Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to find all of the edges of a rectangle.I used two "find vertical edge vi" and two "find horizontal edge vi". I wonder if there are other better ways.

I want to find all of the edges of a rectangle.I used two "find vertical edge vi" and two "find horizontal edge vi".
it's too complex, and  I wonder if there are other better ways.
 
Besides ,there is a problem that the edges finded are different each time I run the progamm.
 Sometimes the edges are very few, only several points,and the points centralize,not fulfilling the request. but sometimes I can find a lot of points.why?
 
0 Kudos
Message 1 of 9
(4,299 Views)

I don't know of a better way to locate the edges of a rectangle than what you are doing.  I would recommend using Vision Assistant (or Vision Builder AI) on one of your images to fine tune the parameters for the edge location.  You may need to change the contrast level or the line spacing to get better points.  Also, try to avoid the corners so you don't get points from other edges.

Other than that, I would recommend posting an image if you are still having problems.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 9
(4,293 Views)

well, I have find the edges of the rectangle using the way I mentioned .

Now, I want to reconstruct the rectangle using these edged points. I don't know how to do it.

Can you help me? Thanks

0 Kudos
Message 3 of 9
(4,279 Views)

You should have the lines that represent the four sides of the rectangles.  You can use "IMAQ Lines Intersection" to get the points at each corner of the rectangle.  This function is under at Vision -> Machine Vision -> Analytic Geometry.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 9
(4,271 Views)
I adopt your suggest and use the "IMAQ Lines Intersection" , but there is a problem I don't konw.
 
The input of "IMAQ Lines Intersection" asks a clusters of two point-coordinates that lie on each lines.
 
I wonder the structure of  the two point-coordinates. I tried many times: the cluster of two arrays, the cluster of two clusters ,
 
but it's wrong. So I conslut you about the right way.
0 Kudos
Message 5 of 9
(4,257 Views)

I adopt your suggest and use the "IMAQ Lines Intersection" ,but there is a problem I don't know.

the input of "IMAQ Lines Intersection" asks the cluster of two point-coordinates that lie on each line,

I wonder the type of the cluster of the two point-coordinates, I tried many times: cluster of two arrays,cluster of two clusters,

They are both wrong. I don't know other ways to show the point-coordinate.

0 Kudos
Message 6 of 9
(4,255 Views)

Try an array of clusters.  Each cluster is a point.  The output of the Find Horizontal/Vertical Edge should be the same line - you should be able to just wire the output of Find Edge into the input of Lines Intersection.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 7 of 9
(4,257 Views)
Thanks very much! The problem has been solved.
 
But sorry, I have another problem.
 
The picture I captured has some aberrance, and the peaks of the rectangle have the most aberrance.
 
So I can't use the input of Find Edge into the input of Lines Intersection. I hope to fit a beeline using the edged points I found so that the error could be reduced. I use the "IMAQ fit line". The problem is that the result is some lines,not a beeline.
 
Another problem is how to choose two points from the line as the input of Lines intersection to realize the best result.
0 Kudos
Message 8 of 9
(4,242 Views)
Or do you have other better methods to reduce the error resulted from  aberrance?
0 Kudos
Message 9 of 9
(4,239 Views)