Aşağıdaki kod bir istisna oluşturuyor. Niye ya?OpenCV'de Matrix sıfırlarla nasıl doldurulur?
OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file %OPENCV_DIR%\build\include\opencv2\core\mat.hpp, line 537
GÜNCELLEME
bu kodu izleme olsam, o yapıcı çizgi yapıcı
inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
Neden
çağırır bkz:#include <opencv2/core/core.hpp>
#include <iostream>
using namespace cv;
using namespace std;
void main() {
try {
Mat m1 = Mat(1,1, CV_64F, 0);
m1.at<double>(0,0) = 0;
}
catch(cv::Exception &e) {
cerr << e.what() << endl;
}
}
Hata izler mi? Bu prototip, 4 argüman sağladığım sırada 5 parametreye sahip.
Burada bir örnek var 'cv :: Mat depthMAP = cv :: Mat :: zeros (depthMap.rows, depthMac.cols, depthMeType());' –