I’m working with a point cloud 3D body data, and i manually highligt certain points on the scan in blender. I treid visually the cordinates on the point on pyvista but the location of the poibt seems to far off (somewhere at the back) even after setting the location and rotation as follows:
import pyvista as pv
import numpy as np
import pyvista as pv
import numpy as np
pcd_pv = pv.read('../slider/slidder002.obj')
pcd_pv.points -= np.mean(pcd_pv.points, axis=0)
pcd_pv.points /= np.max(np.abs(pcd_pv.points))
pcd_pv.rotate_y(180) # rotations parameters from blender
pcd_pv.rotate_x(180)
pcd_pv.rotate_z(295)
highlight_point = [0.007935, 0.162809, 0.098870] # cordinates on the eye extracted from blender
highlight_point = np.array(highlight_point)
type here
index = pcd_pv.find_closest_point(highlight_point)
print(f"Closest index for the highlight point: {index}")
plotter = pv.Plotter()
plotter.add_mesh(pcd_pv, point_size=5, render_points_as_spheres=True)
plotter.add_mesh(pv.PolyData(highlight_point), color='red', point_size=10, render_points_as_spheres=True)
plotter.add_text('Highlighted Point', font_size=18)
plotter.add_point_labels([highlight_point], [str(index)], point_size=10, text_color='red', font_size=12)
plotter.show()`
[point on the 3D scan](https://i.sstatic.net/AJc2Y558.png