src/search_engine/relja_retrival/external/KMCode_relja/descriptor/FastDetector.cpp
/****** HESSIAN DETECTOR derivation sigma = 1***********/
HESSIAN DETECTOR derivation sigma = 1
HESSIAN DETECTOR derivation sigma = 1
void hessian_fast(DARY *image_in, DARY *corner_image){
   int col_nb, row_nb;
   float A, B, C;
   row_nb = image_in->y();
   col_nb = image_in->x();
   DARY  *fxx= new DARY(row_nb,col_nb);	
   DARY  *fyy= new DARY(row_nb,col_nb);	
   DARY  *fxy= new DARY(row_nb,col_nb);	
   dXX7(image_in, fxx);
   dYY7(image_in, fyy);
   dXY7(image_in, fxy); 
   for (int row = 0; row < row_nb; row++)
     for (int col = 0; col < col_nb; col++)
       {
        A = fxx->fel[row][col];
        B = fyy->fel[row][col];
        C = fxy->fel[row][col];
        corner_image->fel[row][col] =fabs((A*B) - (C*C));	
       }
   delete fxx; delete fyy; delete fxy; 
}
void hessian_fast ( DARY * image_in , DARY * corner_image ) { int col_nb , row_nb ; float A , B , C ; row_nb = image_in -> y ( ) ; col_nb = image_in -> x ( ) ; DARY * fxx = new DARY ( row_nb , col_nb ) ; DARY * fyy = new DARY ( row_nb , col_nb ) ; DARY * fxy = new DARY ( row_nb , col_nb ) ; dXX7 ( image_in , fxx ) ; dYY7 ( image_in , fyy ) ; dXY7 ( image_in , fxy ) ; for ( int row = 0 ; row < row_nb ; row ++ ) for ( int col = 0 ; col < col_nb ; col ++ ) { A = fxx -> fel [ row ] [ col ] ; B = fyy -> fel [ row ] [ col ] ; C = fxy -> fel [ row ] [ col ] ; corner_image -> fel [ row ] [ col ] = fabs ( ( A * B ) - ( C * C ) ) ; } delete fxx ; delete fyy ; delete fxy ; }
HESSIAN DETECTOR derivation sigma = 1
HESSIAN DETECTOR derivation sigma = 1
//printf("- Starting to calculate hessian \n"); /*        A = B = C = determinant = trace = 0.0;*/