Definition at line 158 of file DoG.h. References max, Impala::Core::Array::Set(), and Impala::Core::Array::SetVal(). Referenced by CalculateOctaveExtrema(). 00161 { 00162 Array2dScalarReal64* res = 0 ; 00163 Array2dScalarReal64* arrays[3]; 00164 00165 arrays[0]=u; 00166 arrays[1]=c; 00167 arrays[2]=l; 00168 00169 Set(res,c); 00170 SetVal(res,0); 00171 /* 00172 ILOG_DEBUG("LSSE sizes: "<<l->CH()<<"x"<<l->CW() 00173 <<" | "<<c->CH()<<"x"<<c->CW() 00174 <<" | "<<u->CH()<<"x"<<u->CW()); 00175 */ 00176 Real64 max; 00177 int i,j,m,n,a; 00178 bool is_max; 00179 for(i=1;i<c->CW()-1;i++){ 00180 for(j=1;j<c->CH()-1;j++) 00181 { 00182 max = arrays[1]->Value(i,j); 00183 is_max = true; 00184 for(a=0;a<3;a++) 00185 { 00186 for(m=-1;m<2;m++) 00187 { 00188 for(n=-1;n<2;n++) 00189 { 00190 if(max <= arrays[a]->Value(i+m,j+n)) 00191 { 00192 if((a==1)&&(m==0)&&(n==0)) 00193 continue; 00194 //ILOG_DEBUG(a<<"\t"<<m<<"\t"<<n); 00195 is_max=false; 00196 break; 00197 } 00198 } 00199 if(!is_max) 00200 break; 00201 } 00202 if(!is_max) 00203 break; 00204 } 00205 if(is_max) 00206 res->SetValue(1,i,j); 00207 } 00208 } 00209 return res; 00210 00211 }
Here is the call graph for this function:
|