Module imagingbook.common
Class LucasKanadeForwardMatcher
java.lang.Object
imagingbook.common.image.matching.lucaskanade.LucasKanadeMatcher
imagingbook.common.image.matching.lucaskanade.LucasKanadeForwardMatcher
Lucas-Kanade (forward-additive) matcher [1], as described in [2]. Also called the "forward-additive" algorithm. See
Sec. 24.2 (Alg. 24.1) of [2] for additional details. This version assumes that the origin of R is at its center!
[1] B. D. Lucas and T. Kanade. "An iterative image registration technique with an application to stereo vision". In
Proceedings of the 7th International Joint Conference on Artificial Intelligence IJCAI’81, pp. 674–679, Vancouver, BC
(1981).
[2] Simon Baker and Iain Matthews, "Lucas-Kanade 20 Years On: A Unifying Framework: Part 1", CMU-RI-TR-02-16 (2002)
[3] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer
(2022).
- Version:
- 2014/02/08
-
Nested Class Summary
Nested classes/interfaces inherited from class imagingbook.common.image.matching.lucaskanade.LucasKanadeMatcher
LucasKanadeMatcher.Parameters
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor using default parameters.Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Measures the RMS intensity difference between the reference image R and the patch in the search image I defined by the current warp Tp.boolean
Checks if the matcher has converged.Performs a single matching iteration on the given image pair (I, R).Methods inherited from class imagingbook.common.image.matching.lucaskanade.LucasKanadeMatcher
getIteration, getMatch, getReferenceMappingTo, getReferencePoints
-
Constructor Details
-
LucasKanadeForwardMatcher
public LucasKanadeForwardMatcher(FloatProcessor I, FloatProcessor R, LucasKanadeMatcher.Parameters params) Constructor.- Parameters:
I
- the search image (of typeFloatProcessor
).R
- the reference image (of typeFloatProcessor
)params
- a parameter object of typeLucasKanadeMatcher.Parameters
.
-
LucasKanadeForwardMatcher
Constructor using default parameters.- Parameters:
I
- the search image (of typeFloatProcessor
).R
- the reference image (of typeFloatProcessor
)
-
-
Method Details
-
hasConverged
Description copied from class:LucasKanadeMatcher
Checks if the matcher has converged.- Specified by:
hasConverged
in classLucasKanadeMatcher
- Returns:
- true if minimization criteria have been reached.
-
getRmsError
Description copied from class:LucasKanadeMatcher
Measures the RMS intensity difference between the reference image R and the patch in the search image I defined by the current warp Tp.- Specified by:
getRmsError
in classLucasKanadeMatcher
- Returns:
- the RMS error under the current warp
-
iterateOnce
Description copied from class:LucasKanadeMatcher
Performs a single matching iteration on the given image pair (I, R).- Specified by:
iterateOnce
in classLucasKanadeMatcher
- Parameters:
Tp
- the warp transformation from the reference image R to the initial search patch, assuming that R is centered at the coordinate origin!- Returns:
- a new warp transformation (again assuming that R is centered at the coordinate origin) or null if the iteration was unsuccessful.
-