Image processing

Hi

have wierd time solving this.

Task is to limit/crop ANY input image to the first pixels with alfa>0

How would you approach that issue in TD.
Appreciate input (#TheBadTouch) :slight_smile:

Kind regards
f8

1 Like

interesting challenge - here’s my attempt:

autoCrop.png
autoCrop.tox (1.94 KB)

The analyse top & chop are quite nice for this.
Here’s my attempt :slight_smile:

cheers,
Tim
CropAlpha.tox (1.74 KB)

You guys are gentlemen and scholars.

You can do this with getbbox method from python’s PIL but thats just a lazy cheap trick.

I appraciate your solutions so much more :slight_smile:

f8

thanks @nettoyeur @timgerritsen for your examples.

Here is my attempt, largely inspired by yours, which returns an image of equivalent size to the same procedure done with Gimp (602x555 px)

what I am wondering is if the Table DAT is the correct operator to save the data provided by the CHOP Execute DAT, or if I should have used another operator (I am trying to learn how to do things with touchdesigner)

cropAlpha.tox (1.6 KB) cropAlpha_example.toe (4.5 KB)

Ok, i found how to correctly set a value in a constantCHOP, so i removed the tableDAT and the dattoCHOP :smiley:

cropAlpha.tox (1.5 KB) cropAlpha_example.toe (4.4 KB)