Skip to main content

Small cv2/Pillow image-processing utilities (load/save, resize/rotate/crop, blur/sharpen/edge, drawing) — standalone module from the SciTeX ecosystem

Project description

scitex-cv

Small cv2/Pillow image-processing utilities, extracted from the SciTeX ecosystem as a standalone package.

Install

pip install scitex-cv

API

import scitex_cv as cv

# I/O
img = cv.load("input.png")
cv.save(img, "out.png")
gray = cv.to_gray(img); rgb = cv.to_rgb(img); bgr = cv.to_bgr(img)

# Transform
cv.resize(img, scale=0.5)
cv.rotate(img, 90); cv.flip(img, axis="horizontal")
cv.crop(img, x=10, y=10, w=100, h=100)
cv.pad(img, top=10, bottom=10, left=10, right=10)

# Filters
cv.blur(img, ksize=5); cv.sharpen(img)
cv.edge_detect(img, method="canny")
cv.threshold(img, value=128); cv.denoise(img)

# Drawing
cv.rectangle(img, (5,5), (30,30), color=(0,255,0))
cv.circle(img, (50,50), radius=10)
cv.line(img, (0,0), (100,100))
cv.arrow(img, (0,0), (50,50))
cv.text(img, "label", (10,30))
cv.polylines(img, points=[(0,0),(100,0),(100,100)])

Status

Standalone fork of scitex.cv. Only deps are numpy + opencv-python + Pillow. The umbrella package's scitex.cv import path is preserved via a sys.modules-alias bridge.

License

AGPL-3.0-only (see LICENSE).

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

scitex_cv-0.1.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_cv-0.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file scitex_cv-0.1.0.tar.gz.

File metadata

  • Download URL: scitex_cv-0.1.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scitex_cv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd40f083099f02b4def6d05d8b4cf4230118aa8a7fde11c2be59434c164829d6
MD5 c71e4a9948071c1b3f50fafceeec4ba7
BLAKE2b-256 5564421b00284a8d2e273638763965cdbf9373f5c1a5b6feec2ab56376b131c9

See more details on using hashes here.

File details

Details for the file scitex_cv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scitex_cv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scitex_cv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88994ea9c27a9d2e4a6eeba6d51d65f2d9fadc5f8a6844983e3874bbb752edf3
MD5 318e2d87b2af12e593a328d578147fe9
BLAKE2b-256 81e36e341ee9758220ae51ed97cbb301fe96ca81e03a9f47ee4f770234c5b392

See more details on using hashes here.

Supported by

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