Kinect with Kuwahara FilteringPosted: May 5, 2012
Sometimes I see those commercials on TV where the people look like they kind of cartoonish, but the video is still real life. I suspect they probably use some form of spacial filtering while maintaining the various boundaries. One such filter is the so called “Kuwahara” filter. It’s one of those things that takes a neighborhood of pixels, and does a sort of averaging of them, and out pops a noise reduction in the image.
The video here shows a Kuwahara filter running as a GLSL pixel shader. I can’t take credit for the code, it actually comes almost verbatim out of the book GPU Pro. In this case, the video source is the Kinect of course.
This filter easily maintained a respectable 30 frames per second.
What’s more interesting to me is the fact that it’s so totally obvious that the GPU can be utilized for this sort of thing, that I can’t imagine why I’d want to rely on the CPU alone for such tasks. Considering the fact that even the low-end Raspberry Pi contains OpenGL capabilities, that means that this type of powerful processing is available, even on what I would consider to be a throwaway computicle.
I guess there’s no excuse for coming up with fairly lame software that does not take advantage of the serious compute power that can be had almost from a box of cereal.