How can i use mask created by background substraction algorithm to see the foreground image as in the video.

asked 2018-02-19 03:13:46 -0500

I have used the back ground substraction algorithm to create a mas k of moving object now i need to crop the actual image showing only moving object and save it in pc. How can it be done.

winName= "Movement Indicator"

fgbg = cv2.createBackgroundSubtractorMOG2() while(True): ret, frame= height , width =frame.shape[:2]
videoMasked =fgbg.apply(frame)

if cv2.waitKey(1)==13:

cam.release() cv2.destroyAllWindows()

edit retag flag offensive close merge delete


LBerger gravatar imageLBerger ( 2018-02-19 03:27:42 -0500 )edit