2015-07-09 23:49:46 -0600 | answered a question | Detecting dent in pipelines Method Extending LBerger's comment, you will definitely be looking to us a contour of some kind. OpenCV has a function that calculates the "convexity defects" of a contour and its context hull, and it gives you a struct with all the pertinent information. You can find more documentation here: http://docs.opencv.org/modules/imgpro... Convexity Defect Struct Locating a Dent With the Struct You can compare the "depth" variable against a threshold. If it's greater than this threshold, you'll consider that defect a "dent". Example Code: Marking It Using the "start" and "end" point, you can draw rectangle/circle/ellipse that fits these two points. |
2015-07-09 18:03:46 -0600 | received badge | ● Supporter (source) |