Multi webcam support

This commit is contained in:
charlesbvll 2021-05-04 12:27:58 +02:00
parent a68699db62
commit 9483fc3654
3 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,7 @@ def cli():
predict_parser.add_argument('--dropout', type=float, help='dropout parameter', default=0.2)
predict_parser.add_argument('--show_all', help='only predict ground-truth matches or all', action='store_true')
predict_parser.add_argument('--webcam', help='monstereo streaming', action='store_true')
predict_parser.add_argument('--camera', help='device to use for webcam streaming', type=int, default=0)
predict_parser.add_argument('--focal', help='focal length in mm for a sensor size of 7.2x5.4 mm. (nuScenes)',
type=float, default=5.7)

View File

@ -437,6 +437,7 @@ class Printer:
ax.set_ylim(0, self.z_max + 1)
ax.set_xlabel("X [m]")
ax.set_box_aspect(.8)
plt.xlim((-x_max, x_max))
plt.xticks(fontsize=self.attr['fontsize_ax'])
plt.yticks(fontsize=self.attr['fontsize_ax'])
return ax

View File

@ -84,7 +84,7 @@ def webcam(args):
preprocess = preprocess_factory(args)
# Start recording
cam = cv2.VideoCapture(0)
cam = cv2.VideoCapture(args.camera)
visualizer_mono = None
while True: