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 created 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.


  • Determine the size of the final mosaic prior to stitching (easy to compute with the size of your input images and the homography).
  • Write a blank mosaic to file (not in any specific format but a sequence of bytes just as in memory)
  • 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:

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

  • 您可以在并行计算工具箱中使用分布式数组

    链接地址: http://www.djcxy.com/p/4964.html

    上一篇: 我的Winforms编码方法是否过时?

    下一篇: 如何在matlab中处理大图像而不会耗尽内存?