Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (21 loc) · 933 Bytes

File metadata and controls

30 lines (21 loc) · 933 Bytes

2D Finite Difference For Object Edge Detection

Installation

Use the package manager pip to install the requirements.

pip install -r requirements.txt

Usage

The predictObjectEdge takes 2 arguments, first one is Image Object which can be created by using PIL.Image and the second one is boundary. Experiment with the boundary value to get the best result. From my experience it's about 5-25.

from image_detection import predictObjectEdge
from PIL import Image

if __name__ == '__main__':
    # load image
    img = Image.open('sample_sunflower.jpg')
    img_result = combineImage(img,predictObjectEdge(img, 15))
    img_result.save('./result/result_sunflower' + '.jpg')

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT