Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
bertjiazheng committed Mar 25, 2020
1 parent c90b689 commit f30d630
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion visualize_bbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ def visualize_bbox(args):
position_path = os.path.join(room_path, position_id)

image = cv2.imread(os.path.join(position_path, 'rgb_rawlight.png'))
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
height, width, _ = image.shape

instance = cv2.imread(os.path.join(position_path, 'instance.png'), -1)
instance = cv2.imread(os.path.join(position_path, 'instance.png'), cv2.IMREAD_UNCHANGED)

camera_info = np.loadtxt(os.path.join(position_path, 'camera_pose.txt'))

Expand Down
2 changes: 2 additions & 0 deletions visualize_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def visualize_panorama(args):

cor_id = np.loadtxt(os.path.join(room_path, "layout.txt"))
img_src = cv2.imread(os.path.join(room_path, "full", "rgb_rawlight.png"))
img_src = cv2.cvtColor(img_src, cv2.COLOR_BGR2RGB)
img_viz = draw_boundary_from_cor_id(cor_id, img_src)

plt.axis('off')
Expand All @@ -46,6 +47,7 @@ def visualize_perspective(args):
position_path = os.path.join(room_path, position_id)

image = cv2.imread(os.path.join(position_path, "rgb_rawlight.png"))
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

with open(os.path.join(position_path, "layout.json")) as f:
annos = json.load(f)
Expand Down

0 comments on commit f30d630

Please sign in to comment.