LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract plane from a image

Hi, can anyone help me with this how can i extract the rgb plane from an image.
I need extract the red,green and blue plane from an image and show them in a vi.
I have a vi that extract the turn into the grayscale from a color image.

0 Kudos
Message 1 of 9
(3,793 Views)
On the graphics palette is a color to RGB VI.  Take your 1-D array of image data, autoindex it into a for loop.  Wire out the R, G, B values through an AutoIndex tunnel.  Now you will have a 1-D array for each of those colors of the image data.
0 Kudos
Message 2 of 9
(3,785 Views)
I did not understand well, could you explain me better in a vi
0 Kudos
Message 3 of 9
(3,781 Views)
Forget that last message.  Color to RGB wasn't doing what I thought it was.  I realized your image data already as the R G B components coming out of your decimate array function.  The 1st 1D array is Red, the 2nd Green, the 3rd Blue.  See the attached block diagram.  If you take the red array and interleave that with two arrays full of zeroes of the same size, you get a red image back.  Likewise for the green and blue 1-D arrays.
0 Kudos
Message 4 of 9
(3,776 Views)
could you send me the vi please.
0 Kudos
Message 5 of 9
(3,771 Views)

It looks like you are using LV 8.0?

 

0 Kudos
Message 6 of 9
(3,769 Views)
Hi, thanks for your help. I need one more thing of you to help me.
I need load a image , any size, and automaticly resize the image to his original size.
The vi must load the image when is execute it.
Could you help please

Regards david
0 Kudos
Message 7 of 9
(3,767 Views)
I'm not sure what you are asking by this question.  In the top part of your code, I think you are already doing this.  You are reading the attributes of the image and setting the boundaries of those 2 picture indicators to math.
 
If this isn't what you want, than please explain what you mean by its "original size".
0 Kudos
Message 8 of 9
(3,717 Views)

Hi David,

if you want to have your gray picture in the original size, then you can use the "Interleave 1d Array" function. In gray pictures R,G and B have the same values.

Hope it helps. Mike



Message Edited by MikeS81 on 06-16-2008 04:19 PM
0 Kudos
Message 9 of 9
(3,715 Views)