Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Octagon measurement

Hi there,

 

I'm trying to make measurements on an octagon.  I need to know the Max width, min width and center of mass.  I also need to evaluate the chipping on the side of the octagon (dark area on the side of the octagon). The chipping measurement must be made perpendicular from the side.  I would have use the blob tool if it would not have been the case.

 

I'm using 

 

I thought of using the clamping tool but the measurement must be automated so I need to figure a way to build an algorithm.

 

Any idea?

 

Thank in advance

0 Kudos
Message 1 of 4
(2,927 Views)

My thoughts:

 

You can create a mask for the (ideal) entire octagon by converting it to binary, then use convex surface to fill in all the chips.

 

The ideal octagon can be converted to a depth gage by using IMAQ Distance or Danielson.

 

By manipulating the original image to get a binary image of the chips, you can combine it with depth gage to get distance from edge.

 

Bruce

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

The problem is that the sides of the octagon are never the same length. the sidse can be longer/shorter than the mask.

 

as for the chipping, I tought of finding a straight edge of one side to start. then place the cordinate system on this edge and sweep ( one line ROI incremented by 1 pixel at a time from end to end of the side)  and check for the chipping.

 

what do you think?

0 Kudos
Message 3 of 4
(2,906 Views)

Hi,

 

I think that your idea of sweeping the edge will work to check for chipping.  As far as actually detecting the octagon, you could threshold the image then use a detect object step to locate where in the picture the octagon is.  Then you could specifiy a coordinate system and then a mask or ROI based on this.  You could set the size of the ROI/Mask proportional to the size of the detected object and this should account for the change in size.

 

Regards,

 

Greg H.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,889 Views)