Assembling slightly rotated Images - Not so easy

Hello again,

I am trying to combine two images into one, not stacking them, but concatenating them. One image is a satellite picture of the northern parts of the Netherlands. The other image is a picture of the southern part. See the 2 images below

Two Images

Using the very handy image montage workflow I was able to assemble them into 1 image, see a picture of the result below:

Images together

As you can see, the end result is not yet satisfying in this particular case. The goal is to create something like this, see image below:

I was considering several things (e.g. using a coordinate system or by rotating the images so the borders are horizontal instead of slightly diagonal, and then cut away the black edges and then merge), but I have not found a satisfying way how to do this, and I do not know what is possible in KNIME or the best way forward to get this done.

Any help would be very much appreciated.

Kind regards,


Hi Wouter,

That is very likely the easiest option to achieve in the short term:

  1. Rotation 2D
  2. Auto Crop the individual images (assuming that your background is of 0 value your result should be quite good)
  3. Use the Image montage workflow

Are your images always rotated at the same angle? Also, is there any overlap between the images or are they exclusive? If it’s the latter, do you have coordinates of the images that could be used for stitching the images…


Dear Stefan,

Thank you very much for you reply. I tried your suggested approach and it produces a very decent result. As you said, it is not perfect, because joining the two images perfectly would require using coordinates. There also appears to be some overlap in the images that I did not notice before, but I can try to solve that later. For now this produces a good enough result though, so thank you again.

I did run into another issue however and I very much like to ask your opinion on whether you think this is possible in KNIME. The images I am using are actually geoTIFF images that also contain some spatial information such as the coordinate reference system (CRS) and the spatial extent data (what area of the world does this image cover). This can be used to transform pixel locations [row, column] into geo-coordinates and the other way around. Our goal is to use a file that has actual coordinates (polygons) of farmland (in a shapefile or geoJSON format) and use this as a mask on the image in such a way so that only the farmland is kept in the image and all other pixels are set to 0.

Here you can see a very simple example being done in python using one polygon to extract a part of the image (in our case we have multiple polygons and we do not want the crop=True because we want to keep the original image size).

To do this in KNIME I have installed the geospatial operations extension, but have not been able to get it work due to the lack of documentation and examples. When you search on this forum using the word ‘geospatial’ or ‘geotiff’ there are only a few topics which are unfortunately not helpful.

Do you have any experience with this, or do you know people that do? Thanks to your help I have been able to do almost all image processing steps that we like to do in our research project, but this final step proves to be a very difficult one thus far.

Kind regards,