13
b2 b1 a2 c1 c2 a1 MXY2 MX3 MY3 MX2Y MXY MX2 MY2 

a1^2 MX2 + c1^2 MX2 + a2^2 MY2 + c2^2 MY2
	+ 2 a1 a2 MXY + 2 c1 c2 MXY + 2 b1^2 
	- 2 MX2;

a2^2 MX2 + c2^2 MX2 + a1^2 MY2 + c1^2 MY2 
	- 2 a2 a1 MXY - 2 c2 c1 MXY + 2 b2^2 
	- 2 MY2;

- a1 a2 MX2 - c1 c2 MX2 + 
       a2 a1 MY2 + c2 c1 MY2 +
       a1^2 MXY - a2^2 MXY + c1^2 MXY - c2^2 MXY +
       2 b1 b2 
	- 2 MXY;

a1^3 MX3 + c1^3 MX3 + a2^3 MY3 + c2^3  MY3 +
      3 a1^2 a2 MX2Y + 3 c1^2 c2 MX2Y +
      3 a1 a2^2 MXY2 + 3 c1 c2^2 MXY2 +
      3 a1^2 b1 MX2 - 3 c1^2 b1 MX2 +
      3 a2^2 b1 MY2 - 3 c2^2 b1 MY2 +
      3 a1 a2 b1 MXY - 3 c1 c2 b1 MXY 
	- 2 MX3;

- a2^3 MX3 - 1 c2^3 MX3 + a1^3 MY3 + c1^3 MY3 +
      3 a2^2 a1 MX2Y + 3 c2^2 c1 MX2Y -
      3 a2 a1^2 MXY2 - 3 c2 c1^2 MXY2 +
      3 a2^2 b2 MX2 - 3 c2^2 b2 MX2 +
      3 a1^2 b2 MY2 - 3 c1^2 b2 MY2 -
      6 a2 a1 b2 MXY + 6 c2 c1 b2 MXY 
      - 2 MY3;

-a1^2 a2 MX3  - c1^2 c2 MX3 +
       a2^2 a1 MY3 + c2^2 c1 MY3 -
       2 a1 a2^2 MX2Y + a1^3 MX2Y + c1^3 MX2Y - 2 c1 c2^2 MX2Y+
       2 a1^2 a2 MXY2 - a2^3 MXY2 + 2 c1^2 c2 MXY2 - c2^3 MXY2+
       a1^2 b2 MX2 - c1^2 b2 MX2 - 2 a1 b1 a2 MX2 + 2 c1 b1 c2 MX2 +
       a2^2 b2 MY2 - c2^2 b2 MY2 + 2 a2 b1 a1 MY2 - 2 c2 b1 c1 MY2 -
       2 a2^2 b1 MXY + 2 a1^2 b1 MXY  + 2 a1 a2 b2 MXY - 2 c1^2 b1 MXY +
	      2 c2^2 b1 MXY - 2 c1 c2 b2 MXY 
	- 2 MX2Y;


/* in IFS theory, one can try to solve the inverse problem by using moments.
** if mu






# This file contains a program used in maple to find the parameters of the 
# affine maps given the different moments of the image.
# The assumption is that there are only two affine maps and that they
# have same probability. Their two eigen values are identical.
# MX,...., MY3 are the moments. They can be produced from an image
# by calling the program moment. We choose the origin such that MX = MY = 0.
# a1, a2, -a2, a1 are the members of the matrix of the first map.
# c1, c2, - c2, c1 are the members of the matrix of the second map.
# b1, b2 are the coordinates of the vector of the first map.
# -b1, -b2 are the coordinates of the vector of the second map.


