当前位置:首页 > 地信家园 > 有关ENVI下设置image tile size的意义及大小分析

有关ENVI下设置image tile size的意义及大小分析

在ENVI中,选择File → Preferences→Miscellaneous,可以设置两个参数,cache size和image tile size,前者大家知道可以极大提高ENVI的图像处理效率,但后面参数设置不当,往往会造成ENVI软件报错,下面技术宅结合英文帮助简单分析这个参数的作用。希望对大家有点帮助。

从ENVI的帮助中可以看到下面这句话:

Sets the tile size for ENVI to use for processing. Tiling is an internal ENVI image segmentation technique that allows the system to work on images larger than available RAM. Set this value to about 1/10th the total cache size described in Image Tile Size. You can view images of any size in ENVI; however, this setting determines how much of that image is kept in memory at any given time.

可以看到这段话的主要意思是ENVI采用Image tile size分割技术,可以运算大于内存的数据。这个tile size的大小可以设置为ceche的10分之一。最后面一句话是:这个设置会影响影像在内存中的存放量,因此看下面的详细详细解释:

For ENVI to process images that are much larger than the total amount of RAM available on the system, large images are broken into pieces that are small enough for the system to handle. Each piece is called a tile.

For images stored as:

BSQ, each tile is a spatial subset of an individual band.

BIL, each tile is a single image line of all bands.

BIP, each tile is all of the pixels in an image line for all bands.

ENVI uses the image tile size keyword to segment the processing of large images. It specifies the amount of data processed in each segment. Image tile size only affects the processing of data, not the displaying of images.

When the image is processed, only one tile is read into memory at a time. The Image Tile Size setting in the ENVI configuration file determines the size for the tile, and thus how much of an image is read into RAM and processed at a time. This setting only affects how the data are processed, not how they are displayed. If the entire image is smaller than the Image Tile Size setting, then the entire image is processed in one tile. When a tile is processed, ENVI releases that tile’s memory and reads the next tile for processing. If ENVI tries to read a tile that is larger than the amount of contiguous RAM available on your machine at the time you start a process, it displays an error, “unable to allocate memory to make array.”

Even if you have a very large amount of RAM, it is important to remember that each tile must fit into a contiguous section of memory. Because RAM quickly becomes fragmented, it is risky to have a large tile setting. So, a smaller size is better. Because the Image Tile Size setting has very little effect on performance, it is recommended you keep the default value of 1 MB and never let it exceed about 4 MB.

In one specific case, ENVI uses a tile size that is different than the Image Tile Size setting in the configuration file. When spectral processing is being performed, the tile size is equal to the number of samples times the number of bands, regardless of the tile size setting. So, for spectral processing it is possible for the tile to exceed the tile size setting, although this is rarely the case. In fact, spectral tiles are usually smaller than the configuration file’s tile size setting.

Tiling is generally transparent to you and is used by ENVI to insure that hardware memory limitations do not impose processing limitations when you are processing large images. A tile is a piece of data read from the disk or from memory in one piece.

从上面可以看出,这个image tile size的主要作用是让ENVI能处理无限大的影像,而不是为了提高处理速度,设置cache size的值才是提高处理速度。有关ENVI下设置image tile size的意义及大小分析

如果设置这个tile size越大,表示会长久占用大内存的时间越长,当你下一个处理过程使用的tile size 刚好大于可用内存的时候,会出现:”unable to allocate memory to make array.” 的提示。因此这个tile size 值一般不宜过大,最好不超过4。

最后技术宅建议:cache size设置成你电脑内存的一半或者四分之一,我的是4g内存,设置为1024了。image tile size设置为4 。

友荐云推荐
  • «
  • »
  • 作者:
    除非注明,本文原创:技术宅,欢迎转载!转载请以链接形式注明本文地址,谢谢。
    原文链接:http://www.jishuzh.com/gis/有关envi下设置image-tile-size的意义及大小分析.html

    2 thoughts on “有关ENVI下设置image tile size的意义及大小分析

    1. 即时比分

      拜读了,博主很给力

    2. 旅途者

      好有规律的更新,站长有心了……

    评论已关闭.