BLOB - Support RGBA

pull/10536/head
Hamdi Sahloul 7 years ago
parent 004a1cd64a
commit 2d2499f610
  1. 2
      modules/features2d/src/blobdetector.cpp

@ -311,7 +311,7 @@ void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>&
//TODO: support mask
keypoints.clear();
Mat grayscaleImage;
if (image.channels() == 3)
if (image.channels() == 3 || image.channels() == 4)
cvtColor(image, grayscaleImage, COLOR_BGR2GRAY);
else
grayscaleImage = image.getMat();

Loading…
Cancel
Save