Ask Your Question
1

Maximum possible dimensions for a IplImage object

asked 2013-03-13 03:52:35 -0500

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!

edit retag flag offensive close merge delete

Comments

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 ;] )

berak gravatar imageberak ( 2013-03-13 07:27:18 -0500 )edit

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-03-13 07:38:11 -0500 )edit

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?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-03-13 07:56:11 -0500 )edit

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 ;(

berak gravatar imageberak ( 2013-03-13 08:06:34 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-14 03:51:10 -0500

Solved my problem. Probably I was doing something wrong by starting out in the old Opencv1.x API and then combining it with the newer C++ Opencv 2.x API. The conversion between IplImages and MAT objects got screwed up.

Changing my complete code to the C++ interface worked, no longer problems with pointers, unclosed references, ... all done for me by the api now.

Topic closed :)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-13 03:52:35 -0500

Seen: 2,085 times

Last updated: Mar 14 '13