Ask Your Question

rik's profile - activity

2014-05-12 18:40:22 -0600 asked a question No viable conversion from 'cv::SimpleBlobDetector *' to 'cv::Ptr<cv::FeatureDetector>'

Hi,

I get the error " No viable conversion from 'cv::SimpleBlobDetector *' to 'cv::Ptr<cv::featuredetector>' " when I build my code in Xcode 5.1 using openCV 2.4.6. It would be great if anyone could help me figure out the cause of this build error.

Below is the code snippet from my app:

//Blobs
cv::SimpleBlobDetector::Params params;
params.minDistBetweenBlobs = 30.0f;
params.filterByInertia = false;
params.filterByConvexity = false;
params.filterByColor = true;
params.filterByCircularity = false;
params.filterByArea = true;
params.minArea = 200.0f;
params.maxArea = 1000.0f;
params.blobColor=225;
std::vector<cv::KeyPoint> myBlobs;
cv::Ptr<cv::FeatureDetector> blob_detector = new cv::SimpleBlobDetector(params);
blob_detector->create("SimpleBlob");
blob_detector->detect(output, myBlobs);
cv::Mat blobbedImg;
cv::drawKeypoints(output, myBlobs, blobbedImg);

Thanks for the help in advance.