HDR to improve scanned images

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

HDR to improve scanned images

Post by Andy2011 »

This is not a request for advice but rather a report of a technique I stumbled across that may be of help to other PSP users.
Late last year I volunteered to digitise a set of 78 black and white prints of views and houses taken in our village in the summer of 1977. The objective in digitising the prints was to make them accessible to local residents in a convenient fashion, so avoiding damage to, and loss of, the originals.
The prints, approximately 9 inches by 7 (~23cm by 18 cm) were of good quality though of high contrast. I think the original negatives were 35mm film but were not available. Looking at the prints with a magnifying glass some detail, such as leaves in hedgerows, could be seen but the intense whites, of e.g. the sky, were burnt out.
Initial test scans to decide on resolution and settings on my Epson XP-540 gave reasonable results but, even on a calibrated display screen, there was loss of detail in the dark areas. Different prints needed different settings for the best output. I tried many different adjustments in PSP to cope with the high contrast but again each one needed something different.
What did work well and consistently, though, was using HDR. I scanned each print 3 times - recommended setting, brightness +50%, brightness -50% then ran it through the HDR process. The output had a much better appearance with far more detail in the dark areas. The workflow was relative simple. Scanning 3 times was a bit laborious but HDR conversion could be done in batch mode. PSP was cleaver enough to group the triplets automatically, possibly by the time stamps. Of course, image alignment wan't an issue.
Each image was reviewed and had a description and geotag location written to the EXIF data.
I kept the 16 bit tif output of the HDR (though I guess the resolution is nearer 10 bit) as HDR displays will come in, no doubt. The tifs were copied to 12megapixel jpegs and also 1.2 megapixel jpegs, the latter for use on a village web site - the smaller resolution being more than adequate for a PC display as well as saving space and giving faster loads.
A further change for the online version was to write a PSP script to put a white strip at the bottom of each image and write on it the description from the EXIF data. Again this was a batch job.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: HDR to improve scanned images

Post by Jean-Luc »

Clever! :)
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: HDR to improve scanned images

Post by Andy2011 »

Serendipity, I think.
The histograms of the 16 bit tiff "HDR" scans were nice and smooth - unlike those where I tried to adjust the contrast etc. to bring out the detail.
A typical example:
histogram of 16 bit tif
histogram of 16 bit tif
The washed out sky shows up as the high count of white pixels to the right.
The JPEG histogram is a bit more ragged - presumably due to the compromise of moving from 16 to 8 bits per pixel. If you look at the low res image attached, there is good detail in the darker areas and the shiplap cladding of the mill is distinct. Unfortunately I don't have the scan triplets now and I have handed the original prints back to the village archivist.
Attachments
JPEG with reduced resolution (for online use)
JPEG with reduced resolution (for online use)
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: HDR to improve scanned images

Post by Jean-Luc »

Could you post the final image, after HDR applied?

I observed in your Epson-540 scanner specifications that it is not the best scanner for such work: CIS sensor and unknown Dmin/Dmax value.

https://techgearoid.com/scanners/what-i ... mic-range/

http://www.how-ocr-works.com/scanners/scanners.html

Your workaround is a good idea.
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: HDR to improve scanned images

Post by Andy2011 »

Jean-Luc wrote:Could you post the final image, after HDR applied?
It's a 28MB file so here is a link
https://www.dropbox.com/s/d52ajaxcwam1e ... 3.tif?dl=0
Just to avoind any confusion, the posted picture of the mill was a JPEG derived from the 16 bit tif file, not one of the initial scans.
Jean-Luc wrote:I observed in your Epson-540 scanner specifications that it is not the best scanner for such work: CIS sensor and unknown Dmin/Dmax value.
It's what what I have - used normally for home-office purposes! I wasn't going to buy another for just the project. I did consider setting up a jig to take photos with my DSLR but reflections from the glossy prints could have been a problem.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: HDR to improve scanned images

Post by Jean-Luc »

I asked for the final image because I thought the one you published was not the final. I don't see any detail in the sky. Was the original print faded?
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: HDR to improve scanned images

Post by Andy2011 »

Jean-Luc wrote:I asked for the final image because I thought the one you published was not the final. I don't see any detail in the sky. Was the original print faded?
As I mentioned in my original post
The prints, approximately 9 inches by 7 (~23cm by 18 cm) were of good quality though of high contrast. I think the original negatives were 35mm film but were not available. Looking at the prints with a magnifying glass some detail, such as leaves in hedgerows, could be seen but the intense whites, of e.g. the sky, were burnt out.
Some of the original prints were close to "soot & snow".
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: HDR to improve scanned images

Post by Jean-Luc »

Andy2011 wrote: the intense whites, of e.g. the sky, were burnt out.
Oops, I missed that information.
:?
Last edited by Jean-Luc on Wed Jan 29, 2020 12:43 pm, edited 1 time in total.
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: HDR to improve scanned images

Post by JoeB »

Andy2011 wrote:
Jean-Luc wrote:Could you post the final image, after HDR applied?
It's a 28MB file so here is a link
https://www.dropbox.com/s/d52ajaxcwam1e ... 3.tif?dl=0

It's what what I have - used normally for home-office purposes! I wasn't going to buy another for just the project. I did consider setting up a jig to take photos with my DSLR but reflections from the glossy prints could have been a problem.
Excellent detail in that image on Dropbox. Loved it!
Regards,

JoeB
Using PSP 2019 64bit
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: HDR to improve scanned images

Post by Andy2011 »

JoeB wrote:Excellent detail in that image on Dropbox. Loved it!
Yes, there is certainly more detail visible on the screen than could be seen in the original print under normal viewing conditions.

I didn't think about it at the time but stacking 3 pictures under HDR could (depending on the algorithm PSP's HDR uses) reduce some scanner sensor noise, though probably just in the mid tones. I haven't done the maths but my gut feeling is it would be no better than something of the order of 1/(square root(n)) where n is number of images. The HDR process could well produce a weighted average of each pixel from the source images based on (local?) surrounding intense blacks/whites. Conversely, the process could increase apparent noise in the very dark areas. Perhaps the optimum would be to do several scans at each setting, average each setting group then do HDR on the 3 groups. Life's too short! Space and finances permitting, a better scanner is the answer.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Post Reply