readRGBAImage
Read image using RGBA interface
Description
Examples
Get Image Data and Associated Alpha Matting
Get all image data and its associated alpha matting from a TIFF file.
Create a Tiff
object for an image file.
t = Tiff('example.tif','r');
Read the image data and the associated alpha matting.
[RGB,A] = readRGBAImage(t);
Display the image.
imshow(RGB)
Close the Tiff
object.
close(t);
Input Arguments
t
— Tiff object
Tiff
object
Tiff
object representing a TIFF file. Use the Tiff
function to create the object.
Output Arguments
RGB
— Image data
numeric array
Image data, returned as a
m
-by-n
-by-3
numeric array. Where m
and n
are the
height and width of the image, respectively.
The readRGBAImage
function can transform the pixel
values based on specifications in these tags:
PhotometricInterpretation |
BitsPerSample |
SamplesPerPixel |
Orientation |
ExtraSamples |
ColorMap |
alpha
— Alpha matting
numeric array
Alpha matting associated with the image, returned as an
m
-by-n
numeric array. Where
m
and n
are the height and width
of the image, respectively.
If the image does not have associated alpha matting, then
alpha
is a matrix with all values set to
255
(transparent).
Algorithms
References
This function corresponds to the TIFFReadRGBAImage
function in
the LibTIFF C API. To use this function, you must be familiar with the TIFF
specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.
Version History
Introduced in R2009b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)