Matlab program files for random fields and images


Loading images and making simple modifications

Note to BGSU users: the version of Matlab available in the Scientific Computing Lab does not have the image processing toolbox installed, and so cannot be used to run the image processing example program below.

Image modeling

Generating realizations of random fields

A gray-scale image is just a special graph of a function of two variables that takes values between 0 and 1. The graph is white where the function equals 1, it is black where the function is 0, and is various shades of gray for intermediate values. It can be manipulated like any other function, and you can add or average two different images, as you would add or average two functions. In practice, the image data is stored in a matrix whose entries are numbers between 0 and 1. For the examples loaded in the file images.m below, the matrices are 200 by 320. Color images are not much different. They simply have 3 functions (or matrices), one showing the red intensity, one for blue, and one for green.