IT Community - Software Programming, Web Development and Technical Support

Convert YUV to RGB

This is a discussion on Convert YUV to RGB within the C# Programming forums, part of the Software Development category; I want to convert an image from YUV to RGB and vice versa... can someone help...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-17-2008, 12:03 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Convert YUV to RGB

I want to convert an image from YUV to RGB and vice versa...

can someone help
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-17-2008, 12:06 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: Convert YUV to RGB C#

i think this helps..

Algorithm..formula available ..pls search in google
RGB-YUV

for ( i=0 ; i<8 ; i++ ){
for ( j=0 ; j<8 ; j++ ){
y[i][j]= 0.299 *r[i][j]+0.587 *g[i][j]+0.114 *b[i][j] ;
u[i][j]=-0.1687*r[i][j]-0.3313*g[i][j]+0.5 *b[i][j]+128;
v[i][j]= 0.5 *r[i][j]-0.4187*g[i][j]-0.0813*b[i][j]+128;
}
}




YUV-RGB


for ( i=0 ; i<8 ; i++ ){
for ( j=0 ; j<8 ; j++ ){
r[i][j]=y[i][j] +1.402 *(v[i][j]-128);
g[i][j]=y[i][j]-0.34414*(u[i][j]-128)-0.71414*(v[i][j]-128);
b[i][j]=y[i][j]+1.772 *(u[i][j]-128) ;
}
}
}
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-17-2008, 12:07 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: Convert YUV to RGB

ok..thanks...i try this to implement in C#

and let u know
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert int[] into byte[] using C# bluesky C# Programming 2 08-23-2007 01:18 AM
How to convert C source to C# ? oxygen C# Programming 1 07-30-2007 04:34 AM
How can you convert them to another format? devarajan.v PHP Programming 1 07-26-2007 10:33 AM
Convert XML to JSON in PHP ramkumaraol PHP Programming 0 07-17-2007 12:10 AM
File convert varghese PHP Programming 0 07-11-2007 04:11 AM


All times are GMT -7. The time now is 07:57 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0