I have the following lines of code in C API :
IplImage *imdist_scaled = cvCreateImage(cvSize(orig_bw->width/pow((double)2,itr_scale-1), orig_bw->height/pow((double)2,itr_scale-1)), IPL_DEPTH_64F, 1); cvResize(orig_bw, imdist_scaled,CV_INTER_CUBIC);
And I've converted it into C++ API as :
Mat imdist_scaled(Size(orig_bw.cols/cv::pow((double)2, itr_scale-1), orig_bw.rows/pow((double)2, itr_scale-1)), CV_64F, 1); resize(orig_bw, imdist_scaled, imdist_scaled.size(), 0, 0, INTER_CUBIC); // INTER_CUBIC
In first case, when I try to show the image to the screen (imdist_scaled) - it shows me resized image. But in the second case, when I do the same, it shows a blank white image.
Also note that I've verified orig_bw.cols, orig_bw.rows etc. have correct outputs.
Here orig_bw is a sample image I'm taking.
Why would that be?