Skip to main content

scitex-cv

SciTeX

Small cv2-based image utilities — I/O, transform, filters, drawing.

Full Documentation · uv pip install scitex-cv[all]

PyPI Python Tests Coverage Docs License: AGPL v3


Installation

pip install scitex-cv

Architecture

scitex_cv/
├── __init__.py        ← public API (load, save, resize, blur, edge_detect, ...)
├── _io.py             ← image I/O wrappers (PIL / OpenCV backends)
├── _transform.py      ← geometric transforms (resize, crop, rotate)
├── _filters.py        ← blur, sharpen, edge-detect filters
├── _draw.py           ← annotation helpers (draw boxes, text, masks)
└── _ocr.py            ← image → text (EasyOCR; optional `ocr` extra)

Thin, opinionated wrapper around PIL + OpenCV — every public name in __init__.py re-exports from one of the five leaf modules above.

Quick Start

import scitex_cv as cv

img = cv.load("input.png")
img = cv.resize(img, scale=0.5)
img = cv.blur(img, ksize=5)
edges = cv.edge_detect(img, method="canny")
cv.save(edges, "edges.png")

1 Interfaces

Python 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, angle=90)
cv.flip(img, direction="horizontal")
cv.crop(img, x=10, y=10, width=100, height=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, thresh=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=np.array([[0, 0], [100, 0], [100, 100]]))

# OCR (image → text; requires the optional `ocr` extra: pip install 'scitex-cv[ocr]')
cv.ocr("scan.png")                       # → recognized text (str)
cv.ocr(img, languages=("en",))           # in-memory array, English only
cv.ocr(img, detail=True)                 # → [(bbox, text, confidence), ...]

Demo

flowchart LR
    F["input.png"] --> L["cv.load()"]
    L --> R["cv.resize(scale=0.5)"]
    R --> B["cv.blur(ksize=5)"]
    B --> E["cv.edge_detect(method='canny')"]
    E --> S["cv.save('edges.png')"]
    S --> O["edges.png"]

Status

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

Part of SciTeX

scitex-cv is part of SciTeX. Install via the umbrella with pip install scitex[cv] to use as scitex.cv (Python) or scitex cv ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

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.3.0.tar.gz (40.0 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.3.0-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_cv-0.3.0.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for scitex_cv-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3edcc302c723d3b7cb390fa49b96d3bc0f52dff222485ec005e5658b8256376b
MD5 4c1d8b12c01d03154182bfd762bcb8a9
BLAKE2b-256 e73e2c2a5598a73a14bd6ec6af9b9439c0c643896a228fe3d8cbcec0d5132c64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scitex_cv-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for scitex_cv-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a1fd582a961b93dbdfc53e44397c6b2fdd5587b46e23144de7deb0aaa6068a
MD5 8b06b7605f86c8297e15152b284ebca3
BLAKE2b-256 ba905788266cd4250f957962d2d1d2bc46735d96b8ab0d4ec28248eedcc7dca8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.5

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page