Read strip data using RGBA interface
readRGBAStrip function trims the area in a strip that falls
outside of the
ImageLength boundary. Therefore, image data from a
strip at the bottom edge of the image can have different dimensions.
Read a strip of data from a TIFF file using the RGBA interface.
Tiff object for the image file.
t = Tiff('peppers_RGB_stripped.tif','r');
Get the number of strips and strip size. The
readRGBAStrip function trims the area in a strip that falls outside of the
ImageLength boundary. Therefore, image data from a strip at the bottom edge of the image can have different dimensions.
ans = 6
ans = 35
Read the strip containing the fourth row of the image. Since each strip contains
35 rows, specifying any row between
35 returns the first strip of data.
[RGB,A] = readRGBAStrip(t,4);
Display the image.
RGB— Image strip data
Image strip data, returned as a
numeric array. Where
n are the
height and width of the strip, respectively.
The value in the
RowsPerStrip tag determines the height
the strip and the
ImageWidth tag determines the width of
readRGBAStrip function can transform the pixel
values based on specifications in these tags:
alpha— Alpha matting
Alpha matting associated with the image strip, returned as a numeric array. The number of rows and columns in the alpha matting data are the same as the strip data.
If the image does not have associated alpha matting, then
alpha is a matrix with all values set to