1 Assume an image contains very bright pixels Design a mappi

1. Assume an image contains very bright pixels. Design a mapping function to enhance the contrast of this image.

Solution

Below fucntion will use histogram for adjusting contrast of image

===============================================================================

function h = histogram(imgname) //Get Histogram of image

img = imread(imgname); //Read image

figure; imshow(img);

img = double(img);

h = zeros(256,1);

for i=1:M,

for j=1:N,

f = img(i,j);

  h(f+1) = h(f+1) + 1;

end

end

1. Assume an image contains very bright pixels. Design a mapping function to enhance the contrast of this image.SolutionBelow fucntion will use histogram for ad

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site