Tuesday, 14 July 2015

Gestalt - Measurements From Photographs

Measurement by definition requires a numerical scale and a comparable frame of reference.  The physical distance between two points is measured along a straight line using a measurement instrument such as a straight ruler or callipers, or perhaps remotely using a calibrated laser.  What counts in all cases is the accurate scale and an accurate frame of reference.  Photographs present numerous challenges and moreover some of our typical frames of reference in birding are a little questionable at times.

Frame of Reference
Let's take a typical birding scene, a small group of shorebirds, Dunlin Calidris alpina and Common Ringed Plover Charadrius hiaticula.  Let's say we are interested in taking accurate measurements of the aberrant Dunlin and comparing it with other Dunlin in the same image.   


Straight away we have a problem.  In order to take an accurate measurement we need a frame of reference.  Current camera technology can't help us out but let us pretend that we have access to futuristic technology which places a ruler inside an image for us.  The concept is simple enough to achieve, the camera needs to note the distance to our chosen subject and then fancy software will overlay the ruler at that point, while avoiding obscuring anything in the foreground.  The weatherman uses this kind of technology every day so why not us?


This is an appropriate frame of reference for our photograph because our photograph is a flat, two-dimensional representation (X and Y axes) of the three-dimensional world which we are observing.  And, our ruler is located exactly perpendicular to the camera at the location of our key subject of interest.  There is no doubt that this type of technology would be very useful for taking some measurements in the field.  But within this scene, right away we can see we are missing something.  We have a lot of things going on within that third (Z) axis which we are going to have trouble measuring accurately.  Things which we need measuring in front of and behind our frame of reference cannot be measured accurately using that scale.  Only those points which fall exactly along the line of our ruler can be measured accurately against it.  We find a fix to this in version 2.0 of our imaginary measurement software.  Using bird recognition software our camera is smart enough to distinguish a number of subjects and kindly overlays a different coloured grid over each.  Not only that, as the camera has measured the distance to each subject each grid is calibrated, providing four unique frames of reference, one for each subject.  Super!  Right?


Once again, we have improved our range of useful points which we can measure.  But looking closely at each individual bird and grid we find that the grids do not align perfectly along the same plane on each subject.  So why are we still having difficulties?  Well the bird's aren't cooperating.  Our main subject is nicely in profile while the other Dunlin have their back's slightly to the camera and the right hand bird isn't looking at the camera at all.  Therein lies the problem of accurate measurement from a single digital image.

3D Imaging
A quick internet search will reveal various methods to create 3D models from 2D images.  Whether or not this is a practical application for birding remains to be seen and consumer-level technology may be some time away yet.  The basic principal is that multiple images are taken of a subject than stitched together to create a three-dimensional representation.  Such a technique, matched with the kind of sophisticated measurement techniques outlined above would ultimately give us accurate measurement in all three dimensions.  

However if our goal is to be able to measure accurately based on a single moment and we don't want to be reliant on the subject giving us multiple angles, more than likely we are talking about a 3D camera or some other bespoke technology.  A 3D camera is essentially two or more separate cameras, separated from one another by a short distance, triangulating images of roughly the same scene.  While the measurements from this type of setup are possibly not 100% accurate they are far better than the guesswork involving in measuring from a single 2D image.  

Another possible solution would be a 3D laser scanner which would image the terrain in front of our camera and create an accurate 3D model.  The elusive Z axis coordinates are normally recorded by measuring laser "time-of-flight" from leaving the scanner to reflecting off the subject and returning back to the scanner.  One problem with that technique would be the amount of time and file storage required to generate a detailed scan.  Not very practical when trying to photograph a swarm of waders, all constantly moving about, though this technology is improving all the time (eg. see HERE).

Stepping forward again into an imaginary future, I have put my faith instead in a 3D camera setup involving three separate cameras placed approximately 30cm apart.  They stitch together three images into one and I interrogate them using sophisticated software for an accurate bill length comparison.  Some day...

For more on the challenges of measurement from photographs see HERE.

No comments:

Post a Comment