Mat::不在OpenCV中工作的
Mat::ones not working in OpenCV
int main () {
Mat A = Mat::ones(100, 100, CV_8U)*3;
cout << A.at<int>(0,0) << endl;
return 0;
}
输出是一个非常大的数字::50529027
有人能帮我吗??C++代码
you're casting to the wrong type in A.at<int>() // should be uchar instead of int
so, A.at<int>(0,0) sees 0x03030303, which is, in fact 50529027.
Mat A = Mat::ones(100, 100, CV_8U)*3;
cout << int(A.at<uchar>(0,0)) << endl;
(A.at((周围的强制转换只是显示一个带有cout而不是char的数字(
相关文章:
- CV_OCL_RUN宏如何在OpenCV(版本3.4.5)的goodFeaturesToTrack实现中工作?
- 如果不在窗口 10 中声明名为 openCV 的 openCV namedWindow,QT 图像显示将无法正常工作
- OpenCV Tracker 属性访问在 ARM 上因 SEGFAULT 而失败,但在 X86_64 中工作
- OpenCV:文件存储操作员">>"在一个项目中工作,但不在另一个项目中工作(在同一类上)
- C++ / CannyEdgeDetection.exe 已停止工作 代码块 /OpenCV 错误:断言失败
- OPENCV标准视差图无法正常工作
- OpenCV 3.2 在抓取时提供选择超时,但 fscyber 可以工作
- OpenCV的"calcCovarMatrix"函数中"const Mat*样本"参数的工作原理?
- Opencv - filter2D() 方法实际上是如何工作的?
- 带有OpenCv 2.4的Firewire相机.不工作
- Flann Matcher火车在OpenCV中如何工作
- 解释在opencv中实现的阴影检测代码的工作原理
- OpenCV,dlib - 函数中的图像类型转换失败;在外面工作
- BOOST::线程工作线程同步,C++和OpenCV
- 在不复制数据的情况下将OpenCV Mat发送到MATLAB工作区的方法
- cv::TermCriteria如何在opencv中工作
- convertTo不在opencv中工作
- opencv是如何工作的
- OpenCV 3.0.0 C++:无法使knn->load("file.yml")工作
- 调整图像大小后OpenCV VideWriter无法工作