Create object thumbnails within pipeline


we were wondering whether one could save one cropped image per identified object, where the cropping is the bounding box of the object maybe plus a certain margin.

so for instance, if we have one big circular object (1) and one small elongated object (2) in an image, the output should be two images

image 1: big square shape, containing object 1
image 2: small rectangular shape, containing object 2

is that possible?

Thanks a lot!

Hi Tischi,

One of the cropping options is to crop to the shape of a prior object. So if you identify the single object, you can use ExpandOrShrinkObjects to expand it by the desired margin, and then crop to the expanded object, while removing “Edges” in the Crop module. This should get you the rectangular region that you want.