Pages

Monday, 31 March 2014

Colour - Colour Sampling

I remember getting into an argument some years ago about the apparent leg colour of a Shearwater.
The question was were the legs blue or pink?  In reality they were probably best described as pale bluish-pink but the question came down in the end to a measure of the number of pixels on the pink side versus the number on the blue side.  And, of course, given the difficulty in accurately capturing colour in nature using a camera, the image may not even have reflected the true colour of the bird's legs in life.  Nonetheless, for me it was an interesting exercise and I have recently been thinking a bit more about the question of how we should sample colours from an image of a bird.

Colour in nature is rarely uniform.  A patch of colour will, generally consist of smaller patches of slightly different colours, further complicated by the texture and structure of the surfaces of the subject.  The angle of light falling on the subject will create subtle colour gradients.  A feather for instance as we all know is neither flat nor uniform.  It has a complex structure at a microscopic level.  One has to be relatively close to see the shaft and vanes on a feather and these are just the larger, more obvious features that make up this marvellous design.  

However, as the observer withdraws, details tend to merge and flatten with distance.  If you open any field guide and closely observe the plates, generally you will note that the artist has not resolved detail down to the level of individual feather veins.  Not only would this be extremely laborious but it should not even be necessary.   After all we generally don't tend to get close enough to birds to see these fine structures clearly in life.  

So, in summary we are used to observing and identifying birds without having to resolve extremely fine detail.  We are also more used to describing birds based on large, apparently uniform patches of colour.  The question is, how do we define the colours we capture in photographs.  In COLOUR BY NUMBERS I described an accurate, standard method for classifying colours in digital photographs.  This method however only applies to individual pixels.


As the example above shows, though an area may look quite uniform in colour, there tends to be a lot of variation at the pixel level so simply placing a "dropper" over a patch of colour gives no guarantee that the actual pixel sampled will be representative.

Selective use of the dropper
If at first you don't succeed you can keep sampling pixels until you find what might be considered a good match.  This approach however is obviously subjective.


Make the image much smaller  
When we make images smaller the pixel count drops but the overall colour representation remains fairly true.  Unfortunately, we still end up with far too many choices.  Below is a good example of why this method simply doesn't work.   


Postarize the image
Obviously using an artistic postarizing tool will dramatically alter the image.  This is a means to an end.  Our primary motive here is to take subjectivity out of the process.  By subjecting the image to a standard algorithm we can replicate the process for different images and expect the same results time and again.  So we now have a qualitative method for sampling colour in bird images.

A Result!


See also HERE.

Sunday, 30 March 2014

Colour - Colour by numbers

Colour Theory

If you don't know very much about colour theory, don't worry, with just three or four terms that I will explain below you will understand what I am on about here.  If not I would recommend a visit to www.cambridgeincolour.com and a read of one or two tutorials.

Colour theory is based around three primary colours, red, green and blue that, when mixed together can produce all other colours.  In terms of digital photographs the colour of an individual colour pixel can be described and measured in terms of three parameters, hue, saturation and luminance (or luminosity).  First however we must define our colour pallet.


Colour Space and Gamut

A colour space is like a massive colour pallet containing all the colours capable of being accurately displayed by digital devices.  sRGB is the default colour space of most cameras, computers and printers.  Not all devices can display all available colours however.  Printers for instance don't tend to have the same capabilities as cameras and colour monitors.  The range of colours which a particular device can reproduce is called it's colour gamut.  


Hue

This is the name given to the major colour component of the pixel.  There are 240 different hues available in the colour space sRGB. 

Saturation


Saturation (or chroma) is defined as the purity of the colour.  In sRGB, again there are 240 different saturation increments between a vivid, pure colour and a totally desaturated grey.


Luminance

Luminance (luminosity or brightness) is the brightness of the colour or pixel in this instance and is a reflection of the amount of incident light the colour reflects.


All image editing and digital painting packages use hue, saturation and luminance in different combinations to display all the available colours.  I particularly like the arrangement in Microsoft Paint as it maps hue and saturation in one graphic and keeps a separate bar for luminance.


Each colour carries a value for hue, saturation, luminance, red, green and blue.  Thus every colour can be identified by a unique set of numbers.


If we look at this another way.  Every coloured pixel, no matter how pale and seemingly colourless, is derived from a discrete hue.  Here are all the various shades of red that can be derived from hue number 0.  Note as hue 0 is desaturated it becomes a muddy reddish-brown before becoming grey.













Thursday, 20 March 2014

Project Scope

Let's take a step back

Now that I have a few postings under my belt I thought it might be a good idea to clarify the scope of this blog.  Obviously it is about birding, identification of birds and photography.  To narrow it down for you here is an illustration showing the typical pathways involved in identifying a bird.  I have highlighted in blue those elements which are of particular interest to me and which I will be exploring with this blog.  Specifically it includes the ID of birds from photos and related aspects of the analysis process.


If you have read a couple of my postings hopefully you will have by now grasped what I am trying to do here and how I am going about the process.  The Image Quality Tool is certainly a key focus and reason for setting up the blog but I am also interested in delving into a range of other aspects of bird ID from photographs.  The approach I have been taking is to bite off small pieces of the puzzle (if you will excuse the mixed metaphor).   I then further deconstruct each piece hoping to distill some practical and useful lessons which I will form part of an overall manual for logically and systematically approaching this broad subject. 

The image quality tool is a good example of how I am approaching this project.  The identification of a bird from a photograph is dependent on a range of variables, one of them being the quality of the image.  I have deconstructed quality into a number of parameters.  I have discounted those which I felt were too technical or impractical for most birders and rarities committees to find useful.  But, being anxious at the same time to include those parameters which have the greatest impact on our ability to successfully identify a bird from a photograph.  So I ended up with 5 broad parameters, namely image resolution, focus, exposure, colour and artefacts. 

At the moment I am not working to any grand plan here.  I am simply researching areas that interest me, taking and deconstructing pieces of the puzzle and putting up my findings on the blog. 
You will note that I have set up a number of pages to gather together the postings in some sort of order.  As the blog develops I will put a bit more time and effort into these pages and these will hopefully start to take some shape and begin to look like a manual in due course.  As stated in my introduction page, I hope that all this effort will yield a single document at the end of the day, a Standard Approach to Identifying Birds from Photographs perhaps.   

If at any point you wish to make contact, correct any errors or recommend some direction or other for my research please do not hesitate to drop me a line.  Thanks again to those who have taken the time to visit the blog and get involved. 

Wednesday, 12 March 2014

Gestalt - Size Matters

Judging Size and Proportions


Size and proportion is difficult to judge accurately in the field.  We have all misjudged the size of a bird flying above us.  Birds rarely stand still for long and it can be hard to make a useful size comparison against another bird or object in the environment. 

One might expect that it should be far easier to judge size and proportions accurately from a good photograph.  Well, this is not necessarily the case.  Below are a number of examples of how a bird’s apparent size and proportions can easily be altered due to camera optics, perspective, and even the mind’s eye. 

2D Distortion - LENS DISTORTION
This is caused by variations in magnification over the field of a lens.  It results in a deviation from the rectilinear projection of the image in 2D and may appear as barrelling, pincushion or the combined moustache distortion arrangements.  Focus is unaffected.  The easiest way to check the extent to which your own camera lens suffers from lens distortion is to take a picture of a grid of squares and check for bowing effects at the sides of the image.  Make sure the camera lens is parallel to the grid when taking the photograph so as not to introduce 3D or perspective distortion (see below). 

This effect is mostly associated with zoom and fish-eye lenses.  If you have a zoom lens it is worth repeating the above experiment at the lowest and highest magnifications of the lens and comparing the results.  Fixed lenses can also exhibit lens distortion, eg. wide-angle or fish-eye lenses, as well as other lenses when photographing objects at short focal distances.  Lower quality telephoto lenses may also exhibit lens distortion.

Lens distortion will of course affect every photograph you take but will be less easily detected in images which don’t have straight lines in them.  For images of birds the effect is usually not obvious to the eye, particularly if the image has been cropped.



3D Distortion - Perspective and foreshortening
Architectural photographs of buildings often look unnaturally distorted due to perspective, i.e. the distance and angle of the camera relative to various points in the scene.  What we often forget is that our own visual perception of the same scene is based on the brain’s interpretation of the image obtained from both our eyes (refer to CAMBRIDGEINCOLOUR).  Our brain, and how we subconsciously interpret the scene will often differ from reality.  In our mind’s eye, lines will tend to appear straighter and more parallel.  When we look at a photograph of the scene our brain it seems does not adapt as quickly and something which we may otherwise subconsciously ignore or be less aware of in life suddenly becomes noticeable.  The image of the building suddenly looks distorted.

For birders the situation is somewhat more straightforward.  Birds are usually too small and too far away from us for perspective to be a significant issue.  However when faced with a bird at extremely close range, such as a bird coming to a feeder or a bird in the hand, perspective does start to play a role in terms of our perception of size and proportion and of course in terms of photography.  If the observer is standing close, over the bird, looking down the head will obviously appear larger relative to the feet than it would if the bird is being viewed in side profile.  This type of distortion may appear similar to but should not be confused with lens distortion.  A key distinction between lens distortion and perspective distortion is that lens distortion can be easily corrected with 2D software whereas correcting for perspective distortion requires a more complex, 3D correction.  Another distinction is that whereas lines will appear bowed due to lens distortion, lines will remain straight when viewed in perspective.



Another very important consideration in terms of the relative size of objects in perspective is the focal length of the lens.  For more information please read  PERSPECTIVE DISTORTION.

Size Illusion
As stated above, the brain is capable of “correcting for” perspective to present the world to us in a slightly more two-dimensional looking space.  No doubt there are some evolutionary advantages to this but from a scientific and investigative perspective this adaptation is not always helpful.  If you search the internet for optical illusions you will quickly discover that there are many types of optical effects that appear to fool our mind’s eye.  Some size illusions are related to perspective (eg. the PONZO ILLUSION) and may be invoking by the same innate brain response referred to above.  Another interesting illusion is the MOON ILLUSION and the related EBBINGHAUS and DELBOEUF illusions.  Most of these illusions seem to work best with simple shapes like discs and squares but I was able to recreate the effect to some extent with a silhouette of a gull below.  


The mid-sized gulls appear to differ in size though they are in fact identical.  The reason the gull, surrounded by smaller gulls appears somewhat larger to the eye than the bird standing out on its own but surrounded by even larger gulls obviously has something to do with the wiring of the brain.  From my limited research into the Ebbinghaus and Delboeuf illusions it seems that there are two key factors involved.  Firstly, and perhaps most importantly , the proximity of the subject to other objects affects it’s apparent size.  This is perhaps also key to the Moon illusion where the moon appears larger when it is closer to the horizon.  The second factor is an annulus or a circular pattern around the object.  This factor may have something to do with the design of the eye. 

This illusion might manifest at a roost where various species congregate in close association at high tide.

These are just a few examples of factors that can determine how we perceive size and relative proportion in birds, including in bird images.  When it comes to bird identification one must therefore bare in mind that the lens may distort the bird and its surroundings to varying degrees.   The brain also plays a major role in how we perceive size and proportion. 

If we want to minimize all of these impacts it is advisable to obtain a range of images of a bird from varying distances and perspectives, to carefully take measurements and to compare and average the results from different photographs.  It is also worth investigating the accuracy of the lenses used.

Tuesday, 4 March 2014

Human Bias - Camera v's Human Eye (Part 1)

Check This Out

For a fascinating look into the differences between how our eye and brain works and how the camera and processor works check out CAMBRIDGEINCOLOUR.



Cast your eye around the image on the left.  This scintillating design (from LINK) helps highlight the typical field of view of your focal area.  As I focus on the image on my screen a box consisting of 9 circular points pops out from the screen.  This effect is just one of a range of optical illusions which we are prone to, but more of that another time.  You may see more or less points depending on your screen size and your distance from the screen.

Using the same concept as the "region of interest" example in the CAMBRIDGEINCOLOUR tutorial, here I have marked the areas of this Kumlien's Gull image that drew my attention over the first 60 seconds of viewing.