Skip to content

Instantly share code, notes, and snippets.

Kamen Dimitrov kamend

Block or report user

Report or block kamend

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:10869771
// by dave @ beesandbombs.tumblr.com >:)
void setup() {
setup_();
result = new int[width*height][3];
result_ = new int[width*height][3];
}
int[][] result, result_;
float time;
@kamend
kamend / KinectCommonBridge Mesh Generation
Created Apr 4, 2014
This is how to generate point cloud mesh from the rawDepthPixels data, using Openframeworks and KinectCommonBridge
View KinectCommonBridge Mesh Generation
mesh.clear();
mesh.setMode(OF_PRIMITIVE_POINTS);
for(int x=0;x<640;x+=2) {
for(int y=0;y<480;y+=2) {
int index = x + y * 640;
short depth = kinect.getRawDepthPixelsRef().getPixels()[index];
if(depth > minDistance && depth < maxDistance) {
Vector4 world = NuiTransformDepthImageToSkeleton(x,y,kinect.getRawDepthPixelsRef().getPixels()[index] << 3,NUI_IMAGE_RESOLUTION_640x480);
float scale = 500.0f;
mesh.addVertex(ofVec3f(world.x,world.y,-world.z)*scale);
View check-for-src-pattern
#! /bin/bash
#
# simple script to check for a given string pattern in any
# .c, .h, .cpp, .cxx, .m, & .mm source files
#
# Dan Wilcox <danomatika@gmail.com> 2014
#
# super simple command parsing
if [ $# -lt 1 -o "$1" == "-h" -o "$1" == "--help" ] ; then
You can’t perform that action at this time.