MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / GetMagsAndOrients_AllInImg

Function GetMagsAndOrients_AllInImg

jni/stasm/hat.cpp:198–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196// an image patch that is entirely in the image boundaries.
197
198static inline void GetMagsAndOrients_AllInImg(
199 vec_double& mags, // out
200 vec_double& orients, // out
201 const int ix, // in: x coord of center of patch
202 const int iy, // in: y coord of center of patch
203 const int patchwidth, // in
204 const MAT& magmat, // in
205 const MAT& orientmat, // in
206 const vec_double& pixelweights) // in
207{
208 const int halfpatchwidth = (patchwidth-1) / 2;
209 int ipix = 0;
210 for (int x = iy - halfpatchwidth; x <= iy + halfpatchwidth; x++)
211 {
212 const double* const magbuf = Buf(magmat) + x * magmat.cols;
213 const double* const orientbuf = Buf(orientmat) + x * orientmat.cols;
214
215 for (int y = ix - halfpatchwidth; y <= ix + halfpatchwidth; y++)
216 {
217 mags[ipix] = pixelweights[ipix] * magbuf[y];
218 orients[ipix] = orientbuf[y];
219 ipix++;
220 }
221 }
222 CV_DbgAssert(ipix == NSIZE(mags));
223}
224
225void GetMagsAndOrients( // get mags and orients for patch at ix,iy
226 vec_double& mags, // out

Callers 1

GetMagsAndOrientsFunction · 0.85

Calls 2

BufFunction · 0.85
NSIZEFunction · 0.85

Tested by

no test coverage detected