Loads an image from a file as an IplImage.
Parameters: |
|
---|
The function cvLoadImage loads an image from the specified file and returns the pointer to the loaded image. Currently the following file formats are supported:
Note that in the current implementation the alpha channel, if any, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB.
Loads an image from a file as a CvMat.
Parameters: |
|
---|
The function cvLoadImageM loads an image from the specified file and returns the pointer to the loaded image. urrently the following file formats are supported:
Note that in the current implementation the alpha channel, if any, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB.
Saves an image to a specified file.
Parameters: |
|
---|
The function cvSaveImage saves the image to the specified file. The image format is chosen based on the filename extension, see LoadImage . Only 8-bit single-channel or 3-channel (with ‘BGR’ channel order) images can be saved using this function. If the format, depth or channel order is different, use cvCvtScale and cvCvtColor to convert it before saving, or use universal cvSave to save the image to XML or YAML format.
Video capturing structure.
The structure CvCapture does not have a public interface and is used only as a parameter for video capturing functions.
Initializes capturing a video from a camera.
Parameters: | index (int) – Index of the camera to be used. If there is only one camera or it does not matter what camera is used -1 may be passed. |
---|
The function cvCaptureFromCAM allocates and initializes the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
To release the structure, use ReleaseCapture .
Initializes capturing a video from a file.
Parameters: | filename (str) – Name of the video file. |
---|
The function cvCaptureFromFile allocates and initializes the CvCapture structure for reading the video stream from the specified file. Which codecs and file formats are supported depends on the back end library. On Windows HighGui uses Video for Windows (VfW), on Linux ffmpeg is used and on Mac OS X the back end is QuickTime. See VideoCodecs for some discussion on what to expect and how to prepare your video files.
After the allocated structure is not used any more it should be released by the ReleaseCapture function.
Gets video capturing properties.
Parameters: |
|
---|
The function cvGetCaptureProperty retrieves the specified property of the camera or video file.
Grabs the frame from a camera or file.
Parameters: | capture (CvCapture) – video capturing structure. |
---|
The function cvGrabFrame grabs the frame from a camera or file. The grabbed frame is stored internally. The purpose of this function is to grab the frame quickly so that syncronization can occur if it has to read from several cameras simultaneously. The grabbed frames are not exposed because they may be stored in a compressed format (as defined by the camera/driver). To retrieve the grabbed frame, RetrieveFrame should be used.
Grabs and returns a frame from a camera or file.
Parameters: | capture (CvCapture) – video capturing structure. |
---|
The function cvQueryFrame grabs a frame from a camera or video file, decompresses it and returns it. This function is just a combination of GrabFrame and RetrieveFrame , but in one call. The returned image should not be released or modified by the user. In the event of an error, the return value may be NULL.
Gets the image grabbed with cvGrabFrame.
Parameters: | capture (CvCapture) – video capturing structure. |
---|
The function cvRetrieveFrame returns the pointer to the image grabbed with the GrabFrame function. The returned image should not be released or modified by the user. In the event of an error, the return value may be NULL.
Sets video capturing properties.
Parameters: |
|
---|
The function cvSetCaptureProperty sets the specified property of video capturing. Currently the function supports only video files: CV_CAP_PROP_POS_MSEC, CV_CAP_PROP_POS_FRAMES, CV_CAP_PROP_POS_AVI_RATIO .
NB This function currently does nothing when using the latest CVS download on linux with FFMPEG (the function contents are hidden if 0 is used and returned).
Creates the video file writer.
Parameters: |
|
---|
The function cvCreateVideoWriter creates the video writer structure.
Which codecs and file formats are supported depends on the back end library. On Windows HighGui uses Video for Windows (VfW), on Linux ffmpeg is used and on Mac OS X the back end is QuickTime. See VideoCodecs for some discussion on what to expect.