Imwrite does not saves image properly (Bug #4043)


Added by Barath Lakshmanan over 10 years ago. Updated almost 10 years ago.


Status:Cancelled Start date:2014-12-03
Priority:Blocker Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected version:2.4.0 - 2.4.8 Operating System:Linux
Difficulty:Medium HW Platform:x86
Pull request:

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

Also available in: Atom PDF