Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine tho color of many particles in an image?

1. Could you please tell us how to measure the color of each particle in an image that have many particles? In our case the particle is soybean pod. The attached file (beans.jpg) is the image that we are determining. Now we can measure color of only one whole object which we get the method from Rishee B. of NI. The old question is "how to measure color of whole object?
 
2. Could you please tell us how to get the data for calculation from the code that we attached for you to determine? (bean area.vi) we are now trying to measure the area of soybean pods and we would like to get the data from our code for next calculation such as compare with threshold value.
 
Thank you very much indeed.
 
With my best regards,
 
Panmanas
 
 
Download All
0 Kudos
Message 1 of 6
(3,878 Views)

1. Could you please tell us how to measure the color of each particle in an image that have many particles?

Do  You mean distribution  of the clor.Then you can convert  the image into a gray scale image and as  u r doing  extract the luminance plane by using "Extract clor plane vi"  and use histogram vi and u can  get the max ,min and standars deviation.


Again i  am sure whether you need this.Do you want to extract the individual beans? then you apply threshold and use a particle filter .
0 Kudos
Message 2 of 6
(3,876 Views)

2. Could you please tell us how to get the data for calculation from the code that we attached for you to determine? (bean area.vi) we are now trying to measure the area of soybean pods and we would like to get the data from our code for next calculation such as compare with threshold value.

You can use particle analysis after thresholding the image  to determine the area of each particle,on the assumption that you are successfully able to filter out all other stray noise other than the soya pods.


Hope it helps
0 Kudos
Message 3 of 6
(3,875 Views)

Dear muks

Thank you very much that you try to help us. We dont understand your answer. May be you misunderstood our question.

May we explain our question again.

We would like to get the RGB value of each particle in an image that have many particles. We have some soybean pods on an image and we would like to measure RGB of each pod in the same image.

Please kindly determine our question and reply to us.

Thank you very much.

With my best regards,

Panmanas

0 Kudos
Message 4 of 6
(3,839 Views)

If you have a color image (like your .jpg) you seperate it into its color parts by using the Numeric>>Conversion>>Color to RGB function.  (alternatively, you can use the seperate image into color planes function in the vision tools.  If you take the image, convert it to an array, then step through the array with for loops, your could build 3 arrays, each containing the value of  of the colors R...G...B.  Your could then go look in the Green array for locations where pixels were much more green that in the red or blue array...that would let you find the boundary of each of the green parts of the picture.

Finding the size would mean counting the number of adjacent pixels which were above the green to rb threshold you set.  You would then have to multiply the pixel sizes by their corresponding physical size....which will depend on how the camera is arranged, its lens and the pixel size of the camera array.  (I think I would just stick a known size on the table and let LabView measure all that...and keep it for you.)

Hope that Helps.

 

Attachement is a rough guess and may not work without the normal trial and error.

 

 

 

0 Kudos
Message 5 of 6
(3,812 Views)

Dear Hummer1

Thank you very much for your help. We shall try and study what you suggest.

Thank you very much.

With my best regards,

Panmanas

0 Kudos
Message 6 of 6
(3,794 Views)