Monday, July 6, 2009

あのぉさあ。。晩御飯は、おいしいですか? (Activity # 4)


I actually missed this activity that day. I spent the day in a hospital bed with a liter of 0.9% sodium chloride solution connected to my hand through plastic transparent tubing. Not to mention, I got a shot of gamma-immuno to strengthen my immune system and get my platelets up. It was the flu. However, the symptoms were more dengue-like than H1N1.. better luck next time.

Anyway, the activity was on Histogram Manipulation. Just like the others, I had to make use of the useful piece of code that can be found on a little learning. Getting it to work on my pc in CSRC was a bit tricky, good thing I had Neil and Rommel with me. For manipulating the histogram, Gilbert shared this little bit of info with me:
good = [];
for i = 1:size(poor,1)
for j = 1:size(poor,2)
good(i,j) = cdf(poor(i,j));
end
end

good: new image
poor: old image
With everything all set, all I needed was a picture to work on. The one i got from this site seems pretty nifty:

Right next to the image is its histogram. Using the chunk of code Gilbert suggested to apply the transformation, I gave it a shot for a linear function:
The linear function did not turn out as good as expected. In any case, the eye has non-linear response and therefore a non-linear transformation (square function) should be better:

And that concludes the histogram activity. I think I'll get a nine this time for missing the meeting, still high enough considering I finished the activity in a meeting instead of two meetings. xD

No comments:

Post a Comment