Wednesday, 28 October 2015

Time To Exhale

This blog is both a personal journey of research and exploration and also a means to an end.  The objectives set out in the Introduction have not changed.  The scope of the project is essentially contained within the first figure in that introduction.  The ultimate goal is a standalone guide and set of tools to aid in the identification of birds from photographs.

As 2015 winds to a close it is time to halt the research and consolidate the learning.  By the end of the year I hope to have published a revision of the Quick Reference Guide.  Between now and then I will be pulling together and summarising the key findings of the blog.  

There is almost no end to the realms of research that this blog could potentially expand upon.  Identification is itself a hugely broad area, undergoing constant development.  But the blog is not really about cutting edge bird identification.  It is about designing a set of tools and standards to aid bird identification from photographs.  And yes, strange as it might seem, some of these tools haven't existed up to this point.  For instance, there hasn't even been a standard method or nomenclature for properly sampling and describing colours from digital bird images.  And colour is just one of the areas I have been looking at closely.  I have cast out a number of nets in order to gather the information needed to develop the tools I need.  I think finally it may be time to start pulling back in some of these nets to examine the catch. 

All of this essentially boils down to light.  I have spent a great deal of time deconstructing light, almost to a point where it has become a bit of an obsession.  A clear understanding of light is key to bird identification from photographs and that is why I feel all this has been fundamental and therefore clearly worth the effort.  Because the camera is such a masterful tool for playing with and dissecting light I have been able to use my camera to obtain clearer answers to many of the questions I have.  I have particularly enjoyed constructing experiments that help understand this subject.  This year the posting which I think has borne the most fruit was the set of experiments looking once again at lighting and perspective (part 2).


The major reveal from the particular experiment above was that from the perspective of the camera lens the diffuse shadows on an overcast day all fall towards the centre of the digital image.  In outdoor photography we are used to positioning ourselves relative to the sun in order to obtain optimal lighting on our subject.  But on an overcast day sunlight is scattered very efficiently by the clouds, to the extent that the entire sky dome becomes a fairly uniform light source. All angles should offer fairly decent lighting and the sun's position shouldn't matter a great deal.  This is why an overcast day is far superior to a bright sunny day for photography and observation generally.  While this might seem fairly logical its not something we often consider or analyse in our images.  These types of experiments have made me think a lot more about how light and shadow falls on a subject in a photograph and, more importantly, why light and shade works as it does.

Spotlight - On Colour
Having expended considerable effort during 2014 on the subject of digital colour reproduction, including even a sojourn into the ultraviolet realm to try and see a bit more as bird's do, I thought perhaps I had figured colour out.  Not so it seems.  Not only did the pride of my earlier exploits the Birders Colour Pallet need a bit more thought and explanation in Rev. 2, but I had failed to spot a fundamental point about digital colour capture and reproduction.  I hadn't given enough thought to one of the three parameters that make up colour, namely saturation.  Cameras capture and measure the first of these parameters very well - the brightness or 'luminance' of colour.  This is possible because each photosite on a digital camera sensor measures quite effectively the actual intensity of the light falling on it.   Then, thanks to the Bayer colour filter array which sits over the sensor itself, cameras can identify quite accurately the 'hue' of each of the colours reaching the sensor, albeit within the constraints of the digital colour space we operate to.  However, what about saturation?  the sensor does not have the facility to measure the third colour axis, namely colour 'saturation'.  Image saturation is actually one if the camera pre-sets by the camera manufacturer and takes effect during image processing.    I am very mindful of it's importance of accurate colour saturation reproduction in terms of an accurate colour standard.  After all the saturation of colours form an integral part of colour nomenclature, both traditionally (eg. Robert Ridgway's Color Standards and Color Nomenclature) and indeed in my own Birder's Colour Pallet.  I have finally tackled this question HERE.  For more see HERE.


Spotlight - On Field Marks
Field Marks form the core of many a bird identification, and certainly most ID's based on photographs.  I started looking into this whole area early in 2015 and by mid-year I had a significant body of work done.  Whether rightly or wrongly, the approach that I took was to look at plumage patterns starting from the centre of the feather and working outwards.  So I started by looking at simple plumage patterns arising from shaft-streaks which collectively form tramlines.  Then I looked at solid, diffuse and more complicated patterns associated with the broad feature centre.  Lastly I focused on the feather edge and tip.  I was kind of surprised to find that this simple approach tended to encapsulate most of the vast array of plumage field marks that exist in birds.  Lastly I tidied up the set of postings with a look at bareparts patterns and also colour and field marks, in a broad sense.

As I worked through the problem it became apparent fairly quickly that there are broadly two sets of field marks in birds, the bold and the bland.  While testing the effects of different image quality parameters on bold versus bland features I began to observe consistent patterns.  Bold field marks are more robust, able to withstand a far greater level of image quality deterioration than bland field marks.  So, in effect, when we analyse bird images for field marks we need to know how 'volatile' those field marks are and we need to consider that point within the overall image quality context.

Another area that particularly interested me was the concept of false field marks.  These are false markings produced by the interplay between light, shadow and avian anatomical structures.  By its very nature anomalies due to lighting or posture tend to be harder to detect in a still image then they would be while observing a bird in life.  Because birds are normally moving about we judge and compensate for lighting and the momentary movement of feathers often without even having to think about it.  But faced with a single still frame, all of a sudden that shadow or bright spot, or slightly odd posture or misaligned feather becomes a major source of confusion. In the end I thought it appropriate to develop a topographical nomenclature to describe some of the consistent anomalies we find in bird images and I call this Shadow Topography.  This is not simply me making up a lexicon for the hell of it.  Before we can understand and deal with an issue we need a way to describe it.  Or as one of my daughter's kindergarten teacher's cleverly puts it..."name it to tame it".


Spotlight - On Forensic Image Analysis
I haven't added too many postings to this part of the blog so far this year.  Having made reasonable strides towards a forensics manual last year the postings this year tended to be more about delving that bit more deeply into one technical subject or another.  It's probably fair to say none of the postings make for exciting reading and I don't suspect that the really in-depth analysis of digital images will float many a birder's boat.

If I had to select one posting worthy of particular mention here it would be fringe artefacts while working in RAW.  I had imagined the RAW work flow as this pure, unadulterated form of image analysis.  So when I started to see strange artefacts appear in files that had undergone hard restoration with Camera RAW I started to wonder was I imagining things.  Sure enough I found an explanation for these artefacts.  It turns out that some RAW work flow tools leave behind artefacts when they are a little over-used and this is something to be really mindful of, especially when the goal of working in RAW is to bring out hidden field marks.


Spotlight - On Gestalt
The gestalt page of the blog is another aspect of the journey that I have only really started to develop in 2015.  I know that there is going to be a real limit to the extent to which a bird's gestalt or jizz can be revealed by digital stills images.  Most of the time, when we are talking about identification of birds from images we are referring to as few as a single digital image.  So lets not kid ourselves.  That said, in defining the distinction between field marks and gestalt for the purposes of this blog I have been clear to point out that I consider a bird's size and shape, structure or morphology as all falling within the broad definition of gestalt.  Some might include these in the definition of field marks.  The obvious question when faced with a single image - can we take size or proportional measurements from an image which would help us identify the species in the photograph.  Most of my postings on gestalt to date have been about tackling this question.  The conclusions so far would tend to be a resounding NO to that question.  The problem very simply is that the real world is three-dimensional while a digital image is two-dimensional.  Whether we are trying to measure primary projection, bill to eye ratio, tibia to tarsus ratio or some other measurement or proportion we constantly run into problems of foreshortening and/or features which are offset from one another by small angles which we cannot hope to measure.  In other words all attempted measurements from digital images tend to be estimates at best.


The solutions to these problems lie in 3D modelling (eg. HERE).  Modern technology is starting to provide us with practical 3D modelling solutions.  Before too long we may well be able to judge size and proportion extremely accurately in the digital images of the future thanks to 3D photography.  But for now at least we need to be mindful of the limitations that exist with our 2D images.

This incomplete 3D model created using some clever, freely available software was made by simply feeding a number of 2D images into the software and letting it crunch the numbers.  More sophisticated forms of this type of technology may offer better solutions in the future to allow the accurate measurement of features on birds based on images captured in the field.

Spotlight - On Human Bias
This is the last of the specialist fields of enquiry that I have so far opened up on the blog.  Starting in late December 2014 into early January 2015 I opened up the blogging year with a lot of cognitive science jargon and concluded with 10 tips for avoiding cognitive bias during the process of identifying a bird from digital images.  It's probably fair to say that cognitive bias can play just as big a role in the identification and assessment process as ones technical knowledge of an ID subject.  On a bad day even the most expert birder can fall foul to their own biases and be misled by a misguided trail of clues.  I guess if someone were to say to me that they have a difficult identification to pour over from a set of bird images and were wondering where to go first on my blog for some useful advice, this posting is where I would direct them.  Its about having the right mindset before engaging any identification puzzle and trying to approach it as objectively and open-minded as one possibly can.  Unfortunately, despite our best efforts we can never fully turn off our biases - they are a fundamental part of how we work.

Many of the biases that I have gone on to discuss are associated more with the mechanics and wiring of the human visual system than human cognition.  As observers and identifiers our ability to visualise and analyse the images we see are subject to the limitations of our eyes and brain.  The dress viral phenomenon created quite a storm of attention on social media for a short period in March 2015.


Those who observed the poorly exposed photograph of a dress were divided between observers who believed it was blue and black and those who were equally convinced it was white and gold.  The bias in this case seems to be from a subset of optical illusions referred to as Brightness Illusions.  In a roundabout way this leads us full circle back to Birds and Light.  While I hope the blog will continue to grow and develop I am getting the sense that it may be time to start pulling together the threads to weave the first couple of chapters of the manual.  At the end of the day, like a PHD student who just can't quite finish a thesis, I could go on and on with all of these disparate fields of study.  But the average birder is likely to only want a few simple and effective tools to approach a bird identification with a degree of knowledge and confidence to deal with the variables and challenges that might be thrown up.  Time to consolidate.


Tuesday, 13 October 2015

Colour - Resolution and Colour Sampling

Among the various aspects of this blog the subject of colour has been one of the more interesting and revealing.  Colour in birds is discussed in detail HERE.  From a distance colour plumage patterns may appear quite uniform and homogeneous.  But, take a closer look at say a Northern Wheatear (Oenanthe oenanthe) in the hand or through a scope and one can see that the micro structure of the feather plays an important role in how colours are actually presented to us.


Colour In Layers
The splayed barbs of downier scapular, mantle and coverts feathers add a degree of texture and complexity to a bird's plumage.  By contrast the more tightly-knit barbs of the flight feathers appear less textured, smoother and, as a result may appear more uniformly coloured.  Bird illustrators might resort to crosshatch or fine brush strokes to try and capture this subtle difference in texture.

Take a close look once more for instance at the Northern Wheatear image above.  The highly magnified scapular feathers (lower left inset) have splayed barbs, which in turn reveals a darker background beneath these feathers.  Similarly, on the throat we can see fine white feather barbs, like fine brush strokes lit against a rich, orangish background.  When we pull back and look at the bird in lower resolution (top left) we generally miss these subtle distinctions.  The scapulars appear instead as light tawny with perhaps a hint of fine texture evident.  But the dark background is not so readily apparent.  The throat appears a rather uniform pale orange, though without the same contrast between layers needed to appreciate the texture between the layers of feathers in that area.  Contrast is an important element of all of this.  Contrast determines how the human eye resolves detail and is an essential element of what we term sharpness or acutance, as for instance explored HERE.

For those with experience of handling and describing birds from museum skins or from ringing birds this is perhaps not much of a revelation.  Those who often work up close with birds experience their colours and morphology quite differently to those who watch them solely in the field.  I imagine many field birders miss this subtle distinction between overlapping feather layers and their colours when describing the birds they observe.  I know I have.  Very often when we describe the colours of plumage in the field we are not actually describing the individual feathers.  Very often it is a combination of colours of one or more overlapping feather layers.  This should be borne in mind when it comes to comparing our field descriptions with those obtained from the text of a scientific description, or from a ringer's guide such as the Identification Guide to European Passerines by Lars Svensson or the North American equivalent, the Identification Guide to North American Birds by Peter Pyle for example.

The question is, do we need to be able to observe and capture the kind of detail only obtained by viewing a bird up this close?  Clearly, in most cases we do not.  Standard field guides and their identification plates rarely go into such minute detail and most birds can in fact be described and identified without reference to colour at all.  Moreover, there can be considerable intra-specific variation and variation due to feather moult and wear, particularly involving feather edges and tips.  Not surprisingly then subtle colour detail such as this is not commonly high up the agenda for many birders in the field.

Pixel Resolution
Resolution in photographic terms is the image quality parameter that best represents that distinction between that forensic 'up close and personal' plumage analysis and that, generally far less exacting analysis achievable in the field.  Without a very high level of resolution we can never hope to get down to the fine feather detail needed to for example distinguish between the colours of layers of overlapping feathers as described above.  It is quite rare that a bird will allow such a close approach as this Northern Wheatear.  Typically speaking the image resolution obtainable with a camera in the field is not a close match for such in-the-hand analysis.  In actual fact, most of the time the camera struggles to even come close to capturing the level of detail we can see with our field optics.  Though of course an image may be subject to far more rigorous scrutiny than a field observation, no matter how close and prolonged the sighting.  It could also be said that modern digiscoping and the latest crop of DSLR cameras are making significant ground all the time on field optics in terms of image sharpness, resolution and magnification.  And this trend is only set to continue.

While the resolution we can perceive is dependent on our eye-sight and the resolution of the screen upon which we view our images, we can of course use the zoom function in our imaging software to magnify an image to resolve fine details down to the level of individual pixels.  So when we talk about forensic analysis of detail in digital imagery what really matters is resolution in terms of total pixel count.


The image captured by photographing a bird with a small lens at close range is not the same as the image captured from further away with a longer lens.  Where we are concerned with very fine detail every pixel counts, and that means that image artefacts come into play.

Up closer we can fill the frame and capture the image at much higher resolution.  We also tend to have much better control over lighting and exposure with a smaller lens.  At greater distance we have environmental factors like heat haze, dust and moisture to distort the image.  We rely on larger lenses which generally means compromising optimal exposure and introducing noise and other artefacts.  While these are all clearly important considerations, for this posting I am keeping things rather more simple.  Rather than try and capture similar images of our subject from varying ranges I have instead mimicked this approach by simply taking a really sharp image and gradually lowered its resolution by resizing it smaller.  

There are some similarities between this approach and photographing the subject at varying distances.  The key distinction however is that resizing requires image interpolation which alters every single pixel in the image.  Therefore a resize is an adulteration of the original image content.  On the other hand, when we simply stand further back from our subject and take a smaller image of it we are achieving the same reduction in overall pixel resolution but without that added interpolation step.  Despite all of that, starting with a sharp, well exposed image taken at close range and resizing smaller always tends to produce better, far more reliable results.

Resolution and Sample Homogeneity
I have discussed image colour sampling and analysis is detail elsewhere.  We can sample and identify the colour RGB value for an individual pixel using any standard image editing software.  But when it comes to sampling a patch of colour we face a problem.  The pixels across the surface of a colour swatch will tend to vary slightly, no matter how perfectly homogeneous the swatch might appear.  One need only zoom in to the pixel level to appreciate the level of variation occurring at that minuscule level.  We may inadvertently sample a pixel of noise and end up with a completely spurious result.  Or, for instance in the case of the very sharp image above we may set out to sample the tawny feather colouration of the mantle and inadvertently sample an underlying feather or the feather shaft instead of the barb.  The purpose of the postarizing method that I developed (HERE) is to reduce the margin for error by creating a homogeneous patch, thus eliminating that background noise within the image.  What I am particularly interested in here is the effect of the postarizing method on a really sharp image versus progressively lower resolution images.  Afterall, by resizing an image smaller the interpolation step is liable to introduce a certain amount of portarization itself, filtering out much of the noise in the process.  But the fear might be that in doing so colour accuracy is compromised.

I have already carried out an experiment involving colour patch homogeneity (HERE) and in doing so I think I found a pretty good quality control tool for selection of appropriate sample swatches using defocus as a tool to test homogeneity.  Here I am testing something slightly different.  This is a test of the image resizing interpolation algorithm to see if that process introduces unwanted drift among the colours of the image.


Once again I have taken the very sharp original image.  I have drawn five sample boxes within the image and collected each of those samples.  I have then resized the image and resampled the same boxes over and over at progressively lower image resolutions.  This leaves me with a total of twenty five samples ready for analysis as displayed above (lower left).  The next step involves postarizing each sample.  Once again for this I have used a simple tool in the MS Office 2010 suite called "Cutout".  Taking each swatch in turn this tool reduces the colour pallet of each swatch down to at most two or three sample colours to choose from.  It is quite easy to select a pixel of the appropriate colour from the limited choice.

The results are striking.  Even with the highest resolution image, with its fine textured detail, the postarizing tool has arrived at the same basic colour sample result as the same swatch taken from a much lower resolution image.  For me this strongly suggests that the interpolation tool which I have used to resize the image (MS Paint) is very good at preserving colours down to a very low resolution.


A closer look at the actual RGB numbers shows that there is actually a slight drift evident, most noticeably towards the lower resolutions.  This is not too surprising given that a resize down to 1% of the original image means that every pixel has to somehow convey the detail contained in 100 pixels at high resolution which it has amalgamated and replaced!

Turning to the Birders Colour Pallet which I created to try and put a standard name to colours in sRGB colour space note I have intentionally allowed for a fair degree of latitude between each named colour.  This is an allowance for a fair degree of colour drift during interpolation and other forms of image manipulation.  The result is that, for the most part the Birders Colour Pallet key delivers the same colour result across the board in this experiment.  Only in the case of the dark mauve swatch has the drift exceeded the boundary and arrived at a neighbouring named colour (dark maroon and dark heather in the case of two of the results).  For me these minor outliers are perfectly acceptable and the results further enforce this blog's colour sampling method as a valid and useful one for birders to adopt.

Conclusions
There is a lot to be said for studying plumage up close and personal.  While most field guides and indeed many field observations might give the impression that birds are clad in fairly uniform colours, the reality is plumage colouration is highly complex and subtle at the micro level.  Then again we can get by in the field without having to study birds in such fine detail.  The same can be said for field photography as a means to capture and analyse colour in birds.  What this experiment has shown is that image resolution is not a significant factor we need to be to worry about.  Whether an image is a full frame, high definition mind-bender, or a much lower resolution, simpler representation, it is still possible to analyse colour consistently using the colour sampling method and Birder's Colour Pallet.