What is an affine transform?

"Sprinceana " <mihaispr@yahoo.com> wrote in message <h0q8gq$b2e$1@fred.mathworks.com>...
> For the mathematical point of view.
I cannot understand the document here:
http://en.wikipedia.org/wiki/Affine_transformation
I understand that is a linear transformation follower by a translation.

"Darren Rowland" <darrenjremovethisrowland@hotmail.com> wrote in message <h0qb8t$6bj$1@fred.mathworks.com>...
> Michael,
> Can you PLEASE post Matlab related questions only to CSSM. There are other forums for general mathematics questions.
> Darren.
Sry for that!
Can you give me an example pls? (a link)
I didn't knew that!
Sry again!
Waiting for your response!

transforming vector by affine transformationLet A be an affine transformation and v a vector. The book "Geometric
Tools for Computer Graphics" says:
T(v) = T(Q - P) = T(Q) - T(P)
But 1 + (-1) = 0. Don't the weights of the points need to sum to
one? Q - P isn't even an affine combination...
A vector being the difference of two points is not translated over
affine transformation. So, vectors are transformed linearly, not
affinely. For an affine transformation T(x) = Bx + c, where B is a
square matrix whose columns are the target coordinates of the local unit
axes and c the target position of the local origin, ...

Affine transformationHello!
I've got an image and I've tried to use the cp2tform function to map
an image in a grid. I've defined these grids:
>> grid_X=[0.0:1/(nx-1):1.0];
>> grid_Y=[0.0:1/(ny-1):1.0];
I've defined this matrix:
> A=[0 0; 1 0; 1 1; 0 1];
I've selected 4 vertex from the image in this way:
imshow(im);
angoli=ginput(4);
angoli =
173 108
468 133
510 391
138 379
At this point I've used the function cp2tform:
>> tform=cp2tform(A, angoli, 'projective');
>> H=(tform.tdata.Tinv)';
Now I would get the coordinates of the image ...

Affine transformHello, All!
Where I may get the affine transform algorhitm with a simple example in any
language (Delphi/C/C++)?
Vladimir.
On Mon, 12 Jan 2004 12:16:35 +0300, "Getalo Vladimir"
<korben@mariupol.net> wrote:
> Hello, All!
>
> Where I may get the affine transform algorhitm with a simple example in any
> language (Delphi/C/C++)?
I'm not sure what you mean by "the affine transform algorithm".
For instance any pair of "formulas"
x' = a1*x + b1*y + c1
y' = a2*x + b2*y + c2
where a*,b*,c* are real numbers defines an affine mappin...

Affine transformationHi everyone,
I need to create an affine transformation matrix with the following
order:
- translation in the x direction
- uniform scaling in x and y
- and a rotation about the image center.
Can someone tell me what the affine matrix would look like? Ia m
having some confusion with the homogeneous coordinates...
Cheers,
Anja
"Anja" <anja.ende@googlemail.com> wrote in message
news:5316ad5f-98de-4b8c-a8bc-da2af936147e@e6g2000prf.googlegroups.com...
> I need to create an affine transformation matrix with the following
> order:
>
> - translation in the x direction...

affine transform,In books like "Geometric Tools for Computer Graphics" it seems that they
assume a transformation is affine to construct the matrix representation
without proving it is affine first. In particular, they often use the step:
T(P) = T(Q + v) = T(Q) + T(v) = Q + T(v), where T(Q) = Q because Q is
invariant under the transform.
But how is T(Q + v) = T(Q) + T(v) legal until they have proved it is an
affine transform?
"vsgdp" <hello@null.com> wrote in message
news:TfZtg.6686$5K2.5606@fed1read03...
> In books like "Geometric Tools for Computer Graphics&quo...

affine transformationshi,
how would you use the built in java 'affine transformations' found
here :-
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/geom/AffineTransform.html#rotate(double)
for example, lets say i needed to shear the point (2,3), how would i
use
these commands to accomplish this?
thanks
jeremy watts
Jeremy Watts wrote, under subject 'affine transformations':
> hi,
>
> how would you use the built in java 'affine transformations' found
> here :-
> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/geom/AffineTransform.html#rotate(double)
>
> for examp...

Affine Transformation --map transformation to original image size after alignmentHello,
I am using the following code to align several frames: The original images are 4096*4096. Due to speed accuracy, I found it more suitable to re-size the images to 512*512 and executed the following code:
while ii < length(images)
% Read in new frame
imgA = imgB;
imgAp = imgBp;
imgB = imresize(imread(cs{ii}),[512,512]);
% Estimate transform from frame A to frame B, and fit as an s-R-t
H = cvexEstStabilizationTform(imgA,imgB);
HsRt = cvexTformToSRT(H);
...

Affine transformation?Hi,
I have an affine 2x2 matrix. How do I get the transformed ("global") scale
factors sx, sy?
I mean the scale factors which could be applied to the already transformed
(global) points. This need is a bit untypical. But I need this for drawing a
thick line. I already have the global line points, but I also need to draw
the thickness which depends on the matrix too. ( the typical way is to draw
a line as transformed
polygon, but not in my case).
I tried to get the scale factor by transforming a vector, but this is
obviously wrong. For example. I transformed (sx = 1,sy = 1), and thus...

affine transformation to rastersHi all,
I am working on fractals through IFS (Iterated Function Systems). An
IFS ca be defined as a set of affine transformations that are
iteratively applied to an initial image. All examples in the Wolfram
Demonstrations Project do IFSs with polygons. When you apply an
affine transformation to a raster image, you get the rotations,
reflections, and shearings right, but not the translations nor the
scalings.
I am reading a jpg file with import, extracting the raster from it,
and applying an affine transformation.
oce = Import["ExampleData/ocelot.jpg"];
oceras = o...

Fitting for an affine transformHi,
Does matlab have any facility for fitting an unknown affine transform?
I need to read more on the subject, but I have 3 pairs of points. I want to find an affine transform which satisfies all of them (or the best affine transform possible for all 3 I guess).
Thanks
...

Help on affine transformHi,
I have been trying to use maketform, tformarray and makeresampler to
perform a principal axes transform of a 3D dataset, without success:
The transformed datasets prin. axes are not aligned with coordinate
sys. axes, because the initial mapping to the origin cuts off the
data.
How can achieve mapping the mass centre to the origin without
"loosing" values with tformarray?
Best,
Felix.
% snip
% intertia matrix based on mass-centered moments
T=[M_200 M_110 M_101;
M_110 M_020 M_011;
M_101 M_011 M_002];
T=T./M_000;
[R,D]=eig(T);
R=[R(3,:);R(1,:);R(2,:)];
% mass center ...

Differentiation of the affine transformationHi there,
I am facing a problem of calculating the differentiation of the affine transformation w.r.t. the image intensity and the transfromation parameters. May I ask if anyone has an idea how to do it in Matlab please?
For example:
I have an image I and 6 input parameters:
affineKernelMatrix = [ 1 0 0; 0 1 0; 0 0 1];
affineKernelMatrix(1:3, 1:2) = reshape(inputsParameters(1:6), 3, 2);
affineTransform = maketform('affine', affineKernelMatrix);
affineTransformedImage = imtransform(I, affineTransform, ...
'UData', udata, 'VData', vdata, ...
'XData', ...

Affine transformation of a polytope.Hi,
I am trying to find affine transformation of a polytope(more
specifically a zonotope) given by Ax<=b.
Is there any package that I can use to do the same?
thanks,
--a.
"Amit Bhatia" <amit.bhatia@gmail.com> wrote in message
news:1131271203.365704.61370@o13g2000cwo.googlegroups.com...
> I am trying to find affine transformation of a polytope(more
> specifically a zonotope) given by Ax<=b.
For the polytope generated by A*x <= b. The vectors x and b
are 3-by-1. Let A be n-by-3. Let the affine transformation be
y = M*x+T, where M is 3-by-3 and T is 3-by-1....

Shear Affine TransformationHi Everyone,
This is a simple question but for some reason it's going over my head.
I want to do a shear transformation 20 degrees to the right (parallel
to x axis). Right now I'm applying the following affine transformation
matrix:
[1 tan(20)
0 1
0 0]
Though it seems that this is shearing slighting too much (the tops of
the characters are too far to the right). Am I missing something?
Thanks!
> This is a simple question but for some reason it's going over my head.
> I want to do a shear transformation 20 degrees to the right (parallel
&...

affine transformation interpolationhi,
I'm pretty new to matlab, it took me quite a while to
figure out how to do this...can only come to ask for help.
Now I've got an image I, an affine transformation matrix T
= [.9,.9,.001,.5,.5] which represents the scale,
orientation and displacement.
How can I apply this transformation T onto image I so that
I get a complete image? Should I use interp3 or things like
this to do the work? I've tried, but it's a bit
complicated :(
Thanks so much for any help!
...

computings for an affine transformationI want to map a scanned map of my town to lat/long coordinates.
The affine transformation seems to be the right way to do this:
x' = a*x + b*y + c
y' = d*x + e*y + f
The Problem is getting the right parameters for a, b, c, d, e and f.
When I have three controlpoints in both coordinate systems I get a
linear equitation system. But I'm unable to solve it.
Is there any source code available to get from controlpoints to the
parameters for the affine transformation? Any other hints for solving
this?
drt
D. R. Tzeck <drt-usenet-200310@un.bewaff.net> wrote:
> The affine tr...

java affine transformationshi,
how would you use the built in java 'affine transformations' found
here :-
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/geom/AffineTransform.html#rotate(double)
for example, lets say i needed to shear the point (2,3), how would i
use
these commands to accomplish this?
thanks
jeremy watts
On Sat, 10 May 2008 02:27:01 -0700 (PDT), Jeremy Watts
<jwatts1970@hotmail.com> wrote, quoted or indirectly quoted someone
who said :
>how would you use the built in java 'affine transformations' found
for background, see http://mindprod.com/jgloss/affinetransform.html
--...

3D Affine TransformI am trying to transform an image (2d or 3d) in 3 dimensions. I have
made my 3d transform matrix using 'maketform' function. Then, I use
'tformfwd' function to actually apply this transformation on the
image. This is where I am having problems. It gives me an error for
missmatch dimensions.
Are there any simpler functions to solve this problem??
Any Idea what am i doing wrong?
Any suggestion will be very helpful.
Thanks
AG
******************************************************
function T = afft3(alpha, beta, gamma, sx,sy,sz,tx,ty,tz)
R1 = [ sx*cos(gamma)*cos(beta), -sy*sin(ga...

Derivative of the affine transformationHello all,
I am trying to do a simple image registration algorithm where I am trying to find the optimal rigid transformation parameters and minimising the sum of square differences between the reference and transformed image. So, assume I have a reference image 'r' and I have another image 's' and I am trying to find the rigid transformation that finds the spatial correspondences between 'r' and 's'. So, my cost function is given by
f = 0.5 * \sum [r(p) - s (M(p))]^2
Here, M is the rigid transformation matrix which is given by the product of rotation a...

Affine Transformation MatrixHi everybody,
One aspect of the DICOM standard I am unclear on is the affine transformati=
on matrix. Suppose you have two images who are in different orientations an=
d with different image position elements. If a registration exists between =
the two images using the affine model then a simple rotation and translatio=
n should account for this. However, from what reference point is the transl=
ation starting from. i.e.
if Image B is deformed onto a static image A, then how are image B and imag=
e A aligned before starting the transformation. Are the top left corners al=
igned, o...

Ask about invert affine transformationHi all,
I am practicing with Geometric transformation by using Matlab tool. I
used the imtransform function to do affine transformation. But I do
knot which function can help me to do invert transformation??
Are there anyone having experience about this issue??
huylp <huy1208@gmail.com> wrote in message <4dbff880-9745-43a6-ad5f-f63a8524c5d5@l32g2000vba.googlegroups.com>...
> Hi all,
>
> I am practicing with Geometric transformation by using Matlab tool. I
> used the imtransform function to do affine transformation. But I do
> knot which function can help me to do...

affine transformation interpolation #2Lost my last post somehow
I have an image I, an affine transformation matrix T=
[1,.9,.01,02,-.3]. Now how can I apply the transformation
to image I so that I get a new complete image?
Should I use interp3 or something like this? I've tried but
it looks a bit complicated to use... any other way I can do
it?
thanks for any help!
Erica
Erica, try to use imtransform function. I think this is the
solution you want.
"Mehmet OZTURK" <mehmetozturk@mathworks.com> wrote in
message <fqmpr9$2ef$1@fred.mathworks.com>...
> Erica, try to use imtransform function. I th...

find affine transformation matrixHello. I am a newcomer to MATLAB and need some help. I
have two linear equations - y1=m1*x1+b1 and y2=m2*x2+b2 -
and I want to find the affine transformation matrix that
transforms y1 into y2. I also have two data points
(x11,y11) and (x12,y12) on the line y1 that map to the
points (x21,y21) and (x22,y22), respectively, on the line
y2. I know that the transformation matrix should consist
of only a rotation and translation. I have found functions
in the MATLAB functions list that create/define an affine
transformation matrix assuming you already know the amount
you want the matri...

Computational Complexity of Affine TransformationHi All,
Does anyone know to calculate the computational complexity of an
affine transformation operation?
Thanks!
Nathan
nathanwh71@gmail.com writes:
> Does anyone know to calculate the computational complexity of an
> affine transformation operation?
The "obvious" algorithm in n dimensions requires n^2 multiplies and
n^2 adds. To say more one would need to know what you consider to be
basic (O(1)) operations and what algorithm you are using (the numbers a
slightly different if you use homogeneous coordinates, for example).
I'd prefer, also, to know that this ...