crop black in matrix

mharter's icon

Hey there!

I'm trying to crop black borders automatically, any hints?

Thanks!
MH

cap10subtext's icon

Where to begin? jit.rota might serve your purposes.

mharter's icon

I tried using jit.iter to slice the matrix X and Y in the center, then look at the lists with ZL objects. if I can get the position of the first and last non-zero in each list, I might be able to feed those numbers into an object that crops, or the dstdims of another matrix.

I trying that strategy next.

Thanks!
MH