Merge pull request #3190 from StevenPuttemans:fix_simpleblobdetector

This commit is contained in:
Vadim Pisarevsky 2014-09-23 07:18:00 +00:00
commit df28bb5ccd

View File

@ -282,6 +282,9 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector<cv::KeyPoi
else
grayscaleImage = image;
if (grayscaleImage.type() != CV_8UC1){
CV_Error(CV_StsUnsupportedFormat, "Blob detector only supports 8-bit images!");
}
vector < vector<Center> > centers;
for (double thresh = params.minThreshold; thresh < params.maxThreshold; thresh += params.thresholdStep)
{