How to Reduce the time of capturing image
조회 수: 1 (최근 30일)
이전 댓글 표시
Here is my code for capturing image
vid=videoinput('winvideo',1);
vid.Framespertrigger=1;
start(vid)
im=getdata(vid);
imagename=('C:\Program Files\MATLAB\R2013a\bin\test.tif');
imwrite(im,imagename);
stop(vid);
This code is taking around 2 seconds to capture one image,but the camera frame rate specifies it is 15 frames/sec,Is it possible to capture 15 images per second or even close to it? If so what modification I should make in this code, Please help me..Thank you
댓글 수: 0
채택된 답변
Image Analyst
2014년 11월 8일
Use "run and time" to see where the time is being spent. I bet most of it is in calling videoinput() - that takes a long time. imwrite() also takes a long time. To speed up you can use a ramdisk or use solid state drives instead of hard drives.
댓글 수: 0
추가 답변 (1개)
Anchit Dhar
2014년 11월 13일
편집: Anchit Dhar
2014년 11월 13일
Starting/Initializing the camera takes up some time. Starting/Stopping for each frame can slow down your application considerably. In order to capture frames at a higher frame rate, you can start the camera once and then use 'manual triggering' to grab the frames in a loop. The following example describes this method.
As an alternate solution, you can use the WEBCAM interface (introduced in R2014a).
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 GigE Vision Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!