Skip to main content

Netra: Mata Digital untuk Pemrosesan Citra Nusantara

Project description

Netra: Digital Eye for Image Processing

Bahasa Indonesia

PyPI version License: MIT

Netra (Sanskrit/Javanese: "Eye") is a modern Python library designed to simplify image processing and computer vision. Inspired by the philosophy of Saka-NLP, Netra serves as a clean, modular, and high-performance visual infrastructure pillar.


✨ Key Features

  • Clean API (Façade Pattern): Access all advanced features through a single Netra class.
  • Intelligent Auto-Correction: Automatically straightens skewed images with auto_rotate.
  • One-Line Preprocessing: Clean images for OCR or Deep Learning in a single line.
  • Smart Resizing: Resize images without breaking the aspect ratio.
  • Data Augmentation: Includes noise injection and lighting simulation for AI datasets.
  • Computer Vision Plugins: Built-in support for face detection, shape detection, and color isolation.
  • Lightweight Algorithms: Includes Pencil Sketch, Cartoon, Sepia, and Contrast Enhancement.

🚀 Installation Guide

Ensure you have Python 3.8 or newer.

pip install netra-cv

For installation from source (development version):

git clone https://github.com/Muhammad-Ikhwan-Fathulloh/Netra-CV.git
cd Netra-CV
pip install -e .

📖 Usage Examples

Netra is designed to keep your code clean and readable.

1. Basics & Preprocessing

from netra import Netra

# Load image
img = Netra.load("photo.jpg")

# Clean image (Grayscale -> Blur -> Otsu Threshold)
cleaned = Netra.clean_image(img)

# Automatically straighten image skew
straightened = Netra.auto_rotate(img)

2. Geometric Manipulation

# Smart resize (preserving aspect ratio)
resized = Netra.smart_resize(img, width=800)

# Center crop for AI model input (TensorFlow/PyTorch)
cropped = Netra.center_crop(img, size=(224, 224))

# Flip/Mirror (horizontal, vertical, both)
mirrored = Netra.flip(img, mode="horizontal")

3. Effects & Enhancement (Lightweight Algorithms)

# Intelligent contrast enhancement (CLAHE)
enhanced = Netra.enhance_contrast(img)

# Vintage Sepia Filter
sepia = Netra.to_sepia(img)

# Pencil Sketch Effect
sketch = Netra.to_sketch(img)

# Cartoon Effect
cartoon = Netra.to_cartoon(img)

4. Color & Shape Vision

# Isolate specific colors (green, blue, red, yellow)
only_green = Netra.isolate_color(img, "green")

# Detect shapes (Triangle, Square, Circle)
shapes = Netra.find_shapes(img)

# Add Text Watermark
marked = Netra.watermark(img, "NETRA-CV", position=(50, 50))

🛠️ Command Line Interface (CLI)

Netra can also be used directly from the Command Line:

# View help
netra --help

# Get image info
netra --info sample.jpg

# Sketch conversion
netra --sketch photo.jpg --output result_sketch.jpg

# Quick resize
netra --resize sample.jpg --width 1024 --output resized.jpg

❤️ Credits & Contributors


"Netra provides eyes to your code."

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

netra_cv-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

netra_cv-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for netra_cv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a9362f687e81047d4f572a89eb47aefac58ce718f186d38a080d5b5ded951278
MD5 5271b8f7c89ff38796aebcf8eb2a93ac
BLAKE2b-256 4766775469faf05807d1f07db6b6aa91c0aab4e16ef0bbfa53ab16a966a2af08

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for netra_cv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f55d7e9cb86013a0a67e29386df9301b69f348b346bc656c912a241d560163a1
MD5 f8516e92234daefeeb496ff33b6b8a03
BLAKE2b-256 cedc43f485cfe909c98f0a8a865e89923eb4b3132aa864927e24098c063d0d94

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