Convert image to 8-bit unsigned integers
converts the grayscale, RGB, or binary image J
= im2uint8(I
)I
to
uint8
, rescaling or offsetting the data as
necessary.
If the input image is of class uint8
, then the output image
is identical. If the input image is of class logical
, then
im2uint8
changes true-valued elements to 255.
You optionally can perform the conversion