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
February 5, 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:

http://cycling74.com/forums/topic.php?id=29469&page=2

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
transform
matrix1 x1 y1 r1 g1 b1
into
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!!
thanks,
clemens

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)

[attachment=153231,1772]