[PD-dev] Re: [PD-announce] pdp v0.7

Yves Degoyon ydegoyon at free.fr
Mon Jan 13 13:47:33 CET 2003


hi,

sorry, i've tried all these formulas :

>>>>
>>>>
>>>> /*
>>>>  * conversion from YUV to RGB
>>>>  *   r = 1.164*(y-16) + 1.596*(v-128);
>>>>  *   g = 1.164*(y-16) - 0.813*(v-128) - 0.391*(u-128);
>>>>  *   b = 1.164*(y-16)                 + 2.018*(u-128);
>>>>  * conversion from RGB to YUV
>>>>  *   y =  0.257*r + 0.504*g + 0.098*b + 16
>>>>  *   u = -0.148*r - 0.291*g + 0.439*b + 128
>>>>  *   v =  0.439*r - 0.368*g - 0.071*b + 128
>>>>  */
>>>>
julien from

>http://www.fourcc.org/fccyvrgb.htm
>

/*
* conversion from YUV to RGB
* r = y + 1.403*v
* g = y - 0.344*u - 0.714*v
* b = y + 1.770*u
* conversion from RGB to YUV
* y = 0.299*r + 0.587*g + 0.114*b
* u = -0.169*r -0.331*g + 0.500*b
* v = 0.499*r -0.418*g - 0.081*b
*/

tigital :

/*
* conversion from YUV to RGB
* r = y + 1.140*v
* g = y - 0.395*u - 0.581*v
* b = y + 2.032*u
* conversion from RGB to YUV
* y = 0.299*r + 0.587*g + 0.114*b
* u = -0.147*r - 0.289*g + 0.436*b
* v = 0.615*r - 0.515*g - 0.100*b
*/

without any success, i guess we're trying to convert [0-255] scaled RGB 
values
to BC_YUV420P color model --

any [ more ] hints appreciated here,

sevy/yves

ps : it's not really a serious issue for the color tracker
because the tracked color is kept internally as YUV,
but i need to convert it in order to display it in Tcl/Tk,
so the displayed color is different from the real color that is tracked.







More information about the Pd-dev mailing list