Image stabilization
===================

This folder contains source codes, concerned with Omni-View image stabilization.
The OmniView system is made up of a camera, and a mirror on a holder. This system,
depending on the construction may be prone to table vibrations. Because it is
part of AMI Meeting Room, and people are usually typing to computers, or writing
notes on paper, vibrations can be expected.

Because image unwrapping is nonlinear transformation, even small changes in system
parameters lead to significant / noticeable deformations, which are disturbing for
human viewer, and may make image recognition harder or even impossible for a computer.

It would be costy to build system firm enough to withstand vibrations without
noticeable image deformation, and it would be impractical to have system attached
to other surface than the table, where the vibrations wouldn't reach it (for
example - hanging down from the ceiling). Such setup would sure limit device
portability.

Therefore, image stabilization system was devised. It works in two stages, the first
stage is executed on GPU, and it's result is set of points, detected on edge of the
mirror. These points are passed to circle fitting algorithm (using the least squares
method). This is not very precise, as these detections tend to contain some outliers,
and circle doesn't fit too well. But it gives the initial approximation, and it's
quite fast.

The other step is performed after unwrapping the image. The mirror border is found
as a horizontal curve on the top part of the unrolled image. The goal is to change
system parameters to make this curve as flat as possible. This process is closely
described in attached publication.


Source files
============

Source files in this folder were taken from ..\AMI_Demo\Transformation. They concern
the following problems:

Circle fitting algorithms:

	StFastCircleFitter.h, StFastCircleFitter.cpp	(using least squares)


Circle detection on top of circle fitting algorithms:

	cubiccircle.h, cubiccircle.cpp, cubicedge.h, cubicedge.cpp	(using cubic edge
									 finder to feed circle
									 fitting algorithm)


Precise circle detection using unrolled image:

	circledetect.h, circledetect.cpp		(using iterative approximation from horizontal edge)


Image unwrap transformation implemented in software:

	FastTransform.h, Fasttransform.cpp		(transformation for uniform resolution mirrors)
	Hyper.h, Hyper.cpp				(transformation for hyperbolic mirrors)


Image processing helper functions:

	MyImageFun.h, MyImageFun.cpp			(basic image processing)


Building
========

These files were written for Borland C Builder, but it shouldn't be very hard to
compile them using any ANSI c++ compier, as these do not reference os-specific
functionality.
