Difference between image processing in a loop

조회 수: 3 (최근 30일)
Adrian Lim
Adrian Lim 2018년 7월 13일
댓글: Adrian Lim 2018년 7월 14일
I'm currently doing object counting on a traffic light model. After I can count the vehicle, I'm trying to put the codes into a loop to get same results. The variables gotten in the loop is similar to the one that without the loop but I couldn't get the same results.
The area that it is counting is the road beside the vehicle while doing it in the loop.
bgd=snapshot(cam)
hfig = figure;
while isvalid(hfig)
img = snapshot(cam);
('segmentation and counting code')
end
pause(1)
end
Are there any solutions to this?

답변 (1개)

Image Analyst
Image Analyst 2018년 7월 13일
There is nothing wrong with the loop itself. The problem is with this:
('segmentation and counting code')
That code is not robust. Fix that.
  댓글 수: 8
Adrian Lim
Adrian Lim 2018년 7월 14일
I guess it can't be helped. Doing it as a live streaming part is kind of headache one. Thank you for your time!
Adrian Lim
Adrian Lim 2018년 7월 14일
There's images with and without the car at the third comment which are matlab.mat. Those are my inputs.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by