Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
17fc9493
Commit
17fc9493
authored
Dec 26, 2010
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add erode libopencv filter.
Originally committed as revision 26097 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
91cbb6ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
filters.texi
doc/filters.texi
+10
-0
avfilter.h
libavfilter/avfilter.h
+1
-1
vf_libopencv.c
libavfilter/vf_libopencv.c
+8
-0
No files found.
doc/filters.texi
View file @
17fc9493
...
@@ -532,6 +532,7 @@ informations:
...
@@ -532,6 +532,7 @@ informations:
Follows the list of supported libopencv filters.
Follows the list of supported libopencv filters.
@anchor{dilate}
@subsection dilate
@subsection dilate
Dilate an image by using a specific structuring element.
Dilate an image by using a specific structuring element.
...
@@ -578,6 +579,15 @@ ocv=dilate=5x5+2x2/cross:2
...
@@ -578,6 +579,15 @@ ocv=dilate=5x5+2x2/cross:2
ocv=0x0+2x2/custom=diamond.shape:2
ocv=0x0+2x2/custom=diamond.shape:2
@end example
@end example
@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
@subsection smooth
Smooth the input video.
Smooth the input video.
...
...
libavfilter/avfilter.h
View file @
17fc9493
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 70
#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, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_libopencv.c
View file @
17fc9493
...
@@ -291,6 +291,13 @@ static void dilate_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIm
...
@@ -291,6 +291,13 @@ static void dilate_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIm
cvDilate
(
inimg
,
outimg
,
dilate
->
kernel
,
dilate
->
nb_iterations
);
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
{
typedef
struct
{
const
char
*
name
;
const
char
*
name
;
size_t
priv_size
;
size_t
priv_size
;
...
@@ -301,6 +308,7 @@ typedef struct {
...
@@ -301,6 +308,7 @@ typedef struct {
static
OCVFilterEntry
ocv_filter_entries
[]
=
{
static
OCVFilterEntry
ocv_filter_entries
[]
=
{
{
"dilate"
,
sizeof
(
DilateContext
),
dilate_init
,
dilate_uninit
,
dilate_end_frame_filter
},
{
"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
},
{
"smooth"
,
sizeof
(
SmoothContext
),
smooth_init
,
NULL
,
smooth_end_frame_filter
},
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment