I am trying to define a function to generate a mask image using halide. There is a buffer
Buffer<int> bounding_box;
bounding_box(0, 0) = min_x0;
bounding_box(0, 1) = max_x0;
bounding_box(0, 2) = min_y0;
bounding_box(0, 3) = max_y0;
bounding_box(1, 0) = max_x1;
....
And I define Func Mask(x, y)
equals to 0 everywhere but 255 if located in any box given in bounding_box, bounding_box is dynamic size.
Tried to use DRom
but not able to success since the DRom arguments can not come be variable.