Tiff class: Tile setting
7 ビュー (過去 30 日間)
古いコメントを表示
I'm confused in setting two parameters TileLength and TileWidth for Tiff object when my data is an 3D array (m x n x p).
In the example in the doc page https://www.mathworks.com/help/matlab/ref/tiff.html?searchHighlight=Tiff&s_tid=srchtitle_Tiff_1
setTag(t,'TileLength',32);
setTag(t,'TileWidth',32);
I just wonder why the 32 come frome ? Is it a 16 ceil-rounding of BitsPerSample*SamplesPerPixel (p) ? Why we need to set both Tile Length and Width?
0 件のコメント
採用された回答
Omega
2023 年 11 月 9 日
Hi Bruno,
I understand that you would like to know more information on "TileLength" and "TileWidth" parameters of a TIFF object.
The "TileLength" and "TileWidth" parameters determine the size of the tiles used to store the image data within the TIFF file. By dividing the image into smaller tiles, it allows for efficient access and manipulation of specific regions of the image. TileLength represents the number of rows in each tile and TileWidth represents the number of columns in each tile.
The example you mentioned sets both "TileLength" and "TileWidth" to 32. This specific value of 32 is used as an illustration and may not be suitable for all scenarios. It is not necessarily related to "BitsPerSample" or "SamplesPerPixel". You can have a look at the example in the following link where "TileLength" and "TileWidth" are completely unrelated to "BitsPerSample" or "SamplesPerPixel". https://www.mathworks.com/help/matlab/ref/tiff.settag.html#br8cfl9-3
The choice of tile size depends on multiple factors, including the characteristics of your data and the requirements of your application. Larger tile sizes can improve compression efficiency and reduce file size, but they may also increase memory requirements during read/write operations. Smaller tile sizes can provide better random access to specific regions of the image but may result in larger file sizes.
Additionally, it's important to note that the use of tiles is optional in the TIFF file format. If you don't have specific requirements, you can also consider using the strip-based organization ("RowsPerStrip" tag) instead.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!