2017-03-06 01:39:18 -0600 | commented answer | how to save detected face in opencv I am sure it will be a similar idea, with a different syntax. If I get a chance I will post the java version |
2017-03-06 01:29:55 -0600 | answered a question | how to save detected face in opencv Let assume that there is only one face. We can crop the result of the face detection and save it as follows: |
2017-03-05 23:47:31 -0600 | answered a question | can not read a video using opencv! The issue here might well be that Ubuntu cannot open that video format. I have had a similar issue with MacOS, I had to install new decoder so that MacOS could open my *.avi file. Then it worked just fine. Good luck with that! |
2017-03-03 07:47:02 -0600 | commented answer | CvVideoWriter WriteFrame for iOS not working Nice Solution. Here is the snippet for python: import cv2, os cap = cv2.VideoCapture('myvideo.mp4') if cap.isOpened(): width = cap.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH) # float height = cap.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT) # float fname = 'result.m4v' fourcc = cv2.cv.CV_FOURCC(*'XVID') out = cv2.VideoWriter(fname,fourcc, 20.0, (int(width), int(height))) if os.path.exists(fname): os.remove(fname) |