Skip to content

Commit

Permalink
pyzed patch for roi calibrator, disable display
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishaan-Datta committed Dec 7, 2024
1 parent 6460f90 commit d5570b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def inference_callback(self, msg):
labels = [f"{i}%" for i in msg.confidences.data]
final_image = display_annotated_image(raw_image, bounding_boxes, labels)

if self.use_display_node:
cv2.imshow("left window", final_image)
cv2.waitKey(1)
# if self.use_display_node:
# cv2.imshow("left window", final_image)
# cv2.waitKey(1)

if len(bounding_boxes) > 0:
self.boxes_present = 1
Expand Down
3 changes: 3 additions & 0 deletions tools/calibration/roi_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def initialize_image_source(source_type="static_image", image_path='C:/Users/ish
return files

elif source_type == "zed_single":
import pyzed.sl as sl
init = sl.InitParameters()
cam = sl.Camera()
init.camera_resolution = sl.RESOLUTION.HD1080
Expand All @@ -53,6 +54,7 @@ def initialize_image_source(source_type="static_image", image_path='C:/Users/ish
return cam

elif source_type == "zed_double":
import pyzed.sl
init = sl.InitParameters()
cam1 = sl.Camera()
cam2 = sl.Camera()
Expand Down Expand Up @@ -178,6 +180,7 @@ def onTrack6(val):

elif source_type == "zed_single":
image, velocity = retrieve_zed_image(cam, orientation)
velocity = 0
if orientation == "left":
shifted_roi_x = roi_x + abs(velocity) * shift_constant
else:
Expand Down

0 comments on commit d5570b5

Please sign in to comment.