How to apply foreground sampling
Mostrar comentarios más antiguos
I need to detect vehicles(multiple) blocking the zebra lane (pedestrian crossing lane) to show the count of vehicles blocking. By blocking it means lying motionless for a period of time. The usual background subtraction, setting the ROI will be used.
An excerpt from a research:
"A sample of M frames must be collected and a foreground mask for each frame must be created. Since the masks are in binary form, the logic operator AND, denoted as ^, will create a sampled mask

where Mt(x,y) is the mask, and S only contains the objects that have been detected in all of the sampled masks. Those pixels that are still white in the mask correspond to the stationary object in the scene."
Another mention
"The foreground mask is applied on every frame and at frame 0 and at frame N, the mask is saved as a sample. When the frame number is N, a comparison is done by taking the masks at frame 0 and frame N and perform a logical AND operation. This operation creates a new binary matrix with pixels in white only if the corresponding pixels in both of the sample frames are white. This operation will detect if an object has been present in both of the frames when the sample was taken, indication that an object has been left abandoned."
-------------------------------------------------------------------------------------------------------------------------
So the idea is put this whole process in a method/function then call it whenever a vehicle enters the region of interest. But the problem is the process(foreground sampling) makes use of several image frames and I know the approach in processing videos is looping through the image frames from the video. Hence, the code inside loop is applied "per image frame". There seems to be a conflict here.
So guys can you enlighten me on how to implement this concept? Thanks for your patience guys :)
Respuestas (0)
Categorías
Más información sobre AI-Assisted and Automated Labeling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!