Wednesday 22 October 2014

Forensics - Analysis of Shadows

This is the first of a series of posts, looking at specific forms of analysis for specific challenges.  I am going to establish a consistent approach and, in time I will compile my analysis into a series of specification sheets so that they can be put into a form of Forensics Manual.  As stated in the introductory posting HERE, this is all trial and error, so don't be surprised to see various changes to postings, recipes and specs over time.  As the spec sheets are put together I will keep the current version available for download on a dedicated page in the blog.

Scope and Objective

This posting is an overview of lighting or, more specifically shade.  The objective is to identify a standard approach for analysing shadows in digital bird images.  This is not a simple task and no doubt it will need plenty of revisiting.

Understanding Shadows

The first step in any analysis is to understand what it is we are seeking to analyse.  Shadows are formed where light meets an opaque obstacle.  Shadows cast by objects have a complex 'anatomy' as discussed HERE but most of the time we are only aware of the darkest portion of the shadow, called the umbra.  From the perspective of bird identification we are far less interested in the shadow cast by the subject onto the surrounding landscape, and more interested in the pattern of shadows falling on the subject itself.  These shadows may be cast by the subject onto itself or may be cast by surrounding objects onto the subject.

Shadows only form part of the whole lighting story.  We need to consider all direct and indirect light sources and the properties of materials, including their reflectance and if they are opaque, translucent or transparent to light.

Why Analyse Shadows?

Shadows frequently obscure identification details.  Fine shadows can also be confused with genuine identification field marks (eg. it may be difficult to tell the difference between a grey underwing and and a white underwing in shadow - an important feature for example for telling European Golden Plover from it's American and Pacific cousins.  Or for example judging the axillaries on a putative American Wigeon in a flock of European Wigeon, or visa versa).  A recent posting on ID Frontiers (LISTSERV@LISTSERVE.KSU.EDU) actually prompted me to review this subject.  In the mystery bird in question there is a putative field mark on the underside of the secondaries.  The challenge is to determine if it is a real field mark or merely a shadow.   By studying the pattern and even the colour of shadows we may be able to distill some clues, or even firm evidence to support or refute an identification.

The Plan

Here is a recipe I have been devising for studying shadows in bird images.

Step 1 Careful review of the images
All the available photographs should be studied carefully to establish as much information as possible about the ambient lighting and environment around the subject.  Ideally the images should be unedited, originals from the camera (preferable RAW images if possible).
A record of the following information should be documented for reference.
- Date, time and location images were obtained.
- Likely position of the sun relative to the subject.
- Environmental factors influencing image lighting and shade (eg. cloud, foliage, water etc.)
- The location of obvious shadows in each image
- Give attention to translucent parts (flight feathers, displaced contour feathers, even bareparts in       
   some species).  Note in certain circumstances these can be darker not lighter than surrounding 
   features.  Don't assume because they are translucent that they should always be lighter 
   (for example the image above).   
- Any obvious inconsistencies or discrepancies between the images.

It may be necessary to adjust the exposure levels in an image to bring out shadow detail (eg. if the image is under or overexposed).  In a lot of cases the shadows we are interested in inspecting are preserved within the midtones and not in the shadows, where one might expect.  Simply darkening or brightening an image using a unsophisticated editing tool may do little to improve the visibility of shadows.  A more sophisticated image exposure tool, like the Levels tool (eg. in photoshop) is therefore possibly the best tool to use, as it is possible to adjust midtones separately from highlights and shadows.  For more on Levels see HERE and for more on this and other useful image lighting tools for forensic image analysis (in particular, the Adobe Elements Shadows tool and Midtone Contrast tools) see HERE.  

- If it is necessary to modify image exposure I would suggest making a record of that too (eg. the 
  values for black, white and midtone level and other lighting tool sliders used in the final image and the editing package used - so that exposure conditions can be replicated).

Please see also HERE.

Requirements: Any image viewing package.  Exif software may be useful/necessary for establishing image capture data (I recommend the freeware exif software, Opanda Exif).  Image editing software (Adobe Elements recommended), if required.

Step 2 Greyscale Contours
Switching to greyscale removes distracting colour and, crucially for this test, simplifies the colour pallet down to as few as 256 colours (or rather shades of grey).  Contours are a useful way to follow the pattern of light and shade, to establish where shadows do fall and/or should fall on a subject.  This is a useful way for instance of identifying subtle shifts in the alignment of feathers, or the subtle bow of the wing - something that is not always clear when studying a two-dimensional image.  Bare in mind of course that a greyscale image is not merely a map showing the position of shadows on a subject.  A shadow will appear prominent against a white (highly reflective) surface but will be invisible on a black (poorly reflective) surface.  So the reflectance of the subject is obviously an important consideration, and one of the things that confounds our ability to judge shadows easily.

I have come across a really useful tool for tracing contours.  Color Quantizer is freeware (free software) and is essentially a postarising or Colour Quantization tool with a very nice user-interface and a possible aid for a number of image interrogation techniques.
Requirements: Freeware Color Quantizer tool, highly recommended.

Step 3 Pixel Colouration
While the Color Quantizer software is open I would next drop in the original colour image and begin looking at the distribution of colours throughout the image.  Why is this of value one would ask?  Well, put simply, we would expect shadows to be of a subtly different colour to illuminated areas, at least on sunny days.  The reason for this is that shadows tend to be illuminated by the blue sky while those areas illuminated by the sun are illuminated by white or yellowish light.  For more on this see HERE .  One of the really useful advantages of the Color Quantizer tool is the ability to toggle between 'TrueColor' (the full range of image colours) and a range of reduced colour pallets at various increments from 4096 colours down to a mere 16 colours.  There is also an option to replace colours, so having selected a specific colour pixel, one can replace it with a tracer (say bright yellow) and then study the distribution of this tracer in the image relative to other colours.  I think it is important to stress that this technique on it's own may yield fairly mixed results, which is why it is included as part of a suite of analysis.  At the moment I would tend to regard this technique as a 'clue gatherer' rather than an 'evidence gatherer'.

Where the tool tends to lose it's impact is with images taken on overcast days.  Cloud scatters white light evenly, thus shadows are grey not blue in colour.  There may still be an advantage in that plumage markings are rarely neutral grey in colour and therefore it may still be possible to tell the difference between a shadow and a plumage marking, just about.  But I have found it becomes a lot more difficult.   

I am not sure if this technique has been considered before as part of digital image analysis and I am still only playing around with the idea.  But, I think the theory behind this concept makes a lot of sense.  Where I have found this useful, and where I consider this approach might work best is when working with seabird images.  As outlined HERE, lighting at sea is in many ways at it's simplest and it's purest.  Essentially, we have a bird flying about in a bluish or a greyish light, where the seascape mostly merely reflects the sky canopy. Shadows do tend to mirror the colour of the sky canopy quite a bit.  We also have the added factor of surface water reflectance to consider at sea.  I have noticed with images where birds are flying close to the water that the underside of their plumage often takes on the same colour pattern as the surrounding sea.  Trying to tell real plumage markings from shadows and water reflections can be a real challenge, particularly on a bright, sunny day.   I hope, and have reasonable confidence that this tool and technique may be a valuable analytical tool to help unlock some of the challenges involved in seabird identification from images. 
Requirements: Freeware Color Quantizer tool, highly recommended.

Step 4 Document
Hopefully having stuck to this suite of analysis there will be enough clear evidence and supporting clues gathered to establish the answer we were looking for.  I think it is important, in order for others to be able to check and confirm the evidence to document as much as possible.  Screen grabs can be a useful way to capture a piece of evidence observed on a screen during analysis and details can be annotated as a slide presentation, word processor document or some other format.

This is the first stab at the very first of these postings.  I fully anticipate changes to it before I compile it into a specification for the manual.  Comments and advice as always welcome.  

No comments:

Post a Comment