J = imadjust(I) maps the intensity values in grayscale image I to new values in J such that 1% of data is saturated at low and high intensities of I. This increases the contrast of the output image J. This syntax is equivalent to imadjust(I,stretchlim(I)). J = imadjust(I,[low_in, high_in],[low_out, high_out]) maps the values in I to new values in J such that values between low_in and high_in map to values between low_out and high_out. Note If high_out is less than low_out, imadjust reverses the output image, as in a photographic negative. J = imadjust(I,[low_in, high_in],[low_out, high_out],gamma) maps the values in I to new values in J, where gamma specifies the shape of the curve describing the relationship between the values in I and J. newmap = imadjust(map,[low_in, high_in],[low_out, high_out],gamma) transforms the m-by-3 array colormap associated with an indexed image. low_in, high_in, low_out, and high_out must be 1-by-3 vectors. gamma can be a 1-by-3 vector that specifies a unique gamma value for each channel or a scalar that specifies the value used for all three channels. The rescaled colormap newmap is the same size as map. RGB2 = imadjust(RGB1,___) performs the adjustment on each plane (red, green, and blue) of the RGB image RGB1. If low_in, high_in, low_out, high_out, and gamma are scalars, imadjust applies the same mapping to the red, green, and blue components of the image. To specify unique mappings for each color component of the image, specify low_in, high_in, low_out, high_out, and gamma as 1-by-3 vectors. gpuarrayB = imadjust(gpuarrayA,___) performs the contrast adjustment on a GPU. The input gpuArray gpuarrayA is an intensity image, RGB image, or a colormap. The output gpuArray gpuarrayB is the same as the input image. This syntax requires the Parallel Computing Toolbox™. Adjust the contrast of the image so that 1% of the data is saturated at low and high intensities, and display it. Read an RGB image into a gpuArray and then pass the gpuArray to imadjust, specifying contrast limits for the input image. Contrast limits for input image, specified as a two-element numeric vector with values between 0 and 1. Values below low_in and above high_in are clipped, that is, values below low_in map to low_out, and those above high_in map to high_out. If you specify an empty matrix (), imadjust uses the default limits [0 1]. Contrast limits for the output image, specified as a two-element numeric vector with values between 0 and 1. Values below low_in and above high_in are clipped, that is, values below low_in map to low_out, and those above high_in map to high_out. If you specify an empty matrix (), imadjust uses the default limits [0 1]. Shape of curve describing relationship of input and output values, specified as a numeric value. If gamma is less than 1, imadjust weights the mapping toward higher (brighter) output values. If gamma is greater than 1, imadjust weights the mapping toward lower (darker) output values. If you omit the argument, gamma defaults to 1 (linear mapping). Image to be adjusted on a GPU, specified as an gpuArray containing a grayscale image, an RGB image, or a colormap. Adjusted image or colormap on a GPU, returned as a gpuArray. The gpuArray contains a grayscale or an RGB image, or a colormap. This function supports the generation of C code using MATLAB® Coder™. Note that if you choose the generic MATLAB Host Computer target platform, the function 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 Understanding Code Generation with Image Processing Toolbox. Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands. Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: . Source.