Re: [PHP] Read/decode barcodes from an image

2008-12-18 Thread Per Jessen
Adam Randall wrote:

 I'm amazed that this either doesn't exist, or is hard to find. I
 basically am looking for a way to read in an image into PHP, or shell
 out to something on the Linux side, and determine, and see if it has a
 barcode in it or not. If it does, I need to decode the barcode so that
 I can identify the page as a separator page or not.
 
 Basically, what I'm doing is reading in a PDF or TIF which will
 contain multiple pages (probably a lot of pages) and look for a page
 containing a barcode. The barcode will identify the page as a
 separator page which will be used to split the multipage document into
 smaller single or multipage documents.
 
 Has anyone ever heard of anything that might help me in this process?

I can't say for certain, but have a look at zebra:

http://zebra.sourceforge.net/

Looks like the sort of thing you could use. 


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Read/decode barcodes from an image

2008-12-18 Thread ceo

AIUI:



The barcodes are on faxes and whatnot, with no predictable skew, position, nor 
orientation.



You've tried JOCR/GOCR, and they don't do very well.



Here are your options:

1) Shell out the money for that PaperPort OMNI or whatever it is commercial OCR 
product. It *is* better than JOCR/GOCR, in my experience.

[If you Google for OCR you'll find it, as it's the only/best contender, and 
referenced everywhere.]



2) Roll your own with GD. With sufficient skill and time, you can utilize very 
specific knowledge of your content to do even better than the generalized 
commercial solution. I have done this myself for standardized medical documents 
that were scanned in, getting a percentage point or two better than 1)



No matter what you do, OCR will never ever get you 100%.  You WILL need a human 
oversight process on the results that hand-checks everything, or be prepared to 
accept a (small) failure rate.



Set your [client's] expectations properly, or be doomed to frustration 
[failure].





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Read/decode barcodes from an image

2008-12-18 Thread Boyd, Todd M.
 -Original Message-
 From: c...@l-i-e.com [mailto:c...@l-i-e.com]
 Sent: Thursday, December 18, 2008 10:06 AM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Read/decode barcodes from an image
 
 The barcodes are on faxes and whatnot, with no predictable skew,
 position, nor orientation.
 
 You've tried JOCR/GOCR, and they don't do very well.
 
 Here are your options:
 1) Shell out the money for that PaperPort OMNI or whatever it is
 commercial OCR product. It *is* better than JOCR/GOCR, in my
 experience.
 [If you Google for OCR you'll find it, as it's the only/best
contender,
 and referenced everywhere.]
 
 2) Roll your own with GD. With sufficient skill and time, you can
 utilize very specific knowledge of your content to do even better than
 the generalized commercial solution. I have done this myself for
 standardized medical documents that were scanned in, getting a
 percentage point or two better than 1)
 
 No matter what you do, OCR will never ever get you 100%.  You WILL
need
 a human oversight process on the results that hand-checks everything,
 or be prepared to accept a (small) failure rate.
 
 Set your [client's] expectations properly, or be doomed to frustration
 [failure].

I had always thought that faxes were a big no-no for character
recognition software? I know that we can't use it for one of our OCR
solutions because it is just too... well, crappy. The image quality is
nowhere near what it should be for a successful OCR pass.

As for client expectations: hell yes--tell them not to use a fax machine
in the digital age. Scan the document and e-mail it or something. Where
I work, we've done away with 90% of any fax machine usage in order to
have documents that can be used by our OCR solution.

My 2c,


// Todd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Read/decode barcodes from an image

2008-12-18 Thread ceo

Certainly if the quality of the input can be improved by using some digital 
transfer that is not a fax, go for it...



I assumed the OP already knew that, but perhaps not.



The fax is going to cost you a LOT of accuracy, probably too much to make OCR 
even viable, really, but it depends on the faxes involved.  If it's always the 
same two fax machines, and they are both set at image quality and have good 
feeders, you *might* get halfway decent quality out of them.



If you're talking random faxes from random people, then forget about OCR. Not 
gonna work.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Read/decode barcodes from an image

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 14:56 -0800, Adam Randall wrote:
 I'm amazed that this either doesn't exist, or is hard to find. I
 basically am looking for a way to read in an image into PHP, or shell
 out to something on the Linux side, and determine, and see if it has a
 barcode in it or not. If it does, I need to decode the barcode so that
 I can identify the page as a separator page or not.
 
 Basically, what I'm doing is reading in a PDF or TIF which will
 contain multiple pages (probably a lot of pages) and look for a page
 containing a barcode. The barcode will identify the page as a
 separator page which will be used to split the multipage document into
 smaller single or multipage documents.
 
 Has anyone ever heard of anything that might help me in this process?

Barcode reader?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
Are you referring to a project, class, or just generally curious about
what I'm asking? Barcode reader can be many things, including a
scanning wand (not applicable to what I am looking for).

On Wed, Dec 17, 2008 at 3:47 PM, Robert Cummings rob...@interjinn.com wrote:
 On Wed, 2008-12-17 at 14:56 -0800, Adam Randall wrote:
 I'm amazed that this either doesn't exist, or is hard to find. I
 basically am looking for a way to read in an image into PHP, or shell
 out to something on the Linux side, and determine, and see if it has a
 barcode in it or not. If it does, I need to decode the barcode so that
 I can identify the page as a separator page or not.

 Basically, what I'm doing is reading in a PDF or TIF which will
 contain multiple pages (probably a lot of pages) and look for a page
 containing a barcode. The barcode will identify the page as a
 separator page which will be used to split the multipage document into
 smaller single or multipage documents.

 Has anyone ever heard of anything that might help me in this process?

 Barcode reader?

 Cheers,
 Rob.
 --
 http://www.interjinn.com
 Application and Templating Framework for PHP





-- 
Adam Randall
AIM: blitz574

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php