116a117 > params.upright = 0; 578d578 < 632a633,636 > > float descriptor_dir; > if (params->upright == 0) { > 683c687,688 < float descriptor_dir = cvFastArctan( besty, bestx ); --- > > descriptor_dir = cvFastArctan( besty, bestx ); 684a690,693 > } else { > descriptor_dir = 0; > kp->dir = 0; > } 691a701,703 > > if (params->upright == 0) { > 719a732,735 > } else { > /* extract rect - slightly optimized version of the code above > TODO: find faster code, as this is simply an extract rect operation, > e.g. by using cvGetSubRect, problem is the border processing */ 720a737,753 > float win_offset = -(float)(win_size-1)/2; > int start_x = cvRound(center.x + win_offset); > int start_y = cvRound(center.y + win_offset); > uchar* WIN = win.data.ptr; > for( i=0; i { > int pixel_x = start_x; > for( j=0; j { > x = MAX( pixel_x, 0 ); > y = MAX( start_y, 0 ); > x = MIN( x, img->cols-1 ); > y = MIN( y, img->rows-1 ); > WIN[i*win_size + j] = img->data.ptr[y*img->step+x]; > } > } > } 926a960 > upright = 0; 931c965 < SURF::SURF(double _threshold, int _nOctaves, int _nOctaveLayers, bool _extended) --- > SURF::SURF(double _threshold, int _nOctaves, int _nOctaveLayers, bool _extended, bool _upright) 934a969 > upright = _upright;