I am trying to run the second tab with the examples provided by pyorc.
cam_config = pyorc.load_camera_config("ngwerere.json")
video_file = "/home/rodrigo/pyorc/examples/ngwerere/ngwerere_20191103.mp4"
video = pyorc.Video(video_file, camera_config=cam_config, start_frame=0, end_frame=125, stabilize="fixed", h_a=0.)
video
But it is generating the following error:
ValueError Traceback (most recent call last)
Cell In[2], line 3
1 cam_config = pyorc.load_camera_config("ngwerere.json")
2 video_file = "/home/rodrigo/pyorc/examples/ngwerere/ngwerere_20191103.mp4"
----> 3 video = pyorc.Video(video_file, camera_config=cam_config, start_frame=0, end_frame=125, stabilize="fixed", h_a=0.)
4 video
File ~/anaconda3/envs/pyorc/lib/python3.11/site-packages/pyorc/api/video.py:100, in Video.init(self, fn, camera_config, h_a, start_frame, end_frame, freq, stabilize)
97 # explicitly open file for reading
98 if self.stabilize is not None:
99 # set a gridded mask based on the roi points
--> 100 self.set_mask_from_exterior(self.stabilize)
101 # set end and start frame
102 self.frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
File ~/anaconda3/envs/pyorc/lib/python3.11/site-packages/pyorc/api/video.py:477, in Video.set_mask_from_exterior(self, exterior)
459 def set_mask_from_exterior(
460 self,
461 exterior
462 ):
463 """
464 Prepare a mask grid with 255 outside of the stabilization polygon and 0 inside
465
(...)
475
476 """
--> 477 mask_coords = np.array([exterior], dtype=np.int32)
478 mask = np.zeros((self.height, self.width), np.uint8)
479 mask = cv2.fillPoly(mask, [mask_coords], 255)
ValueError: invalid literal for int() with base 10: 'fixed'
I am trying to run the second tab with the examples provided by pyorc.
cam_config = pyorc.load_camera_config("ngwerere.json") video_file = "/home/rodrigo/pyorc/examples/ngwerere/ngwerere_20191103.mp4" video = pyorc.Video(video_file, camera_config=cam_config, start_frame=0, end_frame=125, stabilize="fixed", h_a=0.) video
But it is generating the following error:
ValueError Traceback (most recent call last) Cell In[2], line 3 1 cam_config = pyorc.load_camera_config("ngwerere.json") 2 video_file = "/home/rodrigo/pyorc/examples/ngwerere/ngwerere_20191103.mp4" ----> 3 video = pyorc.Video(video_file, camera_config=cam_config, start_frame=0, end_frame=125, stabilize="fixed", h_a=0.) 4 video
File ~/anaconda3/envs/pyorc/lib/python3.11/site-packages/pyorc/api/video.py:100, in Video.init(self, fn, camera_config, h_a, start_frame, end_frame, freq, stabilize) 97 # explicitly open file for reading 98 if self.stabilize is not None: 99 # set a gridded mask based on the roi points --> 100 self.set_mask_from_exterior(self.stabilize) 101 # set end and start frame 102 self.frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
File ~/anaconda3/envs/pyorc/lib/python3.11/site-packages/pyorc/api/video.py:477, in Video.set_mask_from_exterior(self, exterior) 459 def set_mask_from_exterior( 460 self, 461 exterior 462 ): 463 """ 464 Prepare a mask grid with 255 outside of the stabilization polygon and 0 inside 465 (...) 475 476 """ --> 477 mask_coords = np.array([exterior], dtype=np.int32) 478 mask = np.zeros((self.height, self.width), np.uint8) 479 mask = cv2.fillPoly(mask, [mask_coords], 255)
ValueError: invalid literal for int() with base 10: 'fixed'