mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
BLOB - Support RGBA
This commit is contained in:
parent
004a1cd64a
commit
2d2499f610
@ -311,7 +311,7 @@ void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>&
|
|||||||
//TODO: support mask
|
//TODO: support mask
|
||||||
keypoints.clear();
|
keypoints.clear();
|
||||||
Mat grayscaleImage;
|
Mat grayscaleImage;
|
||||||
if (image.channels() == 3)
|
if (image.channels() == 3 || image.channels() == 4)
|
||||||
cvtColor(image, grayscaleImage, COLOR_BGR2GRAY);
|
cvtColor(image, grayscaleImage, COLOR_BGR2GRAY);
|
||||||
else
|
else
|
||||||
grayscaleImage = image.getMat();
|
grayscaleImage = image.getMat();
|
||||||
|
Loading…
Reference in New Issue
Block a user