Skip to main content

mmcq_numba

Faster MMCQ algorithm ( analyze dominant colors in image) with numba in python

results

Installation

pip install mmcq-numba

Usage

from mmcq_numba.quantize import mmcq

color_count = 8 # the number of dominant colors
quantize = 5 


path = <path to image>
rgb = cv2.cvtColor(cv2.imread(path),cv2.COLOR_BGR2RGB)
width,height,c = rgb.shape
rgb_resize = cv2.resize(rgb, (width//quantize, height//quantize))
width,height,c = rgb_resize.shape
colors = rgb_resize.reshape(width*height, c).astype(np.int64)
    
# input type must be 2d arrays((size, channels)), and dtype=np.int64
c_map = mmcq(colors, color_count)

Reference

This project is based on mmcq.py

Metadata

Release files for mmcq-numba 0.1.1

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

Source distribution (sdist)

Source distribution for mmcq-numba 0.1.1
File Size Uploaded Provenance Actions
mmcq_numba-0.1.1.tar.gz 9.8 kB Without provenance Details for mmcq_numba-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mmcq-numba 0.1.1
File Interpreter ABI Platform Actions
mmcq_numba-0.1.1-py3-none-any.whl Python 3 none any Details for mmcq_numba-0.1.1-py3-none-any.whl

Total release size: 20.6 kB

Release files / mmcq_numba-0.1.1.tar.gz

Download URL mmcq_numba-0.1.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c9ec85374bb82e1b1caf394bf2ba17b7a80b4741fdd8d448f31c5077f60e5745
BLAKE2b-256 checksum
How to use checksums
26dc0137ead51e4efbd69c7ee553e81b260a76036e0fca9076b1c0bde7c2a4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / mmcq_numba-0.1.1-py3-none-any.whl

Download URL mmcq_numba-0.1.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87a1b35cf9a0b5349f39d804f775bc21675c52e634195763779743b54cf28719
BLAKE2b-256 checksum
How to use checksums
5d106ee6cfcaa840a06f229af587d9a972b6a1e65ad86519ff81954d4be788e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for mmcq-numba 0.1.1

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