Skip to main content

CharSplit

CharSplit is a lightweight, dependency-free Python library that segments a binary image into individual character images.

The input image is provided as a 2D matrix (list[list[float]]), and the output is a list of extracted character images, where each character is represented as a list[list[list[float]]].

PyPI version License

Features

  • 🚀 Zero third-party dependencies
  • ✂️ Segments a binary image into individual characters
  • 📄 Accepts a 2D image matrix (list[list[float]])
  • 📦 Returns a list of character matrices (list[list[list[float]]])
  • ↔️ Preserves left-to-right character order
  • 🐍 Pure Python implementation

Installation

pip install charsplit

Quick Start

from charsplit.main import splitCharsFromImage

image = [
    [0, 0, 1, 1, 0],
    [0, 1, 1, 0, 0],
    ...
]

characters = splitCharsFromImage(image)

print(len(characters))

API

splitCharsFromImage(image)

Splits a binary image into individual character matrices.

Parameters

Name Type Description
image list[list[float]] Input image represented as a 2D matrix

Returns

list[list[list[float]]]

A list of character images in left-to-right order.

Applications

  • OCR preprocessing
  • Handwritten character segmentation
  • Character dataset generation
  • Machine learning preprocessing
  • Computer vision pipelines

Dependencies

None.

CharSplit is implemented entirely in pure Python and requires no external libraries.

License

MIT License

Author

Siddharth Karna

Metadata

Release files for charsplit 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for charsplit 0.1.2
File Size Uploaded Provenance Actions
charsplit-0.1.2.tar.gz 3.4 kB Without provenance Details for charsplit-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for charsplit 0.1.2
File Interpreter ABI Platform Actions
charsplit-0.1.2-py3-none-any.whl Python 3 none any Details for charsplit-0.1.2-py3-none-any.whl

Total release size: 7.6 kB

Release files / charsplit-0.1.2.tar.gz

Download URL charsplit-0.1.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
07a20dbb7cb057aa8651f2e720d19817c8f11b8aa04630ab70b7f6e630a604d3
BLAKE2b-256 checksum
How to use checksums
94988a370ee3179c508d1fe8dd81651c67a5d2d477c5afdf38c3774542ebf782
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / charsplit-0.1.2-py3-none-any.whl

Download URL charsplit-0.1.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
124e8445738382aa06057c8a68b664e02317a9aae2258c920752888df87654d7
BLAKE2b-256 checksum
How to use checksums
c1f70d5a038d24cc8f8055afd5ee262a9b203ceb5c43d0d963391f5d142dcd8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for charsplit 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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