I have some problems with OpenCVs cvCanny(...) and the Image data types it can handle. Well, maybe you guys/gals know a solution.
I have a 32 bit float image and I want to perform cvCanny on it. The problem is cvCanny can only handle "IPL_DEPTH_8S" or U (signed / unsigned short), or at least that's what I suspect. The OpenCV manual does not indicate how much it can handle and this line in cv/cvcanny.cpp didn't raise my hopes:
...
if( CV_MAT_TYPE( src->type ) != CV_8UC1 ||
CV_MAT_TYPE( dst->type ) != CV_8UC1 )
CV_ERROR( CV_StsUnsupportedFormat, "" );
...
The images I have are greyscale / single channel float32 bit and the values in the image are between 0.0 and 16.0. Casting my float32 to unsigned short wouldn't help much since the values would loose their precision and I would miss edges with OpenCVs canny.
Do you guys/gals happen to know a solution for my problem? (besides using ITK :) )