From 0a8f41f9872853b39ab92d8122ddf265b13cbcfe Mon Sep 17 00:00:00 2001 From: lorenzo Date: Fri, 24 May 2019 16:20:22 +0200 Subject: [PATCH] add 2 aspect ratios for kitti and nuscenes --- src/visuals/printer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/visuals/printer.py b/src/visuals/printer.py index f83dc1b..98805dc 100644 --- a/src/visuals/printer.py +++ b/src/visuals/printer.py @@ -82,9 +82,12 @@ class Printer: print(y_scale) width = self.fig_width + 0.6 * self.fig_width height = self.fig_width * self.im.size[1] / self.im.size[0] - print(width) - print() - fig_ar_1 = 1.7 # 1.3 before + + # Distinguish between KITTI images and general images + if y_scale > 1.7: + fig_ar_1 = 1.7 + else: + fig_ar_1 = 1.3 width_ratio = 1.9 ext = '.combined.png' @@ -213,7 +216,6 @@ class Printer: ax1.plot([0, x_max], [0, self.z_max], 'k--') ax1.plot([0, -x_max], [0, self.z_max], 'k--') ax1.set_ylim(0, self.z_max+1) - ax1.set_xlim(-self.z_max+2, self.z_max-2) ax1.set_xlabel("X [m]") ax1.set_ylabel("Z [m]")