Forums > Jitter

Use only part of a matrix

August 19, 2011 | 1:50 pm

Hi Guys,

I’m working on a patch using a jitter matrix. I need to isolate a certain part of the image and turn the rest of the values in the matrix to 0 (in real time). I tried to use an MXJ object but have ran into issues with loss of frames, and the code was also not very good at accomplishing the task, even though logically it should have worked. Is there any object within the max library that could isolate a box in the image from four cordinates, i.e. the top left right and bottom left right. Any help would be greatly appreciated.

Thanks,
Alan


August 19, 2011 | 2:08 pm

jit.submatrix? jit.scissors? you can use these smaller pieces and put into another matrix that’s otherwise all 0 values.

probably there is a clever way to use jit.op as well.


August 19, 2011 | 2:25 pm

Here’s a tutorial patch I’ve used in my class which my old instructor gave to me. Jit.submatrix basically does the same thing, but this is a way to do it without any extra objects.

Explains the usedstdim and usesrcdim attibutes and how to control them with srcdimstart, srcdimend, dstdimstart, and dstdimend.

– Pasted Max Patch, click to expand. –

August 19, 2011 | 2:31 pm

Thanks for the help guys, I’ll try both of these methods and see if I achieve my original goal.


August 20, 2011 | 8:23 pm

Thanks cap10subtext, works a treat.


Viewing 5 posts - 1 through 5 (of 5 total)