void pyramids(uint32_t nimages, uint32_t nlev, uint32_t r, uint32_t c, double **I, double **W, double *tmp_halfsize, double *tmp_quartsize, double *tmp2_quartsize, double ***pyrW, uint32_t **pyrW_r, uint32_t **pyrW_c, double ***pyrI, uint32_t **pyrI_r, uint32_t **pyrI_c){ //multiresolution blending for (int n = 0; n < nimages; n++){ //construct 1-channel gaussian pyramid from weights gaussian_pyramid(W[n],r,c,nlev,tmp_halfsize,pyrW[n],pyrW_r[n],pyrW_c[n]); } for (int n = 0; n < nimages; n++){ //construct 3-channel laplacian pyramid from images laplacian_pyramid(I[n],r,c,nlev,tmp_halfsize,tmp_quartsize,tmp2_quartsize,pyrI[n],pyrI_r[n],pyrI_c[n]); } }
void pyramids(uint32_t nimages, uint32_t nlev, uint32_t r, uint32_t c, double ***C, double **W, double *tmp_halfsize, double *tmp_quartsize, double *tmp2_quartsize, double ***pyrW, uint32_t **pyrW_r, uint32_t **pyrW_c, double ****pyrI, uint32_t **pyrI_r, uint32_t **pyrI_c){ //multiresolution blending for (int n = 0; n < nimages; n++){ //construct 1-channel gaussian pyramid from weights gaussian_pyramid(W[n],r,c,nlev,tmp_halfsize,pyrW[n],pyrW_r[n],pyrW_c[n]); } for (int n = 0; n < nimages; n++){ for(int k = 0; k < CHANNELS; k++){ double ***pyrIk = pyrI[k]; laplacian_pyramid(C[n][k],r,c,nlev,tmp_halfsize,tmp_quartsize,tmp2_quartsize,pyrIk[n],pyrI_r[n],pyrI_c[n]); } } }
vector<OERegion> ComputeLoGExtrema::operator()(const Image<float>& I, vector<Point2i> *scale_octave_pairs) { auto& G = _gaussians; auto& L = _laplacians_of_gaussians; G = gaussian_pyramid(I, _params); L = laplacian_pyramid(G); auto extrema = vector<OERegion>{}; const auto preallocated_size = int(1e4); extrema.reserve(preallocated_size); if (scale_octave_pairs) { scale_octave_pairs->clear(); scale_octave_pairs->reserve(preallocated_size); } for (int o = 0; o < L.num_octaves(); ++o) { // Be careful of the bounds. We go from 1 to N-1. for (int s = 1; s < L.num_scales_per_octave() - 1; ++s) { auto new_extrema = local_scale_space_extrema( L, s, o, _extremum_thres, _edge_ratio_thres, _img_padding_sz, _extremum_refinement_iter); append(extrema, new_extrema); if (scale_octave_pairs) { for (size_t i = 0; i != new_extrema.size(); ++i) scale_octave_pairs->push_back(Point2i(s,o)); } } } shrink_to_fit(extrema); return extrema; }