Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: A different approach to scanned image histograms

  1. #1

    Join Date
    Apr 2011
    Location
    Hemel Hempstead, UK
    Posts
    543

    A different approach to scanned image histograms

    Most scanning software and most picture editing software - all that I have seen, in fact - uses a simple histogram to give some hint as to relatively how many samples are at any particular grey-scale level. I don't find this particularly useful, as often a picture may have a larger range than is immediately visible, but with a relatively few samples at either extreme. This can lead to adjustments to the picture which remove information at the extremes, since the operator is relying on the accuracy of the display system to show him the image.

    Outside a professional image editing suite, with calibrated displays and room lighting, I suspect that accuracy is rarely to be had. Angle of view on many LCD screens is a particular matter for concern, with a movement of only a few degrees vertically changing the apparent contrast and brightness of the screen (IPS screens are much better in this respect).

    I spent over thirty years in professional broadcast engineering (the BBC) and there is a tool used regularly there to accurately judge exposure (even in a regularly calibrated environment) - a waveform monitor. In such a display, the signal is scanned across its width and the vertical position of the trace shows the luminance of the signal; if large areas are at the same brightness then trace increases in brightness.

    I've been playing with a proof-of-concept for such a display using Python: This is very much an unfinished work in progress. Here are some examples (each picture being worth a thousand words, this saves eight thousand words of explanation):

    Click image for larger version. 

Name:	bars-gif.jpg 
Views:	115 
Size:	21.4 KB 
ID:	147294

    Click image for larger version. 

Name:	ely nave 2.jpg 
Views:	123 
Size:	34.5 KB 
ID:	147295

    Click image for larger version. 

Name:	peppers.jpg 
Views:	114 
Size:	33.7 KB 
ID:	147296

    Click image for larger version. 

Name:	door.jpg 
Views:	107 
Size:	32.7 KB 
ID:	147297

    Any interest in this kind of display? It's currently living on a Linux Mint system, running Python 3.4 with the GTK+ toolkit and with the UI built in Glade. I don't think there is any difficulty porting to other OSes but that's someone else's problem; I don't have access. If anyone else wants to play, you're welcome; I'll post the code.

    Neil

  2. #2
    Peter De Smidt's Avatar
    Join Date
    Jan 2001
    Location
    Fond du Lac, WI, USA
    Posts
    8,974

    Re: A different approach to scanned image histograms

    Good stuff, Neil. I take it the advantage of this approach is that there are many more samples than with a traditional scanner histogram? Is that correct?
    “You often feel tired, not because you've done too much, but because you've done too little of what sparks a light in you.”
    ― Alexander Den Heijer, Nothing You Don't Already Know

  3. #3
    Nodda Duma's Avatar
    Join Date
    Nov 2014
    Location
    Batesville, Arkansas
    Posts
    1,116

    A different approach to scanned image histograms

    Hi Neil,

    That's very interesting, thank you for posting. It looks like you scan every line, correct?

    I agree that histograms *as presented in scan software* can be misleading. Properly used, histograms can provide valuable information. They form the input data for almost all automatic gain control algorithms used in digital imaging systems today.

    For work I pull images into Matlab and do a histogram there so I can look at actual numbers -- including min & max values, peaks etc.
    Newly made large format dry plates available! Look:
    https://www.pictoriographica.com

  4. #4
    fishbulb's Avatar
    Join Date
    Dec 2014
    Posts
    407

    Re: A different approach to scanned image histograms

    Quote Originally Posted by barnacle View Post
    Most scanning software and most picture editing software - all that I have seen, in fact - uses a simple histogram to give some hint as to relatively how many samples are at any particular grey-scale level. I don't find this particularly useful, as often a picture may have a larger range than is immediately visible, but with a relatively few samples at either extreme. This can lead to adjustments to the picture which remove information at the extremes, since the operator is relying on the accuracy of the display system to show him the image.
    Yep, this is a problem with the histograms in DPL. When I scan, I leave the histogram a bit lower contrast, moving the black point and white point a bit outside the histogram that DPL gives me. In general, this works quite well to preserve detail in the shadows and highlights.

    Quote Originally Posted by barnacle View Post
    Any interest in this kind of display? It's currently living on a Linux Mint system, running Python 3.4 with the GTK+ toolkit and with the UI built in Glade. I don't think there is any difficulty porting to other OSes but that's someone else's problem; I don't have access. If anyone else wants to play, you're welcome; I'll post the code.
    If you want to make some money, build it as a Photoshop and Photoshop Lightroom plugin, then sell it by publicizing it on the big photography blogs (petapixel, photographylife, etc).

    There are tons of photography nerds who would go for this level of detail, not just for scanning but for digital imaging. But with Linux-only, you are really limiting your addressable market to a microcosm of the larger photo community.
    -Adam

  5. #5

    Join Date
    Apr 2011
    Location
    Hemel Hempstead, UK
    Posts
    543

    Re: A different approach to scanned image histograms

    Thanks all.

    This is still, as I said, in need of further development, but I doubt I'll release it as commercial software - apart from anything else, it would probably not comply with any future employer's conditions. It might find its way into the Gimp, perhaps - I have been an open source user for many years and only rarely get to give anything back. Also - I'm really unhappy with the way that Windows has gone in recent years and also many high end windows programs, as the transition to a software-for-rent model. I don't see why I should support such systems. </rant>

    I don't know if there are more samples but there is more precision, even though it's a scaled image that I use to measure. In practice, every vertical line of the image is used to build a histogram, and the same vertical line on the display shows that histogram, but with the brightness of the point showing the height of the histogram. Another way to look at it is that a single faint green line is drawn across the display for each line in the image with the vertical height of the line indicating the brightness. As more and more lines are drawn, if they happen to meet an existing line, they make themselves brighter.

    What I wanted it for was to adjust the black and peak levels when scanning and in particular to see what the scanner was doing when it expanded the range - because its internal histogram indicated that there were huge gaps in the signal (i.e. quantisation).

    Looking at this image again

    Click image for larger version. 

Name:	ely nave 2.jpg 
Views:	49 
Size:	34.5 KB 
ID:	147313

    it's clear that it's a pretty much full range scan; the whites are very close to peak white but don't crush (which would be indicated by a line at peak white) and while there is detail well into the blacks, it's apparent that some of the blacks may be crushed in the scan on the left hand side where they are all at the same level a couple of bit values above zero.

    Neil

  6. #6

    Join Date
    Jul 1998
    Location
    Lund, Sweden
    Posts
    2,214

    Re: A different approach to scanned image histograms

    I have written my own similar tools to analyse spatially-resolved spectroscopy data. I loved the technique. Other people - mostly nerdy research types, so not afraid of interpreting data - loved the analysis when used by me for a case study as part of a talk, but did not want to learn how to interpret the displays themselves. You may run into a similar resistance :-)

    If you can refine the code to the state where it could work reliably as a GIMP plug-in, that would be an excellent way to get it to people who are likely to use it.

    One finesse you might want to consider is a toggle that allows different sorts of normalisation.
    First setting plots a fully-white point for every data value (no grey scale values). The allows rapid identification of extremal points and data ranges.
    The second normalises each histogram separately. I think this is what your code is doing here. It gives the best overall view of the data values and their spread.
    The third does a global normalisation. This allows a comparison of the intensity of the histogram peaks for different scan lines.

    I also overlaid (well, underlaid) lines or coloured bands representing max/min, average, or average+-a given number of SDs.

    Finally, as a photographer, I would like the option here to switch from producing histograms of vertical lines to histograms of horizontal ones. That would make it easier to avoid clipping/compression in things like seascape skies.

  7. #7

    Join Date
    Apr 2011
    Location
    Hemel Hempstead, UK
    Posts
    543

    Re: A different approach to scanned image histograms

    Yeah, it's one of those things... any broadcast engineer will recognise it instantly. Your point about different gain normalisations is well made; picking a suitable gain is easy with a twist of a knob on the hardware tool.

    Here's a few done with 100% - any active point gets full brightness green.

    Click image for larger version. 

Name:	peppers 255.jpg 
Views:	34 
Size:	54.9 KB 
ID:	147496 Click image for larger version. 

Name:	Ely nave 255.jpg 
Views:	29 
Size:	56.7 KB 
ID:	147497 Click image for larger version. 

Name:	Ely choir 255.jpg 
Views:	34 
Size:	66.6 KB 
ID:	147498

    Neil

  8. #8

    Join Date
    Jul 1998
    Location
    Lund, Sweden
    Posts
    2,214

    Re: A different approach to scanned image histograms

    Here's me thinking I'd invented something :-)

    You need a snappy name. 'Waveform monitor' is too analogue. 'Waterfall plot' is taken. My wife christened my diagrams 'dreich plots' because they looked like curtains of rain sweeping through a typical Sunday afternoon in Cumbernauld. I adopted 'drizzle plots' to avoid confusing the Swedes with yet another cultural shock.

    I like the way the cathedral photos look like their waveform plots.

  9. #9

    Join Date
    Jul 2010
    Location
    Ontario, Canada
    Posts
    667

    Re: A different approach to scanned image histograms

    Hello Neil!

    Without going into 'too much' detail... What are your thoughts on existing Software Programs --
    Such as FastRawViewer and RawDigger? Thank-you!

    Best regards, -Tim.

  10. #10

    Join Date
    Apr 2011
    Location
    Hemel Hempstead, UK
    Posts
    543

    Re: A different approach to scanned image histograms

    Struan, how about a 'WFM plot'?

    Tim, I can't comment on those programs; I've never used either and I rarely do much with raw formats. A quick look at their websites though indicates that while they have *lots* of histograms, they don't tell you much more than the simple histograms in Gimp.

    As an aside, an excellent how-to on the use of waveform monitors in filming: https://www.youtube.com/watch?v=x-8o_TvyNjc

    Neil

Similar Threads

  1. First scanned 4x5 image
    By Meekyman in forum Image Sharing (LF) & Discussion
    Replies: 2
    Last Post: 2-Feb-2013, 07:49
  2. What is the best approach to getting your work seen
    By Craig Griffiths in forum Business
    Replies: 15
    Last Post: 7-Jan-2012, 12:12
  3. An interesting approach - revolutionary?
    By Norm Buchanan in forum Digital Hardware
    Replies: 23
    Last Post: 29-Dec-2007, 13:30
  4. How to approach galleries?
    By Marek in forum Business
    Replies: 2
    Last Post: 1-Mar-2004, 09:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •