refactored
This commit is contained in:
@@ -43,7 +43,7 @@ class Detector(abc.ABC):
|
|||||||
Path.mkdir(Path(RESULTS_FOLDER), exist_ok=True)
|
Path.mkdir(Path(RESULTS_FOLDER), exist_ok=True)
|
||||||
try:
|
try:
|
||||||
self.params_load()
|
self.params_load()
|
||||||
except json.decoder.JSONDecodeError:
|
except Exception:
|
||||||
self.params_save()
|
self.params_save()
|
||||||
|
|
||||||
self.cap = None
|
self.cap = None
|
||||||
@@ -59,7 +59,6 @@ class Detector(abc.ABC):
|
|||||||
self.cap = cv.VideoCapture(self.src_images, cv.CAP_IMAGES)
|
self.cap = cv.VideoCapture(self.src_images, cv.CAP_IMAGES)
|
||||||
self.camera_name = self.name
|
self.camera_name = self.name
|
||||||
|
|
||||||
print(f"Camera: {self.camera_name}")
|
|
||||||
self.calibration = Calibration()
|
self.calibration = Calibration()
|
||||||
self.calibration.load(f"{RESULTS_FOLDER}/{self.camera_name}_cal.npz")
|
self.calibration.load(f"{RESULTS_FOLDER}/{self.camera_name}_cal.npz")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user