Wednesday, June 29, 2011

Contrast stretch filter

I put the task of accelerating the color enhancement filter and removing flicker aside a bit, and ported Autostretch HSV, a very similar GIMP filter that does histogram stretching directly on the saturation and value channels of a HSV image. I've just pushed the new code to github. Its current problems are the same as with the color enhancement filter: flicker, and speed. On my test video, the effect (and problems) were clearly observable with contrast and saturation reduced by a factor of 0.2 using the videobalance plugin. (Also, this was a nice occasion to finally try the tee element. :-) )

For the flickering introduced by maxima and minima being calculated and used directly for every frame, I tried to keep a moving average of them from 50 frames. That didn't work out very well.

For speed, I'm still looking for options. I currently don't see anything substantially improvable in the code, aside from an efficient YUV to HSV conversion algorithm. If such an algorithm exists, we could skip the YUV-RGB conversions.

Sunday, June 26, 2011

Color enhancement filter

I ported a GIMP filter, Color Enhance, to GStreamer. Basically, it does saturation stretching in HSV space. I've just committed the new code to github.

There are two major problems with the algorithm when used on video. The first is performance. I made some modifications to the algorithm (see details in the commit message and the code), and now the performance is reasonable, but still can't keep up with 640x480 @ 50 FPS. The other problem is flickering, as the degree of stretching varies from frame to frame. Maybe a moving average could help.

If you have any ideas or suggestions, feel free to tell me in the comments.

Wednesday, June 22, 2011

Hello World!

This blog is mostly about progress on my Google Summer of Code 2011 project, "Plugins for editing" for GStreamer, with Zaheer Merali as my mentor. Code is kept in a git repository at git:// . Check back often for updates, and if you have any suggestions, ideas, or general thoughts about the project, feel free to let me know in the comments.