Skip to content

Commit e3a6d74

Browse files
committed
Merge pull request opencv#10536 from Sahloul:bug_fix/BLOB
2 parents dd3c1d3 + 2d2499f commit e3a6d74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/features2d/src/blobdetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>&
311311
//TODO: support mask
312312
keypoints.clear();
313313
Mat grayscaleImage;
314-
if (image.channels() == 3)
314+
if (image.channels() == 3 || image.channels() == 4)
315315
cvtColor(image, grayscaleImage, COLOR_BGR2GRAY);
316316
else
317317
grayscaleImage = image.getMat();

0 commit comments

Comments
 (0)