1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Modify findTransformECC to support a mask of pixels to consider

Tests of the mask are also included.

This is useful for registering a non-square image against a non-square
template.

This also needs to relax a sanity check as per
https://github.com/Itseez/opencv/pull/3851
This commit is contained in:
Owen Healy
2015-03-18 21:11:33 -04:00
parent e12a04ac7e
commit 86fb9f8409
4 changed files with 111 additions and 7 deletions
@@ -278,6 +278,7 @@ order to provide an image similar to templateImage, same type as temlateImage.
criteria.epsilon defines the threshold of the increment in the correlation coefficient between two
iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).
Default values are shown in the declaration above.
@param inputMask An optional mask to indicate valid values of inputImage.
The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion
(@cite EP08), that is
@@ -309,7 +310,8 @@ estimateRigidTransform, findHomography
*/
CV_EXPORTS_W double findTransformECC( InputArray templateImage, InputArray inputImage,
InputOutputArray warpMatrix, int motionType = MOTION_AFFINE,
TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001));
TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001),
InputArray inputMask = noArray());
/** @brief Kalman filter class.