High speed camera compatible with Matlab

19 views (last 30 days)
said kiram
said kiram on 10 Dec 2017
Commented: Walter Roberson on 11 Apr 2018
Hello I want you to help choose a camera that I can connect with the Matlab and is characterized by fast and high accuracy and that is for use in the project   The sorting of objects exists in a fast moving motion

Sign in to comment.

Answers (2)

ABHILASH SINGH on 3 Apr 2018
Walter Roberson
Walter Roberson on 11 Apr 2018
You missed the "fast" part of the question.
See for example https://www.speedguide.net/faq/what-is-the-actual-real-life-speed-of-wireless-374 which says that for 802.11g that typical transfer rates are only about 20 Mbps.
On my smartphone, the default image size is 9.6 megapixels, and each of those pixels is 3 bytes (RGB). If that were uncompressed that would give you 9.6E6*3*8/1024/1024 = 219.7 megabits, which would be about 1 frame every 10 seconds. With compression of course there is the potential for considerably more frames per second. Typical PNG lossless compression ratio is about 2.7:1, which would get you down to about 1 frame every 4 seconds.
Since "fast" was required, suppose we say that 20 fps is the requirement (because 10 fps is decidedly not fast -- typical video rates are 24 to 30 fps but for the sake of argument suppose we are willing to tolerate a bit low of a meaning of "fast".
Okay, so to go from 1 frame every 4 seconds to 20 frames per second, we would need to be transferring 1/80th of the data. But that's into lossy compression now. So we go back to the original data rate. 20 fps in 20 Mbps requires an average of 1 megabits per frame, which would about 220:1 lossy compression ratio.
"I decided to check compression ratios for JPEG values in range [55..100], because lower values are not looking acceptable for the most of the users (too strong artifacts)."
and for QI=55, Andrew found an average compression of 43.27:1 . So to get 220:1 would require 5 times more compression than the value reported as unacceptable.
What might it look like? Well it would be compression to 1/2 of 1% so it would be worse quality than the following example from wikimedia:
I find it difficult to believe that anyone would accept this as being both "fast and high accuracy"

Sign in to comment.

Walter Roberson
Walter Roberson on 10 Dec 2017
If you are using Simulink then see https://www.mathworks.com/matlabcentral/answers/5433-image-acquisition-in-simulink-framerate-problem#answer_34598 for a 30 fps method; without it you probably cannot get nearly the same rate in Simulink.
For MATLAB use, sometimes 15 fps can be reached, but not always https://www.mathworks.com/matlabcentral/answers/196731-using-a-webcam-with-matlab
Much higher framerates can be reached using Mex files and very small frames (such as 32 x 32 pixels); see https://www.mathworks.com/matlabcentral/answers/63046-image-acquisition-camera-high-speed-fast-capture

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!