Detecting crosses in an image

后端 未结 3 721
梦如初夏
梦如初夏 2021-02-03 12:32

I am working on a program to detect the tips of a probing device and analyze the color change during probing. The input/output mechanisms are more or less in place. What I need

3条回答
  •  醉梦人生
    2021-02-03 13:11

    How about simply determining the autocorrelation as you have a nice periodic pattern in your images.

    Let say you have your target image:

    enter image description here

    And a template image to synchronize to

    enter image description here

    You can determine the Autocorrelation of both:

    enter image description here enter image description here

    In both you can detect the ACF peaks, as in this example enter image description here

    These peaks you can match against each other using the Hungarian algorithm. Here a match is indicated by a white line.

    enter image description here

    This gives you a set of matching 2D coordinates, which hopefully satisfy the relationship:

    x = Ax'
    

    Where A is tranformation matrix with scaling and rotation. Solving it thus gives you the rotation and the scaling between your template and your target image. Translation can then be ascertained via normal cross-correlation with the partly rectified/corrected image and the template image.

提交回复
热议问题