Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Different methods to find a rectangle shape's centre and rotation in vision assistant

Solved!
Go to solution

Hi this is my first go at machine vision and the Vision Assistant tool. I am trying to find a rectangle shape in an image, and determine its centre and rotation about that centre. I have started off with this image:

 

RawImage.jpg

 

 

 

and I have boosted the saturation and contrast to make a clearer target area:

 

 

 

BrightnessApplied.jpg

 

I am interested in the main red rectangle rotated about 5 degrees clockwise. To me it looks like it has suitably contrasty edges, but I have quickly tried a few of the edge detection (including rake) and pattern matching algorithms and I am not getting any useful results. It may be that the white lines are interfering. I tried to extract just the red color plane but since white also contains red these lines are still appearing.

 

I am hoping to get some ideas for various approaches to accurately get the center and rotation of this part, along with any tips needed to achieve success. Thanks for any advice!

 

 

 

 

0 Kudos
Message 1 of 2
(3,830 Views)
Solution
Accepted by TripleAntigen

I would try using color thresholding to extract the rectangle.  Use particle analysis on the rectangular blob and you should be able to get a rotation value.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 2
(3,817 Views)