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 Types of Code Generation Support in Image Processing Toolbox.
Thread-Based Environment Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.
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.