| 101 | } |
| 102 | |
| 103 | static inline int Pix( // get pixel at ix and iy, forcing ix and iy in range |
| 104 | const Image& img, // in |
| 105 | int ix, // in |
| 106 | int iy) // in |
| 107 | { |
| 108 | return img(Clamp(iy, 0, img.rows-1), Clamp(ix, 0, img.cols-1)); |
| 109 | } |
| 110 | |
| 111 | // fullprof is the 1D profile along the whisker, including extra elements |
| 112 | // to allow searching away from the current position of the landmark. |