SLIC error
Enviorement: Win 8.1 Professional Visual Studio 2013 Professional 2013 Version 12.0.406929.00 Update 5 OpenCV: Opencv CUDA Contrib vc12 Debug Build 3.1.0
Error in: module: ximgproc -> Superpixels Ptr<superpixelslic> cv::ximgproc::createSuperpixelSLIC ( InputArray image, int algorithm = SLICO, int region_size = 10, float ruler = 10.0f )
Description: I get this error every time, no matter what the input image type may be (png, jpg,..). Using imread with CV_LOAD_IMAGE_COLOR or CV_LOAD_IMAGE_GRAYSCALE, doesn't make a difference. I tried giving the function invalid parameters to see where does the error occur like setting the algorithm parameter to 300, and the assertion fails, as it should. Checked the Q&A here and looked for any error ticket on the github page to no prevail.
The suprising thing is, that the other 2 types of Superpixel segmentation algorithms, SEED and LSC, work just fine.
How could I resolve this error?
Actually with that error we have only a single clue on what is going on. First guess, you are accessing a matrix/vector index that does not exist. How to avoid this?
.empty()
property which should be false.Could you try this first?