# Calculate quality of a transformaion

Hi,

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 close merge delete

Sort by ยป oldest newest most voted

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.

more

1

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')

( 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 ?

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

You compare the (Euclidean) distance in the image.

( 2014-06-20 04:51:57 -0600 )edit

Official site

GitHub

Wiki

Documentation