I have a program I wrote that allows chromakey (green screen) using a web cam. I wrote it using DirectShow - I created a custom filter to blend the web cam video with a graphic. It works fine but requires huge amounts of CPU. Also, from what I understand, DS is deprecated - or at least on its way out.So, I'm thinking about re-doing it with OpenGL and using OpenCV to grab the web cam video. I don't have a lot of experience with OpenGL, so my question is: If I create a chromakey shader will it be executed on the GPU and therefore be faster? Or is this something for which OpenGL is not useful?I would like the input of someone with experience before I attempt this.
Chromakey Conversion
opengl;gpu
It almost certainly depends on implementation. I have used CPU only keyers that had no problems keying full hd in real time. But back to the question would a shader be faster? Most likely, especially if your chroma key is a classic color transform. Then the GPU would shine as it would get to use it massive multicore architecture to full potential.