Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int k = 1; k < 100; ++k) {
- for (int i = 0; i < __rows; ++i) {
- for (int j = 0; j < __cols; ++j) {
- for (int c = 0; c < 3; ++c) {
- float res = 0;
- for (int ii = std::max(-__masksize/2, -i); ii <= std::min((__rows - i) - 1, __masksize/2); ++ii) {
- for (int jj = std::max(-__masksize/2, -j); jj <= std::min((__cols - j) - 1, __masksize/2); ++jj) {
- res += __img_data[0][(((i+ii) * __cols ) + j+jj) * imL.chans + c];
- }
- }
- res /= __masksize*__masksize;
- __img_data[1][((i * __cols ) + j) * imL.chans + c] = res;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement