![]() ![]() Custom edge following circle detection algorithm.ĭon’t tell me you see no difference The custom one outperforms OpenCVs HT21 circle detection algorithm both in performance and accuracy (in this specific case that is.) Analytical tilt controlĪnother big software update was the addition of analytical tilt control. If you’re not convinced just look at this data: HT21 circle detection algorithm. And if we do this for 10 pixels randomly chosen and then only consider the 5 biggest diameters we are able to get very accurate ball data even if the ball isn’t fully visible or part of the edge isn’t appearing circely. Computing the 2D distance between these two pixels yields the diameter of the ball. After we got this edge data we just look at one of the edge-pixels and determine which of all the other edge pixels is the furthest away. My current algorithm just follows around the edge of all the bright pixel lumps it is able to detect. So here’s what I ended up doing: Edge following. I went down this route for a while but the processing load quickly got out of hand and my goal of 120 FPS didn’t seem feasible. The only problem with this approach is that detecting multiple balls is only possible if we’re adding code to distinguish the different lumps of bright pixels. Following this line of thought a bit deeper, we also see that there’s an easy way to get the ball’s radius by counting all the bright pixels and then using the fact that a circles area is equal to pi * r^2. We could find the ball’s position just by counting all the bright pixels and then taking the average. Just look at it:Īfter doing a simple orange to gray scale conversion the data is even crisper. But our image data is very clear cut from the start. HT21 shines in circumstances when there’s a lot of different shapes and edges and you want to know where the f*ck the circle is. It just wasn’t the right fit for the job. I am not bashing the HT21 circle detection algorithm. ![]() Wasn’t able to reliably process at 120 FPS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |