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?