double h2[3][3];


  
  // WE DEFINE THE HOMOGRAPHY
  h2[0][0]=cos(0.1); h2[0][1]=sin(0.1); h2[0][2]=0;
  h2[1][0]=-sin(0.1); h2[1][1]=cos(0.1); h2[1][2]=0;
  h2[2][0]=0.001; h2[2][1]=0; h2[2][2]=1;
//   ami_printf2d("H",H.H,3,3);

  // WE DEFINE THE IMAGE 
  CImg<double> image(640,480,1,3); 
  int width=image.width;
  int height=image.height;
  for(int i=0;i<height;i++){
     for(int j=0;j<width;j++){
//        long m=i*width+j;
       if(j>width/4 && j<3*width/4 && i>height/4 && i<3*height/4){
         image(j,i,0,0)=255;
         image(j,i,0,1)=128;
         image(j,i,0,2)=0;
       }
       else
for (int k=0;k<3;k++)
         image(j,i,0,k)=0;

       
     }
  }
  image.save_bmp("original_image.bmp");    
  CImg<double> image_out(640,480,1,3);  
  //WE PERFORM THE WARPING 
   warping(image,image_out,h2);      
  image_out.save_bmp("output_image.bmp");   