executing cv::resize on the same image fails (Bug #1098)
Description
Executing cv::resize on the same image fails, the resulting image contains nothing (something gray with the correct desired size).
Expected result should be one of the following:
- do it right.
- inform an error (at least in debug builds).
----------------------------------------------------------
Please use this test program:
#include <cv.h>
#include <highgui.h>
#include <iostream>
int main()
{
const char *file_name = "baboon.jpg";
cv::Mat img = cv::imread(file_name);
if(!img.data)
std::cerr<<"can't open file \""<<file_name<<"\""<<std::endl;
else
{
cvNamedWindow( "before", 1 );
cvShowImage( "before", &IplImage(img) );
cv::resize(img, img, cv::Size(), 0.5, 0.5);
cvNamedWindow( "after", 1 );
cvShowImage( "after", &IplImage(img) );
while(cvWaitKey(50)==-1);
cvDestroyAllWindows();
}
return 0;
}
----------------------------------------------------------
Regards,
Andres Hurtis
www.visiondepatentes.com.ar
Associated revisions
Merge pull request #1098 from SeninAndrew:ximea_camera_bw_fix
History
Updated by Vadim Pisarevsky almost 14 years ago
In SVN trunk cv::resize supports in-place operations (after migration from Mat to InputArray/OutputArray in the API calls)
- Status changed from Open to Done
- (deleted custom field) set to fixed