summaryrefslogtreecommitdiff
path: root/libavfilter/vf_libopencv.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-26 11:27:09 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-26 11:27:09 +0000
commit17fc94933b050c7b0917ee5a347b14d7b6f87580 (patch)
treefee63df759e9bce7af7707d36748f4ce227b19cc /libavfilter/vf_libopencv.c
parent91cbb6ba53147a058e5cc91f5e466f18529abd9d (diff)
Add erode libopencv filter.
Originally committed as revision 26097 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_libopencv.c')
-rw-r--r--libavfilter/vf_libopencv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 497d4cab85..8401b4dcb7 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -291,6 +291,13 @@ static void dilate_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIm
cvDilate(inimg, outimg, dilate->kernel, dilate->nb_iterations);
}
+static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg)
+{
+ OCVContext *ocv = ctx->priv;
+ DilateContext *dilate = ocv->priv;
+ cvErode(inimg, outimg, dilate->kernel, dilate->nb_iterations);
+}
+
typedef struct {
const char *name;
size_t priv_size;
@@ -301,6 +308,7 @@ typedef struct {
static OCVFilterEntry ocv_filter_entries[] = {
{ "dilate", sizeof(DilateContext), dilate_init, dilate_uninit, dilate_end_frame_filter },
+ { "erode", sizeof(DilateContext), dilate_init, dilate_uninit, erode_end_frame_filter },
{ "smooth", sizeof(SmoothContext), smooth_init, NULL, smooth_end_frame_filter },
};