J = im2uint16(I)
converts the grayscale, RGB, or binary image I to
uint16, rescaling or offsetting the data as
necessary.
If the input image is of class uint16, then the output
image is identical. If the input image is of class logical,
then im2uint16 changes true-valued elements to 65535.
J = im2uint16(I,'indexed')
converts the indexed image I to uint16,
offsetting the data if necessary.
Image with class uint16, returned as a numeric array of
the same size as the input image I.
Data Types: uint16
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
im2uint16 supports the generation of C
code (requires MATLAB®
Coder™). Note that if you choose the generic MATLAB Host Computer
target platform, im2uint16 generates code that uses a precompiled,
platform-specific shared library. Use of a shared library preserves performance optimizations
but limits the target platforms for which code can be generated. For more information, see Code Generation Using a Shared Library.
GPU Arrays Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.