algorithm

Class GradientDescentSearch1DAlgorithm


public class GradientDescentSearch1DAlgorithm
extends MotionEstimationAlgorithm

Überschrift:

Beschreibung:

Copyright: Copyright (c) 2002

Organisation:

Field Summary

private static int
DIRECTION_1
private static int
DIRECTION_2
private static int
DIRECTION_3
private static int
DIRECTION_4
private int
currentDirection
private int
docCounter
private int
jumpDistance
private Point
lastOptPos
private boolean[][]
searchArea
private LinkedList
searchQueue

Fields inherited from class algorithm.MotionEstimationAlgorithm

NUM_STEPS, counter, docCounter, grid, gui, imageViewer, images, listenerList, maxError, minError, optPos, quietMode, searchRange, stepCounter, threshold

Constructor Summary

GradientDescentSearch1DAlgorithm(ImageHolder ih)

Method Summary

void
fillSearchCoordinatesQueue()
int
getDocCounter()
URL
getNextExplenationURL()
private LinkedList
getNextSearchCandidates(Point initialPoint, int direction, int distance)
private boolean
hasBeenSearched(Point p)
Checks wether a certain coordiante has already been searched
boolean
hasUserDefinedSearchRange()
boolean
hasUserDefinedThreshold()
boolean
performNextComparison()
void
reset()
String
toString()

Methods inherited from class algorithm.MotionEstimationAlgorithm

addAlgorithmListener, fillSearchCoordinatesQueue, fireAlgorithmEvent, getDocCounter, getMaxError, getMinError, getNextExplenationURL, getNumComparisons, getOptimalPostion, getSearchRange, hasUserDefinedSearchRange, hasUserDefinedThreshold, incrementCounter, init, performNextComparison, removeAlgorithmListener, reset, setQuietMode, setSearchRange, setThreshold

Field Details

DIRECTION_1

private static final int DIRECTION_1
Field Value:
1

DIRECTION_2

private static final int DIRECTION_2
Field Value:
2

DIRECTION_3

private static final int DIRECTION_3
Field Value:
3

DIRECTION_4

private static final int DIRECTION_4
Field Value:
4

currentDirection

private int currentDirection

docCounter

private int docCounter

jumpDistance

private int jumpDistance

lastOptPos

private Point lastOptPos

searchArea

private boolean[][] searchArea

searchQueue

private LinkedList searchQueue

Constructor Details

GradientDescentSearch1DAlgorithm

public GradientDescentSearch1DAlgorithm(ImageHolder ih)

Method Details

fillSearchCoordinatesQueue

public void fillSearchCoordinatesQueue()
Overrides:
fillSearchCoordinatesQueue in interface MotionEstimationAlgorithm

getDocCounter

public int getDocCounter()
Overrides:
getDocCounter in interface MotionEstimationAlgorithm

getNextExplenationURL

public URL getNextExplenationURL()
Overrides:
getNextExplenationURL in interface MotionEstimationAlgorithm

getNextSearchCandidates

private LinkedList getNextSearchCandidates(Point initialPoint,
                                           int direction,
                                           int distance)
Parameters:
initialPoint - This is the coordinate to search around
direction - The current direction to search in
distance - The current search distance
Returns:
A LinkedList including all legal further search coordinates in the current direction at the current distance

hasBeenSearched

private boolean hasBeenSearched(Point p)
Checks wether a certain coordiante has already been searched
Parameters:
p - The coordinate to be checked
Returns:
true if coordinate has already been searched

hasUserDefinedSearchRange

public boolean hasUserDefinedSearchRange()
Overrides:
hasUserDefinedSearchRange in interface MotionEstimationAlgorithm

hasUserDefinedThreshold

public boolean hasUserDefinedThreshold()
Overrides:
hasUserDefinedThreshold in interface MotionEstimationAlgorithm

performNextComparison

public boolean performNextComparison()
Overrides:
performNextComparison in interface MotionEstimationAlgorithm

reset

public void reset()
Overrides:
reset in interface MotionEstimationAlgorithm

toString

public String toString()