Addee
Addee

Reputation: 671

Basic Image processing queries

Assume that image im of type uint 8. We want to map the minimum gray level to 0 and maximum gray level to 255.

a) what point operation should be applid to the image (write the expression Da and Db are the gray levels for input and out images respectively)

b) what change do you expect from the brightness and contrast of the image after applying the point operation.

Just saw these questions in some exam today.. But I couldn't solve it. Anyone wants to help

Upvotes: 0

Views: 83

Answers (1)

Andrea Perissinotto
Andrea Perissinotto

Reputation: 184

First you should convert the image to double with:

Da=im2double(Da)

This operation will convert the image from range [0 255] to [0 1];

Then you should normalize the image between 0 and 1 with the operation:

Db=(Da-min(Da(:)))/(max(Da(:))-min(Da(:)))

In this way you will have the highest gray value shifted in 1 and the smallest value in 0.

After reconverting back the image to uint8 will bring the image back to the range [0 255]:

Dc=im2uint8(Db);

In this last image the minimum will be 0 and the maximum 255. After normalization the contrast is enhanced.

Upvotes: 1

Related Questions