11-12-2015 05:37 AM
I am trying to separate an image taken in white light using NI Vision Builder into 3 separate images in Red, Blue and Green respectively. The separated images show interference of other colored regions also and so I want to filter them. When I tried the Threshold filter, the output is a binary image which means nothing but data loss. I need to filter the image without data loss i.e. an 8 bit image in the end.
I tried to see the histogram and this shows the interference but, there is no option of a filer to apply with the histogram.
Attached here is the image I am trying to separate.
Please help.
11-12-2015 11:46 AM
In the color image palette, use the VI for separating an image into three color planes.
Bruce
11-12-2015 11:53 AM
Hi Bruce..
Thanks but, I do not see any color image pallette.
Sri
11-12-2015 11:36 PM
I was thinking LabVIEW. I know Vision Assistant has the option to separate color planes, but I don't know if you can do it in VBAI.
Bruce
11-13-2015 06:21 AM - edited 11-13-2015 06:32 AM
@BruceAmmons wrote:
I was thinking LabVIEW. I know Vision Assistant has the option to separate color planes, but I don't know if you can do it in VBAI.
Bruce
You can do this with plain LabView using the picture and the array palette:
But I guess, that wasn't the question.
@SriMaddy, you have quite a strange image format: PNG 32 bit alpha, Green, Red, Blue
The LabView Standard is alpha, Red, Green, Blue.
Maybe that is why you have issues.
Regards,
Alex
11-13-2015 08:04 AM - edited 11-13-2015 08:06 AM
If you want to do this in Vision Builder AI, here's a Vision Builder AI 2012 inspection that shows how to get mono 8 images of the three separate color channels using image variables. Now you can do whatever greyscale processing you want on the individual planes by adding image processing steps after each Select Image step that gets the plane of interest.
Hope this helps,
Brad
11-13-2015 10:05 AM
@Bruce
Actually the picture was TIFF 32-bit. But the post service here did not accept the file type. So I had to change the format and attached here.
@Bruce and @Brad
I was able to extract the images just like this but as you can see, there is interference in the pictures i.e. one picture influencing the other. For example, the red picture that started from 109 and ends with 113.5(approx) and the green from 113 to 117(approx). But if we observe them, a small signature of the red can be seen in the background of green picture. This is what I want to eliminate and so am trying to get the right filters.
Sri
11-13-2015 10:19 AM
@Brad
This is what I have simulated and got the binary images. Please take a look and suggest some filters if you can.
Thanks
Sri
11-13-2015 10:50 AM
One difficulty is the white background. When you look at the red color plane, the black areas are actually the parts that aren't red, and so forth.
I suspect you could multiply each color plane by a percentage factor, then add them up to get the color you want. That may not work, though.
Another idea: Use a Hue image to see where the different colors are. You should get fairly distinct areas for each color and each overlap. You could threshold the hues that go with one color, then use that as a mask on the Intensity image to extract the grayscale values.
How is the original image created? That might help us figure out a way to separate the colors.
Bruce
11-13-2015 11:06 AM
Multiplying the images by factors and adding or subtracting them might work. I think you would have to invert the images first, though, so you are working with the numbers instead of the background.
Bruce