Search code examples
opencvimage-processingedge-detection

How to used the edge detection in opencv python to return number of edge?


Hi I have the following picture, how to use edge detection to return the result which is equal to 4?

enter image description here

Here are the original image link: https://1drv.ms/u/s!An0pWQPDB_ImjGu_nQGSvG3fUBPS

enter image description here


Solution

  • I think for your example you are rather looking for corner detection like the Harris algorithm. Edge detection would match too many edges.

    General information on corner detection: Corner Detection on Wikipedia

    And for OpenCV: Harris Corner Detection