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

DNG, tiff and OCR

  • 16 Replies
  • 4602 Views
*

Offline poussin

  • *
  • 36
  • A2200
DNG, tiff and OCR
« on: 28 / September / 2013, 05:38:06 »
Advertisements

In fact , I needed a .tif file for OCR.

From the .dng file I downloaded from the A2200 , I was able to get a .tif file .

The .tif file can be displayed but the OCR returned no text.


From the .jpg file I downloaded from the A2200 , I was able to get a .tif file .

The .tif file can be displayed and the OCR returned the text.

Not sure where the problem (transparence ? ) lies.

Re: DNG, tiff and OCR
« Reply #1 on: 28 / September / 2013, 09:30:04 »
Not sure where the problem (transparence ? ) lies.
At the risk of stating the obvious, the problem lies in the software you used to translate DNG to TIFF.   

DNG is an Adobe standard format that CHDK implements.  As pretty much all PC image processing software accepts CHDK DNG files and there have been no bug reports,  it seems unlikely the CHDK part is broken (although with software, nothing is impossible).

What software did your conversion?  Have you tried other packages?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #2 on: 28 / September / 2013, 11:39:43 »
Not sure where the problem (transparence ? ) lies.
At the risk of stating the obvious, the problem lies in the software you used to translate DNG to TIFF.   

DNG is an Adobe standard format that CHDK implements.  As pretty much all PC image processing software accepts CHDK DNG files and there have been no bug reports,  it seems unlikely the CHDK part is broken (although with software, nothing is impossible).

What software did your conversion?  Have you tried other packages?


Thanks for your reply.
Windows Photogallery gives error code : 0x88982F61
graphicsmagick converts the .dng to a .tif  file  unsuitable for OCR
Adobe Photoshop converts the .dng to a .tif  file  suitable for OCR but with a size cut in half .



Re: DNG, tiff and OCR
« Reply #3 on: 28 / September / 2013, 14:05:06 »
Thanks for your reply.
Windows Photogallery gives error code : 0x88982F61
graphicsmagick converts the .dng to a .tif  file  unsuitable for OCR
Adobe Photoshop converts the .dng to a .tif  file  suitable for OCR but with a size cut in half .
I tried googling for  DNG TIFF OCR but didn't find anything interesting.   My only other suggestion might be to try RawTherapee to see if it will create a TIFF file your OCR software will accept.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline ahull

  • *****
  • 634
Re: DNG, tiff and OCR
« Reply #4 on: 28 / September / 2013, 14:57:50 »
You might also have some luck with Gimp and its scripting capabilities, it should be able to transform your starting image in pretty much any way you can think of, but it might be a bit of a steep learning curve to get it to do what you require. No pain, no gain as they say.  :blink:

*

Offline reyalp

  • ******
  • 14080
Re: DNG, tiff and OCR
« Reply #5 on: 28 / September / 2013, 16:03:45 »
Thanks for your reply.
Windows Photogallery gives error code : 0x88982F61
graphicsmagick converts the .dng to a .tif  file  unsuitable for OCR
Adobe Photoshop converts the .dng to a .tif  file  suitable for OCR but with a size cut in half .
It's possible for problems in a port to cause DNGs to be invalid and not work in every program.

If you can upload an example somewhere, we can check this. Use a file hosting site like box or google drive, it will be too big to attache to the forum.

If you can post examples of the "suitable for OCR" and "not suitable for OCR", that might help understand what is going wrong.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG, tiff and OCR
« Reply #6 on: 28 / September / 2013, 17:30:48 »
Not sure where the problem (transparence ? ) lies.
At the risk of stating the obvious, the problem lies in the software you used to translate DNG to TIFF.   

DNG is an Adobe standard format that CHDK implements.  As pretty much all PC image processing software accepts CHDK DNG files and there have been no bug reports,  it seems unlikely the CHDK part is broken (although with software, nothing is impossible).

What software did your conversion?  Have you tried other packages?


Thanks for your reply.
Windows Photogallery gives error code : 0x88982F61
graphicsmagick converts the .dng to a .tif  file  unsuitable for OCR
Adobe Photoshop converts the .dng to a .tif  file  suitable for OCR but with a size cut in half .

It could also be the compression used on the TIF file is not supported with the OCR program.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline ahull

  • *****
  • 634
Re: DNG, tiff and OCR
« Reply #7 on: 29 / September / 2013, 08:27:46 »
OCR is a bit of a black art, (or to twist the metaphor a bit, ..black and white art). You probably need to transform the image to greyscale or black and white (assuming your OCR software doesn't already do so) for best results too.

If the OCR software specifies what version it expects the TIFF format to be that might also give us some clues about what would best handle the conversion. 


*

Offline poussin

  • *
  • 36
  • A2200
Re: DNG, tiff and OCR
« Reply #8 on: 29 / September / 2013, 16:21:17 »
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


After further investigation, it looks like I have a problem with graphicsmagick  conversion from dng to tiff for OCR use.

Still a way to convert from .dng ( Adobe xmp core 4.2-c020 1.124078 11/9/2007)  to .tif is needed .

*

Offline reyalp

  • ******
  • 14080
Re: DNG, tiff and OCR
« Reply #9 on: 29 / September / 2013, 16:36:02 »
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

Adobe provides a conversion utility,  available from http://www.adobe.com/support/downloads/detail.jsp?ftpID=5646

dng_validate in the DNG sdk will also convert to tiff.

dcraw should also be able to convert DNGs. ImageMagick uses this under the hood http://imagemagick.org/script/index.php

All of this is very off topic from chdkptp, so I'm going to split it into a new thread
Don't forget what the H stands for.

 

Related Topics