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
f3ca1a2f
Commit
f3ca1a2f
authored
Nov 11, 2016
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #848 from sovrasov:ERFilterNM_fix
parents
a5e3b5e8
c1505161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
erfilter.cpp
modules/text/src/erfilter.cpp
+1
-1
No files found.
modules/text/src/erfilter.cpp
View file @
f3ca1a2f
...
...
@@ -811,7 +811,7 @@ ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *pa
vector
<
vector
<
Point
>
>
contours
;
vector
<
Point
>
contour_poly
;
vector
<
Vec4i
>
hierarchy
;
findContours
(
region
,
contours
,
hierarchy
,
RETR_TREE
,
CHAIN_APPROX_NONE
,
Point
(
0
,
0
)
);
findContours
(
region
(
Rect
(
1
,
1
,
region
.
cols
-
2
,
region
.
rows
-
2
)),
contours
,
hierarchy
,
RETR_TREE
,
CHAIN_APPROX_NONE
,
Point
(
1
,
1
)
);
//TODO check epsilon parameter of approxPolyDP (set empirically) : we want more precission
// if the region is very small because otherwise we'll loose all the convexities
approxPolyDP
(
Mat
(
contours
[
0
]),
contour_poly
,
(
float
)
min
(
rect
.
width
,
rect
.
height
)
/
17
,
true
);
...
...
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