Skip to content

Commit df767b4

Browse files
committed
color fixed
1 parent 36f1659 commit df767b4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

example_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def main():
6868
print(type(map_data['points']))
6969

7070
points = np.array(map_data['points'])
71-
colors = np.array(map_data['colors'])/256.0
71+
colors = np.array(map_data['colors'])/255.0
7272
print(colors.shape)
7373
print(colors[0:50])
7474
visualize_point_cloud_color(points, colors)

mapping/reconstruction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ def update_vbg(self,depth,intrinsic,pose,color = None,semantic_label = None, sce
290290
def update_color(self,color,depth,valid_voxel_indices,mask_inlier,w,wp,v_proj,u_proj):
291291
#performing color integration
292292
color = cv2.resize(color,(depth.columns,depth.rows),interpolation= cv2.INTER_NEAREST)
293+
color = cv2.cvtColor(color, cv2.COLOR_BGR2RGB)
294+
color = color.astype(np.float32) / 255.0
293295
color = o3d.t.geometry.Image(o3c.Tensor(color.astype(np.float32))).to(self.device)
294296
color_readings = color.as_tensor()[v_proj,u_proj].to(o3c.float32)
295297
color = self.vbg.attribute('color').reshape((-1, 3))

0 commit comments

Comments
 (0)