Locate RGB colors faster than ever with this efficient color search module (C + multiprocessing)!
pip install chopchopcolorc
Tested against Python 3.11 / Windows 10
In Action - one CPU only:
https://www.youtube.com/watch?v=bhLRYlK0cts
This module provides functions for parallel color search in a collection of images.
It utilizes multiprocessing and a code written in C to efficiently process images concurrently.
Functions:
1. **_color_search_c(pic, colors):**
- Internal function for color search in a single image.
- Utilizes the 'locate_pixelcolor_c' module to search for specified colors.
- Returns an array of coordinates where the colors are found.
2. **color_search_c(pics, rgb_tuples, cpus=5, chunks=1, print_stderr=True, print_stdout=False, usecache=True):**
- Executes parallel color search on a list of images using multiprocessing.
- Utilizes '_color_search_c' for each image in parallel.
- Returns a dictionary with image indices mapped to their corresponding color search results.
Example Usage:
from chopchopcolorc import color_search_c
from list_all_files_recursively import get_folder_file_complete_path # optional
folder=r"C:\testfolderall"
colors2find = (
(69, 71, 66),
(255, 255, 255),
(153, 155, 144),
(55, 57, 52),
(136, 138, 127),
(56, 58, 53),
(54, 56, 51),
(0, 180, 252),
)
allpi = [
x.path
for x in get_folder_file_complete_path(folder)
if x.ext == ".png"
]
colorresults=color_search_c(pics=allpi, rgb_tuples=colors2find, cpus=6, chunks=1, print_stderr=True,
print_stdout=False, usecache=True,)
print(colorresults)
Metadata
Release files for chopchopcolorc 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chopchopcolorc-0.10.tar.gz | 56.0 kB | Without provenance | Details for chopchopcolorc-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chopchopcolorc-0.10-py3-none-any.whl | Python 3 | none | any | Details for chopchopcolorc-0.10-py3-none-any.whl |
Total release size: 113.3 kB
Release files / chopchopcolorc-0.10.tar.gz
| Download URL | chopchopcolorc-0.10.tar.gz |
|---|---|
| Size | 56.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77082944cf1e99a9d9f302d59c56e6f660980a88167d4621baa1d9217ac042d6
|
|
BLAKE2b-256 checksum How to use checksums |
a7c0bf562672089a6ff138707485ae7251579765f3574c4f5fc3385d2177828b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / chopchopcolorc-0.10-py3-none-any.whl
| Download URL | chopchopcolorc-0.10-py3-none-any.whl |
|---|---|
| Size | 57.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73eecf6efba9589da6e2adfcd71316f499589e528d926900e9e4564a99b4b744
|
|
BLAKE2b-256 checksum How to use checksums |
65fe4c112329e8f30f9fb828d886a935d7b7697369e334efd1f155d4287fafcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for chopchopcolorc 0.10
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.