Imwrite does not saves image properly (Bug #4043)
Description
Im trying to save image from webcam on a system on chip for every 5 secs.Everything is working fine but the output image is skewed. I have attached the output image. This is the code i used.
int main( int argc, const char** argv )
{
CvCapture* capture = 0;
Mat frame, frameCopy, image;
capture = cvCaptureFromCAM( 0 ); //0=default, -1=any camera, 1..99=your camera
if(!capture) cout << "No camera detected" << endl;
if( capture )
{
cout << "In capture ..." << endl;
//for(;;)
{
IplImage* iplImg = cvQueryFrame( capture );
frame = iplImg;
// if( frame.empty() )
// break;
if( iplImg->origin == IPL_ORIGIN_TL )
frame.copyTo( frameCopy );
else
flip( frame, frameCopy, 0 );
imwrite( "/www/pages/resultok.bmp", frameCopy );
if( waitKey( 10 ) >= 0 )
cvReleaseCapture( &capture );
}
waitKey(0);
return 0;
}
History
Updated by Artur Wieczorek over 10 years ago
I cannot reproduce this issue with OpenCV 2.4.10 and 3.0 (trunk) under Ubuntu 14.04 LTS (x64).
Saved bitmap is not damaged.
Updated by Vadim Pisarevsky almost 10 years ago
I think, the problem (if any) should have been solved.
- Status changed from New to Cancelled