Ask Your Question
0

get transformation from points

asked 2012-08-24 03:59:09 -0500

mrgloom gravatar image

updated 2012-08-24 04:01:49 -0500

I'm reading this article about shape context algorithm so for example we have pairs of points http://dl.dropbox.com/u/8841028/shape%20context/point_corespondence.png http://dl.dropbox.com/u/8841028/shape%20context/transform_estimation.png what is mean by matrix of homogeneous coordinates?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2012-08-26 05:13:03 -0500

Michael Burdinov gravatar image

updated 2012-08-26 05:17:21 -0500

Linear transformation can be represented as matrix. Assume that you have an object that is set of points, each in the form of p=(x,y). If you want to apply rotation, scaling or shear to it, you just need to find 2x2 matrix A, and for each point p calculate A*p. As a result objected is rotated, scaled and sheared. But some of extreamely frequent transformations are not linear. Shift for example. Or projective transformation. As a result you can't describe them as matrix operation. Homogeneous coordinates is a workaround for this problem. Instead of represnting point as (x,y) you represent it as (x,y,1). Now you can store those transformations as 3x3 matrix B (that part of it is 1 and 0).

edit flag offensive delete link more

Comments

Nice explanation but do you know how to explain in a bit more detail why isn't it possible to describe non-linear transformations as a matrix and how does adding an extra coordinate with homogeneous coordinates helps solving that problem?

Rui Marques gravatar imageRui Marques ( 2012-08-26 16:27:52 -0500 )edit
Michael Burdinov gravatar imageMichael Burdinov ( 2012-08-27 01:41:45 -0500 )edit

What methods applied to solve such system of equation? for example affine transformation can be solved with LeastSquares but how about perspective transform?

mrgloom gravatar imagemrgloom ( 2012-08-27 04:44:51 -0500 )edit

Opencv has affineTransform and perspectiveTransform functions that can be applied to sets of points, buddy :)

Rui Marques gravatar imageRui Marques ( 2012-08-27 05:25:08 -0500 )edit

I never tried to solve least square equations for perspective transformation, so I don't know. Sorry.

Michael Burdinov gravatar imageMichael Burdinov ( 2012-08-27 05:28:10 -0500 )edit

@Rui Marques the problem is that perspectiveTransform can't handle with small errors in coordinates,with outliners when we use overdetermined system of linear equations. I tried to solve it with pseudoinverse matrix http://opencv.willowgarage.com/documentation/cpp/algebraic_operations.html but it give me all 0.

mrgloom gravatar imagemrgloom ( 2012-08-30 01:29:13 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-08-24 03:59:09 -0500

Seen: 898 times

Last updated: Aug 26 '12