added debug image steps for explainer (to be written)
|
After Width: | Height: | Size: 16 MiB |
|
After Width: | Height: | Size: 5.6 MiB |
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 18 MiB |
@@ -1,4 +1,3 @@
|
||||
# import the necessary packages
|
||||
import cv2
|
||||
|
||||
import utils
|
||||
@@ -9,6 +8,7 @@ import argparse
|
||||
# construct the argument parser and parse the arguments
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("-i", "--image", required=True, help="path to input image containing AprilTag")
|
||||
ap.add_argument("-d", "--debug", action="store_true", help="display debug information")
|
||||
args = vars(ap.parse_args())
|
||||
|
||||
# load the input image and convert it to grayscale
|
||||
@@ -17,7 +17,7 @@ print("[INFO] loading image...")
|
||||
image = cv2.imread(args["image"])
|
||||
utils.display_image("Image", image)
|
||||
|
||||
path = cv_maze.solve_maze(image)
|
||||
path = cv_maze.solve_maze(image, debug=args["debug"])
|
||||
|
||||
# draw the path on the original image
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ def display_image(label, image, default_width: int = 800, default_height: int =
|
||||
cv2.namedWindow(label, cv2.WINDOW_NORMAL)
|
||||
cv2.resizeWindow(label, default_width, default_height)
|
||||
cv2.imshow(label, image)
|
||||
cv2.imwrite(f"debug-steps/{len(WINDOW_LABELS):03}_{label}.png", image)
|
||||
|
||||
|
||||
def wait_frame():
|
||||
|
||||