The CvMat type 16 corresponds to “CV_AA”. Is there an easy conversion between this and the type CV_32F?
Something in the same vein as cvCvtColor(cimg,gimg,CV_BGR2GRAY);?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CV_AAis used for telling drawing functions (i.e.,line,circle, fonts, etc) to perform anti-aliased drawing; I don’t believe it is a properMatdata-type. As you can see in core_c.h, it is defined in the drawing functions section.Could you show the code where you are receiving this data-type from?
EDIT : I think I see what’s going on 🙂
Given that
CV_8Uis this:And
CV_MAKETYPEis:where
cnis the number of channels, andCV_CN_SHIFTis 3. I’m betting the type 16 you are seeing is actually(0 + ((3 - 1) << 3)) -> 16or AKACV_8UC3.So, you have an 8bpp RGB image not a CV_AA image 🙂
You need to convert each channel from
CV_8UtoCV_32F.EDIT : Take a look at using cvSplit and cvMerge (I haven’t used the C interface in a while, but it should be something like the following):