Forums - Transformation matrix in fcvTransformAffineClippedu8

5 posts / 0 new
Last post
Transformation matrix in fcvTransformAffineClippedu8
DaniilPattersson
Join Date: 17 Jul 12
Location: Russia
Posts: 23
Posted: Wed, 2013-03-13 07:31

Hi, guys!

I'm want to use fcvTransformAffineClippedu8, but have unexpected results. Which transformation formula does it used? I'm think, if rotate image on angle psi (clockwise order) and shift on (100 - right, 100 - down), the formula should be: a11*x+a12*y+a13 = xNew, correspondingly for y (where a11 = cos(psi) and a12 = -sin(psi), a13 = 100).

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Thu, 2013-03-14 00:01

It should be calculated like this: xNew=a11*x+a21*y+a13.

Sorry for confusion.

  • Up0
  • Down0
DaniilPattersson
Join Date: 17 Jul 12
Location: Russia
Posts: 23
Posted: Thu, 2013-03-14 01:23

Thanks!

 

  • Up0
  • Down0
DaniilPattersson
Join Date: 17 Jul 12
Location: Russia
Posts: 23
Posted: Mon, 2013-03-25 02:44

It seems, that formila is a11*x+a12*y-a13 = xNew. Please, post the whole calculationg formula for this affine transformation.

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Tue, 2013-03-26 17:26

Hi,

My earlier comment on the formula was incorrect. The real issue here is that the rotation convention assumes positive angle for clockwise rotation, and negative angle for counter-clockwise rotation.

If you negate the angle before calculating the transform matrix, you should get correct result.

Cheers,

-Jeff

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.