Hacker News new | ask | show | jobs
by cogman10 1854 days ago
Count things isn't trivial, but this specific use case (counting circles) is trivial with opencv. I've done it myself making a robot follow a ball :)
2 comments

I still wouldn't consider this trivial. It takes a good bit of playing around with parameters like radius range and filters to consistently get all and only real circles. Even under ideal conditions, it's probably more than an hour of trial and error, and it's very easy for a layman to not fully understand why they're not getting the result they wanted. I'm no expert on jewelry but I imagine even a 0.1% error rate would be quite expensive, and that level of performance would be a real challenge for even someone very experienced with opencv.
Agree. Especially if you can control the image quality, background, etc, this can be done with less fancy methods. Heck, they probably don’t even need an image based solution. They could have also used mostly mechanical machines like how coin counters/sorters work, or used a bigger version of their old counting plate method but with detectors in each slot.
Background helps a lot, but if your things are relatively the same color, it's pretty easy to just filter out anything not within that color range and look for circles, even with an inconsistent background (though, admittedly it's harder).

That's effectively what I did with the ball tracking. I had a red ball and filtered out everything that wasn't roughly that shade. Certainly someone could have messed with me by wandering into frame with a red shirt :D

They could even make people count them by hand!
Well no that wouldn't be fully automatic. A counting machine that just funnels the pearls through a switch is simple, automatic, non-patent encumbered, and cheap.