Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
7360642d
Commit
7360642d
authored
Dec 24, 2016
by
LaurentBerger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve paillou filter
parent
86342522
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
paillou_filter.hpp
modules/ximgproc/include/opencv2/ximgproc/paillou_filter.hpp
+2
-2
paillou_demo.cpp
modules/ximgproc/samples/paillou_demo.cpp
+10
-8
paillou_filter.cpp
modules/ximgproc/src/paillou_filter.cpp
+0
-0
No files found.
modules/ximgproc/include/opencv2/ximgproc/paillou_filter.hpp
View file @
7360642d
...
...
@@ -51,8 +51,8 @@ namespace ximgproc {
*
* For more details about this implementation, please see @cite paillou1997detecting
*
* @param op Source
8-bit or 16bit image, 1-channel or 3-channel
image.
* @param _dst result CV_32F image with same num
e
ber of channel than op.
* @param op Source
CV_8U(S) or CV_16U(S), 1-channel or 3-channels
image.
* @param _dst result CV_32F image with same number of channel than op.
* @param omega double see paper
* @param alpha double see paper
*
...
...
modules/ximgproc/samples/paillou_demo.cpp
View file @
7360642d
...
...
@@ -47,8 +47,8 @@ using namespace cv::ximgproc;
using
namespace
std
;
int
aa
=
100
,
ww
=
10
;
Mat
dx
,
dy
;
UMat
img
;
Ptr
<
Mat
>
img
;
const
char
*
window_name
=
"Gradient Modulus"
;
static
void
DisplayImage
(
Mat
x
,
string
s
)
...
...
@@ -77,8 +77,8 @@ static void PaillouFilter(int, void*)
Mat
dst
;
double
a
=
aa
/
100.0
,
w
=
ww
/
100.0
;
Mat
rx
,
ry
;
GradientPaillouX
(
img
,
rx
,
a
,
w
);
GradientPaillouY
(
img
,
ry
,
a
,
w
);
GradientPaillouX
(
*
img
.
get
()
,
rx
,
a
,
w
);
GradientPaillouY
(
*
img
.
get
()
,
ry
,
a
,
w
);
DisplayImage
(
rx
,
"Gx"
);
DisplayImage
(
ry
,
"Gy"
);
add
(
rx
.
mul
(
rx
),
ry
.
mul
(
ry
),
dst
);
...
...
@@ -89,13 +89,15 @@ static void PaillouFilter(int, void*)
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
==
2
)
imread
(
argv
[
1
]).
copyTo
(
img
);
if
(
img
.
empty
())
Mat
*
m
=
new
Mat
;
if
(
argc
==
2
)
*
m
=
imread
(
argv
[
1
]);
if
(
m
->
empty
())
{
cout
<<
"File not found or empty image
\n
"
;
}
imshow
(
"Original"
,
img
);
img
=
Ptr
<
Mat
>
(
m
);
imshow
(
"Original"
,
*
img
.
get
());
namedWindow
(
window_name
,
WINDOW_AUTOSIZE
);
/// Create a Trackbar for user to enter threshold
...
...
modules/ximgproc/src/paillou_filter.cpp
View file @
7360642d
This diff is collapsed.
Click to expand it.
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