Open samueleruffino99 opened 1 year ago
Check this function https://github.com/owl-project/NVISII/blob/master/examples/21.ndds_export.py#L66 I think it does what you need.
How can I just project points onto the camera matrix? Because it seems that using those matrices I get wrong pixel position
p_image = cam_proj_matrix * (cam_matrix * pos_m)
p_image = nvisii.vec2(p_image) / p_image.w
p_image = p_image * nvisii.vec2(1,-1)
p_image = (p_image + nvisii.vec2(1,1)) * 0.5
You need this for pixel location, is that helpful.
Hello everyone!
I have (I think) a very simple question, I am trying to project bounding boxes to camera and apparently I am applying the wrong transformation.
First of all I have computed the 3d bbox vertices with:
Then tried in two different ways: 1) Using intrinsic matrix (
.get_camera().get_intrinsic_matrix(width, height)
) and compute matrix multiplication by the 8 vertices. 2) Using world_to_local matrix (.get_transform().get_world_to_local_matrix()
) and projection matrix (.get_camera().get_projection()
), transforming 3d vertices in homogeneous coordinates, multiuply them by world_to_local matrix and then by projection matrix.Anyway, I am getting strange results and bounding boxes are not printed correctly.
How am I suppose to project world points onto image ?
Thank you!!