Ask Your Question

joshuajnoble's profile - activity

2016-05-13 23:56:49 -0600 asked a question Can't convert cv::Mat to CV_32F in ocv 3.1

Trying to convert an image to CV_32F like so:

cv::Mat ofApp::getDescriptors(const cv::Mat& img)
{
    cv::Mat dst;
    img.convertTo(dst, CV_32F);

Gives me the following error:

OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in create, file ../../code/opencv/opencv-3.1.0/modules/core/src/matrix.cpp, line 2559
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: ../../code/opencv/opencv-3.1.0/modules/core/src/matrix.cpp:2559: error: (-213) Unknown/unsupported array type in function create

Can someone shed some light on how to convert an image to CV_32F? The image itself is a valid cv::Mat with the following characteristics:

flags   int 1124024336
dims    int 2
rows    int 499
cols    int 381

I can draw the image without problem but can't convert it to CV_32F

2015-03-04 10:39:34 -0600 received badge  Scholar (source)
2015-03-04 10:39:21 -0600 received badge  Supporter (source)
2013-01-21 22:00:35 -0600 asked a question Training CvGBTrees/CvRTrees with Features?

I'm trying to understand how to use keypoints or other non-HOG-based features for object recognition and I'd really like to try out CvGBTrees or another Random Trees based approach for this.

I have seen a few approaches that have used either hand selected points (i.e. in the points_classifier example included with OpenCV) and also that have used random sampling directly within the image to create a single vector which is then used with a CvRTrees.

Can anyone either confirm that features based detection is plausible or that verify that it isn't at all. Reshaping the descriptors returned from SIFT/SURF to use as training sets for CvRTrees doesn't seem possible, but I'm wondering if there's something that I'm not understanding.

Thanks for any advice or pointers to good resources to understand what feature detection techniques will work well with either CvRTrees or CvGBTrees.