Skip to content

Commit

Permalink
Merge pull request luxonis#1113 from luxonis/update_submodules
Browse files Browse the repository at this point in the history
Update submodules
  • Loading branch information
themarpe authored Sep 8, 2023
2 parents 4c82993 + 745ecef commit dde0ba5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def parse_args():
help="Save calibration file to this path")
parser.add_argument('-dst', '--datasetPath', type=str, default="dataset",
help="Path to dataset used for processing images")
parser.add_argument('-mdmp', '--minDetectedMarkersPercent', type=float, default=0.7,
parser.add_argument('-mdmp', '--minDetectedMarkersPercent', type=float, default=0.4,
help="Minimum percentage of detected markers to consider a frame valid")
parser.add_argument('-mt', '--mouseTrigger', default=False, action="store_true",
help="Enable mouse trigger for image capture")
Expand All @@ -165,7 +165,6 @@ def parse_args():
parser.add_argument('-ebp', '--enablePolygonsDisplay', default=True, action="store_true",
help="Enable the display of polynoms.")
options = parser.parse_args()

# Set some extra defaults, `-brd` would override them
if options.defaultBoard is not None:
try:
Expand All @@ -182,8 +181,6 @@ def parse_args():
raise argparse.ArgumentTypeError(options.defaultBoard, "Board name has not been found.")
if options.markerSizeCm is None:
options.markerSizeCm = options.squareSizeCm * 0.75
else:
raise argparse.ArgumentError(options.markerSizeCm, "-ms / --markerSizeCm needs to be provided (you can use -db / --defaultBoard if using calibration board from this repository or calib.io to calculate -ms automatically)")
if options.squareSizeCm < 2.2:
raise argparse.ArgumentTypeError("-s / --squareSizeCm needs to be greater than 2.2 cm")
if options.traceLevel == 1:
Expand Down Expand Up @@ -580,8 +577,7 @@ def parse_frame(self, frame, stream_name):
if not self.is_markers_found(frame):
return False

filename = calibUtils.image_filename(
stream_name, self.current_polygon, self.images_captured)
filename = calibUtils.image_filename(self.current_polygon, self.images_captured)
path = Path(self.args.datasetPath) / stream_name / filename
path.parent.mkdir(parents=True, exist_ok=True)
cv2.imwrite(str(path), frame)
Expand Down
2 changes: 1 addition & 1 deletion depthai_calibration
2 changes: 1 addition & 1 deletion resources/depthai_boards

0 comments on commit dde0ba5

Please sign in to comment.