开发者

Convert IplImage type IPL_LABEL to IplImage type IPL_DEPTH_8U

开发者 https://www.devze.com 2023-02-18 19:47 出处:网络
I\'m using OpenCV 2.2 and cvBlob in a c++ program and I\'m wondering how I can convert a \"label\" image TYPE IPL_LABEL (unsigned Int) to IPL_DEPTH_8U.

I'm using OpenCV 2.2 and cvBlob in a c++ program and I'm wondering how I can convert a "label" image TYPE IPL_LABEL (unsigned Int) to IPL_DEPTH_8U. I want to multiply my labeled mask with a "Logical" image (IPL_DEPTH_8U with max intenstiy value=1) by using cvMul.

cvMul(labelImg,dest,dest,1);

This line always fails because of the type mismatch. Unfortunately I don't know how to correctly 开发者_高级运维cast the labelImg to IPL_DEPTH_8U?

Thanks, Andreas


cvtcolor() also does type conversions of grayscale types

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号