motion tracking using cv.jit.lkflow

loulou's icon

Hi,

I am new in using MAX/MSP.
I am now doing a school project for motion tracking, and I just found that cv.jit.lkflow is suit my needs as I just need to detect the direction of the object moving.
However, I don't know how to apply the cv.jit.lkflow.
It is said that the value output could indicates the direction of the moving object. Then how could I obtain the output value?

Thanks for helping! really!

mzed's icon

loulou wrote on Fri, 01 May 2009 13:02Hi,

I am new in using MAX/MSP.
I am now doing a school project for motion tracking, and I just found that cv.jit.lkflow is suit my needs as I just need to detect the direction of the object moving.
However, I don't know how to apply the cv.jit.lkflow.
It is said that the value output could indicates the direction of the moving object. Then how could I obtain the output value?

Thanks for helping! really!

1) You might have better luck posting this to the Jitter Forum.

2) The output of cv.jit.lkflow is a 2-plane matrix. The first plane is horizontal motion, the second plane is vertical motion. Hook a jit.cellblock up to one of the first two outputs of the jit.unpack in the helpfile and you should get a better idea.

There is no single value, but two values per pixel.

mz

loulou's icon

Thanks so much!!

But the value I get is very unstable. They just keep changing.
Is that normal? Is there any method to stabilize the value?

mzed's icon

loulou wrote on Sat, 02 May 2009 20:25Thanks so much!!

But the value I get is very unstable. They just keep changing.
Is that normal? Is there any method to stabilize the value?

Try running the output through cv.jit.ravg. That will calm down some of the noise, although it will add a bit of latency.

mz