@@ -225,7 +225,6 @@ def log_arkit(recording_path: Path, include_highres: bool) -> None:
225
225
rr .set_time_seconds ("time" , float (frame_timestamp ))
226
226
# load the lowres image and depth
227
227
bgr = cv2 .imread (f"{ lowres_image_dir } /{ video_id } _{ frame_timestamp } .png" )
228
- rgb = cv2 .cvtColor (bgr , cv2 .COLOR_BGR2RGB )
229
228
depth = cv2 .imread (f"{ lowres_depth_dir } /{ video_id } _{ frame_timestamp } .png" , cv2 .IMREAD_ANYDEPTH )
230
229
231
230
high_res_exists : bool = (image_dir / f"{ video_id } _{ frame_timestamp } .png" ).exists () and include_highres
@@ -240,7 +239,7 @@ def log_arkit(recording_path: Path, include_highres: bool) -> None:
240
239
LOWRES_POSED_ENTITY_PATH ,
241
240
)
242
241
243
- rr .log (f"{ LOWRES_POSED_ENTITY_PATH } /rgb " , rr .Image (rgb ).compress (jpeg_quality = 95 ))
242
+ rr .log (f"{ LOWRES_POSED_ENTITY_PATH } /bgr " , rr .Image (bgr , color_model = "BGR" ).compress (jpeg_quality = 95 ))
244
243
rr .log (f"{ LOWRES_POSED_ENTITY_PATH } /depth" , rr .DepthImage (depth , meter = 1000 ))
245
244
246
245
# log the high res camera
@@ -260,9 +259,7 @@ def log_arkit(recording_path: Path, include_highres: bool) -> None:
260
259
highres_bgr = cv2 .imread (f"{ image_dir } /{ video_id } _{ frame_timestamp } .png" )
261
260
highres_depth = cv2 .imread (f"{ depth_dir } /{ video_id } _{ frame_timestamp } .png" , cv2 .IMREAD_ANYDEPTH )
262
261
263
- highres_rgb = cv2 .cvtColor (highres_bgr , cv2 .COLOR_BGR2RGB )
264
-
265
- rr .log (f"{ HIGHRES_ENTITY_PATH } /rgb" , rr .Image (highres_rgb ).compress (jpeg_quality = 75 ))
262
+ rr .log (f"{ HIGHRES_ENTITY_PATH } /bgr" , rr .Image (highres_bgr , color_model = "BGR" ).compress (jpeg_quality = 75 ))
266
263
rr .log (f"{ HIGHRES_ENTITY_PATH } /depth" , rr .DepthImage (highres_depth , meter = 1000 ))
267
264
268
265
@@ -293,9 +290,9 @@ def main() -> None:
293
290
# For this to work, the origin of the 2D views has to be a pinhole camera,
294
291
# this way the viewer knows how to project the 3D annotations into the 2D views.
295
292
rrb .Spatial2DView (
296
- name = "RGB " ,
293
+ name = "BGR " ,
297
294
origin = primary_camera_entity ,
298
- contents = ["$origin/rgb " , "/world/annotations/**" ],
295
+ contents = ["$origin/bgr " , "/world/annotations/**" ],
299
296
),
300
297
rrb .Spatial2DView (
301
298
name = "Depth" ,
0 commit comments