Improving photos for OCR

Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
Hi,
I have a Nikon D3100 and am using it for taking pictures of documents, so I can use the OCR in Preview to save me a ton of typing.
Curiously it has no problem and does a great job but on an adjacent part of the document it will not. then it will work a couple of lines down.

I tried adjusting the colour, contrast etc. but no difference. I changed the light bulb from an incandescent to a Mercury lamp. No Difference. The light was strong enough from the lamp that the flash did not come on.

Can anyone explain this? What can I do to improve the situation?

Adjust the camera? light preview etc?
 
Joined
Oct 16, 2010
Messages
18,179
Reaction score
1,921
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
Curiously it has no problem and does a great job but on an adjacent part of the document it will not. then it will work a couple of lines down.


Will the documents fit on a flatbed scanner and then scan them at a reasonably high resolution?

I always found scanned documents work better than those taken with a camera, but I didn't have a deluxe camera like yours that I could use. 😊 🥳




- Patrick
=======
 
OP
flyboyy
Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
Thanks Patrick,
Unfortunately not as they are a huge dictionary. Good thought though. I wonder if I can up the resolution. hmmm
 
Joined
Nov 19, 2006
Messages
1,818
Reaction score
103
Points
63
Location
York, UK
Your Mac's Specs
iMac: 5K 27” (2020), 3.3 GHz, 32Gb RAM. iPad 2025, iPhone 13 Mini, Apple Watch SE
May I jump in here? Can someone tell me where I can find and use the OCR function in Preview mentioned in the original post. Thank you.
 
Joined
May 21, 2012
Messages
11,327
Reaction score
1,607
Points
113
Location
Southern New England
Your Mac's Specs
2024 M4 14" MBP, iPhone 16 Pro Max, Watch S7 & Watch S9, AirPods Pro 1
May I jump in here? Can someone tell me where I can find and use the OCR function in Preview mentioned in the original post. Thank you.
I think this is what they are referring to,


OCR, has more to do with a scanners ability, now cameras have that same ability.
 
OP
flyboyy
Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
May I jump in here? Can someone tell me where I can find and use the OCR function in Preview mentioned in the original post. Thank you.
Easy peasy. I discovered it by accident.
I am doing a lot of scanning dictionaries and transcribing that into a document and since the dictionaries are large, I hit on the idea of taking a photo of the entries and then putting the pics onto the desktop and just typing them into the document.

At some point I selected a section to clarify it for typing and i noticed that I could save it to the clipboard so I could save a lot of typing. Then I figured out that if I was careful and only photographed the column and not adjacent columns it did a better job of transcribing.

So you simply carefully take the picture of only the column you want, (remove the date stamp function) and ;
get it onto the desktop using "Preview" which is automatic on my computer, and then ; select it ;
go "command c" (to copy it to the clipboard) ;
Then click on the document where you want to save it and ;
Command V (to save it) ;
and then check to make sure it is a good copy.

I don't have a smartphone so I have no idea if they are better.
 
Joined
Nov 19, 2006
Messages
1,818
Reaction score
103
Points
63
Location
York, UK
Your Mac's Specs
iMac: 5K 27” (2020), 3.3 GHz, 32Gb RAM. iPad 2025, iPhone 13 Mini, Apple Watch SE
Sorry I still do not get it. Sure I can select a portion of text in a .jog and copy and paste it anywhere I want but I just end up with a pasted image, not editable text.
 
Joined
May 21, 2012
Messages
11,327
Reaction score
1,607
Points
113
Location
Southern New England
Your Mac's Specs
2024 M4 14" MBP, iPhone 16 Pro Max, Watch S7 & Watch S9, AirPods Pro 1
Did you check out my link in post #5?
 
OP
flyboyy
Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
Hi Sawday,
One of the difficulties is that when you select text it does not always select, but instead makes a box similar to a box for cropping. If it does this, all you end up with is a pasted image. This was the problem I was bringing up in my second paragraph.

That is why Patrick kindly suggested using a scanner as it has a better rate of actually making the text readable by the OCR.

My guess is that the scanner has a very bring light and if i were to get a very bright pure white light my pictures would have a better chance of having more complete reading. I am also not a photographer by any stretch or I would know how to set the camera properly. I also suspect that having a mount for the camera would improve it's result.

Thanks ferrarr, that makes it simpler.
 
Joined
Nov 19, 2006
Messages
1,818
Reaction score
103
Points
63
Location
York, UK
Your Mac's Specs
iMac: 5K 27” (2020), 3.3 GHz, 32Gb RAM. iPad 2025, iPhone 13 Mini, Apple Watch SE
Got it (finally!). I was only drawing a box around the text rather than highlighting it. Bob - went back to your post #5 and read it properly! Many thanks.
 
OP
flyboyy
Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
Here is an example of what I mean by saying that when i highlight a section, parts of it will be missing and i have not figured out why. Certain parts of it will not copy. Image.png
 
OP
flyboyy
Joined
Jul 3, 2014
Messages
423
Reaction score
113
Points
43
Location
Courtenay, BC Canada
Your Mac's Specs
iMac-Monterey-12.7.6, 27"Ret., Late 2015, 3.2 GHz, i5, 24 GB, 250 SSD, 2 OB screens, 27",32"
Is there a better file type than .jpg for OCR?
 
Joined
Oct 16, 2010
Messages
18,179
Reaction score
1,921
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
Is there a better file type than .jpg for OCR?


According to Google's AI Overview:
For Optical Character Recognition (OCR) on a Mac, TIFF (.tif or .tiff) is generally considered the best file type compared to JPEG. TIFF images are lossless, retain high resolution details, and maintain the source DPI, making them ideal for extracting accurate text from documents.

Learn more...

Bottom line, basically, I believe TIFF files contain more useful data of extra bits and pieces that the computer and its hardware/software can use. Stuff that the human eye may not be able to always detect or see.




- Patrick
=======
 

IWT


Joined
Jan 23, 2009
Messages
10,719
Reaction score
2,611
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sequoia 15.4.1 Apple 5K Retina Studio Monitor
Very interesting post, Patrick. Thank you. I shall look into this for some of my stuff that I do.

Ian
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top