Single-Image-Example-Based-Super-Resolution icon indicating copy to clipboard operation
Single-Image-Example-Based-Super-Resolution copied to clipboard

Hello, I am interested in your code for Single-Image-Example-Based-Super-Resolution. I have a Question.

Open star4s opened this issue 8 years ago • 1 comments

Hello, I am interested in your code for Single-Image-Example-Based-Super-Resolution. I have a Question.

After I do build the code by using the Example, I have no error message. But after I run the program I have some error message on the console,

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 cv::Mat::at, file c:\opencv\build\include\opencv2\core\mat.hpp, line 538

So, I tried debugging in the code. While debugging, in void gs::makeFreqResp(int filterSize, float p, float q, float s, cv::Mat& H, cv::Mat& G, cv::Mat& h, cv::Mat& g) I had some error in /create the low pass magnitude response/ part. in the for loop, in the else if (kTrans[i] == 1.0), after taking d = (1.0 + cos(wScaled[i]))*sqrt(2.0 - cos(wScaled[i])) / 2, H.at(0, i) = d had some thing wrong. I have no idead why H.at(0, i) = d has some thing wrong. Can you help me for the problem? Thank you for your attention

star4s avatar Nov 02 '17 02:11 star4s

  1. when loading the image, can you verify that the image matrix is not empty?
  2. What build configs are you using? I find openCV works when using release configs but not debug configs.

Greg.

Gregjksmith avatar Nov 02 '17 02:11 Gregjksmith