LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

in labview vision 2013 how can i extract red plane color image fromRGB color image?

Solved!
Go to solution

...

0 Kudos
Message 1 of 24
(5,131 Views)

Attach the VI that shows us what you've tried.

 

Bob Schor

0 Kudos
Message 2 of 24
(5,119 Views)

actully i am getting red plane as greyscale image. iexact want red color image.

0 Kudos
Message 3 of 24
(5,102 Views)

If you attach the VI (that means the LabVIEW file containing the code, having the extension ".vi", not a screen-shot of the block diagram), people (like myself) who could try to help you could "play with" and possibly modify your code to help you accomplish what you want.  Please don't make us do all of the work ourselves if you've already done some of it ...

 

Bob Schor (still waiting for a .VI)

0 Kudos
Message 4 of 24
(5,089 Views)

oh..sorry..

0 Kudos
Message 5 of 24
(5,079 Views)

 Thank you.  I've been "playing" with this, and I now see/understand the problem.  I have a colleague who has done more image processing than I, and will ask him for help.  Should have results soon ...

 

BS

0 Kudos
Message 6 of 24
(5,043 Views)

ok..thanks

0 Kudos
Message 7 of 24
(5,038 Views)

Well,  I have a solution (which I made work with either of R, G, or B planes), but I'm not happy with it.  I'm attaching two Snippets, which are in LabVIEW 2015 (I don't have LabVIEW 2013 installed, but you should not have a lot of trouble using these "pictures" to modify your code).

 

Here is basically your routine that I modified by naming the Path Input "Photo" (I pointed at one of the Sample Photos in My Pictures) and I named the output "Red Plane" (as it is now "shades of red".  There's a new sub-VI, "Single Image Plane", that takes the Image, an Image "holder" for the output, and an Enum (Red, Green, or Blue -- here I'm using Red) and "does all the hard work".

abc.png

So what do I do inside Single Image Plane?  Well, this is where I get "messy".  I tried to "colorize" the Red Grayscale Image obtained by ExtractColorPlanes, but couldn't figure out how to put them back together.  So I simply extracted all the Pixels, separated the R, G, and B components, and set two of the three to zero (depending on the Enum input), then reassembling the Image again.  Here it is ...

Single Image Plane.png

Bob Schor

0 Kudos
Message 8 of 24
(5,017 Views)
Solution
Accepted by topic author sagar1511

Ok, now I have what I consider an "acceptable" solution to showing the R, G, and B Color Planes from an Image.  It does not require a "pixel-by-pixel" approach that I posted yesterday, but works directly with the Color Planes you get from splitting the RGB image into its 3 U8 Grey-Scale images.

 

I'm attaching a Demo project that I saved in LabVIEW 2012.  It's pretty rudimentary -- you provide it with an Image (I used Desert.jpg from the Microsoft Sample Pictures folder) and it shows you the Image and the Red, Green, and Blue Color Planes.  A switch allows you to view the Color Planes as U8 Grey Scales (very easy), but also allows you to view them as the R, G, and B Color Channels (a little more difficult to do).  In the latter case, the Image shown is, in fact, not the original Image, but the Image resulting from recombining R+G+B.

 

For this 1024x768 pixel image, decomposing and display the three Color Planes updated at (I'm estimating here) 100 times/second.  When using Grey Scales, it was about 20 times faster (note that doing Color requires doing Grey Scale first, plus each R, G, and B resulting image requires 4 bytes instead of 1 byte per pixel).

 

Here's the Front Panel -- note that the Blue channel has almost nothing except "sky", while the reddish rocks are particularly bright in the Red channel.

Color Planes FP.png

Bob Schor

0 Kudos
Message 9 of 24
(4,982 Views)

ok..thanks...

0 Kudos
Message 10 of 24
(4,961 Views)