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.1.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.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_cv-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9f27e1c81f13f44511ecabb3a70f6a3d2aa28aaac21b19e1980665b52b899617
MD5 6c5ec9e367c229eaa590168ab1b28fd6
BLAKE2b-256 ca3542dc8dd397a840b3ec1ed33259a506e341688aeedbf39f76c05c8811b8af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scitex_cv-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99915f30de65a8a1eeab3309c8248c97c6c7353206ee89ae2a28ee031cdea057
MD5 b96c9a5564400459043df59bea404861
BLAKE2b-256 3c51ef15c9aafc4d09363b501fffb9441addcdb32165fc198cdfc7c0f6556910

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