07-17-2012 01:37 PM
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
07-18-2012 01:16 PM
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
07-18-2012 01:23 PM
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?
07-19-2012 02:17 PM
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.