Is there any better way to do looping image snapshot with some algorithm in the loop?

4 Ansichten (letzte 30 Tage)
I am now doing image processing project that requires looping image snapshot from my webcam. I am using 'getsnapshot' function to capture images and 'imshow' to view the looping image snapshots. The problem is 'imshow' UI did not view the looping images (video-like) but show one image only and my matlab was not responding. My program code was partially shown below:
>> for t=1:10000
image=getsnapshot(video);
imgHsv=rgb2hsv(image);
imgV=imgHsv(:,:,3);
imgVlim=imgV(240:480,315:325);
maxV=max(max(imgVlim));
[r,c]=find(imgVlim==maxV);
ctrRD=[(max(c)+min(c))/2 (max(r)+min(r))/2];
vpd=ctrRD(2)-ctrCam(2);
z=-24.8718+6750/vpd;
imshow(image);
end
What is the problem? is there any better way to do looping image snapshot with algorithm like this?

Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by