Ask Your Question

Calculate quality of a transformaion

asked 2014-06-20 04:07:52 -0600

pkohout gravatar image


i am using OpenCV to calculate a transformation (Rotation + Translation) between two 2D greyscale (pgm) pictures. Now we are looking for a way to calculate how good the transformation we got is. Is there something available in OpenCV to rate the resulting transformation matrix ? Or does somebody know some algorithm to achive this ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-20 04:40:08 -0600

I guess you are using feature points to get the transformation? So, you could inverse your transformation, and re-project features from the second image into the first one. Compute the distance, therefore, you get an error of reporjection (ie a kind of evaluation for the transformation you've made.) You could look at the calibration samples which provide such reprojection for calibration evaluation.

edit flag offensive delete link more



let me just append, that for an orthogonal transformation matrix (no shearing,projection) the inverse is equal to the transpose, so x*A=y, y*A.t() = x' err=norm(x-x')

berak gravatar imageberak ( 2014-06-20 04:44:10 -0600 )edit

thanks for the answers. Yes we are using Keypoints to get the transformation. So you mean i have the transformation from Image A to B, then I take the Keypoint from image B, transform it with the Inverse Matrix and then compare it to the Keypoints i got in Image A ?

pkohout gravatar imagepkohout ( 2014-06-20 04:47:14 -0600 )edit

You compare the (Euclidean) distance in the image.

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2014-06-20 04:51:57 -0600 )edit

Question Tools


Asked: 2014-06-20 04:07:52 -0600

Seen: 173 times

Last updated: Jun 20 '14