Nya
Find a file
2024-08-11 21:08:05 +02:00
blog Add code and explaination to blog post 2024-08-11 21:08:05 +02:00
.gitignore Initial Commit 2024-08-11 16:55:15 +02:00
0.png Initial Commit 2024-08-11 16:55:15 +02:00
1.png Initial Commit 2024-08-11 16:55:15 +02:00
2.png Initial Commit 2024-08-11 16:55:15 +02:00
3.png Initial Commit 2024-08-11 16:55:15 +02:00
4.png Initial Commit 2024-08-11 16:55:15 +02:00
5.png Initial Commit 2024-08-11 16:55:15 +02:00
6.png Initial Commit 2024-08-11 16:55:15 +02:00
7.png Initial Commit 2024-08-11 16:55:15 +02:00
8.png Initial Commit 2024-08-11 16:55:15 +02:00
9.png Initial Commit 2024-08-11 16:55:15 +02:00
License.txt Initial Commit 2024-08-11 16:55:15 +02:00
match.py Initial Commit 2024-08-11 16:55:15 +02:00
Readme.md Add code and explaination to blog post 2024-08-11 21:08:05 +02:00

Purpose

  • It was fun to mess around with :3
  • Making this public so cqql can also mess around with it

Dependencies

  • opencv-python
    • all of the image stuff
  • matplotlib
    • color lookup table
  • (numpy)
    • used internally by opencv, but part of stdlib

Running

  • python -m venv localvenv
  • ./localvenv/bin/pip install opencv-python
  • ./localvenv/bin/pip install matplotlib
  • ./localvenv/bin/python match.py

Modifications

  • If you have more/less images, change MAX global
  • If you want to test rotational stuff, uncomment the line in main
  • It is assumed that the shape is a darker shape on a ligher background
    • The image gets converted into grayscale and assumes
    • the shape has an intensity below 200
    • the background has an intensity above 200
  • Depending on how dissimilar the shapes are, NormUpperBound should be increased

Attributions

Build Blog

  • pandoc --standalone blog.md -o shape_matching.html --metadata title="Shape Matching"