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
9db93d77
Commit
9db93d77
authored
Aug 11, 2016
by
Vitaly Tuzov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for MSER::detectRegions crash on images with either dimension less than 3
parent
44bda8fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
features2d.hpp
modules/features2d/include/opencv2/features2d.hpp
+1
-1
mser.cpp
modules/features2d/src/mser.cpp
+1
-2
No files found.
modules/features2d/include/opencv2/features2d.hpp
View file @
9db93d77
...
@@ -355,7 +355,7 @@ public:
...
@@ -355,7 +355,7 @@ public:
/** @brief Detect %MSER regions
/** @brief Detect %MSER regions
@param image input image (8UC1, 8UC3 or 8UC4)
@param image input image (8UC1, 8UC3 or 8UC4
, must be greater or equal than 3x3
)
@param msers resulting list of point sets
@param msers resulting list of point sets
@param bboxes resulting bounding boxes
@param bboxes resulting bounding boxes
*/
*/
...
...
modules/features2d/src/mser.cpp
View file @
9db93d77
...
@@ -1020,12 +1020,11 @@ extractMSER_8uC3( const Mat& src,
...
@@ -1020,12 +1020,11 @@ extractMSER_8uC3( const Mat& src,
void
MSER_Impl
::
detectRegions
(
InputArray
_src
,
vector
<
vector
<
Point
>
>&
msers
,
vector
<
Rect
>&
bboxes
)
void
MSER_Impl
::
detectRegions
(
InputArray
_src
,
vector
<
vector
<
Point
>
>&
msers
,
vector
<
Rect
>&
bboxes
)
{
{
Mat
src
=
_src
.
getMat
();
Mat
src
=
_src
.
getMat
();
size_t
npix
=
src
.
total
();
msers
.
clear
();
msers
.
clear
();
bboxes
.
clear
();
bboxes
.
clear
();
if
(
npix
==
0
)
if
(
src
.
rows
<
3
||
src
.
cols
<
3
)
return
;
return
;
Size
size
=
src
.
size
();
Size
size
=
src
.
size
();
...
...
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