[FFmpeg-cvslog] r26097 - in trunk: doc/filters.texi libavfilter/avfilter.h libavfilter/vf_libopencv.c
stefano
subversion
Sun Dec 26 12:27:10 CET 2010
Author: stefano
Date: Sun Dec 26 12:27:09 2010
New Revision: 26097
Log:
Add erode libopencv filter.
Modified:
trunk/doc/filters.texi
trunk/libavfilter/avfilter.h
trunk/libavfilter/vf_libopencv.c
Modified: trunk/doc/filters.texi
==============================================================================
--- trunk/doc/filters.texi Sun Dec 26 12:27:05 2010 (r26096)
+++ trunk/doc/filters.texi Sun Dec 26 12:27:09 2010 (r26097)
@@ -532,6 +532,7 @@ informations:
Follows the list of supported libopencv filters.
+ at anchor{dilate}
@subsection dilate
Dilate an image by using a specific structuring element.
@@ -578,6 +579,15 @@ ocv=dilate=5x5+2x2/cross:2
ocv=0x0+2x2/custom=diamond.shape:2
@end example
+ at subsection erode
+
+Erode an image by using a specific structuring element.
+This filter corresponds to the libopencv function @code{cvErode}.
+
+The filter accepts the parameters: @var{struct_el}:@var{nb_iterations},
+with the same meaning and use of those of the dilate filter
+(@pxref{dilate}).
+
@subsection smooth
Smooth the input video.
Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h Sun Dec 26 12:27:05 2010 (r26096)
+++ trunk/libavfilter/avfilter.h Sun Dec 26 12:27:09 2010 (r26097)
@@ -28,7 +28,7 @@
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 70
-#define LIBAVFILTER_VERSION_MICRO 1
+#define LIBAVFILTER_VERSION_MICRO 2
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
Modified: trunk/libavfilter/vf_libopencv.c
==============================================================================
--- trunk/libavfilter/vf_libopencv.c Sun Dec 26 12:27:05 2010 (r26096)
+++ trunk/libavfilter/vf_libopencv.c Sun Dec 26 12:27:09 2010 (r26097)
@@ -291,6 +291,13 @@ static void dilate_end_frame_filter(AVFi
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 },
};
More information about the ffmpeg-cvslog
mailing list