Step 1: Match the search block to the centre block (0,0). If the
BDM is lower than the predefined threshold, stop the search.
Otherwise: proceed with step 2.
Step 2: Set search range r = 4
Step 3: Add the coordinates surrounding the centre at the edges of an "X"
at a distance of r to the search pattern. Find the minimum BDM.
Step 4: Halve the search range.
Step 5: If the search range is greater than one, go back to step 3.
Otherwise: If the actual minimum BDM position is equal to the previous one or
located top-right or low-left to it, add the four coordinates surrounding it like a
Greek cross ("+") to the pattern. If it is located top-left or low-right to the previous,
add the four coordinates, surrounding it like a St. Andrew's cross ("X") to the pattern.
Search this pattern for the location of 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