Forums > Jitter

Shaders for analysis

August 18, 2009 | 4:17 pm


Are there any OpenGl-shaders that output video-analysis data similar to i.e. jit.3m?

In my case I’d like to build an auto-contrast-effect to put at the end of a long chain of shaders with It currently seems like I have to render to a matrix before I can analyse the processed video… Stupid.

Thanks for helping

August 18, 2009 | 4:41 pm

shaders can only work with knowledge of a single pixel. averaging requires knowledge of all the pixels. so i don’t think so.

August 19, 2009 | 8:03 am

Thanks for answering!

Doesn’t for instance cf.edgedetect.jxs or cf.emboss.jxs need knowledge of more then just one pixel?

August 19, 2009 | 4:14 pm

right, these shaders work by sampling the nearest neighbors of a pixel. that is still not enough for a jit.3m type shader.

maybe something could be achieved with multiple passes, but i don’t think it would be very efficient.

i would search around for shaders that to the specific task you’re trying to achieve, rather than general analysis functionality. you might find something that gets the end result differently.

August 22, 2009 | 5:14 pm

It’s possible to take a histogram of an image on the GPU, but it requires more than just writing a shader. You also have to draw geometry to screen in a very specific way in order to make the computation efficient and tractable. Here’s a paper from ATI/AMD describing how to do it:


Viewing 5 posts - 1 through 5 (of 5 total)