Ask Your Question

Revision history [back]

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.

click to hide/show revision 2
retagged

updated 2014-05-13 00:11:03 -0600

berak gravatar image

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.

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.