Select highest value from jit.cellblock

Jan 16, 2009 at 8:50pm

Select highest value from jit.cellblock

Hi guys, I’m fairly new to max and currently I’m working on a project for an interactive sound installation.

I want to track the position of two people (walking and standing still) in front of a camera. The width-range the camera can see will be about 5 meters. I want to know the position of the two people, the distance between them can then be obtained from that.

A simple way to track a person I though was to use grayscale live video with a width resolution of 12 pixels and slice that into 12 slices with jit.scissors. Now I can see the brightness of each of the 12 pieces individually, and attached them to a jit.cellblock.

Currently I only use 1 pixel height resolution so in the cellblock I only have one row, and the 12 columns for each grayscale 0-255 value. What I want to know now is the column in which value is the lowest (that represents where one person is standing)

I’ve tried some stuff and looked around but coundn’t find a (preferably simple) solution yet.

I hope you understand my question, thanks!

#41718
Jan 16, 2009 at 9:13pm

Hi Mischa,

There are external objects available that solve this problem in a
simple way. These will also give you information about the position
at a finer resolution than your approach. Try my 2up.jit.centroids
object at 2uptech.com or the cv.jit.centroids object in the cv.jit
package.

-Randy

On Jan 16, 2009, at 12:50 PM, Mischa Daams wrote:

>
> Hi guys, I’m fairly new to max and currently I’m working on a
> project for an interactive sound installation.
>
> I want to track the position of two people (walking and standing
> still) in front of a camera. The width-range the camera can see will
> be about 5 meters. I want to know the position of the two people,
> the distance between them can then be obtained from that.
>
> A simple way to track a person I though was to use grayscale live
> video with a width resolution of 12 pixels and slice that into 12
> slices with jit.scissors. Now I can see the brightness of each of
> the 12 pieces individually, and attached them to a jit.cellblock.
>
> Currently I only use 1 pixel height resolution so in the cellblock I
> only have one row, and the 12 columns for each grayscale 0-255
> value. What I want to know now is the column in which value is the
> lowest (that represents where one person is standing)
>
> I’ve tried some stuff and looked around but coundn’t find a
> (preferably simple) solution yet.
>
> I hope you understand my question, thanks!
>

#148840
Jan 16, 2009 at 11:13pm

Thanks for your quick reply Randy, i’m definitely going to try / use the centroids object, probably in combination with an ‘empty’ background to compare difference.

But I would find it pretty cool if there was a way find the lowest value from a row in a cellblock.. Because its really simple and fast. I found the minimum object but the problem is when I unpack the cellblock object and place them in a coll an I sort them from small to big I can’t get an automated way to get the column number from the smallest value..

Do you or someone else know a easy way to output the column number with the lowest value?

I tried some things (like to put them in a coll) you can see in the patch but nothing gave me the column(index) number with the lowest data value.

Btw great achievement with the multitouch prototype!

#148841
Jan 18, 2009 at 6:38pm

Jit.3m is the object you want. The other objects under “Jitter
Analysis” in the New Object List may also help.

Jit.cellblock is just a GUI object, so I wouldn’t put it between your
video and your data output.

-Randy

On Jan 16, 2009, at 3:13 PM, Mischa Daams wrote:

> Thanks for your quick reply Randy, i’m definitely going to try / use
> the centroids object, probably in combination with an ‘empty’
> background to compare difference.
>
> But I would find it pretty cool if there was a way find the lowest
> value from a row in a cellblock.. Because its really simple and
> fast. I found the minimum object but the problem is when I unpack
> the cellblock object and place them in a coll an I sort them from
> small to big I can’t get an automated way to get the column number
> from the smallest value..
>
> Do you or someone else know a easy way to output the column number
> with the lowest value?
>
> I tried some things (like to put them in a coll) you can see in the
> patch but nothing gave me the column(index) number with the lowest
> data value.
>
>
> Btw great achievement with the multitouch prototype!
>

#148842

You must be logged in to reply to this topic.