Resizing a matrix I get wrong coordinates

Oct 11, 2012 at 11:36am

Resizing a matrix I get wrong coordinates

Hello everybody,
I’m trying to make some performance tweak to a patch, but I got stuck in a (maybe stupid) resizing issue.
I have a 720×576 input and I want to extract the edges of a picture and translate them into coordinates to make further elaborations.
Since I don’t need much precision and the rest of the patch is very CPU-stressing, I was trying to resize the input matrix to 320×240 and send it to the next stage, while keeping the original input matrix at its native size and sending it to a window.
And here comes the problem: when I pass the “resampled” matrix in jit.iter to extract the coordinates of the ‘active’ points what I get are the coords still in the 720×576 size.
I seem not to understand why this happens. Any hints?

– Pasted Max Patch, click to expand. –

P.S.
if you want to use the example video I’m working with, you can download it here: http://lska.net/box/dancer.mov

#64719
Oct 11, 2012 at 1:58pm

Try this

– Pasted Max Patch, click to expand. –
#233428
Oct 11, 2012 at 2:57pm

That’s it! Thank you!

#233429

You must be logged in to reply to this topic.