mlanypitts / webcamstudio

Automatically exported from code.google.com/p/webcamstudio
GNU General Public License v3.0
0 stars 0 forks source link

Green - Cyan parts are repainted as yellow - pink dots on some images #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run WS.
2. Add Any video Source that has the green-cyan shades that match the issue.
3. Start Playback.

What is the expected output? What do you see instead?
I expected a clean color image.

Sometimes i can see corrupt pixels change their colors to pink-jellow.

I noticed that on WS the output image is ok almost all the time, but if you try 
to look something that have green or cyan parts, those are displayed corrupted. 
In particular i see some green pixels turns to yellow.
This happen only on some outputs.
I can see a green video without the defects, and another same green tonality 
video, with the defect.
It seems that on some pictures the red component of the green/cyan parts 
(usually not seen on normal playback) blend itself with green turning yellow.
I have a look on how the images are made in WS, and i noticed that all images 
are treated like RGBs:
BufferedImage.TYPE_INT_RGB
and then converted into a byte array to be transmitted on all the WS components.
I think that on particular circumstances this convert is not so precise and 
lead to red/green/cyan=yellow pixel wrong interpretation.
I look at this .java in the WS code:

webcamstudio.mixers.WSImage.java -> think do the BufferedImage conversion to 
Byte Array.

webcamstudio.media.renderer.Capturer.java -> Use the WSImages.

For me is too difficult to understand what's going on tense javas, i try to 
google the solution, but after one week of research i understand that i miss 
some basics on graphics2D.

Original issue reported on code.google.com by soylent...@gmail.com on 4 May 2013 at 8:43

GoogleCodeExporter commented 8 years ago
Today thanks to the help of Patrick Balleux, i finally start to resolve this 
strange issue.
I have to change the TYPE_INT_RGB BufferedImage into a TYPE_3BYTE_BGR.
I change the most important components to use Byte [] instead of Int [] but 
this leads to a lot of work to match all the WS component that uses Int [] 
arrays.
I also have to change the Avconv and Gstreamer commands to match BGR to have 
the right colors.
I'm testing the new way.

Original comment by soylent...@gmail.com on 4 May 2013 at 8:50

GoogleCodeExporter commented 8 years ago
Hi,
 i made the needed changes to the code to work with TYPE_3BYTE_BGR BufferedImages, and all seems to work well.
I miss only the changes to the effects components and i will make it as soon as 
possible.

Original comment by soylent...@gmail.com on 6 May 2013 at 3:01

GoogleCodeExporter commented 8 years ago
Got the SwapRedBlue and Chromakey working ...
Seems Chromakey eats lot of CPU usage, but works.

Original comment by soylent...@gmail.com on 7 May 2013 at 7:21

GoogleCodeExporter commented 8 years ago
Issue is fixed, there was a image decode error in WSImage.java
Now works OK.

Original comment by soylent...@gmail.com on 12 May 2013 at 5:33

GoogleCodeExporter commented 8 years ago
The change for this is done now.

Original comment by soylent...@gmail.com on 12 May 2013 at 5:34