Friday, July 03, 2009

Image Processing part 2

(code going online later)

Did the code cleanup the other day... was mostly happy with the results unlike last time.

Then I started playing with DCT's just for the heck of it... and I figured out you could sharpen the image by boosting the middle/end coefficients. I still don't have the color enhancing effects added back into this version yet - once I do I'll probably start going through recent pictures and posting stuff.

I don't have a 'fast' DCT algorithm, but I do have access to an E5200 box that can sustain 1.4 GFlops. So after tweaking it takes about 15sec to do a 2D DCT+IDCT of a 1400x2100 image. When I get back home I'll have the Q8200 again - I bet that could do 2GFlops. And then there's the intel compiler to try out...

... but the real win would be transposing it to GPU code. The DCT algorithm I have now could be turned into shaders really easily... probably resulting in a 10x+ speedup w/a fast video card.

For now - the next step for image processing is to move from RGB to HSL. Having RGB*Y doesn't work very well for extreme adjustments...

Notes:

- Don't bother using SSE intrinsics - setting up the C++ code to vectorize with gcc 4.3 is far easier, even if the results aren't quite as good.

- DCT itself is quite interesting - the 'slow' frequency change covers phase changes pretty well.

No comments: