47 int start_y,
int width,
int height)
const {
50 int clip_x =
std::max(start_x - hx, 0);
51 int clip_y =
std::max(start_y - hy, 0);
52 int clip_w =
std::min(width + hx * 2, image->getWidth() - clip_x);
53 int clip_h =
std::min(height + hy * 2, image->getHeight() - clip_y);
59 image, clip_x, clip_y, clip_w, clip_h
76 VarianceAccessor maskAccessor(mask);
80 clipped_img, mask, 0., 0.);
94 int off_x = start_x - clip_x;
95 int off_y = start_y - clip_y;
96 for (
int y = 0; y < height; ++y) {
97 for (
int x = 0; x < width; ++x) {
98 if (maskAccessor.getValue(x + off_x, y + off_y)) {
100 x + start_x, y + start_y,
101 conv_masked->getValue(x + off_x, y + off_y) / conv_mask->getValue(x + off_x, y + off_y)
104 tile.
setValue(x + start_x, y + start_y, 0);