Android Question OpenCV use case

imbault

Well-Known Member
Licensed User
Longtime User
Dear community,

Is OpenCV able to recognize those elements : Truck labels, Seals, nails with text, see all images attached ?
Sorry if some photo are really bad...

Then I read OpenCV could do some OCR, is it able to grad codes and texts from those images?

Wishing OpenCV is the right way to begin this project....

Thanks a lot
 

Attachments

  • DSC01186-min.JPG
    DSC01186-min.JPG
    137.8 KB · Views: 330
  • IMG_3196-min.JPG
    IMG_3196-min.JPG
    142.3 KB · Views: 343
  • IMG_3197-min.JPG
    IMG_3197-min.JPG
    87.4 KB · Views: 322
  • Lot 2 Apr+¿s-min.JPG
    Lot 2 Apr+¿s-min.JPG
    138.3 KB · Views: 347
  • Lot 3 Apr+¿s-min.JPG
    Lot 3 Apr+¿s-min.JPG
    135.4 KB · Views: 334
  • Lot 3 Plomb Transporteur-min.JPG
    Lot 3 Plomb Transporteur-min.JPG
    110.9 KB · Views: 344
  • Lot 4 Plomb Transporteur-min.JPG
    Lot 4 Plomb Transporteur-min.JPG
    110.5 KB · Views: 312
  • nail-min.jpg
    nail-min.jpg
    19.5 KB · Views: 318
  • 20170126_151043-min.jpg
    20170126_151043-min.jpg
    110.3 KB · Views: 307
  • 20170127_085256-min.jpg
    20170127_085256-min.jpg
    140.8 KB · Views: 312
  • 20170127_100347-min.jpg
    20170127_100347-min.jpg
    142.4 KB · Views: 287
  • 20170127_103918-min.jpg
    20170127_103918-min.jpg
    112.2 KB · Views: 323
  • DSC01169-min.jpg
    DSC01169-min.jpg
    124.7 KB · Views: 309

JordiCP

Expert
Licensed User
Longtime User
I think there are different approaches here (hoping that it will help to see things clearer and not add confusion). They will be better or worse depending on how "clever" their implementation is
  • OpenCV "alone": pre-process the image, train for chars and numbers, detect "zones", detect the chars in each one, and add a final logic level to "build" this data based on detected chars, their position, some coherence filtering, .... --> This will give you total flexibility, but will need more programming.
  • OpenCV + OCR (either Google Vision or Tesseract lib): OpenCV to pre-process the image (noise filter, lightness add/substract), also detect zones --> and give them to OCR (with options: for instance the known font, no dictionary,...) to get the data. Anyway a next-step processing level will also be needed to convert the 'spare' detected chars into values, apply the same coherence-filtering, ....
  • OCR standalone (whichever option): seems that OCR by itself can throw good results. Additionally, playing with options can help (but make things worse if not correctly used). But I'm not sure (just because I haven't tested, nothing else) if it will be true for all situations, since in this case there will not be dictionary -> as the setup for an ocr-based solution should be quite easy, I would anyway implement this one and use it to compare against the others.

Also, some questions/checklist before starting, that can help to decide how to implement it:
  • Must is work real-time from a camera preview, or can it be processed from a photo and take, for instance, 10 seconds?
  • Picture: will the picture always be taken from more or less a certain distance and light conditions?
  • It seems that some chars/combinations can (or must) always appear --> the algorithm should always take advantage of what is known, and also of their expected relative positions in order to make a more accurate guess -> For instance, if it detects "KG" or "LB", it will be after some numbers. Also, there is "CMAU","FCIU","MEDU",..... no idea of what they mean, but if there is a limited set of them, the algorithm should also take advantage from it .
  • Seems that the fonts are similar. If there is a standard, the algorithm (whichever approach you use) should also take advantage of that.

Last but not least, as detection related solutions are never perfect, so you should measure how good your successive approaches are by a hit-rate measurement. A good approach in these cases is to get a lot of test images (including some edge cases) in order to test how each approach improves or not the previous one.

If I had to do it, I would build a "customizable" multi-phase-step detector in which I could play with many chained options (being able to tune, enable/disable each one), and measure performance on the test images.
 
Upvote 0
Top