research projects‎ > ‎image science‎ > ‎

detection algorithms

I spent a considerable amount of time writing new detection algorithms.  The results would improve, which prompted me to try new ideas.  In retrospect, my fault was not accepting decent algorithms as "good enough".  The greatest lesson learned was that an algorithm needs to be based on physical or statistical theory.  Tricks and arbitrary parameters only work under some conditions.

This line of research offers cost and data benefits, but one must always ask oneself: "Would an in-situ instrument suffice?"  If the goal is to obtain usable data for further analysis, e.g. physical processes, then I would strongly recommend in-situ instrumentation.  Conversely, if the goal is to develop a superior instrument to replace in-situ instruments, read on.


REGIONS


For swash-zone imaging, there are essentially two regions; sand and water.  Their different reflectivity creates a bi-modal intensity pdf.  (It's called a histogram, but I prefer probability density function).  The bi-modality also shows up in hue (color), but I found hue fails under very strong reflection.  A simple algorithm can delineate the two modes from the pdf.

Note that the pdf is limited to only the interesting part of the image.  This is essential.  Often called the Region Of Interest (ROI).



Repetitive images yield three dimensions of useful information; two in space and one in time.  The time dimension is extremely useful in algorithms; objects can be classified by their time-variance.

The problem with this approach is that variance implies a measure of amplitude, i.e. pixel intensity, and pixel intensity is not proportionally or simply related to the water's free surface.




Depending on the sunlight incidence angle, certain regions of the sea surface will be brighter, as shown in this variance image.










This is the core difficulty in using a camera to measure the ocean.  Physical oceanographers are interested in physical measurements; velocity, amplitude, pressure, position, etc.  Cameras measure light intensity, which is dependent on the object's reflective index and the light incidence geometry between the sun, object, and camera.

Below is another example using spatial and temporal gradients.  It emphasizes the swash edge (red=more probable), and unfortunately also people on the beach.  This is the easy part.  The difficult step is "choosing" which of pixels is the swash edge.  Using a simple maximum is not sufficiently accurate (see movie).


















Every time I look at these images I come up with a new approach to the problem.  My current mentality is to eschew algorithms entirely and use purely statistical results in the swash region.  In open water with non-breaking waves (no whitewater), I think a sunlight reflection model using the free surface could work; using the entire image.  (note such methods have already been studied).  This last suggestion is appealing because it could provide a full wave directional spectrum.

I see two options here. 1) reduce the intensity information to binary (logical on/off, i.e. events) in which case we would be interested in the switching between states.  Then time-variance, energy, and frequency would all be in units of said events.
Or, 2) employ a light reflective model using the free surface. 

I doubt method 2 would work at all; once the waves break the whitewater is random white pixels.  I believe method 1 could work, provided proof that a pixel has a distinct and time-coherent bi-modality.1  Then the pixels could be classified as sand or water, and a meaningful position of the water surface with time. 

As a side note, I ended up choosing black and white cameras for the third iteration of our imaging system for two reasons: 1) None of the algorithms which incorporated hue performed better than black-and-white (both canned and custom) , and 2) the Bayer filter creates an undesirable checkerboard effect on intensity, e.g. zoom in on this image.  Most people never see a camera's raw image prior to Bayer filter color interpolation.  The interpolation averages-out the checkerboard effect at the cost of spatial resolution and artifacts.   Intensity is the primary measurement in my algorithms.  

1 Or three modes, to handle the case of whitewater