Skip to content

Commit dde0ba5

Browse files
authored
Merge pull request #1113 from luxonis/update_submodules
Update submodules
2 parents 4c82993 + 745ecef commit dde0ba5

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

calibrate.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def parse_args():
150150
help="Save calibration file to this path")
151151
parser.add_argument('-dst', '--datasetPath', type=str, default="dataset",
152152
help="Path to dataset used for processing images")
153-
parser.add_argument('-mdmp', '--minDetectedMarkersPercent', type=float, default=0.7,
153+
parser.add_argument('-mdmp', '--minDetectedMarkersPercent', type=float, default=0.4,
154154
help="Minimum percentage of detected markers to consider a frame valid")
155155
parser.add_argument('-mt', '--mouseTrigger', default=False, action="store_true",
156156
help="Enable mouse trigger for image capture")
@@ -165,7 +165,6 @@ def parse_args():
165165
parser.add_argument('-ebp', '--enablePolygonsDisplay', default=True, action="store_true",
166166
help="Enable the display of polynoms.")
167167
options = parser.parse_args()
168-
169168
# Set some extra defaults, `-brd` would override them
170169
if options.defaultBoard is not None:
171170
try:
@@ -182,8 +181,6 @@ def parse_args():
182181
raise argparse.ArgumentTypeError(options.defaultBoard, "Board name has not been found.")
183182
if options.markerSizeCm is None:
184183
options.markerSizeCm = options.squareSizeCm * 0.75
185-
else:
186-
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)")
187184
if options.squareSizeCm < 2.2:
188185
raise argparse.ArgumentTypeError("-s / --squareSizeCm needs to be greater than 2.2 cm")
189186
if options.traceLevel == 1:
@@ -580,8 +577,7 @@ def parse_frame(self, frame, stream_name):
580577
if not self.is_markers_found(frame):
581578
return False
582579

583-
filename = calibUtils.image_filename(
584-
stream_name, self.current_polygon, self.images_captured)
580+
filename = calibUtils.image_filename(self.current_polygon, self.images_captured)
585581
path = Path(self.args.datasetPath) / stream_name / filename
586582
path.parent.mkdir(parents=True, exist_ok=True)
587583
cv2.imwrite(str(path), frame)

depthai_calibration

resources/depthai_boards

0 commit comments

Comments
 (0)