CLI tool to convert images to the LaTeX bezier curves formulas
Project description
Img2Desmos
This is a simple python script that converts an image to the bezier curves which can be plotted on desmos.
Requirements
- Python 3.11
- Poetry
- [Optional] Chafa (for previewing images in terminal)
Installation
pip install img2desmos
Usage
> img2desmos --help
Usage: img2desmos [OPTIONS] IMG
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────╮
│ * img TEXT Path to the image to convert into graph [default: None] [required] │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --output -o TEXT Output formulas file path [default: None] │
│ --preview -p Preview the img in a window (chafa is required) │
│ --upper INTEGER Upper threshold for the edge detection [default: 200] │
│ --lower INTEGER Lower threshold for the edge detection [default: 100] │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
Formulas will be pasted into clipboard
Demo
https://github.com/Perchinka/img2desmos/assets/34923601/b34c509b-6fae-4e57-8f8f-7d76a0139e42
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
img2desmos-1.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for img2desmos-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd6d538f74cf884236c563e4fb618ff17fffe8cf0499df0c2b9f4d942eb0257 |
|
MD5 | 9865422ee5d22d8f6082ad971d93556b |
|
BLAKE2b-256 | ea4bb5fe569d9c98ee71e59160f21aec3f5ccd9c5caa0f50e30fc40636601ee6 |