OpenCV-Python: How to get latest frame from the live video stream or skip old ones. -
i've integrated ip camera opencv in python video processing done frame frame live stream. i've configured camera fps 1 second can 1 frame per second in buffer process, algorithm takes 4 seconds process each frame, causing stagnation of unprocessed frame in buffer, keeps growing time & causing exponentially delay. sort out, have created 1 more thread i'm calling cv2.grab() api clean buffer, moves pointer towards latest frame in each call. in main thread, i'm calling retrieve() method gives me last frame grabbed first thread. design, frame stagnation problem fixed , exponential delay removed, still constant delay of 12-13 seconds not removed. suspect when cv2.retrieve() called not getting latest frame, 4th or 5th frame latest frame. there api in opencv or other design pattern problem fixed can latest frame process.
thanks in advance help. i'll appreciate quick response.
Comments
Post a Comment