Question / Help What the theory does OBS use on "chroma key filter"?

koala

Active Member
With the chroma filter, OBS replaces the color given in the filter's property with transparency. Actually, it's not selecting by color directly, it's selecting by chroma. That means, it ignores the luma information (brightness), so different shades of green are still considered green and converted to transparent. This supports the use of real green screens in real studios, since due to lightning a green screen is never plain green over the whole screen.

The color key filter is somewhat similar, but as far as I know, it takes luma (brightness of the given color) into account in contrast to the chroma key filter. This supports more narrow matches, in case you have some plain computer-generated surface with some plain color.
 

cv_worker

New Member
With the chroma filter, OBS replaces the color given in the filter's property with transparency. Actually, it's not selecting by color directly, it's selecting by chroma. That means, it ignores the luma information (brightness), so different shades of green are still considered green and converted to transparent. This supports the use of real green screens in real studios, since due to lightning a green screen is never plain green over the whole screen.

The color key filter is somewhat similar, but as far as I know, it takes luma (brightness of the given color) into account in contrast to the chroma key filter. This supports more narrow matches, in case you have some plain computer-generated surface with some plain color.
Thank you for your reply!
But I just want to know the theory the chroma filter based, just like some math formulas. Since I want to re-code the chroma filter function using python, so I need to know the theory of chroma filter that OBS used. And I can not know from the codes from resource because of my unwisdom on coding language "C".
 

koala

Active Member
@cv_worker What you want to know is the algorithm of the chroma key filter. "Theory" is not the correct technical term for this, it's vague and misleading. If you ask computer- and programming-related topics, it's important to use the correct technical language, because only if you use the correct technical language, you can be sure people (and search machines!) understand your technical question correctly. With "theory" I wasn't able to see what you wanted to know.
So you want to learn how to program a chroma key filter in python.
With this knowledge of what you want to learn, you can ask Google. Google for "chroma key algorithm python" and you will find quite some articles about this, including code snippets.
 

cv_worker

New Member
Thank you!
@cv_worker What you want to know is the algorithm of the chroma key filter. "Theory" is not the correct technical term for this, it's vague and misleading. If you ask computer- and programming-related topics, it's important to use the correct technical language, because only if you use the correct technical language, you can be sure people (and search machines!) understand your technical question correctly. With "theory" I wasn't able to see what you wanted to know.
So you want to learn how to program a chroma key filter in python.
With this knowledge of what you want to learn, you can ask Google. Google for "chroma key algorithm python" and you will find quite some articles about this, including code snippets.
ok
 
Top