Skip to content

tirth-patel06/DoodleVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧭 ArUco Marker Path Detection with OpenCV

This project uses OpenCV's ArUco module to detect markers in an image, calculate their positions, and determine the directional path between them. It simulates path planning based on the spatial relationship of detected ArUco markers.


πŸ“· Sample Input Images

Path A Path A1

Image 1: Zig-Zag Path with Turns

Start β†’ Finish: This image demonstrates a more complex path with left and right turns.


Image 2: Linear Path with Rightward Bias

Start β†’ Finish: This image illustrates a more straightforward path layout, with mainly rightward movement.


πŸ’‘ How It Works

The code performs the following steps:

  1. Read Image: Load an image using OpenCV from the provided path.

  2. Detect ArUco Markers: Using cv2.aruco.detectMarkers() with the DICT_ARUCO_ORIGINAL dictionary.

  3. Calculate Center: Compute the average of the 4 corners of each marker to find its center.

  4. Build Path in XY Plane: Determine movement (+x, -x, +y, -y) between consecutive marker centers.

  5. Convert to Directional Instructions: Based on movement between points:

    • F = Forward
    • L = Left
    • R = Right
    • E = End

πŸ“ Project Structure

.
β”œβ”€β”€ A.png                # First sample path image
β”œβ”€β”€ A1.png               # Second sample path image
β”œβ”€β”€ path_detector.py     # Main Python script
└── README.md            # Project documentation

βš™οΈ Requirements

  • Python 3.x
  • OpenCV with ArUco support

Install dependencies:

pip install opencv-python opencv-contrib-python

🧠 Notes

  • Ensure markers are placed in the correct order for meaningful path detection.
  • You can experiment with different ArUco dictionaries if needed (e.g., DICT_4X4_50).

πŸ™Œ Acknowledgements

  • OpenCV β€” For computer vision capabilities
  • ArUco β€” For marker detection algorithms

πŸ“œ License

MIT License β€” free to use, modify, and distribute.

About

Marker-Based Path Extraction System for Autonomous Drawing Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages