| 150 | } |
| 151 | |
| 152 | static double SumAbsElems( // return the sum of the abs values of the elems of mat |
| 153 | const MAT& mat) // in |
| 154 | { |
| 155 | CV_Assert(mat.isContinuous()); |
| 156 | const double* const data = Buf(mat); |
| 157 | double sum = 0; |
| 158 | int i = NSIZE(mat); // number of elements |
| 159 | while (i--) |
| 160 | sum += ABS(data[i]); |
| 161 | return sum; |
| 162 | } |
| 163 | |
| 164 | static VEC SubProf( // return the profile at given offset within fullprof |
| 165 | int offset, // in: offset along whisker in pixels |