Code for finding distance between a point and its closest edge.
- Read image and convert into greyscale
- Perform edge detection on the greyscale image. OpenCV canny edge detector used here. Perform erosion and dilation to fill up gaps.
- Perform line detection using Hough Transform.
- Find min distance of the given point from all lines and select the min distance line.
- pip install -r requirements.txt
- Run complete jupyter notebook
- To generate result images run
python3 closest_edge.py