Skip to main content

Weaving algorithm.

Project description

PyAnchorKnit

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

Installation

Prerequisites

pyanchorknit uses pycairo, which requires pkg-config and cairo. Check here for installation commands for your platform.

Install pyanchorknit

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

drawing

Output JSON

{
  "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).

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.3.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

pyanchorknit-0.3.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyanchorknit-0.3.0.tar.gz
  • Upload date:
  • Size: 5.7 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.3.0.tar.gz
Algorithm Hash digest
SHA256 02f1eba1b9f92ac571e772a57797127c9f73fd26c59313c8d371cb5a5ca911b3
MD5 e5e0a218ff8d189fb01cd100f2ff4f43
BLAKE2b-256 a3d0bdf1eadd5b49addbf71aec645356dbd8b08e46829f5b4726e0982f8a9570

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyanchorknit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b498c086f8b9db5f14fc16a33324cbcc57a30703361296a98b4618bf4437c4cc
MD5 da80fd1011f2db78543ce62de40c7e3f
BLAKE2b-256 a58bdce8dd4808ce2cba2cb7c869bbee757597ab8d4ac86e9671eaa6f9f8d3c6

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