[OpenCV] Extract en recognize barcode from image file.



Hi there!!!

I've been working on recognizing EAN barcodes from images. Yes it's
about recognizing barcodes from images but from bars not from the
digit with the help of OCR software but with "Open Computer Vision
library" (OpenCV).
I haven't been successful yet.

Here is my idea at how I should do it :
- Image capture
- Grays levels
- Binarize image
- Search the angle with Hough Transform
- Rotate the image using the found angle.
- Average of several lines for the color of the bars
- Convert to binary digit
- Convert in decimal

(I'm unable to show the lines found with Hough Transform anyway ...
<)
I can rotate the image and all.

I don't have the slighest idea at how to do to extract the rectangular
zone of the barcode and then averaging the lines.

Then, I have problems with some barcodes with some reflections, some
bars won't be continue bars so ... it inputs errors and dunno how to
correct it (how to reform correctly the bar since some point are
presents).

Here what I have for now :
http://img527.imageshack.us/img527/4182/1barcodeuo0.th.jpg
http://img525.imageshack.us/img525/1876/2levelsofgrayseq3.th.jpg
http://img153.imageshack.us/img153/4425/3binarizexb6.th.jpg
http://img398.imageshack.us/img398/6972/4rotatesz3.th.jpg

I would like to post the source code but it's more than 100 lines ...
When my problem is resolved, I think I'll contribute to the community
by giving out the sources for recognizing a barcode from image.

Help would be much appreciate.

Thank you

Kurapix

P.S. : Sorry for my bad english
.



Relevant Pages

  • Re: Extract en recognize barcode from image file.
    ... I've been working on recognizing EAN barcodes from images. ... Average of several lines for the color of the bars ... For the pictures, remove .th in the links to have real size pictures ...
    (comp.lang.c)
  • Re: [OpenCV] Extract en recognize barcode from image file.
    ... about recognizing barcodes from images but from bars not from the ... Then, I have problems with some barcodes with some reflections, some ... bars won't be continue bars so ... ...
    (comp.lang.c)
  • Re: Postal Barcode /MainFrame Cobol
    ... Windows that will generate POSTNET barcodes. ... Specific combinations of two full bars and three half bars ... represent digits 0 thru 9. ... The POSTNET bar code always begins and ends with a frame bar (Full or tall ...
    (comp.lang.cobol)
  • Re: Barcodes no longer scan
    ... XP is probably producing a more acurate calculation when ... using one driver and the barcode would read but when using another driver it ... After examining the barcodes, the one printed at 203dpi had some narrow bars ...
    (microsoft.public.windowsxp.print_fax)