Re: convert matrix – draw pixels on y-axis using brightness-values as new y-position

Forums > Jitter > convert matrix – draw pixels on y-axis using brightness-values as new y-position
Feb 05 2011 | 7:08 pm

hi beatriz,

thank you very much – that’s exactly what i want to do, but i already got that far by the help of dtr in this thread:

what i want to do is more or less this:

-- Pasted Max Patch, click to expand. --

it works, but this is horribly slow!

there must be some more elegant solution than to set each pixel manually. do you have any advice for me?

btw. i realized i can use the 3 planes of dtr’s calculation results, as values "r g b" represent the real x y z of points measured by kinect in space (much better than using the x coordinate of the actual image).
still, that doesn’t solve my issue:
i need to generate a new matrix from the values of another one.

in the 3-plane case this would be
matrix1 x1 y1 r1 g1 b1
matrix2 r1 b1 255 255 255

(i’m using white as i just need to see the "on" pixels — i want to process this image further with cv.jit)

if you have any advice for me i’d be very very happy!!

ps: attached a screenshot of my status as is – i use clicking on the depth image to locate a point and draw the position of that in the lcd on the right. the blue trapezoid represents the camera angle. i will of course dump this lcd in the end, as i need a 2d matrix with all movement of people visible in it.
(also i’m running in 640*480 in this screenshot)


  1. Bildschirmfoto20110205um19.57.43.png


Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required