Image handling extension_Crop and then store small images problem

Pekka_JounelaPekka_Jounela Member, University Professor Posts: 4 University Professor
edited August 2020 in Help
Dear experts,

I am using Image Handling extension and the goal is to store a collection of small images cropped from a large large image. To crop many small images (from top-left to right-bottom) I have utilized Loop Parameters operator that is found inside the Pre-Process Images operator (see process attached). The first pre-processing step (until the break-point after Loop Parameters) looks like working appropriately, but then after hitting the Run-button for the second time an error occurs ("The connection is producing wrong type of data").
Are there any ways to solve the error message?
So far I have tried to solve the problem by using operators like Append (Superset), Collect, Flatten Collection and Loop Collection in various ways and combinations but nothing seems to work.

Any help is graciously appreciated

Cheers, Pekka

Attached is the process.



  • MateMate Employee, Member Posts: 14 RM Team Member
    Hi Pekka,

    I tested your process and it seemed to work for me, as soon as I removed that loop operator and put the transformation chain straight into the pre-process operator.
    I assume, you wanted to iterate over the images in a directory. The good news is :) that we are doing just that under the hood.
    The Read Image Meta Data operator given a directory collects the images (recursively) and provides the list in an ExampleSet.
    That is the input for the Pre-Process Operator where you only need to make sure to set the path attribute to the appropriate one to get things working. I recommend taking a look at the Pre-Process tutorial process (MNIST).

    Kind regards,
  • Pekka_JounelaPekka_Jounela Member, University Professor Posts: 4 University Professor
    Thanks Mate,

    Much appreciated. However, I was hoping to vary those crop parameters within a loop (from top-left corner to the right-bottom corner, from 0 to 100 and with steps 10) so that the result would be many small images created from one large image.

    Best regards

Sign In or Register to comment.