开发者

How to handle large images in matlab without running out of memory?

I am creating mosaic of two images based on the region matches between them using sift descriptors. The problem is when the 开发者_如何学Ccreated mosaic's size gets too large matlab runs out of memory. Is there some way of stitching the images without actually loading the complete images in memory. If not how do other gigapixel image generation techniques work or the panorama apps.


  1. Determine the size of the final mosaic prior to stitching (easy to compute with the size of your input images and the homography).
  2. Write a blank mosaic to file (not in any specific format but a sequence of bytes just as in memory)
  3. I'm assuming you're inverse mapping the pixels from the original images to the mosaic. So, just write to file when you're trying to store the intensity of the pixel in your mosaic.


There are a few ways you can save memory:

  1. You should use integer data types, such as uint8 for your data.
  2. If you're stitching, you can only keep the regions of interest in memory, such as the potential overlap regions.
  3. If none of the other works, you can spatially downsample the images using imresample, and work on the resulting smaller images.


You can potentially use distributed arrays in the parallel computing toolbox

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜