07-23-2012 01:43 PM
Not so sure if anybody else already came across this problem or not. Any suggestion is welcome.
I have a simple isolated object to be fitted into an ideal rectangle which will then be used for a metrology purpose in following step. I was trying to make use of the equivalent rect long and shot sides from particle analysis operation, but it seems the particle analysis always gives a same value to the long side and short side. Attached picture shows the calculation results from vision assistant. I tried to calculate the equivalent rect sides from the given area and perimeter. The results tends to become complex values as the perimeter seems smaller than it should be(i.e.. P^2 smaller than 16*A). It may be one reason to produce same value to equivalent rect long and short side.
PS: the expression for calculation of equivalent rect long and short side in the page: http://zone.ni.com/reference/en-XX/help/372916L-01/nivisionconcepts/particle_measurements/ seems not right. It should be (P-sqrt(P^2-16A))/4, rather than P/4-sqrt(P^2-16A).
07-31-2012 11:28 AM
Hi paris_sun,
I am assuming you are using the latest version of Vision Assistant 2011 SP1.
I would just like to clarify what you are trying to achieve. This is to measure the long and short (length and width) side of a rectangular shape in your image by using:
Processing Functions: Binary >> Particle analysis
Something I could suggest is to play around with a more definative rectangle and see if this helps. I have tried using a rectangle and the measurements have come out fine.
The shape you are measuring happens to have the same size dimensions i.e. a square.
Where are you acquiring your image from? And are you expecting it to be a square?
With regards to the formulas being incorrect I will look into this for you.
Kev R
07-31-2012 12:59 PM
Thanks Kev, my vision assitant is ver 2009.
The images were captured and processed using the software I wrote in Labview. I haven't translated this part from vision assistant because of the problem posted. I am measuring the box shape objects whose sides could be square or rectangle. I agreed with you the NI particle analysis works for a definative rectangle. But for the square or nearly square objects(actually I believe the rectangle object in my image is not exactly square), it may not work.
08-02-2012 02:49 AM
Hi paris_sun
Can you try to find the equivalent long and short sides, of the rectangle I have posted to see if you get the same values I have got? We can then compare values to see if this is working in my version. Whilst you are doing this I will do some more research to see if this is a known issue.
In answer to comment regarding the equation being incorrect on the Particle measurement page, I agree with you will take the necessary steps to rectify this.
Kev