Friday 29 May 2015

Forensics : Fringe artefacts while working in RAW

Working in RAW is essential for getting the most out of images as discussed HERE.  While working in RAW one is immediately struck by the strong influence of digital noise and the requirement to use sharpening tools with a lot of care, so as not to exaggerate noise in the final image.  It turns out we may have to contend with other digital artefacts introduced while working in the extraordinarily versatile RAW format.

While recently working with some of my images in Camera RAW I have noticed a tendency to introduce an edge artefact using the highlights (recovery) slider.  This looks a bit like purple fringing but after a bit of research I finally came across the explanation for it online.  I noticed this problem while adjusting parameters to extract as much detail as possible from within the highlights of my images.  This has been occurring around high contrast edges and this is apparently where the problem normally arises.  There also seems to be an association here with bright sunlight, which obviously pushes highlights (particularly white plumage) close to the point of being blown.  The original JPEG from the camera doesn't present with these fringes.

In the video below I have presented some examples of this fringe artefact.


Soft-edge Mask Halos
So, what is going on here?  Well, according to this link HERE the explanation for this is most likely down to the use of soft-edge masks in some Camera Raw tools.  These masks are offset from the original image and therefore appear as halos.  So this would make this phenomenon an artefact specifically introduced and left behind by a RAW image processing tool.





   
Purple Fringing - Chromatic Aberration
The term purple fringing has an etymology going back to early colour photography where it's origin would have been in chromatic aberration due to the limitations of lens design and for instance the sensitivity of film to infrared light.  Chromatic aberration is caused by the varying refractive indices of different wavelengths of light, causing different colours to focus at different points on the film/sensor plane.  The same effect allows us to split white light into it's spectral colours using a prism.  While it may be possible through clever lens design and lens coatings to deal with the range of refractive index within the visible light spectrum, IR light, which encompasses a massive spectral range falls well outside that scope, so a sensitivity to IR light is always likely to result in chromatic aberration.  The solution in this case is not to try and design lenses to cope but instead simply to block IR (and UV) and stop those wavelengths reaching the sensor or film.



While better lens design, coatings and UV/IR blocking filters have all largely resolved chromatic aberration, purple fringing still continues to plague photography.


Purple Fringing - Demosaicing Artefacts
The term purple fringing is also used today to describe a wider range of phenomena in modern photography.  Another big potential cause is the interpolation step between a Bayer raw image and the creation of a full colour image.  This process step is called demosaicing.  I have covered this topic in some detail already HERE where I used the illustration below to show what a Bayer RAW image looks like before it is demosaiced to create the final colour image.


The relationship between demosaicing and fringe artefacts is neatly illustrated by the excellent posting by Adam Hooper HERE.

This posting serves to draw attention to the fact that, even when working in RAW there may be a risk of unmasking or introducing unwanted artefacts.  So, enticing and all as it might be to extract every last detail from RAW files, sometimes it may be necessary to trade off some detail and avoid unmasking or introducing some nasty artefacts.

Tuesday 19 May 2015

Field Marks - False Fringes

In this slightly unorthodox posting I am going to use a mystery photo to explore the topic of false fringes in digital bird images.

For those of us here on the western edge of Europe a Caspian Reed Warbler (Acrocephalus scirpaceus fuscus) is a major identification challenge and potential reward.  We know these birds should be occurring here.  Among the potential ID features for this taxon, 1st winter birds in autumn often show a fine pale tip to the tail (reference for example Birding Frontiers, Autumn Challenge Series, Garner 2014).  Caspian Reed Warbler has yet to be recorded in Ireland, though there may have been a few potential candidates, particularly in late autumn.  It may well take DNA analysis to clinch the first but that is no reason to avoid pouring over a potential candidate.

When Killian Mullarney had a brief encounter with an interesting Reed Warbler in Co. Wexford in October 2013 he obtained an image of the bird in flight depicting a possible pale tail tip.  The question is, are these blurred looking tail tips really pale or merely an effect of the lighting?  Or, perhaps motion blur, aliasing or some other artefact?  Killian has kindly let me publish this image with my analysis below.




Photographed using a Canon EOS 7D with 300mm EF IS USM lens
4th October 2013, 2:38pm
Shutter Speed 1/1250th second
F-stop 4.5
ISO 640
Auto exposure mode
Auto white balance






A crop of the tail area reveals what would appear to be reasonably broad whitish tips to each tail feather, though the image is very soft and both the wings and tail appear unnaturally pale or washed out looking.  There are slightly peculiar brighter highlight areas within the pale fringe.  I believe this is a telltale feature of motion blur, which I will demonstrate below.


Lighting
Lighting can most certainly produce pale patches, including the impression of pale fringes.  This is more likely to be the case if the light is behind the subject and translucency is at play.  It might also occur if for example an edge is slightly raised and just about catches the light.  Judging by the shading of the twigs the lighting in this case was coming from the right.  The colours of the mantle, rump and uppertail coverts are reasonably well exposed so the bird certainly isn't in full silhouette.  Humans are not very well equipped to judge the direction of ambient lighting (as discussed HERE).  Despite this however I think it is reasonably safe to assume that the sun in this case was roughly at right angles to the bird and the observer, There seems to be an element of reflective glare off the right wing flight feathers and to a lesser extent the tail.  But it doesn't appear that the brighter tips are due to this glare.  Note for instance that the trailing edge of the wing is very similarly lit but doesn't show this pattern.  Overall I think the lighting would not account for the impression of such a clean, whitish fringe, confined as it is to around the tips of the tail, in this consistent pattern we see.  So I think we can eliminate lighting as a cause of this fringe effect in this case.


Exposure
Exposure by itself would not introduce unnatural fringing around features in an image.  Suboptimal exposure reduces contrast which in fact will subdue fringing.  Focusing on the bird alone one might be forgiven for thinking the image is unusually dull and poorly exposed.  However, looking at the leaves and twigs the exposure of the image isn't actually all that bad.


Defocus and Motion Blur
Our mystery photograph appears to have an measure of both defocus (i.e. lens out of focus) and motion blur.  Some of the leaves and twigs are sharp while others are out of focus and others appear to have been in motion.  The bird appears to be slightly out of focus and is also clearly in motion.  In order to analyse focus errors here I have created two composite images, one with pale fringes and another without.  I have applied artificial Gaussian and motion blur tools to these images.  While these are not natural conditions, the trade off is to allow for a finer control of the variables involved.


The first test below is for defocus.  As stated in the graphic, defocus alone will not produce artificial fringes and in fact the opposite is true.  Defocus reduces contrast and obliterates fringes and other fine detail.


The second test below is for motion blur.  One of the difficulties in trying to replicate motion blur is that the blurred pattern is directional.  The longer the exposure the greater the likelihood that the blur pattern will change direction.  With such a short shutter speed in this case (1/1250th of a second) the motion blur is likely to be along a straight vector but it is impossible to work out exactly what that vector would have been, and it might vary at different points on the bird.  For instance the bird may have been moving up and away within the image while in the same instant it's tail may have been in down stroke.  Meanwhile a movement of the photographer's hand could shift the entire image in another direction entirely.  So the overall motion vector may differ from one place to the next on our subject.  After having played around with different motion blur angles I settled on zero degrees, or motion along the horizontal plane for my test images below.

What is particularly striking about this experiment is that the fringe is dissolved in places yet it is interspersed with patches of highlight.  This pattern is consistent with the fringe pattern in our mystery image.  Another point of course is that, while the feathers without fringes have a blurred, ghost-like edge there is no pale fringe introduced by the motion blur.  So motion blur alone would not explain the presence of bright, whitish tips to the tail of our mystery bird.  On the other hand the motion blur pattern obtained using the test image containing a fringe looks very like our subject.


  
Aliasing and Sharpening Halos
These are both artefacts which are introduced by the processor as a consequence of sharpening an image.  Aliasing would produce the impression of fringing in very low resolution images.  This is not relevant to this image as the resolution is acceptable.  Sharpening halos occur due to the overuse of sharpening tools such as unsharp mask.  Again this is not at play in this instance.  Sharpening introduces contrast to an image and halos will be found around other objects in the image, not just our subject.  Note for instance that the tail has a fringe yet the nearby secondaries of the right wing have not.  In this case the image overall is quite low in contrast and there are no signs of edge halos.  Just to confirm this analysis I have taken the test image without a fringe and created a false fringe by drastically over-sharpening the image and thereby adding an edge halo.  The resulting over-sharpened image has excessively high contrast and looks unnatural,  For more on these phenomena see HERE.


Artefacts
Purple fringing is a term used to describe a variety of factors that can give rise to the impression of a false fringes around often contrasting edges in images.  As the name suggests they are generally coloured and or chromatic aberrations so do not appear white and therefore would not account for the effect in this sample image.


Conclusions
While it is not possible to be totally definitive I think the evidence points towards this bird having had pale tipped tail feathers in life.  The overall lighting in the image doesn't support translucency or localised light reflection as likely causes for the fringe pattern.  For instance the fringes are found on the tail but not on the nearby trailing edge to the right wing, which is similarly lit.  This inconsistency would also tend to rule out an artefact as the cause of the fringes.  Motion blur on the other hand could account for the odd character whereby the fringes have patches of brighter highlight interspersed throughout.

While this analysis may not ultimately confirm the identification of this bird, hopefully it presents a flavor of the mechanisms giving rise to false feather fringes in bird images and how we might analyse images in search of them.

Sunday 10 May 2015

Gestalt - Beak Structure and Shape (Part 1)

Though beaks come in all shapes and sizes they have a consistent design, as discussed HERE.  Though the beak (bill, or rostrum) is a bony structure the upper and lower mandibles have a degree of flexibility.

Rhamphotheca
The outer sheet, the rhamphotheca, contains colour pigments which give the beak colour as discussed HERE.  The rhamphotheca, while subdivided into two segments (rhinotheca of the upper mandible and gnathotheca of the lower) is seamless in most birds.  The albatrosses are among a small number of bird families with a more complex rhamphotheca (note topography below).  The colour pattern of various different segments in albatross rhamphotheca can be an essential part of the ageing and identification process.


  
Tomia
The tomia (singular tomium) are the cutting edges of the bill.  Designs vary greatly, from serrated (eg. in mergansers) to ridged (eg. in granivorous birds) to hooked (eg. raptors, shrikes etc.).


  
Nares
The nares or nostrils are generally fairly prominent features, particularly for example in the tubenose seabirds (eg. Tristan Albatross above).  But, if your speciality is diving it may be a disadvantage to have these structures providing access for water into the lungs.  So on some species eg. cormorants and gannets, the nares are missing.  These birds breath entirely through the mouth.



  
Cere
The cere is a waxy structure at the base of the bill of raptors, owls, skuas, parrots, turkeys and currassows.  In all but the owls the nares are found within the cere.  In owls the nares are distal to the cere.  The cere can be an indication of age and/or sex.



Operculum
Though sometimes confused with the cere, the operculum is a different structure.  It is cartilaginous, not waxy.  It is most recognizable as the swollen, bulbous mass at the base of the bill in pigeons and doves.  It has a functional purpose in many birds.  It can be used to keep water out of the nasal cavity in some diving birds, as a pollen guard in flower feeding birds or to keep dust out of the nares eg. in seedsnipes.


 
Bill Tip Organ
Birds which probe the soil and mud typically have an internal bill tip organ to help them locate prey.  Shorebirds show some of the greatest variation in bill design owing to the rich availability of specialist niches in the intertidal environmental.



   
Intra-specific Variation
In many species younger birds have shorter bills than adults.  Males may also have longer and/or broader bills than females.  In a few species there may be some sexual-dimorphism in bill design.
  
  
Confounding Factors
During feeding, birds can accumulate material on their beaks which can confuse an identification.  Whether it's food material, soil/mud or water, it can all blend in and mask the real colour and shape of the bill.


Here we can see how a single drop of water can drastically alter the appearance of the bill tip.  Depending on the angle of the subject and the light source the water droplet may mirror and take on the colouration of the bill.  Though Semipalmated Sandpiper (Calidris pusilla) generally has a slight bulbous tip, this is accentuated by the fact the bill of this species often carries this little water droplet.

Interestingly, this bird also seems to have some deformity along the dorsal ridge of it's upper mandible (it's culmen).  Birds can overcome some incredible bill deformities or damage, adapt and survive.


Nest-building Common House Martin Delichon urbicum.

For more on beaks see HERE.

Wednesday 6 May 2015

Colour - Beak Colouration

In early May birds are reaching the peak of their courtship and breeding dress here in Ireland.  A nice view here of a lingering Great Northern Diver (Common Loon, Gavia Immer) is a real treat.  In a couple of weeks this bird will presumably be back at it's breeding grounds in Iceland, Greenland or Canada.


In addition to having attained full summer plumage, it's bill is now totally black.  Hormones are responsible for both feather and bareparts adaptation for courtship and breeding.

Melanins and carotenoids are the main pigments involved in bill colouration.  The rhamphotheca is a thin sheath of keratin covering the surface of the bill and it is within this substrate that these pigments are laid down.  The actual combination and concentration of pigments is determined by hormones, diet and other factors.  The rhamphotheca is continuously growing and shedding, much like hair and nails in mammals, so colour is added gradually and is also generally lost gradually.  The pattern and colouration of the bills of individual Great Northern Divers in winter for instance may vary depending on individual feeding habits and their general condition, and this kind of variation is equally obvious among a flock of Starlings in the autumn.


The colour of the bill base of Common Starling (Sturnus vulgaris) in summer indicates its gender.  Pale blue for a boy (top left) and pale pink for a girl.  The colour wears and fades over the summer and is replaced with a melanin-rich black for the winter.  In an interesting study (HERE) it was found that a darker melanin-rich rhamphotheca is tougher than it's colourful summer equivalent so there are practical, survival reasons for this change.

Of course staining due to food or soil contamination can confuse matters.  Here the distinctive yellow bill of a juvenile Rose-coloured Starling (Pastor roseus) is almost entirely obscured by Blackberry juice (Rubus genus).



European Goldfinch (Carduelis carduelis) is colourful year-round and if anything appears to be much more in it's prime in the winter (when pairs may be forming from within social flocks).  While the bill of European Goldfinch is pale flesh coloured, with a black (more hard-wearing?) tip the black may be more extensive in summer.


I have looked at ultraviolet reflectance separately eg. HERE.  Probably the most interesting find I have made so far has been the lack of UV reflectance in the tip of the bill of Common Moorhen (Gallinula chloropus).



Emperor (Aptenodytes forsteri) and King Penguins (A. patagonicus, below) are also known to have UV reflectance patterns on their bills.


The appearance of bareparts colour can vary dramatically depending on lighting.  I have covered this in some detail HERE.  Translucency introduces additional challenges as illustrated below.



For more on beaks see HERE.

Sunday 3 May 2015

Gestalt - An Irish Etymology for Jizz

An Irish Perspective
While researching this subject I came across an interesting paper published by David McDonald in Canberra Bird Notes, 1996 called The Etymology of Jizz (HERE) where he referred to among various potential origins for this word, the work of Thomas A. Coward, Bird Haunts and Nature Memories, 1922.  T.A. Coward devotes a chapter in his book to Jizz (HERE).  
Opening page, chapter titled Jizz, from Bird Haunts and Nature Memories, 1922.  T.A. Coward.

There doesn't appear to be any earlier published reference to the word jizz, least of all in the context in which it is used by birders today so I think there can be little doubt that the originator for this word in birding should be considered to be T.A. Coward, 1922.  And yet this has not been the case (eg. HERE).  Why?


The More Commonly Held Belief
Perhaps the most widespread belief is that jizz is derived from G.I.S.S. (General Impression of Size and Shape), a World War II fighter pilot acronym concerning the recognition of aircraft based on their appearance.  And yet we have a very clear reference which predates this, above.  Why, if the word existed in the correct context before WWII is this the more commonly held etymology for the term?  I think it may come down to usage.  David McDonald referred to various ornithologists who are convinced the word arose directly from the WWII term G.I.S.S.  Could it just be a coincidence that the concept came into widespread being thanks to G.I.S.S. but in parallel was known to a few because of T.A. Coward's writing and that the spelling subsequently shifted from GISS to the more appropriate Jizz over time?  In other words, is it possible both G.I.S.S. (from WWII) and Jizz  (from Coward, 1922) have coexisted in general use unbeknownst to the birding public, simply because they sound the same and have the same approximate meaning?

The Origin for the term jizz in Ireland
The word jizz is not an Irish gaelic word but it is a word that is used even today in Ireland to imply a bit of spirit or cockiness.  It is unclear if the word was in use, with that meaning in the 1920's.  It has been suggested that T.A. Coward may have misheard a word which did actually exist and which has a similar meaning, namely jism.  Or that he misheard another word, gist.  Or perhaps the fisherman may have been using a word which is no longer in use, such as gizz or phizz, both meaning face or facial expression. 

There is one other possibility of course, which is that T.A. Coward may have heard an Irish gaelic word.  David McDonald was unable to glean any likely word from his research among Irish speakers.  Unfortunately I am not a fluent Irish speaker myself but there is one other intriguing possible origin (with thanks in particular to David Quin on the Irish Bird Network (IBNlistserve) for pointing it out).

Jizz, Jazz and Pep
The late (and controversial it seems) Daniel Cassidy suggested an Irish origin for the word Jazz (reference HERE).  Cassidy suggested that it was derived from an Irish word teas, (pronounced by many as chass).  It means heat.  For jazz to have come phonetically from teas it would have to have been spoken by someone with a strong accent.  For those of you not familiar with Ireland, there are a vast multitude of different local accents in Ireland, possibly more than most other countries on the planet.  I have very little doubt that not only could an Irish person pronounce teas as 'jazz' but another, practically living on the same street could pronounce it as 'jizz'.  The origin of jizz as T.A. Coward referenced it may all come down to the accent of one Irish fisherman.

There is one line in T.A. Coward's book that resonates with me.  


Why would the author turn from talking about nature to talking about the characteristic jizz of individual people unless perhaps it had been part of the Irish fisherman's use or explanation of the term.  There was a word coined around the same time as jizz and jazz and it is the word pep.  They essentially mean the same thing.  Someone with pep is spirited, a little cocky... a little pep in their step.  The word pep comes from the word pepper which of course implies heat or, in Irish, teas.  Is this just another strange coincidence in this intriguing etymology or do all these words hail from the same vernacular lineage?

Of course, jizz and jizm have been hijacked in the modern era by a very different meaning, which is why gestalt is possibly a more acceptable word for the present day birder, and it is the term I am going with in this blog.

UPDATE JULY 2016
Further work by David McDonald in 2016 seems to confirm an Irish Etymology for Jizz.  See HERE for details.

Friday 1 May 2015

Field Marks - Shadow Topography

In various postings to date I have referred to contour shadows which form in consistent places on the surface of birds.  While this cannot be considered an exact science I think there is a certain merit in assigning terms to some of these consistent shadows for the purpose of furthering discussion.  In the posting lighting and avian anatomy I discussed the typical contours and pterylosis (the arrangement of feathers in definite areas) that give birds recognisable form.  I noted that in certain topographical areas of the avian body feathers are aligned neatly into near parallel rows, including for example the feathers from the bill and forehead, back over the crown and right back to the tail.  Meanwhile in other areas, such as around the eyes and ears (auriculars) feather alignment is less straightforward.   

With consistent feather alignment we start to see consistent shadows running longitudinally, like diffuse streaking along the length of feathers and pterylae.  We also see transverse shadows frequently running along the bases and just beyond the tips of feathers and pterylae.  Lastly, as illustrated in the posting false malar stripe we find shadows and the occasional exposure of feather bases and bare skin consistently wherever apteria are found on the body of a bird.  When these shadows and other features coincide with the position of typical field marks understandably we have the potential for confusion and misidentification.  In this posting I am going to focus on some consistent areas for confusion concerning field marks and shadows on the heads of birds, particularly passerines.  

Using European Robin Erithacus rubecula as an example below I have illustrated the typical topographical features of a bird's head.  Leafing through a variety of field guides it isn't often made clear that the throat wraps around beneath the submoustachial (malar) and ear-coverts (auriculars)  to meet the nape.  This indeed may not even be obvious in the field until a bird raises it's head and stretches it's neck.


Many birds of course have strongly marked heads and there are a range of commonly used field marks, as illustrated in most field guides.  Terminology varies and is sometimes in a state of flux (eg. the recent trend to replace malar stripe with lateral throat-stripe).  Topographical keys tend to be lacking in some areas, most notably in terminology for markings lying within the ear-coverts (auriculars) and throat (gular).  Below I have tried to fill in some notable gaps, such as the markings bordering the lower and rear of the ear-coverts (eg. common in many passerines), the auricular spot (eg. in some pipits and small gulls), the suborbital stripe (eg. in many larks) and the gular stripe (in some seabirds and the occasional passerine).  There may be better, more accurate terms in use for some of these and if so I'd appreciate some feedback.


The suborbital stripe is found in many lark species including Common Skylark (Alauda arvensis), often in association with a moustachial stripe, yet it rarely if ever features in the topographical keys in field guides.  Even more surprising is the lack of terminology for markings bordering and within the ear-coverts (auriculars).  Normally field guides only illustrate the eye-stripe and moustachial within the ear-coverts.  There is also typically no distinction made between a short moustachial (consisting of a row or two of the small orbital feathers) and a fuller moustachial extension as it were, encompassing the lower, or subauricular border of the ear-coverts.  I think there is some merit in making some clearer distinctions between various portions of the ear-coverts border.

It should be obvious that many of these markings follow specific pterylae, either covering the whole feather tract, or perhaps just the median or lateral portions.  These also align with contours, and therefore the typical alignment of shadows that follow these contours.  I have already explored the supraloral shadow and false malar stripe (perhaps more aptly named lateral throat shadow).  The loral shadow is also a commonly encountered lighting trick.  In fact most of the typical field marks of the head are often mirrored by highly localized and therefore potentially misleading shadows.  Below is a non-exhaustive key to some of the more frequently encountered ones.  I have added suggested terms for illustrative purposes.


  
False lateral crown-stripe (false coronal stripe)
Created by the protrusion of all or part of the crown from above, or alternatively by protruding lores or supercilium from below, shadows can mimic all or part of a lateral crown-stripe.  The European Robin is not a good candidate to demonstrate this.  Booted Warbler Iduna caligata is a better candidate.  Owing to bulging feathers on it's forehead it shows a prominent supraloral shadow, bleeding into a full false lateral crown stripe (or false coronal stripe to use a related though less frequently used term).


 
False eye-stripe and loral stripe
The Booted Warbler sequence above illustrates these shadows also.  In many species the lores are lightly feathered resulting in a slightly hollowed contour which frequently carries a shadow within it.  Note for example how hollow looking the loral area of  the Booted Warbler looks when compared with the European Robin.  This effect is even more striking in the Skylark image.  The loral feathers are also frequently misaligned and parted resulting in streak-like shadows, formed between the feathers.  For this reason it can be a real challenge to accurately assess the colour and tone of the lores.  We can also see in the Booted Warbler image how a bushy rear supercilium can cast a shadow over the top portion of the ear-coverts creating the appearance of a false eye-stripe.  So, depending on the angle of observation relative to the light source, the supercilium may cast a shadow above, onto the lateral crown, or below, onto the ear-coverts.

Gular shadow, auricular shadow, false moustachial stripe and false malar stripe
The shadow cast by the bill onto the throat often resembles a gular stripe.  Meanwhile the ear-coverts might cast a shadow onto the nape and throat side, particularly when a bird's head is turned or if it is looking up. These shadows resemble the dark streaks that frame the ear-coverts including the moustachial, subauricular and postauricular markings.  I have already looked at the false malar stripe separately HERE.


In summary I believe there is a benefit to assigning some terminology and order to an analysis of lighting and avian anatomy.  Starting with basic avian topography and standard field marks I have here overlayed some of the recurring and consistent localized shadows that give rise to confusion.  Light and shade is far from simple and this is not a remedy for the challenges of birds and light.  But I think it helps frame a discussion about a subject that isn't often considered.  Another tool for the toolkit.