Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void integral2(int h, int w, uchar *src, uint *sum)
- {
- uchar *pg;
- uint *ps;
- uint *psu;
- uint s; // line sum
- for (int c = 0; c < n_bins; c++) {
- pg = src + c * w * h;
- ps = sum + n_bins * (w + 2) + c;
- psu = sum + n_bins + c;
- for (int y = 1; y < h + 1; y++, ps += n_bins, psu += n_bins) {
- s = 0;
- for (int x = 1; x < w + 1; x++, pg++, ps += n_bins, psu += n_bins) {
- s += *pg;
- *ps = *psu + s;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement