FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
vf_libopencv.c File Reference

libopencv wrapper functions More...

#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/file.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  OCVContext
 
struct  SmoothContext
 
struct  DilateContext
 
struct  OCVFilterEntry
 

Functions

static void fill_iplimage_from_picref (IplImage *img, const AVFilterBufferRef *picref, enum AVPixelFormat pixfmt)
 
static void fill_picref_from_iplimage (AVFilterBufferRef *picref, const IplImage *img, enum AVPixelFormat pixfmt)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold int smooth_init (AVFilterContext *ctx, const char *args)
 
static void smooth_end_frame_filter (AVFilterContext *ctx, IplImage *inimg, IplImage *outimg)
 
static int read_shape_from_file (int *cols, int *rows, int **values, const char *filename, void *log_ctx)
 
static int parse_iplconvkernel (IplConvKernel **kernel, char *buf, void *log_ctx)
 
static av_cold int dilate_init (AVFilterContext *ctx, const char *args)
 
static av_cold void dilate_uninit (AVFilterContext *ctx)
 
static void dilate_end_frame_filter (AVFilterContext *ctx, IplImage *inimg, IplImage *outimg)
 
static void erode_end_frame_filter (AVFilterContext *ctx, IplImage *inimg, IplImage *outimg)
 
static av_cold int init (AVFilterContext *ctx, const char *args)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *in)
 

Variables

static OCVFilterEntry ocv_filter_entries []
 
static const AVFilterPad avfilter_vf_ocv_inputs []
 
static const AVFilterPad avfilter_vf_ocv_outputs []
 
AVFilter avfilter_vf_ocv
 

Detailed Description

libopencv wrapper functions

Definition in file vf_libopencv.c.

Function Documentation

static void fill_iplimage_from_picref ( IplImage *  img,
const AVFilterBufferRef picref,
enum AVPixelFormat  pixfmt 
)
static

Definition at line 38 of file vf_libopencv.c.

Referenced by filter_frame().

static void fill_picref_from_iplimage ( AVFilterBufferRef picref,
const IplImage *  img,
enum AVPixelFormat  pixfmt 
)
static

Definition at line 56 of file vf_libopencv.c.

Referenced by filter_frame().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 62 of file vf_libopencv.c.

static av_cold int smooth_init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 86 of file vf_libopencv.c.

static void smooth_end_frame_filter ( AVFilterContext ctx,
IplImage *  inimg,
IplImage *  outimg 
)
static

Definition at line 129 of file vf_libopencv.c.

static int read_shape_from_file ( int *  cols,
int *  rows,
int **  values,
const char *  filename,
void log_ctx 
)
static

Definition at line 136 of file vf_libopencv.c.

Referenced by parse_iplconvkernel().

static int parse_iplconvkernel ( IplConvKernel **  kernel,
char *  buf,
void log_ctx 
)
static

Definition at line 203 of file vf_libopencv.c.

Referenced by dilate_init().

static av_cold int dilate_init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 252 of file vf_libopencv.c.

static av_cold void dilate_uninit ( AVFilterContext ctx)
static

Definition at line 281 of file vf_libopencv.c.

static void dilate_end_frame_filter ( AVFilterContext ctx,
IplImage *  inimg,
IplImage *  outimg 
)
static

Definition at line 289 of file vf_libopencv.c.

static void erode_end_frame_filter ( AVFilterContext ctx,
IplImage *  inimg,
IplImage *  outimg 
)
static

Definition at line 296 of file vf_libopencv.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 317 of file vf_libopencv.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 344 of file vf_libopencv.c.

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef in 
)
static

Definition at line 354 of file vf_libopencv.c.

Variable Documentation

OCVFilterEntry ocv_filter_entries[]
static
Initial value:

Definition at line 311 of file vf_libopencv.c.

const AVFilterPad avfilter_vf_ocv_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.min_perms = AV_PERM_READ
},
{ NULL }
}

Definition at line 379 of file vf_libopencv.c.

const AVFilterPad avfilter_vf_ocv_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 389 of file vf_libopencv.c.

AVFilter avfilter_vf_ocv
Initial value:
= {
.name = "ocv",
.description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."),
.priv_size = sizeof(OCVContext),
.init = init,
}

Definition at line 397 of file vf_libopencv.c.