20 #include <sys/types.h>
29 #define kUseContrast 1
33 float*
ProcessChannel(
float** image,
int w,
int h,
int gNumLocs,
int**& gLocations,
int gRadius,
float*
response,
int* len){
50 char file[] =
"gabor_filters/celeste";
53 contrastFilter->
Save( file );
64 char filename[256], suffix[5];
65 strcpy(filename, file);
66 sprintf( suffix,
"%d-", 0 );
67 strcat( filename, suffix );
68 gaborJet->
Initialize(height, width, gLocations[0][0], gLocations[0][1],
73 gaborJet->
Initialize(height, width, gLocations[0][0], gLocations[0][1],
80 gaborJet->
Filter( pixels, &gflen );
84 *len = gflen * gNumLocs;
85 response =
new float[(*len)];
91 for ( i = 0; i < gflen; i++ ){
105 for ( i = 1; i < gNumLocs; i++ )
107 offset = offset + gflen;
110 gaborJet->
Initialize( height, width, gLocations[i][0], gLocations[i][1],
115 gaborJet->
Filter( pixels, &dummy );
116 for ( j = 0; j < gflen; j++ ) response[j+offset] = gaborJet->
GetResponse(j);
121 delete contrastFilter;
void Filter(float **image, int *len)
float * ProcessChannel(float **image, int w, int h, int gNumLocs, int **&gLocations, int gRadius, float *response, int *len)
static deghosting::EMoR response(0.0f)
float ** GetContrast(void)
float GetResponse(int idx)
void Initialize(int y, int x, int x0, int y0, int r, float s=2.0, int f=2, float maxF=2, float minF=1, int a=8, char *file=NULL)