image_normalize, a MATLAB code which reads image data from a file, converts it (if necessary) to grayscale, resizes it to H pixels by W pixels.

This simple program is useful, for example, in a facial recognition study, when a set of images of varying sizes and types needs to be standardized to grayscale of a given shape, before a common processing function is applied.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


image_normalize is available in a MATLAB version.

Related Data and Programs:

image_components, a MATLAB code which seeks the connected "nonzero" or "nonblack" components of an image or integer vector, array or 3D block.

image_contrast, a MATLAB code which applies image processing techniques to increase the contrast in an image.

image_denoise, MATLAB codes which apply image processing techniques to remove noise from an image.

image_edge, a MATLAB code which demonstrates a simple procedure for edge detection in images.

image_noise, a MATLAB code which adds noise to an image.


image_quantization, a MATLAB code which demonstrates how the KMEANS algorithm can be used to reduce the number of colors or shades of gray in an image.

image_rgb_to_gray, a MATLAB code which makes a grayscale version of an RGB image.

image_threshold, a MATLAB code which makes a black and white version of a grayscale image by setting all pixels below or above a threshold value to black or white.


MathWorks documentation for the Image Processing Toolbox is available at

Source Code:

Last revised on 15 December 2018.