A collection of image processing algorithms in Python.
- Python 3+
- OpenCV
Simply clone/download this repository.
- Choose the algorithm you want to run.
- Modify the parameters
- Simply run and get the result (in Python array)
Let's say you want to run a template matching algorithm. Simply navigate to template_matching.py, create array for image and template:
image = [
[4, 4, 4],
[1, 2, 1]
]
template = [
[1, 2, 1]
]
Then choose which type of matching you want:
print('non_normalized_correlation')
print(non_normalized_correlation(template, image))
print()
print('normalized_correlation')
print(normalized_correlation(template, image))
And get the results:
non_normalized_correlation
[[ 4 12 16 12 4]
[ 1 4 6 4 1]]
normalized_correlation
[[1. 2.12132034 2.30940108 2.12132034 1. ]
[1. 1.78885438 2.44948974 1.78885438 1. ]]
There are a lot of algorithms and more are still being added. Experiment with them however you like.