VirusRushTheater / ChromaKeyer

Automagic Chroma Keyer I made for a project, in C++ and OpenCV.
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

returned Mat invisible #1

Open stephanschulz opened 6 years ago

stephanschulz commented 6 years ago

Hi. Thanks for working on this code.

I am trying to port it to openframeworks.cc

It compiles and runs but the chroma Mat is not visible. The dimensions of the returned matout are fine. Maybe all pixels have 100% alpha applied?

I am noticing that bgcolor_rgb is declared in your parameters but not used. why? Or does bgcolor_rgb always set bgcolor_cbcr via

.bgcolor_cbcr =        ChromaKeyer::colorRGB2CbCr(cv::Vec3f(0.0f, 1.0f, 0.0f)),

Thanks for any advice.

screen shot 2018-04-04 at 4 23 50 pm
VirusRushTheater commented 6 years ago

Hi Stephan I am glad this code was useful for you. About this issue, I don't remember too much how this code worked, but it could in some extent adapt to a green background with some noise, but what I did afterwards is creating an external CbCr mapping as a .png image and load it afterwards. At least that worked wonders. Sorry.