Is there any workflow block that can join a number of output images into one?

I have a workflow which produces 6 output images that I want to join side-by-side into a single output image. Are there any existing Roboflow blocks that could do this, or would I need to try and create a custom block for this purpose? If the later, how hard is it to do for an experienced developer who has only a fairly basic grasp of the Python language? Thanks.

Grid Vizualization is the closest (but will combine them into an n x n grid vs a straight line). We’d welcome a PR to extend it to be able to stack horizontally or vertically though!

Thanks. I tried to add that one to my workflow, but it seems that the input to Grid Vizualization block is incompatible with the output of Image Slicer. I don’t understand why since image slicer produces a set of images, and that is what the documentation says Grid Visualization takes as input… Is it a case of a list vs an array or something like that? If so, is there anyway to adapt the Image Slicer output to be compatible with the input of Grid Visualization?

Image Slicer produces a Batch of images. It’s stacked in a different dimension (for running operations in parallel). To convert a Batch into a list, use the Dimension Collapse block. The output of that could be passed to Grid Visualization.

Thanks. But whenever I add a Dimension Collapse block in my workflow where the input is an image or a list of images, I get the message “Internal error” with no other details. The only way I could avoid this error was to connect the Dimension Collapse block to the output of the Dynamic Zone block, but this is not what I need it for.

Maybe if I explain more what I’m trying to do it will help see if there is a solution within Roboflow. I’m detecting a rectangular box in an image, doing a perspective correction warp to make it rectangular in pixel space, then using Image Slicer to cut it up into 6 horizontal rows, then rotating each row to be a vertical image. This is working fine, but the final step is that I want to combine these 6 rotated vertical images into a single long vertical image. For this I would need a block that does the exact opposite to Image Slicer. At the moment, the only way I can do this is run the workflow from Python and do the final image processing step there.

Ok. So I finally worked out how to do this… I created a custom block in Roboflow so I could resize and join the images together using the numpy and cv2 libraries. I found that I had to add a dimension collapse block before my custom block though so that I could iterate through the images output by Image Slicer as a list of values. So that part of your previous advice was helpful.