DRosemei / RoMe

MIT License
223 stars 27 forks source link

Cut-off when exeeding certain range of x, or y #58

Open HernandoR opened 2 months ago

HernandoR commented 2 months ago

My test of colmap is great, and smooth, at least to a certain range.

the bev and mesh both been cut off at a limit of x, and there's no mesh beyond that line.

My have migrated the pymeshlab api as follows, not sure if related:

# utils/geometry.py
# from
    # give faces colors
    face_quality = np.ones((num_vertices_x - 1, num_vertices_y - 1, 2, 1), dtype=np.float64)
    face_quality[mask == 0, :, 0] = 0.0
    face_quality = face_quality.reshape(-1, 1)
    source_mesh = pymeshlab.Mesh(vertex_matrix=vertices.numpy(), face_matrix=faces.numpy(), f_quality_array=face_quality)
    ms = pymeshlab.MeshSet()
    ms.add_mesh(source_mesh, "source_mesh")
    m = ms.current_mesh()

# to

  # give faces colors
  face_quality = np.ones(
      (num_vertices_x - 1, num_vertices_y - 1, 2, 1), dtype=np.float64
  )
  face_quality[mask == 0, :, 0] = 0.0
  face_quality = face_quality.reshape(-1, 1)
  source_mesh = pymeshlab.Mesh(
      vertex_matrix=vertices.numpy(),
      face_matrix=faces.numpy(),
      f_scalar_array=face_quality,
  )

the bev is as follows bev_rgb_7_189c4c1fa69d8647f012

hoping someone point out potential configs

DRosemei commented 2 months ago

@HernandoR We use "pose_xy" to predefine a certain range, because we do not know where the road is. If mvs/lidar points is provided, the range will be more accurate.

HernandoR commented 1 month ago

The center point seems to have am impact on the range of construction through offset

Please point out if there anywhere to automatically scaling based on the range of scene (maybe refer to the range of camera poses?)

DRosemei commented 1 month ago

@HernandoR You can simply set ((max_x + min_x) / 2, (max_y + min_y) / 2) as a center point. In application, we need manually make pose center as bev center before we reconstruct.

HernandoR commented 1 month ago

That surely appropriate I’m currently using ROME a sequential process after colmap, I’m going to write a small script for generating configuration.

Liu Zhen


From: DRosemei @.> Sent: Thursday, October 10, 2024 5:22:04 PM To: DRosemei/RoMe @.> Cc: Liu Zhen @.>; Mention @.> Subject: Re: [DRosemei/RoMe] Cut-off when exeeding certain range of x, or y (Issue #58)

@HernandoRhttps://github.com/HernandoR You can simply set ((max_x + min_x) / 2, (max_y + min_y) / 2) as a center point. In application, we need manually make pose center as bev center before we reconstruct.

— Reply to this email directly, view it on GitHubhttps://github.com/DRosemei/RoMe/issues/58#issuecomment-2404562595, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK4XSWDVOJ4ZA2LASW5HNH3Z2ZBLZAVCNFSM6AAAAABOVZQTASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUGU3DENJZGU. You are receiving this because you were mentioned.Message ID: @.***>