loading
 
Background always black with green screen
Christophe from France  [7 posts]
6 years
I try to make a "chroma key" with an image in background.
The green detection seems OK but the green pixels are turned into black and I never see my background image...

Here is my code :

<head><version>2.61.8</version></head>
<Green_Screen>
  <background>C:/P1030086.jpg</background>
  <foreground>Logitech HD Pro Webcam C910</foreground>
  <high_threshold>10</high_threshold>
  <low_threshold>100</low_threshold>
</Green_Screen>

Any help would be greatly appreciated.
Steven from United States  [1425 posts] 6 years
Christophe,

Can you post the image P1030086.jpg here? Most likely the loading of that image isn't working ... perhaps the path is wrong? Is it really on your root folder?

STeven.
Christophe from France  [7 posts] 6 years
the image is a classic jpg and it seems the path is good.
Do I need to put the image in a specific path ?

For example, when I made an API request like this : <request><load_image><filename>C:/P1030086.jpg</filename></load_image></request>
The image is visible in Roborealm without any problem.
Christophe from France  [7 posts] 6 years
Here is the image.

 
Christophe from France  [7 posts] 6 years
Here is the result (with black)

 
Christophe from France  [7 posts] 6 years
And the params.

I test it on 2 PC (Windows Vista and Windows 8) with the same issue.
May I miss something ?

 
Steven from United States  [1425 posts] 6 years
The image specification doesn't work in the way that you are using it. The dropdown in the GreenScreen module is for directly connected webcams and images that are saved as markers. You first need to use a load module to load in that image and then reference it ... if you don't specify a name in the load image module you can use 'Current'. See the attached robofile. Be SURE the load image module is pointing to the right location ... its very unlikely that your image is on your root folder as most of the recent windows OS's don't let you put it there.

STeven.

program.robo
Christophe from France  [7 posts] 6 years
It works !
Many thanks !!!!!!!

By the way, just a small question, what type of API request I must send to change the background image ?
Steven from United States  [1425 posts] 6 years
You can use several ways ... since you are already sending the greenscreen module then save the script I sent and view it with a text editor. That will give you the load module XML string that you can change the path of the filename before you send that over.

STeven.
Christophe from France  [7 posts] 6 years
Thanks for all Steven and have a good day.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index