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
8f9c4d23
Unverified
Commit
8f9c4d23
authored
Jan 30, 2018
by
Alexander Alekhin
Committed by
GitHub
Jan 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10695 from mworchel:blobdetector_mask
Add mask support to SimpleBlobDetector
parents
ec163076
8b90db3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
blobdetector.cpp
modules/features2d/src/blobdetector.cpp
+6
-2
No files found.
modules/features2d/src/blobdetector.cpp
View file @
8f9c4d23
...
...
@@ -272,9 +272,8 @@ void SimpleBlobDetector::findBlobs(const cv::Mat &image, const cv::Mat &binaryIm
#endif
}
void
SimpleBlobDetector
::
detectImpl
(
const
cv
::
Mat
&
image
,
std
::
vector
<
cv
::
KeyPoint
>&
keypoints
,
const
cv
::
Mat
&
)
const
void
SimpleBlobDetector
::
detectImpl
(
const
cv
::
Mat
&
image
,
std
::
vector
<
cv
::
KeyPoint
>&
keypoints
,
const
cv
::
Mat
&
mask
)
const
{
//TODO: support mask
keypoints
.
clear
();
Mat
grayscaleImage
;
if
(
image
.
channels
()
==
3
)
...
...
@@ -355,6 +354,11 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector<cv::KeyPoi
keypoints
.
push_back
(
kpt
);
}
if
(
!
mask
.
empty
())
{
KeyPointsFilter
::
runByPixelsMask
(
keypoints
,
mask
);
}
#ifdef DEBUG_BLOB_DETECTOR
namedWindow
(
"keypoints"
,
CV_WINDOW_NORMAL
);
Mat
outImg
=
image
.
clone
();
...
...
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