I am developing a software which will detect if car stops and so for testing I froze the frame for a while but emgu returns null while the frame is same I think I need some help.
using (Emgu.CV.Image orignalFrame = _capture.QueryFrame().ToImage())
that thing returns null
This is expected behavior, from EmguCV docs ,
If no more frames are available, null will be returned
It just moves forward and get the next frame, and won't return the same frame again.
For testing purposes you can make a video file using frames read from the webcam, then starting from a certain frame, repeat that frame for several hundred times, this give the same effect as if the car was stopped for several seconds. Then save the video file and test your code with this video file, only this time you pass the video file name to the constructor of the VideoCapture.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.