Skip to main content

Weaving algorithm.

Project description

PyAnchorKnit

Inspired by the work of Petros Vrellis. Based on Weaver.

Installation

Usage of pipx is encouraged.

pipx install pyanchorknit

Example usage

pyanchorknit imgs/Johannes-Vermeer-Girl-With-a-Pearl-Earring.jpg --n-jobs 16 --n-edges 512 --maxlines 2000 --img-out imgs/

Output image

Girl with a Pearl Earring

Output JSON

{
  "points": {
    "0": [
      799,
      400
    ],
    "1": [
      682,
      682
    ],
    ...,
    "7": [
      682,
      117
    ]
  },
  "traces_json": [
    [
      [
        0,
        4
      ],
      145236
    ],
    [
      [
        4,
        1
      ],
      113064
    ],
    ...,
    [
      [
        2,
        6
      ],
      130755
    ]
  ]
}

Which indicates the position of anchor points and traces (along with their distance).

Dev install

Poetry

Install poetry

pipx install poetry

Install the project

poetry install

Install pre-commit hooks

poetry run pre-commit install
poetry run pre-commit install -t pre-push

Publish

poetry publish --build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyanchorknit-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

pyanchorknit-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pyanchorknit-0.1.1.tar.gz.

File metadata

  • Download URL: pyanchorknit-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.6 Linux/5.13.13-200.fc34.x86_64

File hashes

Hashes for pyanchorknit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 811660afbc418add9288b2bd9064b8bdf0024010899bc16b9caab882fd5c2a93
MD5 1b8fe368205f2af1a15230545ab350c5
BLAKE2b-256 e099333e17cef9267d46c564327626439c260c0cd53bc6ecdae7cbc7cb4ccbcd

See more details on using hashes here.

File details

Details for the file pyanchorknit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyanchorknit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.6 Linux/5.13.13-200.fc34.x86_64

File hashes

Hashes for pyanchorknit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dcea8756ac1b61445f2f5fcc1cde0e08d158a5691a8d2fde30702cd2aecab7b1
MD5 b612895b085e48023d2d8e265fc50597
BLAKE2b-256 3a2dd9fba300a50d99b2233295fb3b70c44fd105ebf1a7549621db45a3828cd0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page