I am working with GV-5260 CP color camera using VQ4-GE framegrabber for my application. I need to get gray image out of RGB image captured from the camera. I am using the following formula for extracting gray image:
The three channels of the RGB image are passed as the first three channels of the input image. The image is transformed according to the following formula:
gray = 0.299 * red + 0.587 * green + 0.114 * blue .
Since there is no fractional input for any operators in Visual applets ( ver 3.1) , I have just multiplied the channels with 299,587 and 114 respectively and divided it by 1000. Is it the right way to do that or any other solution?
Please refer my applet that I have attached here! ExtractIntensityChannel.va