Dormidont Posted May 5, 2006 Report Share Posted May 5, 2006 I have to convert RGB pixel intensity to its grayscale intensity. Is it possible to convert it using LV functions? Quote Link to comment
Adnan Posted May 5, 2006 Report Share Posted May 5, 2006 I have to convert RGB pixel intensity to its grayscale intensity. Is it possible to convert it using LV functions? You can use this attach VI. It uses the following equation : Gray scale intensity = 0.333R + 0.333G + 0.333B Download File:post-1057-1146829001.vi Download File:post-1057-1146829047.vi Quote Link to comment
Guest terminator Posted May 5, 2006 Report Share Posted May 5, 2006 Well this works but may not result in the most realistic image. Psychophysically the eye responds more to the green content than to red or blue. For television I believe the weighting is Gray scale intensity = 0.30R + 0.59G + 0.11B You can use this attach VI. It uses the following equation : Gray scale intensity = 0.333R + 0.333G + 0.333B Quote Link to comment
Dormidont Posted May 5, 2006 Author Report Share Posted May 5, 2006 Is this formula the same to one Vision Module uses to convert RGB images to grayscale? It is important because I'm going to use in dynamic determination whether there are dark characters on a light background or light characters on dark background. Quote Link to comment
crelf Posted May 5, 2006 Report Share Posted May 5, 2006 Well this works but may not result in the most realistic image. Psychophysically the eye responds more to the green content than to red or blue. terminator's right - there is no real emperical method to convert from RGB to grayscale - unfortunately it's in the eye of the beholder: it depends on the sensitivity response of your specific detector to the irradiating light (with respect to wavelength). That said, try a googling convert+RGB+grayscale and you'll get a few formulae to choose from... Quote Link to comment
abrilmauro Posted December 17, 2006 Report Share Posted December 17, 2006 you can use the imaq Cast Image. This VI can convert RGB pixel intensity to grayscale intensity. you can found this VI at imaq management. Quote Link to comment
crelf Posted December 18, 2006 Report Share Posted December 18, 2006 you can use the imaq Cast Image. This VI can convert RGB pixel intensity to grayscale intensity. It's still not a true conversion - see my post above. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted December 18, 2006 Report Share Posted December 18, 2006 It's still not a true conversion - see my post above. Not knowing how to do it "right" I just took the three color components and viewed them as the three components of a 3-d vector. Then determined the magnitude of the vector and then normalized to the 0-255 range. Ben Quote Link to comment
crelf Posted December 18, 2006 Report Share Posted December 18, 2006 Not knowing how to do it "right" I just took the three color components and viewed them as the three components of a 3-d vector. Whilst, mathematically at least, that sounds like a good idea, there is no "right" method, as it's all dependant on how the human eye perceives the colours, and each colour is perceived differently for each eye. Several standards exist (do a Google for "CIE"), but none of them are actually "right". That's why x,y, LUV, LU'V' standards and specialised hardware exists. Quote Link to comment
gpql Posted April 6, 2007 Report Share Posted April 6, 2007 QUOTE(Dormidont @ May 5 2006, 11:14 AM) I have to convert RGB pixel intensity to its grayscale intensity. Is it possible to convert it using LV functions? Function IMAQ Quote Link to comment
crelf Posted April 6, 2007 Report Share Posted April 6, 2007 QUOTE(gpql @ Apr 5 2007, 06:16 PM) Function IMAQ But look http://forums.lavag.org/index.php?s=&showtopic=3176&view=findpost&p=21741' target="_blank">here first. Quote Link to comment
Tomi Maila Posted April 6, 2007 Report Share Posted April 6, 2007 This is a question that has no definite answer. See the colorspace FAQ here. http://www.faqs.org/faqs/graphics/colorspace-faq/ Question C-9 gives a shortcut answer but there are so many factors in the question. Tomi Quote Link to comment
crelf Posted April 6, 2007 Report Share Posted April 6, 2007 QUOTE(Tomi Maila @ Apr 6 2007, 01:09 AM) See the colorspace FAQ... Keep in mind that that shortcut equation is only appropriate for standardized contemporary CRT phosphors - as Tomi said, there is no definite answer to the question - it's just not physically possible. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.