Language/OS choices for a low-latency (<5ms) software
2 views (last 30 days)
Show older comments
Hello,
For purpose of an academic research, I need your inputs on implementing the following software so I can give better recommendations to a friend.
The software will display images in frequencies ( Images are flickering between the image itself and a black screen). When an image is shown a trigger will be sent to an external device, and another trigger will be sent when the image is no longer visible (black screen appears).
The frequency of images is about 50Hz, meaning that for 20ms an image is shown, and for 20ms the black screen is shown.
The synchronization between the code, the visual output of the images and trigger sent to device is very important, it should be as close as possible to real-time. (<5ms delay).
User should be able to interact with the system. After viewing the flickering image for couple of seconds user should click or touch.
(For the moment we are not bringing the latency of the external device in to account)
As this is a research project, choices of the tech would highly impact the results.
So far the options for the language are:
- C
- C#
- Matlab (and external toolboxes or Matlab’s realtime workshop)
- Python (and external libraries)
1 - Considering the performance, development time, availability of external libraries, etc. which of the above languages you choose to implement the system, and why?
(Python and Matlab are preferable because ease of use and faster development, but doubtful about the required low latency)
2 - What would be your pick for the OS for such software? Which allows the software to have a high priority execution thread. An OS with low latency. (Probably a RTOS, Real Time Operating System, is not needed)
Any opinion is much appreciated.
0 Comments
Accepted Answer
Walter Roberson
on 15 Mar 2014
There is a third party MATLAB toolbox available for what appears to be exactly that kind of research. See http://psychtoolbox.org/ptb-2/intro.html
0 Comments
More Answers (1)
MF
on 15 Mar 2014
2 Comments
Walter Roberson
on 16 Mar 2014
One of the configurations listed there is < 5 ms, the others are up to 5.5 ms. Special drivers might not be needed as MATLAB now supports ASIO more directly.
The book Real-Time Rendering: Computer Graphics with Control Engineering tested with various scene complexities. They were able to get 50 fps up to roughly 40,000 vertices in the scene.
(That link might expire; if so google
matlab rendering frames per second
to find it again)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!