Source code for second assignment in Image processing course at Polytech Paris-Saclay engineering school.
It implements Hough Transform technique applied to circles.
This file contains instructions for using it.
- Python 3
img-prc-assignment2
├──images # Folder containing the required images
├──main.py # Exercise 2
└──main_optimized.py # Exercise 3
- Clone the project first
git clone https://github.com/furtivesock/img-prc-assignment2.git
- As images are not included in the repository, you need to download the following files and put them in the project root :
You can see the organization needed above.
You can also add the images using curl :
cd img-prc-assignment2
mkdir images
cd images
curl http://hebergement.u-psud.fr/emi/TIPolytech/TP2/images/coins.png --output coins.png
curl http://hebergement.u-psud.fr/emi/TIPolytech/TP2/images/coins2.jpg --output coins2.jpg
curl http://hebergement.u-psud.fr/emi/TIPolytech/TP2/images/four.png --output four.png
curl http://hebergement.u-psud.fr/emi/TIPolytech/TP2/images/fourn.png --output fourn.png
curl http://hebergement.u-psud.fr/emi/TIPolytech/TP2/images/MoonCoin.png --output MoonCoin.png
- Move to the root directory
cd img-prc-assignment2/
- Run the script :
python3 main.py
- If you are on a Unix-like operating system, you can also make it executable :
chmod +x main.py
./main.py
After a few seconds of processing, the final image should appear.
- Set the optional parameters if you want :
python3 main.py [-h] [--images IMAGES [IMAGES ...]] [-s --save]
Or
./main.py [-h] [--images IMAGES [IMAGES ...]] [-s --save]
-s
or--save
: Save the results in an/output
folder--images
: A list of images to process. If not specified, the script will use the images contained in theimages
folder, except for the bigcoins2.jpg
.
- Move to the
src/
directory
cd img-prc-assignment2/
- Run the script :
python3 main_optimized.py
Or
chmod +x main_optimized.py
./main_optimized.py