C++ OpenCV assertion failed error -
i'm trying create code copies pixels 1 image , arranges them differently, error
opencv error: assertion failed 0 && size.height>0> in cv::imshow, file c:\builds\2_4_packslave-win64-vc12-shared\opencv\modules\highgui\src\window.cpp, line 261
here's code
int main(int argc, char** argv) { mat src = imread("srcimg.jpg", 1); mat dst = imread("dstimg.jpg", 1); int srch = src.rows; int srcw = src.cols; int dsth = dst.rows; int dstw = src.cols; double alpha; int r = 50; (int = 0; < srch; i++) { (int j = 0; j < srcw; j++) { alpha = / r; dst.at<uchar>(dstw / 2 * cos(alpha), (dsth / 2 + r) * sin(alpha)) = src.at<uchar>(i, j); } } imshow("source", src); imshow("result", dst); return 0;
what can problem here?
Comments
Post a Comment