OpenCV
3.4.14
Open Source Computer Vision
|
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. allows specifying a preferred API to use 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 <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 <opencv2/videoio/videoio_c.h>
Macro to construct the fourcc code of the codec. Same as CV_FOURCC()
#define CV_FOURCC_PROMPT -1 |
#include <opencv2/videoio/videoio_c.h>
(Windows only) Open Codec Selection Dialog
#define cvCaptureFromAVI cvCaptureFromFile |
#include <opencv2/videoio/videoio_c.h>
#define cvCaptureFromCAM cvCreateCameraCapture |
#include <opencv2/videoio/videoio_c.h>
#define cvCaptureFromFile cvCreateFileCapture |
#include <opencv2/videoio/videoio_c.h>
#define cvCreateAVIWriter cvCreateVideoWriter |
#include <opencv2/videoio/videoio_c.h>
#define cvWriteToAVI cvWriteFrame |
#include <opencv2/videoio/videoio_c.h>
typedef struct CvVideoWriter CvVideoWriter |
#include <opencv2/videoio/videoio_c.h>
"black box" video file writer structure
In C++ use cv::VideoWriter
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
Enumerator | |
---|---|
CV_CAP_MODE_BGR | |
CV_CAP_MODE_RGB | |
CV_CAP_MODE_GRAY | |
CV_CAP_MODE_YUYV |
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
Enumerator | |
---|---|
CV_CAP_OPENNI_VGA_30HZ | |
CV_CAP_OPENNI_SXGA_15HZ | |
CV_CAP_OPENNI_SXGA_30HZ | |
CV_CAP_OPENNI_QVGA_30HZ | |
CV_CAP_OPENNI_QVGA_60HZ |
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
Enumerator | |
---|---|
CV_CAP_INTELPERC_DEPTH_MAP | |
CV_CAP_INTELPERC_UVDEPTH_MAP | |
CV_CAP_INTELPERC_IR_MAP | |
CV_CAP_INTELPERC_IMAGE |
anonymous enum |
#include <opencv2/videoio/videoio_c.h>
int CV_FOURCC | ( | char | c1, |
char | c2, | ||
char | c3, | ||
char | c4 | ||
) |
#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.
CvCapture* cvCreateCameraCapture | ( | int | index | ) |
#include <opencv2/videoio/videoio_c.h>
start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*)
CvCapture* cvCreateFileCapture | ( | const char * | filename | ) |
#include <opencv2/videoio/videoio_c.h>
start capturing frames from video file
CvCapture* cvCreateFileCaptureWithPreference | ( | const char * | filename, |
int | apiPreference | ||
) |
#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 <opencv2/videoio/videoio_c.h>
initialize video file writer
int cvGetCaptureDomain | ( | CvCapture * | capture | ) |
#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 <opencv2/videoio/videoio_c.h>
retrieve capture properties
int cvGrabFrame | ( | CvCapture * | capture | ) |
#include <opencv2/videoio/videoio_c.h>
grab a frame, return 1 on success, 0 on fail.
this function is thought to be fast
#include <opencv2/videoio/videoio_c.h>
Just a combination of cvGrabFrame and cvRetrieveFrame.
void cvReleaseCapture | ( | CvCapture ** | capture | ) |
#include <opencv2/videoio/videoio_c.h>
stop capturing/reading and free resources
void cvReleaseVideoWriter | ( | CvVideoWriter ** | writer | ) |
#include <opencv2/videoio/videoio_c.h>
close video file writer
#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 <opencv2/videoio/videoio_c.h>
set capture properties
int cvWriteFrame | ( | CvVideoWriter * | writer, |
const IplImage * | image | ||
) |
#include <opencv2/videoio/videoio_c.h>
write frame to video file