Prev: Custom Objects / Save then Load / Very Slow
Next: cross validation with layer recurrent neural network
From: Dalle Ali on 16 Jul 2010 05:22 hey guys, does anybody know how to convert the histogram, that being manipulated, to an image? well i try to make my point clearer with my code: %read an image whose histogram's will be manipulated f = imread('.....\abc.tif'); f12 = uint16(f/16); %convert the image to 12-bit [pixelcount12 gray12] = imhist(f12, round(double(intmax(('uint16')))/16)); figure, imhist(f); %plot the original histogram figure, plot(gray12, pixelcount12), xlim([0,4096]); %plot the 12-bit histogram %begin to manipulate the grayvalues from histogram i=1; while i<=123; gray201(i)=gray12(i); i=i+1; gray201'; end; i=124; while i<=189; gray202(i)=((gray12(i)-1936.814069)/2.308799)*148.163473+163.332234; i=i+1; gray202'; end; i=190; while i<=256; gray203(i)=((gray12(i)-2954.085311)/0.17003294)*148.163473+163.332234; i=i+1; gray203'; end; %plot every part from the grayvalues that being manipulated figure, plot(gray201, pixelcount201, 'r'); figure, plot(gray202, pixelcount202, 'b'); figure, plot(gray203, pixelcount203, 'g'); and then... i don't know how the image looks like with the new histogram... so in short, i divide the grayvalues from the original histogram to 3 parts, i manipulated them with some kind of equation, and i really want to know how the new image from the new histogram looks like.. any help will be much appreciated ;) cheers and hood day! Dalle |