Article From:

opencv for video shooting”

Main categories:VideoCaptureAnd VideoWriter


  (1) The program is used to code the camera. If read the existing video, modify the statement (1) and change the parameter 0 to the path name, for example

VideoCapture capture("Demo.avi");

  (2) There are often two kinds of situations that can’t be played after the video is finished.
    a)When VideoWriter is set with statement (2), the second parameter CV_FOURCC is set in the encoding format, and the computer may not have the selected encoding format, which causes the output video to be unreadable.
    Solution: sentence (2) to statement (3), statement (3) will automatically pop up a dialog box as shown in the next figure, which can be selected in the encoding format (these are some coding formats on the computer).

    b)There is no statement (4) or no execution statement (4) for some reasons, which also causes the output video to be unreadable.
  (3) The last parameter in the statement (3) is bool isColor (whether the video frame image is a color image). This parameter corresponds to the image, otherwise it may be wrong.

Link of this Article: Opencv video shooting

Leave a Reply

Your email address will not be published. Required fields are marked *