Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update submodules #1113

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading