Maximum possible dimensions for a IplImage object
Hello,
I am working on a image annotation software package that needs to be able to handle large scale images, obtained using aerial imagery. Resolution of the images is 5000*5000 pixels.
The code is still written in the old C api
IplImage* image=cvLoadImage(path.c_str(),1);
Since displaying a full 5000 x 5000 pixel image on a standard laptop screen is not possible, I create subimages, using a region of interest of 500 x 500 pixels.
However, it seems that the last region of the image, being the bottom 500 pixels in height, are not stored in memory.
- I was wondering if I am running to the size limit of an IplImage?
- Have read on the internet the max size is around 4000 x 4000 pixels that it can store. Is this correct?
- Would this problem dissappear if I change to the newer C++ interface and create a cv::Mat object by using imread?
Kind regards!
in return to your efforts on my problem, i tried to simulate your case for cv::Mat.
http://bpaste.net/show/MXwkfd9uypP6SqdQGBl3/
unfortunately, not enough IplImage fu here .. ( i was happy to forget anything about it ;] )
I already did some other testing, it seems not to be the problem of holding the 5000 x 5000 pixels in IplImage or in cv::Mat. Checked each phase where the segments are used, still correct ones displaying. At some point, reacting to my mouse_action_click, the command cvCloneImage is called. At that last row, third segment it always fails. Doesnt for the previous frames, just for this until the end. Even tried to rescale the image, still, last row, third frame gives problem at cloning. Going deeper through the problem now, hoping to find the solution.
Actually, I am just redoing your test on my machine, already at 22 stages, where yours ended at 20. Guess that is depending on the operating system?
rusty 32bit xp, opencv2.4.9, 2gig ram only ( that's why it stopped, probably ) the limits seem to be the 32bit ints used for row/rol ;)
thinking again, a blind port to cv::Mat might not help you, since like 80% opencv functionality still relies on IplImage internally ( they just convert your Mat )
so, down the rabbithole you go ;(