Macros | |
#define | CV_FOURCC_DEFAULT CV_FOURCC('I', 'Y', 'U', 'V') |
(Linux only) Use default codec for specified filename More... | |
#define | CV_FOURCC_MACRO(c1, c2, c3, c4) (((c1) & 255) + (((c2) & 255) << 8) + (((c3) & 255) << 16) + (((c4) & 255) << 24)) |
Macro to construct the fourcc code of the codec. Same as CV_FOURCC() More... | |
#define | CV_FOURCC_PROMPT -1 |
(Windows only) Open Codec Selection Dialog More... | |
Typedefs | |
typedef struct CvCapture | CvCapture |
"black box" capture structure More... | |
typedef struct CvVideoWriter | CvVideoWriter |
"black box" video file writer structure More... | |
Functions | |
int | CV_FOURCC (char c1, char c2, char c3, char c4) |
Constructs the fourcc code of the codec function. More... | |
CvCapture * | cvCreateCameraCapture (int index) |
start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*) More... | |
CvCapture * | cvCreateFileCapture (const char *filename) |
start capturing frames from video file More... | |
CvCapture * | cvCreateFileCaptureWithPreference (const char *filename, int apiPreference) |
start capturing frames from video file. More... | |
CvVideoWriter * | cvCreateVideoWriter (const char *filename, int fourcc, double fps, CvSize frame_size, int is_color=1) |
initialize video file writer More... | |
int | cvGetCaptureDomain (CvCapture *capture) |
Return the type of the capturer (eg, CV_CAP_VFW, CV_CAP_UNICAP) More... | |
double | cvGetCaptureProperty (CvCapture *capture, int property_id) |
retrieve capture properties More... | |
int | cvGrabFrame (CvCapture *capture) |
grab a frame, return 1 on success, 0 on fail. More... | |
IplImage * | cvQueryFrame (CvCapture *capture) |
Just a combination of cvGrabFrame and cvRetrieveFrame. More... | |
void | cvReleaseCapture (CvCapture **capture) |
stop capturing/reading and free resources More... | |
void | cvReleaseVideoWriter (CvVideoWriter **writer) |
close video file writer More... | |
IplImage * | cvRetrieveFrame (CvCapture *capture, int streamIdx=0) |
get the frame grabbed with cvGrabFrame(..) More... | |
int | cvSetCaptureProperty (CvCapture *capture, int property_id, double value) |
set capture properties More... | |
int | cvWriteFrame (CvVideoWriter *writer, const IplImage *image) |
write frame to video file More... | |
Obsolete functions/synonyms | |
#define | cvCaptureFromCAM cvCreateCameraCapture |
#define | cvCaptureFromFile cvCreateFileCapture |
#define | cvCaptureFromAVI cvCaptureFromFile |
#define | cvCreateAVIWriter cvCreateVideoWriter |
#define | cvWriteToAVI cvWriteFrame |
#define CV_FOURCC_DEFAULT CV_FOURCC('I', 'Y', 'U', 'V') |
#include <videoio/include/opencv2/videoio/videoio_c.h>
(Linux only) Use default codec for specified filename
#define CV_FOURCC_MACRO | ( | c1, | |
c2, | |||
c3, | |||
c4 | |||
) | (((c1) & 255) + (((c2) & 255) << 8) + (((c3) & 255) << 16) + (((c4) & 255) << 24)) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
Macro to construct the fourcc code of the codec. Same as CV_FOURCC()
Referenced by CV_FOURCC().
#define CV_FOURCC_PROMPT -1 |
#include <videoio/include/opencv2/videoio/videoio_c.h>
(Windows only) Open Codec Selection Dialog
#define cvCaptureFromAVI cvCaptureFromFile |
#include <videoio/include/opencv2/videoio/videoio_c.h>
#define cvCaptureFromCAM cvCreateCameraCapture |
#include <videoio/include/opencv2/videoio/videoio_c.h>
#define cvCaptureFromFile cvCreateFileCapture |
#include <videoio/include/opencv2/videoio/videoio_c.h>
#define cvCreateAVIWriter cvCreateVideoWriter |
#include <videoio/include/opencv2/videoio/videoio_c.h>
#define cvWriteToAVI cvWriteFrame |
#include <videoio/include/opencv2/videoio/videoio_c.h>
#include <videoio/include/opencv2/videoio/videoio_c.h>
"black box" capture structure
In C++ use cv::VideoCapture
typedef struct CvVideoWriter CvVideoWriter |
#include <videoio/include/opencv2/videoio/videoio_c.h>
"black box" video file writer structure
In C++ use cv::VideoWriter
anonymous enum |
#include <videoio/include/opencv2/videoio/videoio_c.h>
anonymous enum |
#include <videoio/include/opencv2/videoio/videoio_c.h>
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
#include <videoio/include/opencv2/videoio/videoio_c.h>
int CV_FOURCC | ( | char | c1, |
char | c2, | ||
char | c3, | ||
char | c4 | ||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
Constructs the fourcc code of the codec function.
Simply call it with 4 chars fourcc code like `CV_FOURCC('I', 'Y', 'U', 'V')`
List of codes can be obtained at Video Codecs by FOURCC page. FFMPEG backend with MP4 container natively uses other values as fourcc code: see ObjectType.
References CV_FOURCC_MACRO.
CvCapture* cvCreateCameraCapture | ( | int | index | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*)
CvCapture* cvCreateFileCapture | ( | const char * | filename | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
start capturing frames from video file
CvCapture* cvCreateFileCaptureWithPreference | ( | const char * | filename, |
int | apiPreference | ||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
start capturing frames from video file.
allows specifying a preferred API to use
CvVideoWriter* cvCreateVideoWriter | ( | const char * | filename, |
int | fourcc, | ||
double | fps, | ||
CvSize | frame_size, | ||
int | is_color = 1 |
||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
initialize video file writer
int cvGetCaptureDomain | ( | CvCapture * | capture | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
Return the type of the capturer (eg, CV_CAP_VFW, CV_CAP_UNICAP)
It is unknown if created with CV_CAP_ANY
double cvGetCaptureProperty | ( | CvCapture * | capture, |
int | property_id | ||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
retrieve capture properties
int cvGrabFrame | ( | CvCapture * | capture | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
grab a frame, return 1 on success, 0 on fail.
this function is thought to be fast
#include <videoio/include/opencv2/videoio/videoio_c.h>
Just a combination of cvGrabFrame and cvRetrieveFrame.
void cvReleaseCapture | ( | CvCapture ** | capture | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
stop capturing/reading and free resources
void cvReleaseVideoWriter | ( | CvVideoWriter ** | writer | ) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
close video file writer
#include <videoio/include/opencv2/videoio/videoio_c.h>
get the frame grabbed with cvGrabFrame(..)
This function may apply some frame processing like frame decompression, flipping etc.
int cvSetCaptureProperty | ( | CvCapture * | capture, |
int | property_id, | ||
double | value | ||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
set capture properties
int cvWriteFrame | ( | CvVideoWriter * | writer, |
const IplImage * | image | ||
) |
#include <videoio/include/opencv2/videoio/videoio_c.h>
write frame to video file