Acquisition Toolbox. How can I acquired photo at specific frequency 1 Hz at camera time exposure 1 ms
显示 更早的评论
Hi. I'm actually facing a problem with acquired image with the Image Acquisition Toolbox. I need to acquired image at a specific frequency of 10 Hz and 12 Hz on a moving object. In order to have a clear image the camera time exposure need to be at 1 ms. I've try a bunch of things (TriggerFcn, FrameAcquiredFcn, while loop) to realize that as soon you start(vid) the acquisition the process start acquired image as fast as posiible and I do not know how to specify the acquisition frequency. Anybody have faced this problem? Any solutin in mind?
Thanks for the help.
Denis
1 个评论
Dilip Kunderu
2019-1-16
What is the model of the camera module being used ? Which videoinput adapter are you using ?
回答(2 个)
Denis Perrone
2019-1-16
0 个投票
1 个评论
Walter Roberson
2019-1-16
What shows up for the frame rates if you follow the initial part of the example at https://www.mathworks.com/help/imaq/examples/determining-the-rate-of-acquisition.html ?
Denis Perrone
2019-1-16
7 个评论
Walter Roberson
2019-1-16
I was hoping to see the output of
% Determine the device specific frame rates (frames per second) available.
frameRates = set(src, 'FrameRate')
Note: you can click on "Comment on this Answer" instead of creating a new Answer.
Denis Perrone
2019-1-17
Walter Roberson
2019-1-17
'AcquisitionFrameRate' is still not 'FrameRate' . It looks like 'FrameRate' is intended to be a list of frame rates that the device is willing to run at. It is common for cameras to have several supported frame rates, generally being willing to run faster for smaller frames.
I have sometimes seen 10 fps listed for some cameras, but I do not recall ever having seen 12 fps listed for anything.
Hmmm, looking at the product page for that specific camera, it looks like only 30 fps is supported.
I see that the device supports software trigger and hardware trigger. In theory you could run a timer object with appropriate period that triggered one frame at a time. I would worry about whether the timing jitter would be small enough for your purposes.
What you might possibly need to do is add a small hardware timing circuit that activated hardware triggers. An inexpensive arduino or raspberry pi could probably be used for that purpose.
Denis Perrone
2019-1-18
Walter Roberson
2019-1-18
Ah. This does have the risk of leaving frames in the buffer, as peekdata() is always to fetch the latest buffer (and so can end up copying frames if you are peeking faster than frames are captured.)
After you run that loop (and maybe every once in a while) you should check FramesAvailable and if it is non-zero then getdata() of all of them to clear out the buffer. (At the moment I do not see a direct way to simply clear out the buffer... I thought I had found one before, but it has been a while since I looked and I could be misremembering.)
Denis Perrone
2019-1-21
Walter Roberson
2019-1-21
flushdata() looks like a good way to remove old frames.
类别
在 帮助中心 和 File Exchange 中查找有关 DCAM Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!