Black/White Version of Grayscale Image

IMAGE_DIFFUSE is a MATLAB function which uses diffusion to smooth the colors in a picture.


function g2 = image_diffuse ( g, c, k )


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


IMAGE_DIFFUSE is available in a MATLAB version.

Related Data and Programs:

  • IMAGE_BOUNDARY, a MATLAB library which reports the pixels which form the boundary between the black and white regions of a simple image.
  • IMAGE_CONTRAST, a MATLAB program which applies image processing techniques to increase the contrast in an image.

    IMAGE_DECIMATE, a MATLAB library which compresses an image by dropping the even rows and columns of data.

    IMAGE_DENOISE, a MATLAB library which applies image processing techniques to remove noise from an image.

    IMAGE_DOUBLE, a MATLAB library which doubles the height and width of an image by repeating each row and column.

    IMAGE_EDGE, a MATLAB program which demonstrates a simple technique for edge detection in an image.

    IMAGE_MATCH_GENETIC, a MATLAB program which tries to match a 256x256 JPEG image by blending 32 colored rectangles, using ideas from genetic algorithms, based on an example by Nick Berry.

    IMAGE_NOISE, a MATLAB library which adds noise to an image.

    IMAGE_QUANTIZATION, a MATLAB library 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 function which creates a grayscale version of an RGB image.

    IMAGE_THRESHOLD, a MATLAB library 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:

    Examples and Tests:

    FOOL is an image which was originally a true black and white image; that is, as a gray scale image, every pixel was set to 0 or 255.

    You can go up one level to the MATLAB source codes.

    Last revised on 22 July 2011.