Tim M b22c929a64 Corrected additional `.md` files with new image 2 år sedan
..
cpp de068a52ca contour detection blog folder added 3 år sedan
input de068a52ca contour detection blog folder added 3 år sedan
python 2de1fbc5a8 Update requirements.txt 3 år sedan
README.md b22c929a64 Corrected additional `.md` files with new image 2 år sedan

README.md

Contour Detection using OpenCV

This repository contains code for Contour Detection using OpenCV blogpost.

download

Directory Structure

All the code files and folders follow the following structure.

├── CPP
│   ├── channel_experiments
│   │   ├── channel_experiments.cpp
│   │   └── CMakeLists.txt
│   ├── contour_approximations
│   │   ├── CMakeLists.txt
│   │   └── contour_approx.cpp
│   └── contour_extraction
│       ├── CMakeLists.txt
│       └── contour_extraction.cpp
├── input
│   ├── custom_colors.jpg
│   ├── image_1.jpg
│   └── image_2.jpg
├── python
│   ├── channel_experiments
│   │   └── channel_experiments.py
│   ├── contour_approximations
│   │   └── contour_approx.py
│   └── contour_extraction
│       └── contour_extraction.py
└── README.md

Instructions

Python

To run the code in Python, please go into the python folder and execute the Python scripts in each of the respective sub-folders.

C++

To run the code in C++, please go into the cpp folder, then go into each of the respective sub-folders and follow the steps below:

mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
./build/channel_experiments
mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
./build/contour_approximations
mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
./build/contour_extraction

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.

img