Assuming I have a gray scale image Im
with $0:255$ levels of gray, I want to generate a vector map that will preform a histogram equalization on the image. I have read the wiki entry on the subject as well as the matlab function section and yet to understand. (Note that I need to mathematically generate the vector and extracting it from [J,T] = histeq(I);
does not answer my problem)
I am assuming I am wrong but it is my understanding that I should use the following code:
mapVec=imhist(Im);
EqVecMap=mapVec;
for i = 1:size(mapVec)
EqVecMap(i)=0;
for j = 1:i
EqVecMap(i)=EqVecMap(i)+mapVec(i);
end
end
mapVec=EqVecMap;
What is the correct process for generating this vector?