sadmb / ofxkinect4azure Goto Github PK
View Code? Open in Web Editor NEWaddon for using Azure Kinect DK.
addon for using Azure Kinect DK.
Hi,
I have noticed I can only get 3fps even with an empty project with depth only.
What I have found so far is that creating a transformation is very expensive:
So taking this:
k4a::transformation transformation(calibration);
out of the update loop and executing it in setup setup seems to work.
Hi I had issues with the point cloud not being correct.
Everything that has to do with depth should be interpreted as uint16 instead of uint8.
uint8_t* d_buffer = depth_image.get_buffer();
should be
uint16_t* d_buffer = depth_image.get_buffer();
This is how I get the correct pointcloud data from a depthmap:
//create pointcloud
k4a::image d_image = capture.get_depth_image();
k4a::image xyz_image = transformation.depth_image_to_point_cloud(d_image, K4A_CALIBRATION_TYPE_DEPTH);
int16_t* p_buffer = (int16_t*)xyz_image.get_buffer();
int width = xyz_image.get_width_pixels();
int height = xyz_image.get_height_pixels();
pointcloud_vert.resize(width*height);
int counter = 0;
for (int h = 0; h < height; h++)
{
for (int w = 0; w < width; w++)
{
int pixelIndex = h * width + w;
pointcloud_vert[counter].x = p_buffer[3 * pixelIndex + 0] * 0.001f;
pointcloud_vert[counter].y = p_buffer[3 * pixelIndex + 1] * 0.001f;
pointcloud_vert[counter].z = p_buffer[3 * pixelIndex + 2] * 0.001f;
counter++;
}
}
pointcloud_vbo.setVertexData(pointcloud_vert.data(), width*height, GL_STREAM_DRAW);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.