OpenCV VLFeat Slic function call
问题 I am trying to use the vl_slic_segment function of the VLFeat library using an input image stored in an OpenCV Mat. My code is compiling and running, but the output superpixel values do not make sense. Here is my code so far : Mat bgrUChar = imread("/pathtowherever/image.jpg"); Mat bgrFloat; bgrUChar.convertTo(bgrFloat, CV_32FC3, 1.0/255); cv::Mat labFloat; cvtColor(bgrFloat, labFloat, CV_BGR2Lab); Mat labels(labFloat.size(), CV_32SC1); vl_slic_segment(labels.ptr<vl_uint32>(),labFloat.ptr