libavfilter/vf_libopencv.c File Reference

libopencv wrapper functions More...

#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include "libavutil/avstring.h"
#include "libavutil/file.h"
#include "avfilter.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 PixelFormat pixfmt)
static void fill_picref_from_iplimage (AVFilterBufferRef *picref, const IplImage *img, enum PixelFormat pixfmt)
static int query_formats (AVFilterContext *ctx)
static void null_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
static av_cold int smooth_init (AVFilterContext *ctx, const char *args, void *opaque)
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, void *opaque)
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, void *opaque)
static av_cold void uninit (AVFilterContext *ctx)
static void end_frame (AVFilterLink *inlink)

Variables

static OCVFilterEntry ocv_filter_entries []
AVFilter avfilter_vf_ocv


Detailed Description

libopencv wrapper functions

Definition in file vf_libopencv.c.


Function Documentation

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

Definition at line 287 of file vf_libopencv.c.

static av_cold int dilate_init ( AVFilterContext ctx,
const char *  args,
void *  opaque 
) [static]

Definition at line 250 of file vf_libopencv.c.

static av_cold void dilate_uninit ( AVFilterContext ctx  )  [static]

Definition at line 279 of file vf_libopencv.c.

static void end_frame ( AVFilterLink inlink  )  [static]

Definition at line 352 of file vf_libopencv.c.

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

Definition at line 294 of file vf_libopencv.c.

static void fill_iplimage_from_picref ( IplImage *  img,
const AVFilterBufferRef picref,
enum PixelFormat  pixfmt 
) [static]

Definition at line 34 of file vf_libopencv.c.

Referenced by end_frame().

static void fill_picref_from_iplimage ( AVFilterBufferRef picref,
const IplImage *  img,
enum PixelFormat  pixfmt 
) [static]

Definition at line 52 of file vf_libopencv.c.

Referenced by end_frame().

static av_cold int init ( AVFilterContext ctx,
const char *  args,
void *  opaque 
) [static]

Definition at line 315 of file vf_libopencv.c.

static void null_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
) [static]

Definition at line 68 of file vf_libopencv.c.

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

Definition at line 201 of file vf_libopencv.c.

Referenced by dilate_init().

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 58 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 134 of file vf_libopencv.c.

Referenced by parse_iplconvkernel().

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

Definition at line 127 of file vf_libopencv.c.

static av_cold int smooth_init ( AVFilterContext ctx,
const char *  args,
void *  opaque 
) [static]

Definition at line 84 of file vf_libopencv.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 342 of file vf_libopencv.c.


Variable Documentation

Initial value:

 {
    .name        = "ocv",
    .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."),

    .priv_size = sizeof(OCVContext),

    .query_formats = query_formats,
    .init = init,
    .uninit = uninit,

    .inputs    = (const AVFilterPad[]) {{ .name       = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO,
                                    .draw_slice       = null_draw_slice,
                                    .end_frame        = end_frame,
                                    .min_perms        = AV_PERM_READ },
                                  { .name = NULL}},

    .outputs   = (const AVFilterPad[]) {{ .name       = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO, },
                                  { .name = NULL}},
}

Definition at line 372 of file vf_libopencv.c.

Initial value:

Definition at line 309 of file vf_libopencv.c.


Generated on Fri Oct 26 02:48:01 2012 for FFmpeg by  doxygen 1.5.8