big image ( rows > 10000 ) saves with zero size

asked 2014-11-06 14:00:04 -0500

fedor gravatar image

updated 2014-11-06 14:01:07 -0500

Whant to train GMM on big data. Need train Mat around 450000000 x 3 , but when I'm saving Mat with size 10000 x 3 it have size 0Kb. With 1000 x 3 all ok - 2Kb.

Mat img = Mat::ones( 10000, 3, CV_8UC1 );
imwrite( "out.jpg", img );
edit retag flag offensive close merge delete

Comments

1

might be a buggy jpeg lib. try to save e.g. as png ?

berak gravatar imageberak ( 2014-11-07 01:53:28 -0500 )edit

This is a limitation of the libraries used to save images. You can try tiff supporting large images

D-Alex gravatar imageD-Alex ( 2014-11-07 03:20:01 -0500 )edit

Thanks guys, png with size 10^8 x 3 saves normal, and it's limit of my computer ( old hdd ), not lib :) In tiff saved 10^9 x 3, it's what I need

fedor gravatar imagefedor ( 2014-11-07 07:49:51 -0500 )edit