move debug inside try

This commit is contained in:
Josh Hawkins 2023-09-28 12:53:18 -05:00
parent b6af41ea31
commit 4a36c82c85

View File

@ -108,6 +108,9 @@ class PtzMotionEstimator:
self.coord_transformations = self.norfair_motion_estimator.update( self.coord_transformations = self.norfair_motion_estimator.update(
frame, mask frame, mask
) )
logger.debug(
f"Motion estimator transformation: {self.coord_transformations.rel_to_abs([[0,0]])}"
)
except: except:
# sometimes opencv can't find enough features in the image to find homography, so catch this error # sometimes opencv can't find enough features in the image to find homography, so catch this error
logger.error( logger.error(
@ -117,10 +120,6 @@ class PtzMotionEstimator:
self.frame_manager.close(frame_id) self.frame_manager.close(frame_id)
logger.debug(
f"Motion estimator transformation: {self.coord_transformations.rel_to_abs([[0,0]])}"
)
return self.coord_transformations return self.coord_transformations