You are here : matlabImage Processingmat2gray

mat2gray() - Image Processing

I = mat2gray(A, [amin amax]) converts
the matrix A to the intensity image I.
The returned matrix I contains values in the range
0.0 (black) to 1.0 (full intensity or white). amin and amax are
the values in A that correspond to 0.0 and 1.0
in I.  Values less than amin become
0.0, and values greater than amax become 1.0.I = mat2gray(A) sets the
values of amin and amax to the
minimum and maximum values in A.gpuarrayI = mat2gray(gpuarrayA,___) performs
the operation on a GPU. This syntax requires the Parallel Computing Toolbox™.


Syntax

I = mat2gray(A, [amin amax])I = mat2gray(A)gpuarrayI = mat2gray(gpuarrayA,___)


Example

Convert the matrix into an image.


Output / Return Value


Limitations


Alternatives / See Also


Reference