<p>It almost certainly depends on implementation. I have used CPU only keyers that had no problems keying full hd in real time. </p>

<p>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.</p>

CC BY-SA 3.0
2016-06-07T14:35:14.047Z
2016-06-07T14:35:14.047Z
joojaa
<p>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.</p>

<p>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?</p>

<p>I would like the input of someone with experience before I attempt this.</p>

<opengl><gpu>
Chromakey Conversion
001
# Chromakey Conversion

(Asked by: username_0 on 2016-06-07)

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.

**Tags:** opengl, gpu


---

## 1 answers

### Answer by username_1 on 2016-06-07. Score: 1 | Accepted answer

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.


---

