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.0.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for img2desmos-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46140fb0744cec1a057daef86ffe9f117440516bdaefc45d57cc33553b6a4dd6 |
|
MD5 | 5f2380cd12c779cfcd1527a9f8630620 |
|
BLAKE2b-256 | fc90ecb7f7bee01c79008647b7cd30569d4350364c36073d7eea5661bb32af42 |