facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

pointcould render issue #1762

Closed LTT-O closed 6 months ago

LTT-O commented 6 months ago

I use a ground true depth map and the camera intrinsic to unproject into a pointcloud in this camera space, and then transform this set of poincloud to another view according to the given c2w, but the render result is strange, there is a write point in the center of the screen, how can I fix it the following is the code ` cameras = FoVPerspectiveCameras(device="cuda", R=c2w_2[:,:3,:3], T=w2c_2[:,:3,3]) # 使用新视角的相机变换

# 配置渲染器
raster_settings = PointsRasterizationSettings(
    image_size=512, 
    radius=0.01, 
    points_per_pixel=10,
    bin_size=0,
)
renderer = PointsRenderer(
    rasterizer=PointsRasterizer(cameras=cameras, raster_settings=raster_settings),
    compositor=AlphaCompositor()
)

# 执行渲染
rendered_image = renderer(point_cloud)

` here is the result

acd940f0b0d5e9b9a2822c1806e082c