realtime video postprocessing?

hello!

I’m really new to OF, and would appreciate any pointers on how to actually perform simple postprocessing on video clips - for instance, contrast, or RGB manipulation. Don’t need a whole code solution, just a simple idea of the direction i should be investigating in.

thanks in advance for any tips!

Rodrigo

Hi, you have 2 options really: CPU & GPU.

If you look at the videoPlayer sample that comes with oF, you will see an example of postprocessing on the CPU. As the video is playing, every frame you have access to a pixels array which contains all of the pixel information for that frame in the video. You can parse this array and do all the post-processing you like. This is the most straightforward way of post-processing. If you are feeling adventurous, you can also do postprocessing using shaders. If you search the forums you can find an ofShader addon (or maybe it is included with oF? can’t remember). This addon will allow you to load in GLSL shaders to do postprocessing on the GPU. There are quite a few decent GLSL tutorials out there, usually on nehe or lighthouse3d. Doing the post processing on the GPU will give you much better performance (i.e. better fps) but can be tricker to get into. However you may not even need this extra performance so best to start with CPU and see how you get on.