Inspired by the work of Petros Vrellis. Based on Weaver.
pyanchorknit
uses pycairo
, which requires pkg-config
and cairo
. Check here for installation commands for your platform.
Usage of pipx is encouraged.
pipx install pyanchorknit
pyanchorknit imgs/Johannes-Vermeer-Girl-With-a-Pearl-Earring.jpg --n-jobs 16 --n-edges 512 --maxlines 2000 --img-out imgs/
{
"points": {
"0": [
799,
400
],
"1": [
682,
682
],
...,
"7": [
682,
117
]
},
"traces": [
[
[
0,
4
],
145236
],
[
[
4,
1
],
113064
],
...,
[
[
2,
6
],
130755
]
]
}
Which indicates the position of anchor points and traces (along with their distance).
pipx install poetry
poetry install
Install pre-commit hooks
poetry run pre-commit install
poetry run pre-commit install -t pre-push
poetry publish --build