hi rachi, i have a question , i implement your programm but it''s not working ..when i execute the programm . the result was just a black picture .. plz can you help me .. i really need to this programm to work .. thanks
Thx. I have a question. How can I apply histogram equalization on a selected range. I want to apply HE on 3 ranges on the images. 0 to 10 then 11 to 180 then 181 to 255?
Hi rashi, thank you for your explanation, i would like to ask please, how can i assign a function (that change the intensity) to the pixels with intensity values between 0 and 127 for example and another equation to the pixels from 128 to 255 ??
also, if someone needs the code, its here. (Hope you dont mind miss rashi) clc, clear all a=imread('Name of you image.extension'); r=size(a,1); c=size(a,2); ah=uint8(zeros(r,c)); n=r*c; f=zeros(256,1); pdf=zeros(256,1); cdf=zeros(256,1); cum=zeros(256,1); out=zeros(256,1); for i=1:r for j=1:c value = a(i,j); f(value+1)=f(value+1)+1; pdf(value+1)=f(value+1)/n; end end sum=0; L=255 for i=1:size(pdf) sum = sum + f(i); cum(i) = sum; cdf(i) = cum(i)/n; out(i) = round(cdf(i)*L) end for i=1:r for j=1:c ah(i,j)=out(a(i,j)+1); end end figure() subplot(2,1,1) imshow(ah) subplot(2,1,2) imshow(histeq(a))
will this be the answer to the question Write a program which will apply histogram equalization to a 256 level gray scale image. You can only use imread function in matlab. Program should accept an image of any size.