change matrix size of kinect depth map, faster to double?

prismspecs's icon

Hey all,
I'm basically trying to utilize the 640 x 480 depth map the kinect poops out with some video that is a higher resolution. If I feed the matrix through a larger matrix will it automatically scale it for me? Also, is it going to be faster for me to go from 640 x 480 -> 1024 x 768 or just double it entirely and go 1280 x 960? I've bumped it to 1024 and it dropped my frame rate by 10 or more :(

Wesley Smith's icon

If you're doing this on the CPU, 1280 x 960 is a huge matrix to be processing. If possible, do any calculations on the GPU with slabs and shaders.

prismspecs's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I still have to load movies and the kinect into jit.matrix right? I'm not quite sure how much I can optimize what I have already. You've been insanely helpful with my project so far, Wes. Thank you. If you have time to look at my patch and point me in the right direction, I'm curious how I might be able to take some load off my CPU and put it on the video card.

Wesley Smith's icon

I see, you're doing all of the cv stuff on a 1024 x 768 matrix. This is going to be slow. There's no way around it without downsampling the matrix to a smaller dimension.

prismspecs's icon

Ah, so I could do all the operations on 640x480 and then upres w/ OpenGL shape drawing?

Rob Ramirez's icon

for blob tracking, you can probably go even lower than that.
i've had success with 80x60.
really depends on the specific scenario. fortunately it's easy to change the dims on the fly.
try it out.