Anyone with experience digitally enhancing low contrast text in pictures?
-
On my trip I took lots of pictures of headstones, many of which were poorly readable, if at all.
Anyone got tips to try to enhance the contrast/possibly make some of the text readable?
Here's an example:
-
Hmmm, by what I see there isn't much you can do. I mean, in this specific image I have no idea what the text on the tombstone is, apart from individual letters. It's utterly buried in "noise" (what I imagine to be a combination of moss and erosion). You could try playing with curves (boosting very narrow ranges) then rescaling down, maybe after applying some very narrow radius blur (so that you essentially filter out the high-frequency content), but there isn't much information to start with anyway. Super experts may have a few magic tricks up their sleeve but a good rule of thumb is that if you can't see it how hard you try, then there isn't much you can do.
-
@admiral_p I want to try ways of playing with the shadows of the carvings, trying to make them pop out. Edge detection? Maybe?
I'll have to play around in GIMP (because I can't pay for Photoshop).
-
Since it's mostly lit the same amount, try boosting contrast to the max and finding a place where brightness makes the letters slightly more readable.
-
If I have time I'll try to get waifu2x to run and try filtering it like a dodgy scan...
-
Ok, here goes nothing in GIMP 2.10:
Step 1: crop the image to remove the grass, which will reduce our ability to fuck with the contrast:
Step 2: Here's what it looks like with +50 brightness and +127 contrast:
Step 3: Undo that. Colors->Auto->Equalize
Step 4: Brightness -50, Contrast -75
-
@ben_lubar thanks for the effort. If I don't get anything readable, too bad. Not a huge deal. I'll fiddle and see what I can extract from them.
-
I've been trying things at random in GIMP and had some luck with decomposing the picture into the LAB color space (Colors->Decompose...->LAB), making only the B channel visible, and increasing contrast with the Levels tool (Colors->Levels...). Also, looking at the picture at a reduced size helps filter out noise to make the letters clearer.
Later edit: Other things I tried (and may work on other photos depending on the lighting differences) that got similar results:
- Open the Channel Mixer (Colors->Components->Channel Mixer...), selecting Preserve Luminosity and Monochrome, and then playing with the RGB sliders. Putting Red in the negative, Green near zero, and Blue in the positive ranges seemed to get good results.
- Decompse the picture to CMYK color space. The Y layer seemed to have the most engraving information.
B-layer from LAB decomposition with contrast enhancement:
Settings:
-
@benjamin-hall Not very helpful at this point, but there are things you could have done at the time you were taking the pictures that might have helped. Specifically, better lighting. Even more specifically, a portable light that you could have set up to graze the surface probably would have emphasized the difference between the illuminated surface and the shadowed inscription. And of course rubbing is a time-honored method of reading and preserving gravestone inscriptions.
As for what you can do with the photos you have, apart from just playing around with brightness and contrast, a little blurry — remove the high-frequency noise of the stone texture — might help. Adding false-color might also help bring out the contrast. For some (but not that one, I'm afraid) edge detection might help.
...
I started writing this but got interrupted. It looks like you're already trying those. @MZH's enhancement looks pretty darn good. It's not 100% readable, but I don't think you can get much better from that starting image.
-
I've opened Gimp and played around with a high pass filter, followed by some curve level adjustment, but the results were lukewarm at best
'd with much better work by @MZH
-
Attempted transcription from @mzh's result
MAY
DAUL ETER
HEL AND.D
HUNER
BORN JULY
24.1??1
DIED OCT
2.15 ?4Without supporting details to match, this is the best I can do.
-
@benjamin-hall said in Anyone with experience digitally enhancing low contrast text in pictures?:
On my trip I took lots of pictures of headstones, many of which were poorly readable, if at all.
Anyone got tips to try to enhance the contrast/possibly make some of the text readable?
Here's an example:
You didn't happen to take them in a raw format did you?
-
@tsaukpaetra said in Anyone with experience digitally enhancing low contrast text in pictures?:
Attempted transcription from @mzh's result
MAY
DAUL ETER
HEL AND.D
HUNER
BORN JULY
24.1??1
DIED OCT
2.15 ?4Without supporting details to match, this is the best I can do.
Pretty sure the first few lines are more like
MAY
DAUGHTER
OF E AND D
KUNT_E
-
This post is deleted!
-
@dreikin said in Anyone with experience digitally enhancing low contrast text in pictures?:
@tsaukpaetra said in Anyone with experience digitally enhancing low contrast text in pictures?:
Attempted transcription from @mzh's result
MAY
DAUL ETER
HEL AND.D
HUNER
BORN JULY
24.1??1
DIED OCT
2.15 ?4Without supporting details to match, this is the best I can do.
Pretty sure the first few lines are more like
MAY
DAUGHTER
OF E AND D
KUNT_Ewhat do you want? I did not apply any post reprocessing, just wrote what I saw.
-
@tsaukpaetra said in Anyone with experience digitally enhancing low contrast text in pictures?:
@dreikin said in Anyone with experience digitally enhancing low contrast text in pictures?:
@tsaukpaetra said in Anyone with experience digitally enhancing low contrast text in pictures?:
Attempted transcription from @mzh's result
MAY
DAUL ETER
HEL AND.D
HUNER
BORN JULY
24.1??1
DIED OCT
2.15 ?4Without supporting details to match, this is the best I can do.
Pretty sure the first few lines are more like
MAY
DAUGHTER
OF E AND D
KUNT_Ewhat do you want? I did not apply any post reprocessing, just wrote what I saw.
Just contributing to the effort.
-
@benjamin-hall said in Anyone with experience digitally enhancing low contrast text in pictures?:
On my trip I took lots of pictures of headstones, many of which were poorly readable, if at all.
Anyone got tips to try to enhance the contrast/possibly make some of the text readable?
Here's an example:
Also, a note for the future: If you go taking pictures of things like this again then in addition to the "bring your own lighting" already mentioned, you may also want to do some rubbings.
-
@dreikin said in Anyone with experience digitally enhancing low contrast text in pictures?:
you may also want to do some rubbings.
-
@mzh well that's fantastic.
-
@admiral_p Thanks.
-
@dreikin sadly all I had was my phone camera. So no.
-
Thanks everyone! Especially @MZH !
I wish I'd have thought about the light--i had one in the car.
-
@benjamin-hall I have to ask, could your Mark I human eyeball read the name on this one? Also did you have the foresight to take multiple photos from slightly different angles so you can use a bit of 3D data in the reconstruction? (I ask that, but I have no idea what software would do that...)
-
@blakeyrat I could sort of read it (like a few characters). The reconstruction above is much better than what I could do. That's not even the worst of the graves. Turns out stone isn't very good over even 100-ish years. I think they also used limestone back then (because it's what they had). Which doesn't work well.
-
@tsaukpaetra From context (it's a headstone) I'm 95% sure the second word is Daughter.
Like:
May
Daughter
Of E(L?) and D
Kunter
Born July
???
Died ???
???EDIT: actually I think the daughter's name is Nat, on a second reading.
@benjamin-hall said in Anyone with experience digitally enhancing low contrast text in pictures?:
I could sort of read it (like a few characters).
Did you take notes? Just curious. Frankly, I think your 3D human eyeball vision on the sunny day is going to do a better job of making out those letters than a 2D camera image is.
Also just FYI, it's pretty easy to rent camera equipment if you just need it for a few days. Instead of using your phone. For next time.
-
@blakeyrat I found that many of them were more readable when I looked through the camera. Then again, my eyes are crap, even corrected. So
-
@blakeyrat said in Anyone with experience digitally enhancing low contrast text in pictures?:
multiple photos from slightly different angles so you can use a bit of 3D data in the reconstruction? (I ask that, but I have no idea what software would do that...)
Blender can do that, if there are a sufficient number of distinctive points that it can identify and match between pictures. It could certainly separate the tombstone from the background, but that's not terribly useful in this situation. It can probably give some amount of 3D to the stone surface, but whether that would help make it more legible or not, . It would likely need some, maybe a lot, of manual assistance in identifying points to match. It also helps if you know things like the focal length of the camera lens, distance, dimensions of the objects, etc.
There may be some specialized software that would be better suited. Blender's 3D reconstruction is more intended for incorporating CGI into real-world video scenes. It can theoretically do the job requested here, but whether it would be of practical use, ...?
-
@benjamin-hall said in Anyone with experience digitally enhancing low contrast text in pictures?:
I wish I'd have thought about the light--i had one in the car.
I'm not sure whether I would have thought about it ahead of time, either. I might have also not thought of it until later when looking at the pictures.
-
@hardwaregeek Oh don't get me wrong, I never plan anything and always regret everything.
-
This far in and no memes. Even for a help thread, you guys are slipping.
-
@hardwaregeek Yeah, and in lieu of better lighting, taking pictures from two different horizontal angles could help. The different shadows cast would be a big clue for building a 3d model (even just a stereographic one) of the engraving.
Say, 10 degrees off center, to the left; and 10 degrees off center, to the right.
-
@benjamin-hall said in Anyone with experience digitally enhancing low contrast text in pictures?:
@blakeyrat I found that many of them were more readable when I looked through the camera. Then again, my eyes are crap, even corrected. So
That's why I recommend the rubbings. They're really good at bringing out subtle details that are hard to see, and are preferred for these types of things for just that reason.
-
The Unsharp Mask filter with a large radius may help to enhance larger-scale contrast FWIW