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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -