Tiff class: Tile setting
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bruno Luong
el 4 de Feb. de 2022
Respondida: Omega
el 9 de Nov. de 2023
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 comentarios
Respuesta aceptada
Omega
el 9 de Nov. de 2023
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!