| 196 | // an image patch that is entirely in the image boundaries. |
| 197 | |
| 198 | static 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 | |
| 225 | void GetMagsAndOrients( // get mags and orients for patch at ix,iy |
| 226 | vec_double& mags, // out |
no test coverage detected