3 ms·
Wil Shipley has explored this approach: http://blog.wilshipley.com/2009/08/pimp-my-code-part-16-heuristics-and.html http://blog.wilshipley.com/2009/08/pimp-my-c
by daxelrod 16y ago
Wil Shipley has explored this approach: http://blog.wilshipley.com/2009/08/pimp-my-code-part-16-heuristics-and.html http://blog.wilshipley.com/2009/08/pimp-my-code-part-16-heur...
I also swear I remember reading another example of this on his blog, but I'm unable to find it, so I'll paraphrase from memory (which is somewhat murky, so caveat lector):
One of the features of Delicious Library is that you can use your computer's built-in webcam to scan barcodes as a way of adding items to your library.
The traditional, mathematically-inspired computer science approach to implement this is to frame the problem as: "Given an image with a barcode somewhere in it, find the barcode, and then read it." The problem is that a general algorithm that accepts entire set of images with barcodes in them is prohibitively slow, because you have to deal with skew, perspective, lighting, focus, etc.
The approach they ended up using was inspired by biology: it's OK to fail some of the time as long as there's feedback. They went with a much simpler algorithm that takes a fraction of a second to succeed or fail. They run it continuously against new frames, and indicate to the user whether it has succeeded. Since the user is standing there with the barcode in front of the camera, they'll reposition, try different angles, etc, until there's success.