Azzera filtri
Azzera filtri

Projecting motion heat maps in 3d space

27 visualizzazioni (ultimi 30 giorni)
Sam
Sam il 13 Lug 2023
Risposto: Anurag il 8 Ago 2023
Hello, I have a need to plot motion xyz) data from body, and hands (L/R) together and/or separately (the data is just csv with columns indicating body part x, y, z) in the form of a heat map into a 3d plane (for which I have measurements) into which I can also project other objects (e.g. cylinders). I’ve seen some matlab plug-ins that seem to be useful for this, but I’m curious as to what is the most straightforward approach here. For example, is there a function that allows me to input the measurements of my 3d space, and generate it, a separate function that can simply plot a motion heat map (at a moment in time, OR as a time series), and then can I simply overlay my heat map onto the 3d plane? And ditto with my other 3d objects, over lay them in the space? I realize this is a bit of a general question. I am hoping to find the simplest approach prior to going down rabbit holes of higher complexity. Thank you!

Risposte (1)

Anurag
Anurag il 8 Ago 2023
To plot the motion data from the body and hands as a heat map on a 3D plane you could refer to the following pointers :
  1. Create 3D Plane:Define your 3D plane using the measurements you have. You can use the meshgrid function to create a grid of points that define the plane.
  2. Plot Objects on the Plane:Use appropriate functions to plot additional objects (such as cylinders) on the 3D plane. For example, you can use the cylinder function to create cylinders and position them on the plane.
  3. Generate Heat Map:For the heat map, interpolate your motion data onto the grid points of the 3D plane. You can use interpolation functions like interp2 or griddata to map your data onto the plane's grid.
  4. Visualize Heat Map:Plot the heat map on the 3D plane using the interpolated data. MATLAB's surf or pcolor functions can be used to create the heat map. Set the color data based on the intensity of the motion data at each point.
  5. Overlay Heat Map and Objects:Use the hold function to overlay the heat map and objects on the same figure. Plot the heat map using surf or pcolor and then add the object plots using appropriate functions.
  6. Customization:Customize the appearance of your plot by adding labels, adjusting color maps, adding legends, and adjusting lighting to make it visually informative.

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by