Jump to content

Color detection in IMAQ Vision


Recommended Posts

Hi,

Now I'm using NI LabVIEW 8.5 with IMAQ Vision and a USB Camera.

I look for some method to detect a group of black color.(I don't know how to say it in English >.< Please see the picture below.)

15262888.jpg

-------------100 pixels----------------------30 pixels

Let say, I have two pictures like this. and I want to detect the group of black color, which have more pixel than 50 pixels. (in this picture is the first one.)

I can do a bit with the color detection, but in this case how can I know which one have the black color, which are grouping more than 50 pixels.

So, please help me to do something. and also now I'm trying to improve my English if anything is wrong please correct it for me. (I will appreciate it a lot.)

Thank a lot.

Edited by lovemachinez
Link to comment

Now I'm using NI LabVIEW 8.5 with IMAQ Vision and a USB Camera.

I look for some method to detect a group of black color.

I can do a bit with the color detection, but

in this case how can I know which one have the black color,

which are grouping more than 50 pixels.

The function you are looking for is called "Particle Filter" but before you can use it you need to convert your image to binary.

The image below shows how it can be done in vision assistant.

post-584-127030594272_thumb.png

If the image is color you will have to extract a color plane then do a threshold.

Here is the script and the vi that vision assistant created for me

blob filter.zip

Good luck

Link to comment

The function you are looking for is called "Particle Filter" but before you can use it you need to convert your image to binary.

The image below shows how it can be done in vision assistant.

post-584-127030594272_thumb.png

If the image is color you will have to extract a color plane then do a threshold.

Here is the script and the vi that vision assistant created for me

blob filter.zip

Good luck

yeah, Thank a lot.

by the way, if I got a binary image how can I convert it back to the normal image.

Edited by lovemachinez
Link to comment
  • 2 months later...

There are several VI's that can give you lots of information about particles after you have filtered them:

The Particle Analysis VI can tell you exactly how many pixels are in each blob. It can also do lots of other binary image statistics: elongation, circularity, etc...

Other Analysis VI's part of IMAQ can do other operations. I'd recommend using the filter command as suggested above to limit the amount of data.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.