It is currently Tue Aug 18, 2026 11:33 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Aug 24, 2015 2:05 pm  (#1) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
Hi all.
I would like to ask you to help me.
I'm trying to to understand with the work of MixerYCbCr in G'MIC-plug-in.
I want to understand the algorithm of this effect.
But I do not understand how it works.
I'm not sure about my knowledge of the work of this effect. But I read how it should work in other programs.
-----------------------------------------
For example in Edius (videoeditor for windows):
U and V are similar but you control the balance between two primaries and their complementary color. U and V have same abscissa value range on the X axis while they differ for the Y axis:

With U (Cb), the higher value you are, the more you're on the blue primary color. If you go to the low values then you're on blue complementary color, i.e. yellow.

With V (Cr), this is the same principle but with Red and Cyan.
If you push U full blue and V full red, you get magenta. If you push U full yellow and V full Cyan then you get green
------------------------------

In practice, I move the sliders Blue chroma gain and Red chroma gain and this mixer gives me a completely different color than I expected.
For example I move the slider Blue chroma gain to the in the leftmost position and look forward to gain yellows,
but blue sky turns green and yellow colors - purple ..
I move B chroma gain and R chroma gain to the in the leftmost position, but I get black-white image..
I do not understand why ..

Explain, please.


Attachments:
Source.png
Source.png [ 286.07 KiB | Viewed 3753 times ]
B=0.png
B=0.png [ 240.35 KiB | Viewed 3753 times ]
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Aug 24, 2015 2:21 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Aug 13, 2015
Posts: 312
Location: Somewhere between lost and found.
In newer versions these are labeled:
<color_name> chroma contrast,
<color_name> chroma brightness,
<color_name> chroma smoothness.

Does that help? But I dont understand any of this...

_________________
The answer was 42. The question is long forgotten. The computer that solved it is now destroyed.
The MK-2 has been built. Should this be the next question?
(Solve if you can ... ;) )
Image


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Aug 24, 2015 2:29 pm  (#3) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
jazzon wrote:
In newer versions these are labeled:
<color_name> chroma contrast,
<color_name> chroma brightness,
<color_name> chroma smoothness.
Does that help? But I dont understand any of this...

No.
I want to understand on what principle there is a change in color.
Are you acquainted with the system YUV ?


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Aug 24, 2015 2:55 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Basically, the control 'contrast' multiplies the value (in Y, Cb or Cr) and the control 'brightness' add an offset to the value.
So if you add 'brightness' to the Cb component, your image looks more blue.
If you remove brightness to the Cb component, your image looks more yellow (the complement color to the blue).


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Aug 24, 2015 5:25 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Aug 13, 2015
Posts: 312
Location: Somewhere between lost and found.
user_gimp: No I am not, but if I recall correctly I read somewhere in these forums that Ronounours is directly affiliated with G'MIC somehow, so I would accept his word as gospel (if I recall correctly that is...)

_________________
The answer was 42. The question is long forgotten. The computer that solved it is now destroyed.
The MK-2 has been built. Should this be the next question?
(Solve if you can ... ;) )
Image


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Tue Aug 25, 2015 5:44 am  (#6) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16161
Ronounours is the creator of the G'MIC plug-in for GIMP. :) Thank you David.

_________________
Image


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Tue Aug 25, 2015 10:35 am  (#7) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
Rod wrote:
Ronounours is the creator of the G'MIC plug-in for GIMP. :) Thank you David.

Unfortunately I did not get an answer to my question.


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Tue Aug 25, 2015 12:40 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
user_gimp wrote:
Rod wrote:
Ronounours is the creator of the G'MIC plug-in for GIMP. :) Thank you David.

Unfortunately I did not get an answer to my question.


using Brightness instead of Contrast, as understood from David
Attachment:
using lightness instead of chroma.png
using lightness instead of chroma.png [ 141.93 KiB | Viewed 3576 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Wed Aug 26, 2015 11:01 am  (#9) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
Ronounours wrote:
Basically, the control 'contrast' multiplies the value (in Y, Cb or Cr) and the control 'brightness' add an offset to the value.

What is function of option smoothness ?
Explain please.


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Wed Aug 26, 2015 11:03 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Smoothness applies a blur in the specified channel (Y,Cb or Cr) of the image.
Each pixel diffuses its value to its neighborhood, creating so a kind of 'halo' effect.


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Wed Aug 26, 2015 2:33 pm  (#11) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
Thanks, Ronounours.
Luminance contrast (gain) and Luminance brightness (offset).
What is the difference ? If I'm not mistaken: the higher the Luminance brightness value, the brighter the colors. And vice versa.
But Luminance contrast ?
Explain please.


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Wed Aug 26, 2015 4:27 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
I've already explained it: the 'contrast' parameter is a multiplying factor you apply on your channel values (Y,Cb or Cr), while the 'brightness' parameter is a number you add to your channel values.


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Sep 07, 2015 2:17 am  (#13) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
Ronounours wrote:
Basically, the control 'contrast' multiplies the value (in Y, Cb or Cr) and the control 'brightness' add an offset to the value.
So if you add 'brightness' to the Cb component, your image looks more blue.
If you remove brightness to the Cb component, your image looks more yellow (the complement color to the blue).

So if you add 'brightness' to the Cb component, your image looks more blue.
If you remove brightness to the Cb component, your image looks more yellow (the complement color to the blue).
:-) Good. I understand the math.
If I increase "contrast" to the Cb component, image looks also more blue. So ?
If I reduce "contrast (gain)" to the Cb component, blue-yellow color is removed from the image.
In the picture remain the red-green color.
But I do not understand how this principles is reflected in practice with Y.
If we make the offset value Y increases or decreases. If we do the multiplication, the value also increases or decreases.
So what's the difference?


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Mon Sep 07, 2015 3:07 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
The difference is only that in a case you do a multiplication to increase/decrease the values, while in the other case you do an addition.
It has a difference on the final histogram. Making an addition just shifts the histogram to the right (positive addition) or to the left (negative addition -> subtraction).
The multiplication scales the entire histogram (so pixel with initial values 0 stay with value 0). The multiplication changes the difference between the max and min of your image
(so it increases/decreases contrast), while the addition preserves the min-max difference (it only acts on the global brightness).


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Thu Sep 10, 2015 2:02 am  (#15) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
I load a picture in blue - absolutely pure blue 0, 0, 255.
I move the sliders Blue chroma contrast or Blue chroma brightness and
get a green color.
But why green color ? From absolutely pure blue .. ?
The same situation with absolutely pure red

Explain, please.


Attachments:
b2.png
b2.png [ 44.37 KiB | Viewed 1699 times ]
c2.png
c2.png [ 49.91 KiB | Viewed 1699 times ]
Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Thu Oct 01, 2015 2:39 am  (#16) 
Offline
GimpChat Member

Joined: Aug 23, 2015
Posts: 8
My answer to myself - Just look attentively at picture
https://en.wikipedia.org/wiki/File:YUV_UV_plane.svg
-----------------------

But I have a other question.
In YCbCr color space Y range - from 16 to 235 for 8-bit. Cr and Cb ranges - from 16 to 240

But in MixerYCbCr Luminance brightness and Blue/Red chroma brightness have ranges from 0 to 255
Please explain this "contradiction". What am I misunderstand?


Top
 Post subject: Re: MixerYCbCr in G'MIC-plug-in
PostPosted: Thu Oct 01, 2015 10:34 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
user_gimp wrote:
But I have a other question.
In YCbCr color space Y range - from 16 to 235 for 8-bit. Cr and Cb ranges - from 16 to 240

But in MixerYCbCr Luminance brightness and Blue/Red chroma brightness have ranges from 0 to 255
Please explain this "contradiction". What am I misunderstand?
Here's a quote from the book 'Video Demystified' by Keith Jack.
Keith Jack wrote:
When performing YCbCr to R ́G ́B ́ conversion, the resulting R ́G ́B ́ values have a
nominal range of 16–235, with possible occasional excursions into the 0–15 and 236–255
values. This is due to Y and CbCr occasionally going outside the 16–235 and 16–240 ranges,
respectively, due to video processing and noise. Note that 8-bit YCbCr and R ́G ́B ́ data
should be saturated at the 0 and 255 levels to avoid underflow and overflow wrap-around problems.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group