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
c42beb4c
Commit
c42beb4c
authored
May 03, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1144 from olivierpascal:olivierpascal-structured-edge-detection
parents
da29f712
ab48ffdf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
structured_edge_detection.cpp
modules/ximgproc/src/structured_edge_detection.cpp
+6
-3
No files found.
modules/ximgproc/src/structured_edge_detection.cpp
View file @
c42beb4c
...
...
@@ -235,7 +235,6 @@ static void gradientHist(const cv::Mat &src, cv::Mat &magnitude, cv::Mat &histog
magnitude
/=
imsmooth
(
magnitude
,
gnrmRad
)
+
0.01
*
cv
::
Mat
::
ones
(
magnitude
.
size
(),
magnitude
.
type
()
);
int
pHistSize
=
histogram
.
cols
*
histogram
.
channels
()
-
1
;
for
(
int
i
=
0
;
i
<
phase
.
rows
;
++
i
)
{
const
float
*
pPhase
=
phase
.
ptr
<
float
>
(
i
);
...
...
@@ -245,8 +244,12 @@ static void gradientHist(const cv::Mat &src, cv::Mat &magnitude, cv::Mat &histog
for
(
int
j
=
0
;
j
<
phase
.
cols
;
++
j
)
{
int
index
=
cvRound
((
j
/
pSize
+
pPhase
[
j
])
*
nBins
);
index
=
std
::
max
(
0
,
std
::
min
(
index
,
pHistSize
));
int
angle
=
cvRound
(
pPhase
[
j
]
*
nBins
);
if
(
angle
>=
nBins
)
{
angle
=
0
;
}
const
int
index
=
(
j
/
pSize
)
*
nBins
+
angle
;
pHist
[
index
]
+=
pMagn
[
j
]
/
CV_SQR
(
pSize
);
}
}
...
...
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