06-11-2010 11:50 AM
Hi,
I came accross the problem of measuring area ration from an image. for one section with black and white, i can measure it using image to array and then count the pixels. but what if there are numerous black and white sections in one image. how to get the area ratios for each one (different size of black and white sections with irregular shapes.)?
I attached the image of only one black and white section here.
Thank you.
06-12-2010 12:09 PM
It seems that the image i attached could not be seen. so I attach the file again.
Thanks a lot.
06-14-2010 11:24 AM
Hi lenienter,
LabVIEW has many examples shipped with it. You might want to take a look at those examples to learn the functionality. I found a good example to get you started.
C:\Program Files\National Instruments\LabVIEW 2009\examples\Vision\2. Functions\Binary Analysis\Particle Analysis Example
you can access all those examples through the Example Finder as well. In LabVIEW if you got to Help>> Find Examples>> Toolkits and Modules>> Vision
Hope this helps. Thanks and have a great day.
Esmail Hamdan | Applications Engineering | National Instruments
06-16-2010 02:45 AM
06-16-2010 09:38 AM
1. Threshold the image so the particles you are interested in are not zero.
2. Use IMAQ Label to give each particle a different number. This will work for up to 255 particles.
3. Use IMAQ Quantify with the labeled image wired to both "Image" and "Image Mask" and look at the region reports. Each report entry will give you useful statistics about one particle.
You can get a little fancier by wiring the original thresholded image to "Image" and the labeled image to "Image Mask", or even the original image (unthresholded) to "Image". It all depends on what results you are trying to get.
Bruce
06-18-2010 03:50 AM
Thank you very much for sharing this information.
I did the exactly same procedure as what you have said.
But the problem is the sequence of exporting data. that is, how can you make sure the black one and white one are from the same particle? if i only treat one particle, that is easy to do. but once i need to treat a lot of particles, the labelling won't work, if certain modification is not employed.
therefore, the question is: what is the appropriate modification for that?
06-18-2010 03:52 AM
Thank you very much for your idea.
yes, this method works when only several particles are analysed. but if the particle number increases sharply, it is not easy to do.
06-18-2010 03:54 AM
Hi,
Thanks a lot. I went through this for several times. i used the examples and searched the relevant information from the forum. but i still cannot get it.
maybe i missed some important parts.
06-18-2010 10:51 AM
If you are looking for the black area inside the white area, this is the wrong tool. You aren't really clear on what you are trying to do.
In that case, I would use particle analysis, which was suggested earlier. You will probably need to invert your image so the particle is white and the hole is black. If you use the detailed report, you will find out the area of the particle (white) and the area of all the holes (black). You can get the ratio from these two numbers.
Is that what you are looking for? The way your original posting read, I thought you wanted to compare the area outside the particle to the area inside the particle.
Bruce
06-29-2010 08:30 AM
Hi, Thank you for your advice. Maybe i did not make it clear and used the ambigious figure. I attached another file for that, which i believe is appropriate for my question. I want to know the area ratios for each particle.