LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image to RGB color separation

Hello,

I am new to LabVIew and   my current task is to upload an image (using read JPG file) and then separate and save the RGB components of the image. How can it be done?

Thank you,

Henry O.

Message 1 of 26
(13,635 Views)
Hello Henry,

What's your labview version? Do you have the vision library installed (there a set of vi's that do what you want in a simple way)?

The vi's there I'm talking are those that you can see in the attached pic. If you don't have them, we have to do another approach (and not so simple).
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 26
(13,613 Views)
Hi Henry,

here's a different approach using only "standard" functions:

Message Edited by GerdW on 10-16-2007 11:44 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
Message 3 of 26
(13,611 Views)
Hello GerdW,

Normally I use the vision lib, so I never tried this way. But when i see this post, i've tried what you did. But I faced one problem.
1 - The image output it's one array of 1440000 elements.
2 - and the cluster property rectangle say that the size it's 800*600

in my idea: number of elements (1440 000) = lines * columns. And this it's not true, because 800*600 = 480 000

What's the problem in my idea?

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 4 of 26
(13,608 Views)
Hi Jorge (& Henry),

it's 800*600*3=1440000... You load 24bit JPEGs having 3 bytes per pixel - your RGB-values, 1byte per value.

One more hint: check the image depth (also given in the unbundle function) for the value of 24 - otherwise this simple conversion will fail.

Message Edited by GerdW on 10-16-2007 12:00 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 26
(13,604 Views)

Ok. That was a sad question of me. I should remenbered that. Because I work alot with cameras.

THANKS

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 6 of 26
(13,596 Views)
Hello Everyone,

Thank you for the help. I am running version 8.2 (student) and I am still lost. GerdW, I've tried the file you sent me but all I am able to see is a blue image and i am unable to see the red and green separations. I do not have a clue. I will keep trying until i get it.

Thank you,

Henry O
0 Kudos
Message 7 of 26
(13,575 Views)
Henry,

You can only see the blue part of the image, because that is the only part that is being graphed. To see the red and green seperations, you will need to make 2 more copies each of the "Reshape Array.VI" and the intensity graphs. Please see the attached image.
0 Kudos
Message 8 of 26
(13,555 Views)
Hello Micahel,

I've made the additional changes and I am still getting blue images on all of them. I am not sure what the problem might be---probably lack of experience on my part. I am using labview 8.2 student version. Please advice.

Thank you,

Henry

0 Kudos
Message 9 of 26
(13,551 Views)
The default colors for the intensity chart are blue.   You would have to remap the color table for each chart if you wanted the red chart to look red, and the green chart to look green.
0 Kudos
Message 10 of 26
(13,534 Views)