【发布时间】:2013-09-24 18:09:12
【问题描述】:
需要帮助我尝试使用 OpenCV 加载和转换的图像:
这是我的代码:
templ = imread("Template.bmp",-1);
cout<<"templ before convert: "<<type2str(templ.type())<<endl;
templ.convertTo(templ,CV_8UC4);
cout<<"templ after convert: "<<type2str(templ.type())<<endl;
这总是给我 CV_8UC3!图像不是为转换为 4 个通道或类似的东西而制作的吗?还是我需要一个比例因子(读一下这样的东西)?
感谢您的帮助, 最好的问候!
【问题讨论】: