As
photography evolves, camera operations and its components are getting more
and more automated: the aperture and shutter speed are determined by the
camera's software, the focus by the digital lens and even the flash bulb knows
what to do all by itself. It is our goal to provide the amateur photographer
another tool: automatic polarizing filter.
What is a polarizing filter?
Light can be described as a wave consisting of two perpendicular components.
A polarizing filter only transfers light in a specific plane (it has an
adjustable
inner ring to allow choice of said plane) thus reducing or eliminating glare
and reflections.
Reflected light in a scene often has the effect of washing out the colors in an
photo,
resulting in low-contrast, grayish colors. A polarizing filter improves
both contrast and
color saturation by filtering reflected light; at the same time, such a filter
reduces the
effect of glare from shiny surfaces such as water. While image editing software
can correct
contrast and color saturation within an image, nothing can be done after the
fact about glare
the only answer to this problem is a filter to eliminate the excess light at
the time the photo is taken.
We have tried to contrive an algorithm that will choose from an array of pictures of the same object, taken with different angles of rotation for the polarizing filter the one that the human photographer would have chosen, i.e. saving the effort of deciding and the time taken for that purpose.
In addition, in order for the solution to practical for low cost devices, we require the run time of the algorithm be minimal.
Given: a set of B&W digital pictures of a particular object taken with single difference of the polarizing filter rotation (the rest of the parameters, in particular the exposure, are maintained).
Output: there are several output channels for the algorithm:
Example images:
Maximum Glare
Medium Glare
Minimum Glare
Results
3. Gaussian smoothing
4. Differentiation
5. Hysteresis
Using 4.tif as MAX entropy, 6.tif as MIN entropy
Analyzing picture (1) 4.tif:
Label 1 intensity is: 96.140
Analyzing picture (2) 5.tif:
Label 1 intensity is: 72.045
Analyzing picture (3) 6.tif:
Label 1 intensity is: 61.293
Conclusions
Our solution still requires two parameters to be set. These are the lower and upper threshold for the hysteresis. Albeit that these parameters need only be chosen from a relatively small domain, (for the upper bound; values between 110-170 and 30-50 for the lower bound, all from the range of 0-255) still these parameters have to be correctly chosen for meaningful results.
We think that through further research this process could be made automatic. Since the domain is relatively small, and changes in each parameter are linear in the sense that increasing one always reduces the marked output, a trial and error algorithm can quickly converge to a predefined marked percentage.
Moreover for practical use a choice of selection criteria should be formulated. That is if this algorithm is ever implemented in a camera for instance, the interface will probably contain more general desired characteristics, like "Maximum glare", "Minimum glare" etc…