Switch to full style
Ask all general Gimp related questions here
Post a reply

Help Enhancing Ancient Manuscripts

Sun Aug 06, 2023 3:06 pm

GIMP Version: 2.10.32
Operating System: Windows
OS Version: 11
GIMP Experience: Basic Level
URL or Image link: https://imgur.com/a/cynTAl7

List any relevant plug-ins or scripts:
GMIC



I've got a ~1000 year old manuscript I need to enhance so it reads as well as possible when printed in black and white.
I was hoping there was a good way to clean it up and make the ink cleanly pop on a white background. I've been struggling with it, though I've tried several different GMIC filters. If you can give it a try and post what steps you took, It would be appreciated.

:tyspin

Re: Help Enhancing Ancient Manuscript

Sun Aug 06, 2023 3:09 pm

It would be awesome if anything could be done to salvage any text on the first two lines which are pretty faded.

Re: Help Enhancing Ancient Manuscript

Sun Aug 06, 2023 4:03 pm

You could try desaturating it and then run a levels or use curves. It's a bit of a challenge to find a happy balance.

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 12:19 am

mahvin wrote:You could try desaturating it and then run a levels or use curves. It's a bit of a challenge to find a happy balance.

That doesn't seem to help much (unless I'm doing it wrong). Would really appreciate it if someone would take the time to actually try with the sample I linked.

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 2:18 am

Are you able to post it here? One of us may be able to do it for you and give you the steps if yu have this problem again.

Oops didn't see your link. Will see what I can do when I have more time and if I am successful will let you knkow how it can be done

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 2:26 am

sallyanne wrote:Are you able to post it here? One of us may be able to do it for you and give you the steps if yu have this problem again.

It's in the link in the initial post. :kpix

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 3:07 am

A difficult problem!
I would be hesitant to desaturate the image until you have something acceptable for printing. Treatment of separate areas and combining the results may be of benefit.
Here I have duplicated the original layer. Desaturated the copy using Colour to Grey (default values & Enhance Shadows selected) and changed it's mode to Soft Light. I then duplicated this layer. Overlay mode on these two layers gives a more contrasty result, but perhaps loses information in some areas.

I am sure others, more expert, will provide better solutions!

b8lq4py_1.jpg
b8lq4py_1.jpg (550.9 KiB) Viewed 669 times

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 3:37 am

ok you could try this but it might not help at all
Here I tried Tone Enhance (move the sliders until you are satisfied)in GMIC then back in Gimp I did Desaturate in Multiply mode
Image

By the way.
Welcome to Gimp Chat :gimp

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 5:52 am

david wrote:A difficult problem!
I would be hesitant to desaturate the image until you have something acceptable for printing. Treatment of separate areas and combining the results may be of benefit.
Here I have duplicated the original layer. Desaturated the copy using Colour to Grey (default values & Enhance Shadows selected) and changed it's mode to Soft Light. I then duplicated this layer. Overlay mode on these two layers gives a more contrasty result, but perhaps loses information in some areas.

I am sure others, more expert, will provide better solutions!

sallyanne wrote:ok you could try this but it might not help at all
Here I tried Tone Enhance (move the sliders until you are satisfied)in GMIC then back in Gimp I did Desaturate in Multiply mode


Thanks you two! Not quite where I was hoping we could get, but definitely given me some new things to try!

Re: Help Enhancing Ancient Manuscript

Mon Aug 07, 2023 11:56 am

If you want to do the best in recovering the writing you will need to different type scanning. Perhaps a local college will be able to help. would make a great project for the computer science and medical departments.

https://www.smithsonianmag.com/history/ ... 180969358/

https://ideastream.pbslearningmedia.org ... etectives/

https://www.timesofisrael.com/1500-year ... eciphered/

Re: Help Enhancing Ancient Manuscript

Tue Aug 08, 2023 2:27 am

Two more tries at this difficult problem!
The first of these I used my equal luminosity mask plug-in with the layer transition set to Hard.
The second one, equal saturation mask, again with Hard transition. I used brightness and contrast (curves) adjustments on each masked layer and set the saturation to zero.
Both of these plug-ins are dependent on Python 2.7 being installed.

As to whether the results are an improvement I cannot judge!

b8lq4py_2.jpg
b8lq4py_2.jpg (493.64 KiB) Viewed 639 times


b8lq4py_3.jpg
b8lq4py_3.jpg (567.03 KiB) Viewed 639 times

Re: Help Enhancing Ancient Manuscript

Tue Aug 08, 2023 6:27 am

david wrote:Two more tries at this difficult problem!
The first of these I used my equal luminosity mask plug-in with the layer transition set to Hard.
The second one, equal saturation mask, again with Hard transition. I used brightness and contrast (curves) adjustments on each masked layer and set the saturation to zero.
Both of these plug-ins are dependent on Python 2.7 being installed.

As to whether the results are an improvement I cannot judge!

b8lq4py_2.jpg


b8lq4py_3.jpg

I think the first one there is the best so far. Thanks! Would you mind sharing any settings from the luminosity mask plugin?
thanks!

Re: Help Enhancing Ancient Manuscript

Tue Aug 08, 2023 6:57 am

@MTW613

I cannot give any settings for the plug-ins (other than setting the transition to hard in the opening menu). It is just a question of playing with curves on each of the masked layers.

The reason I tried the equal saturation mask plug-in is because the colour of the vellum, the text and the contamination are of similar colour, but they have different saturation levels. While experimenting with it, I was able to see improvements in some of the more problematic areas. However, the result above was a compromise across the complete document. If you were to run the plug-in to achieve the best results for different regions, you could then flatten the layers of each run and stack them with masks which could be painted to allow the regions to combine.

I hope my explanation makes sense!

I have attached the two zipped plug-ins in case you do not already have them.

eq_lum_mask_h_m_s.zip
(2.62 KiB) Downloaded 16 times
eq_sat_mask_h_m_s.zip
(2.62 KiB) Downloaded 16 times

Help Enhancing Ancient Manuscript 2

Wed Aug 09, 2023 1:57 am

GIMP Version: 2.8.14
Operating System: Windows
OS Version: 11
GIMP Experience: Basic Level

List any relevant plug-ins or scripts:
GMIC



You guys were so helpful with the previous section, I thought you might have some good ideas with this one. The challenge here is that the ink is so degraded, the letters actually aren't contiguous but, rather, have a bunch of crackled lines through them. Same as before, needs to be easily visible when printed in black and white. Please help!
thanks!
AS37.8.png
file
AS37.8.png (324.58 KiB) Viewed 637 times

Re: Help Enhancing Ancient Manuscript 2

Wed Aug 09, 2023 3:04 am

Well...this using the median blur / GEGL ColorWarp I described across on g-f.net

AS37.8-a.png
AS37.8-a.png (158.49 KiB) Viewed 620 times

Re: Help Enhancing Ancient Manuscripts

Wed Aug 09, 2023 4:57 am

I did it with threshold in colour but prob not as good
Image

Re: Help Enhancing Ancient Manuscripts

Wed Aug 09, 2023 1:16 pm

Another experiment to try and find an alternative process.

The original, adjusted with Curves to increase contrast.
AS37.8_1.jpg
AS37.8_1.jpg (101.48 KiB) Viewed 594 times


The Red channel from this was copied into a new layer. Into additional new layers were copied the Green & Blue channels.
With the Green & Blue channels changed to Lighten-only mode we get this:
AS37.8_lighten-only.jpg
AS37.8_lighten-only.jpg (74.16 KiB) Viewed 594 times


With Green & Blue channels changed to Subtract mode we have:
AS37.8_subtract.jpg
AS37.8_subtract.jpg (60.24 KiB) Viewed 594 times


Both these methods result in a muddy grey background but, perhaps, make the characters clearer.

Re: Help Enhancing Ancient Manuscripts

Sun Aug 13, 2023 1:06 am

Thanks!
Post a reply