如何将8位垫转换为32位垫以在kmeans函数中使用.我试图使用ConvertScale,但编译器说这是一个未知的功能.我正在使用OpenCV 2.3.1并希望避免使用旧版本的API调用.
提前致谢!
Boa*_*oaz 10
您可以使用 convertTo
cv::Mat mat = do your thing using CV_8S (or CV_8U)
cv::Mat dst = do your other thing
mat.convertTo(dst, CV_32S);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13776 次 |
| 最近记录: |