DNG, tiff and OCR - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum

DNG, tiff and OCR

  • 16 Replies
  • 4593 Views
*

Offline reyalp

  • ******
  • 14080
Re: DNG, tiff and OCR
« Reply #10 on: 29 / September / 2013, 16:56:08 »
Advertisements
I don't see anything obviously wrong with the "bad" tiff.

One thing that stands out is that there's lot of lens distortion. CHDK DNG does not have the same correction the camera applies to jpeg. This might be more difficult for the OCR.  This could be corrected in post processing with the right software.

However, if jpeg works, why not just use that?
Don't forget what the H stands for.

*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #11 on: 30 / September / 2013, 04:42:05 »
Thanks all for your replies

You should bear in mind the constraints of my config :
under "pure" Windows Microsoft  environment with its .tif specs
my Canon A2200 1.0d  Camera without "jpg remote shoot" ( not implemented until now )
immediate download of the image file to the PC
no need for image compression
minimum processing on the camera

the results of the ocr is used to "measure" the quality of the scanning of the printed material.

I will post later the results of my experiments with dcraw and ImageMagick

« Last Edit: 30 / September / 2013, 05:28:23 by poussin »

*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #12 on: 30 / September / 2013, 05:27:29 »
Thanks all for your replies.

Please find the links to download samples of an image  shot by a A2200 1d :

jpg converted to tif by Paint  suitable for ocr  http://dl.free.fr/kFPl8902D
dng converted to tif  by graphicsmagick unsuitable for ocr  http://dl.free.fr/iJjMfewaq
Can you please post an original DNG? That is the only way for us to tell if there is something wrong with  DNG code on this camera. If there is, then we can fix it. If there is not, then the problem is with the software you have chosen to use


Please find link to the original DNG

http://dl.free.fr/oHl6XUj5T


*

Offline reyalp

  • ******
  • 14080
Re: DNG, tiff and OCR
« Reply #13 on: 30 / September / 2013, 13:24:57 »
Thanks all for your replies

You should bear in mind the constraints of my config :
under "pure" Windows Microsoft  environment with its .tif specs
my Canon A2200 1.0d  Camera without "jpg remote shoot" ( not implemented until now )
Note on cameras without remote shoot support, you can use shoot -dl -rm to shoot an image, download the file and delete it from the card. It's a little slower than remoteshoot, but probably still faster than DNG remote shoot if you only use the jpeg.

Quote
the results of the ocr is used to "measure" the quality of the scanning of the printed material.

I will post later the results of my experiments with dcraw and ImageMagick
I would suggest identifying what aspect of the tiff causes problems with your OCR. If it's the lens distortion, then using different programs isn't going to change anything (unless you find or create a lens profile to correct it). If it's something to do with the actual tiff structure or color values that confuses your OCR program, then maybe changing software would help.

While I know very little about OCR, my guess would be that the lens distortion is the problem. It's possible that a different zoom setting has less distortion.

Your DNG validates perfectly with adobe dng_validate, so I don't think there is any serious problem with CHDK DNG code on this camera.

Your dng has some unfixed bad pixels, which will put some spots on the image if your tiff conversion doesn't know to patch them. If you are using remoteshoot, you can can use -badpix to patch them in the download process. I doubt this causes any serious problem for OCR.
Don't forget what the H stands for.


*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #14 on: 04 / October / 2013, 16:29:31 »

 it's something to do with the actual tiff structure or color values that confuses your OCR program,


You were right .
The OCR does not like the conversion from DNG to Tiff I made with graphicsmagick.

Another conversion gives a good OCR result.
 

*

Offline reyalp

  • ******
  • 14080
Re: DNG, tiff and OCR
« Reply #15 on: 04 / October / 2013, 16:51:04 »
Another conversion gives a good OCR result.
If you post which other conversion works and what OCR you are using, that might help others who have the same problem in the future.
Don't forget what the H stands for.

*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #16 on: 19 / October / 2013, 05:22:54 »
In my new message http://chdk.setepontos.com/index.php?topic=6254.msg106425#msg106425 some faulty .jpg images are obtained with a A2200 1.0D using chdk latest version and that  may explain why the OCR does not (cannot ) give good results .

 

Related Topics