opencv locate and process store shelf labels in photo
I'm looking for the steps I may be able to use to locate and process store shelf labels in a photo. Pretend it's a photo of 20 products on a shelf and under each product is the store label which would typically have a UPC code, english description, price, etc. I'd like to be able to locate each label, pull out the UPC, description, price, etc and process each of those using开发者_StackOverflow OCR, maybe tesseract. Any ideas as to a process I could take to do this processing (I'm assuming opencv)?
Here is a nice OpenCV OCR guide.
Like Martin Beckett said in his answer, a regular pattern-matching mechanism would be a good start to developing an approach.
There's a similar Stack Overflow post in which the OP was seeking a cheap OCR library in .NET. You can find that here.
I hope that helps.
If the labels are suffienctly similar (eg same supermarket, same size, same distance) then a pattern matching approach would probably be good (eg Haar classifier)
Otherwise you need to look for edges and then rectangles of the correct aspect ratio with text in the correct position
edit: If you are specifically taking close-up pictures of each label (rather than trying to detect if an arbitrary image contains a label) then I would just OCR the whole image and then try and work out which string is which.
精彩评论