Step 1: Create the initial search pattern, which consists of the centre
coordinate, the eight blocks surrounding it at a distance of one pixel and at a
distance of four pixels. Search the minimum BDM of this pattern. If the centre
coordinate is the minimum BDM, the search is finished (first-step stop).
Otherwise: Go to step 2.
Step 2: f the minimum BDM is one of the eight direct neighbours of the centre
coordinate, add the eight direct neighbours of this block to the search pattern and
search it again for the minimum BDM. After that, the search is done.
Otherwise: Continue like TSS: add the four coordinates surrounding the minimum
BDM like an "X" at a distance of 2 pixels and search for the new minimum BDM.
Step 3: Search the four coordinates surrounding the current minimum BDM like an "X"
at a distance of 1 pixel for the final minimum BDM.
> |
performs the next comparison |
>> |
performs the next 10 comparisons |
>| |
performs all comparisons |
The grid:
In the lower left you will see a grid. It presents a schematic view of the search area.
Each coordinate represents a block within the area.
A red circle marks position
that are going to be searched.
A yellow dot marks the current optimal position
A green dot marks the current search position
A black cross marks positions that have been searched
How the comparisons of two blocks is done:
In this applet only grey scale-images are used - this means the images have only one color
value per pixel (color images e.g. in RGB format have three).
The algorithm runs through every pixel of the source block and subtracts it from the pixel at
the same position in the block compared to. results are squared and summed up. In the end,
they are normalized,
dist = distance in color space
c(x) = color value of pixel x