Build
- Install or build OpenCV4 with OpenCV4 Contribution (build directions are in the latter)
- Before building, make sure (using a package manager or some other method) that
libgtk2.0-devis installed on Debian/Ubuntu orgtk2-develon Fedora.pkg-configmust also be installed.
- Before building, make sure (using a package manager or some other method) that
- Build this repo:
git clone https://github.com/Brown-LEMS/edge-detect-opencv.git
cd edge-detect-opencv
cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/opencv/build"
cmake --build build -j$(nproc)- Download the Structured Forest Edge model from here
- This executable runs a demo either outputting edges to a file or displaying them on a window. Usage (argument order must match):
# to output edges to a file:
./build/edt -m <model_name> -i <input_img> -o <output_name>
# show on window
./build/edt -m <model_name> -i <input_img> -s