Robustly find N circles with the same diameter: alternative to bruteforcing Hough transform threshold

前端 未结 3 1173
再見小時候
再見小時候 2021-02-07 08:31

I am developing application to track small animals in Petri dishes (or other circular containers). Before any tracking takes place, the first few frames are used to define areas

3条回答
  •  盖世英雄少女心
    2021-02-07 09:14

    Within the current algorithm, the biggest thing that sticks out is the for(int t=5; t<400; t=t+2) loop. Trying recording score values for some test images. Graph score(t) versus t. With any luck, it will either suggest a smaller range for t or be a smoothish curve with a single maximum. In the latter case you can change your loop over all t values into a smarter search using Hill Climbing methods.

    Even if it's fairly noisy, you can first loop over multiples of, say, 30, and for the best 1 or 2 of those loop over nearby multiples of 2.

    Also, in your score function, you should disqualify any results with overlapping circles and maybe penalize overly spaced out circles.

提交回复
热议问题