It is currently 22 Jun 2017, 19:38



New chroma keying implementation

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

New chroma keying implementation

Postby Helge Norberg » 19 Jan 2017, 18:18

In the latest builds of CasparCG Server 2.1.0 the chroma key shader has been rewritten to work in HSB/HSV instead of RGB, this allows for the following parameters to be changed:

  • Hue
  • Hue Width
  • Minimum Saturation
  • Minimum Brightness/Value

Parameters that are no longer needed because of the above:

  • Predefined Color
  • Threshold

I have created a JavaFX tool for testing out the new features before they are available in the CasparCG Client:
http://casparcg.com/builds/CasparCG%20T ... encies.jar
It requires Java 8 and can be started with
Code: Select all
java -jar tools-chromakey-1.0-SNAPSHOT-jar-with-dependencies.jar


chroma_key_gui.png
chroma_key_gui.png (22.88 KiB) Viewed 1042 times


The tool can work in realtime against the CasparCG Server but can also export a Custom Command to the clipboard that you can paste as a rundown item in the CasparCG Client.

I recommend starting with keying something like:

Image
Spectrum.2400.1800.S.G [Public domain], by Bautsch 16:36, 18 January 2008 (UTC) (Own work), from Wikimedia Commons

.. to get a feel for how it works.
Helge Norberg
 
Posts: 62
Joined: 01 Jun 2012, 13:42

Re: New chroma keying implementation

Postby jackreynolds » 19 Jan 2017, 20:48

Here is a question - is there a way to define colors to never be keyed? Like to ensure that a certain color cannot be keyed in it?
jackreynolds
 
Posts: 160
Joined: 02 Nov 2015, 18:02
Location: Pittsburgh, Pennsylvania, USA

Re: New chroma keying implementation

Postby didikunz » 19 Jan 2017, 23:57

jackreynolds wrote:Here is a question - is there a way to define colors to never be keyed? Like to ensure that a certain color cannot be keyed in it?


That makes no sense to me. What is your question, and what would you like to do? Normally a choma key is defined by selecting a color to key. All other colors do not key...
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3477
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: New chroma keying implementation

Postby jackreynolds » 20 Jan 2017, 14:51

For example - if I had a dark green shirt (a player jersey) on a light green background (an american football field) and the key range is too close for us, are we able to specifically define the dark green to not be keyed?

More specifically: https://youtu.be/1Oqm6eO6deU?t=1m58s
jackreynolds
 
Posts: 160
Joined: 02 Nov 2015, 18:02
Location: Pittsburgh, Pennsylvania, USA

Re: New chroma keying implementation

Postby Helge Norberg » 20 Jan 2017, 16:12

Raise the "minimum brightness" slider until only the american football field is keyed but the jersey green is still visible. It might be impossible to get it right, but you could try.
Helge Norberg
 
Posts: 62
Joined: 01 Jun 2012, 13:42

Re: New chroma keying implementation

Postby jackreynolds » 23 Jan 2017, 02:35

Dumb question: Is there a reason to use that command to start the application that I am missing? Double clicking seems to run it just fine for me on Mac.
jackreynolds
 
Posts: 160
Joined: 02 Nov 2015, 18:02
Location: Pittsburgh, Pennsylvania, USA

Re: New chroma keying implementation

Postby didikunz » 23 Jan 2017, 10:48

jackreynolds wrote:Dumb question: Is there a reason to use that command to start the application that I am missing? Double clicking seems to run it just fine for me on Mac.


What are you talking about? The tread is entitled "New chroma keying implementation".
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3477
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: New chroma keying implementation

Postby jackreynolds » 23 Jan 2017, 14:46

The command up in the original post about starting it:
Code: Select all
java -jar tools-chromakey-1.0-SNAPSHOT-jar-with-dependencies.jar
jackreynolds
 
Posts: 160
Joined: 02 Nov 2015, 18:02
Location: Pittsburgh, Pennsylvania, USA

Re: New chroma keying implementation

Postby Helge Norberg » 24 Jan 2017, 17:40

Yes, double clicking usually works as well.
Helge Norberg
 
Posts: 62
Joined: 01 Jun 2012, 13:42

Re: New chroma keying implementation

Postby Helge Norberg » 03 Mar 2017, 18:12

I have now updated the spill suppression algorithm to work in the HSV color space and it works really well. Download the updated test client: http://casparcg.com/builds/CasparCG%20T ... encies.jar

And the latest build of the server to test:
http://casparcg.com/builds/CasparCG%20S ... nux.tar.gz

The windows build server seems to take forever, so we will see when http://casparcg.com/builds/CasparCG%20S ... indows.zip will be up.
Helge Norberg
 
Posts: 62
Joined: 01 Jun 2012, 13:42


Return to Tech and Development

Who is online

Users browsing this forum: Google [Bot] and 6 guests