Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
3e2515d7
Commit
3e2515d7
authored
Jun 09, 2015
by
René
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in distanceATS_L1_8u and typos.
The inner loop of the backward scan got the wrong initial "a".
parent
424c2bdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
distransform.cpp
modules/imgproc/src/distransform.cpp
+3
-3
No files found.
modules/imgproc/src/distransform.cpp
View file @
3e2515d7
...
...
@@ -438,7 +438,7 @@ static void getDistanceTransformMask( int maskType, float *metrics )
metrics
[
2
]
=
2.1969
f
;
break
;
default:
CV_Error
(
CV_StsBadArg
,
"Uknown metric type"
);
CV_Error
(
CV_StsBadArg
,
"U
n
known metric type"
);
}
}
...
...
@@ -662,7 +662,7 @@ distanceATS_L1_8u( const Mat& src, Mat& dst )
// do right edge
a
=
lut
[
dbase
[
width
-
1
+
dststep
]];
dbase
[
width
-
1
]
=
(
uchar
)(
MIN
(
a
,
dbase
[
width
-
1
]));
a
=
dbase
[
width
-
1
]
=
(
uchar
)(
MIN
(
a
,
dbase
[
width
-
1
]));
for
(
x
=
width
-
2
;
x
>=
0
;
x
--
)
{
...
...
@@ -730,7 +730,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
float
_mask
[
5
]
=
{
0
};
if
(
maskSize
!=
CV_DIST_MASK_3
&&
maskSize
!=
CV_DIST_MASK_5
&&
maskSize
!=
CV_DIST_MASK_PRECISE
)
CV_Error
(
CV_StsBadSize
,
"Mask size should be 3 or 5 or 0 (pre
siz
e)"
);
CV_Error
(
CV_StsBadSize
,
"Mask size should be 3 or 5 or 0 (pre
cis
e)"
);
if
(
distType
==
CV_DIST_C
||
distType
==
CV_DIST_L1
)
maskSize
=
!
need_labels
?
CV_DIST_MASK_3
:
CV_DIST_MASK_5
;
...
...
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