Skip to content

Instantly share code, notes, and snippets.

View anselanza's full-sized avatar
👋

Stephen Buchanan anselanza

👋
  • Amsterdam, The Netherlands
View GitHub Profile
@atduskgreg
atduskgreg / kinect_to_stl.pde
Created August 17, 2011 09:36
Processing sketch to make a 3D printable STL file from the Kinect (in progress)
import processing.opengl.*;
import unlekker.util.*;
import unlekker.modelbuilder.*;
import SimpleOpenNI.*;
SimpleOpenNI kinect;
boolean scanning = false;
boolean scanned = false;
int maxZ = 2000;
@irealva
irealva / moveMirrorWeightedDistance.js
Created July 18, 2018 22:23
Gist for Move Mirror blog post: weighted distance
// poseVector1 and poseVector2 are 52-float vectors composed of:
// Values 0-33: are x,y coordinates for 17 body parts in alphabetical order
// Values 34-51: are confidence values for each of the 17 body parts in alphabetical order
// Value 51: A sum of all the confidence values
// Again the lower the number, the closer the distance
function weightedDistanceMatching(poseVector1, poseVector2) {
let vector1PoseXY = poseVector1.slice(0, 34);
let vector1Confidences = poseVector1.slice(34, 51);
let vector1ConfidenceSum = poseVector1.slice(51, 52);
@philhartung
philhartung / dante-aes67-relay.js
Last active April 11, 2024 04:40
Relay a Dante multicast stream to AES67. This assumes the AES67 device is synced to the same PTP master, as no PTP timestamping is done (timestamp from Dante is copied to AES67 RTP packet)
const dgram = require('dgram');
const client = dgram.createSocket({ type: 'udp4', reuseAddr: true });
const sdp = require('./sdp');
//config
const addr = '10.10.1.100';
const danteMulticast = '239.255.220.221';
const aes67Multicast = '239.69.1.122';
const samplerate = 48000;
const channels = 2;