LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have extracted R, G, B of jpeg image now I want to convert each one to matrix

 http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/

 

Method 2 – Correcting for the human eye (sometimes called “luma” or “luminance,” though such terminology isn’t really accurate)

 

Grayscale generated using a formula similar to (Red * 0.3 + Green * 0.59 + Blue * 0.11)

 

 

 

 

you have to calculate this for each pixel!

0 Kudos
Message 11 of 19
(1,005 Views)

 

No, maitaining pixel intensity is not required for case 1

 

If I add G&B, it is simply like summation of 2matrix, and the value of "pixel a" in G will be added to pixel a" in B.

I tried to wire the outlet of "+" to IMAQ array to image but it does't work this way I have to use something to convert it to format that is acceptable by this vi inlet

 

many thanks

 

 

0 Kudos
Message 12 of 19
(1,003 Views)

Hi

Thanks for your reply,

No I can't use this formula. 1. I should just remove R, Convert  G & B to array, and add (combine) them using math functions, then convert it to an image then grayscale

2. for second case I should convert R, G &B to array, and add (combine) them using math functions, then convert this to an image then grayscale

Regards

0 Kudos
Message 13 of 19
(1,000 Views)

VItan,

value is different from intensity? I thought value of each pixel means its intensity smileyembarrassed:

 

0 Kudos
Message 14 of 19
(994 Views)

Have u recieved my reply?

 

0 Kudos
Message 15 of 19
(977 Views)

Hi VItan

I realized what is my mistake im previous code. I cant use IMAQ color Image to array, bcoz I have my G&B are in grayscale, so I used IMAQ Image to array, and added them to create the new matrix, now I am going to convert this to an image using IMAQ arrat to image

Thanks for your help

 

0 Kudos
Message 16 of 19
(965 Views)

@sara14 wrote:

VItan,

value is different from intensity? I thought value of each pixel means its intensity Smiley Embarassed

 


I'm sorry, I just realized that I had been making a great, and probably incorrect, assumption this whole time.  I was thinking of "intensity" of the original image's pixels as a single value per pixel, something like HSV value, HSL luminosity, or a straight RGB average.  Not even a well-defined assumption!  I'm now not sure at all what you meant regarding maintaining intensity:


I have to convert my image to Grayscalein such a way that the value of intensity of each pixel doesn't change 


 

 

However, everything you have said since seems to indicate that you are not concerned with the original image and simply want a G+B summation image and a R+G+B summation image.  In that case, it sounds like you have what you need, although I do not know how you plan to map the summed values to grayscale: As I mentioned earlier, the summing of planes' values can go over the U8 representation limit, so you will need to either limit the sum to 255 or sum them into a larger representation and then convert that as something other than a U8 grayscale...



0 Kudos
Message 17 of 19
(951 Views)

Hi VItan

Thank you very much for your kind reply. it is fine, I am new in this field so I make many mistakes. By intensity I mean the value of voltage that has been recorded by the CCD camera for each pixel.

Yes, I have grabbed and saved several images using my camera. Sor to run this new program I use them. As you can see here, every time that I hit run, since the first step is open file, it askes me for the file, so I select the file and it runs.

Now, I have problem with the combination of R+G+B, it dosent show this image.

my input image is RGB(U32), then I have extracted R, G, B and have displayed them all as Grayscale (U8), ...I am not very good at this I cant find my mistake. every thing is fine only R+G+B image is not displayed in FP vindow

May plz have a look

 

 

0 Kudos
Message 18 of 19
(946 Views)

If you dont mind, may I send my file to you in private window?  Bcoz I dont know how to remove it later on.  I am new in this froum, still not familiar with stuffs here

0 Kudos
Message 19 of 19
(942 Views)