# π¨ Color Correction Toolkit
> **Note:** The "asdfghjkl" is just a placeholder due to some naming difficulties.
This package is designed to perform color correction on images using the Color Checker Classic 24 Patch card. It provides a robust solution for ensuring accurate color representation in your images.
## π οΈ How It Works
1. **Input Requirements**:
- An image containing the Color Checker Classic 24 Patch card (referred to as the color checker).
- A reference image of the color checker.
2. **Process**:
- The package computes a color correction matrix based on the input image and reference image.
- This matrix can then be used to correct the colors of the input image or other images with the same color profile.
**Workflow**:
```
Input Image + Reference Image -> Color Correction Matrix -> Corrected Image
```
3. **Advanced Usage**:
- For multiple images, itβs recommended to preprocess the images using white balance before calculating the color correction matrix. This ensures that all images are in the same color profile, leading to a more accurate correction matrix.
**Enhanced Workflow**:
```
Input Images -> White Balance -> Compute (Input Image with Color Checker, Reference Image) -> Color Correction Matrix -> Corrected Images
```
## π Benefits
- **Consistency**: Ensure uniform color correction across multiple images.
- **Accuracy**: Leverage the color correction matrix for precise color adjustments.
- **Flexibility**: Adaptable for various image sets with different color profiles.
## Installation
```bash
pip install color-correction-asdfghjkl
```
## Usage
```python
import cv2
from color_correction_asdfghjkl import ColorCorrection
cc = ColorCorrection(
detection_model="yolov8",
correction_model="least_squares",
use_gpu=False,
)
input_image = cv2.imread("cc-19.png")
cc.fit(input_image=input_image)
corrected_image = cc.correct_image(input_image=input_image)
cv2.imwrite("corrected_image.png", corrected_image)
```
<!-- write reference -->
## π References
- [Color Checker Classic 24 Patch Card](https://www.xrite.com/categories/calibration-profiling/colorchecker-classic)
- [Color Correction Tool ML](https://github.com/collinswakholi/ML_ColorCorrection_tool/tree/Pip_package)
- [Colour Science Python](https://www.colour-science.org/colour-checker-detection/)
- [Fast and Robust Multiple ColorChecker Detection ()](https://github.com/pedrodiamel/colorchecker-detection)
- [Automatic color correction with OpenCV and Python (PyImageSearch)](https://pyimagesearch.com/2021/02/15/automatic-color-correction-with-opencv-and-python/)
- [ONNX-YOLOv8-Object-Detection](https://github.com/ibaiGorordo/ONNX-YOLOv8-Object-Detection)
- [yolov8-triton](https://github.com/omarabid59/yolov8-triton/tree/main)
Raw data
{
"_id": null,
"home_page": null,
"name": "color-correction-asdfghjkl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "color consistency, color correction, color-consistency, color-correction",
"author": null,
"author_email": "magfianf <muhammadagfian96@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/53/a6/011f3c7e54497d3b16ea3f39dea845c17a79b4b55023eddb9f18191b7868/color_correction_asdfghjkl-0.0.1a2.tar.gz",
"platform": null,
"description": "\n# \ud83c\udfa8 Color Correction Toolkit\n\n> **Note:** The \"asdfghjkl\" is just a placeholder due to some naming difficulties.\n\nThis package is designed to perform color correction on images using the Color Checker Classic 24 Patch card. It provides a robust solution for ensuring accurate color representation in your images.\n\n## \ud83d\udee0\ufe0f How It Works\n\n1. **Input Requirements**:\n - An image containing the Color Checker Classic 24 Patch card (referred to as the color checker).\n - A reference image of the color checker.\n\n2. **Process**:\n - The package computes a color correction matrix based on the input image and reference image.\n - This matrix can then be used to correct the colors of the input image or other images with the same color profile.\n\n **Workflow**:\n ```\n Input Image + Reference Image -> Color Correction Matrix -> Corrected Image\n ```\n\n3. **Advanced Usage**:\n - For multiple images, it\u2019s recommended to preprocess the images using white balance before calculating the color correction matrix. This ensures that all images are in the same color profile, leading to a more accurate correction matrix.\n\n **Enhanced Workflow**:\n ```\n Input Images -> White Balance -> Compute (Input Image with Color Checker, Reference Image) -> Color Correction Matrix -> Corrected Images\n ```\n\n## \ud83d\udcc8 Benefits\n- **Consistency**: Ensure uniform color correction across multiple images.\n- **Accuracy**: Leverage the color correction matrix for precise color adjustments.\n- **Flexibility**: Adaptable for various image sets with different color profiles.\n\n## Installation\n\n```bash\npip install color-correction-asdfghjkl\n```\n## Usage\n\n```python\nimport cv2\n\nfrom color_correction_asdfghjkl import ColorCorrection\n\ncc = ColorCorrection(\n detection_model=\"yolov8\",\n correction_model=\"least_squares\",\n use_gpu=False,\n)\n\ninput_image = cv2.imread(\"cc-19.png\")\ncc.fit(input_image=input_image)\ncorrected_image = cc.correct_image(input_image=input_image)\ncv2.imwrite(\"corrected_image.png\", corrected_image)\n```\n\n\n<!-- write reference -->\n## \ud83d\udcda References\n- [Color Checker Classic 24 Patch Card](https://www.xrite.com/categories/calibration-profiling/colorchecker-classic)\n- [Color Correction Tool ML](https://github.com/collinswakholi/ML_ColorCorrection_tool/tree/Pip_package)\n- [Colour Science Python](https://www.colour-science.org/colour-checker-detection/)\n- [Fast and Robust Multiple ColorChecker Detection ()](https://github.com/pedrodiamel/colorchecker-detection)\n- [Automatic color correction with OpenCV and Python (PyImageSearch)](https://pyimagesearch.com/2021/02/15/automatic-color-correction-with-opencv-and-python/)\n- [ONNX-YOLOv8-Object-Detection](https://github.com/ibaiGorordo/ONNX-YOLOv8-Object-Detection)\n- [yolov8-triton](https://github.com/omarabid59/yolov8-triton/tree/main)\n",
"bugtrack_url": null,
"license": null,
"summary": "help to do color correction on images based on color checker card classic 24 patch.",
"version": "0.0.1a2",
"project_urls": {
"Issues": "https://github.com/agfianf/color-correction-asdfghjkl/issues",
"Repository": "https://github.com/agfianf/color-correction-asdfghjkl"
},
"split_keywords": [
"color consistency",
" color correction",
" color-consistency",
" color-correction"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5c2cf4bc114169f61063078a6af6092224f50cc52713fa4346d064033183164b",
"md5": "2ab8734ed31d00141b47e6a426777bed",
"sha256": "303661e242c117f453f107375823467ff2111604277e004d7c6e2b9a45335c15"
},
"downloads": -1,
"filename": "color_correction_asdfghjkl-0.0.1a2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2ab8734ed31d00141b47e6a426777bed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 21158,
"upload_time": "2025-01-27T02:32:33",
"upload_time_iso_8601": "2025-01-27T02:32:33.548941Z",
"url": "https://files.pythonhosted.org/packages/5c/2c/f4bc114169f61063078a6af6092224f50cc52713fa4346d064033183164b/color_correction_asdfghjkl-0.0.1a2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "53a6011f3c7e54497d3b16ea3f39dea845c17a79b4b55023eddb9f18191b7868",
"md5": "0fb0fb1c70504d9a09fcfb4e25f6c1b9",
"sha256": "ec9e21b22d47af6bf48bda75e4f486d8068fdf30c71ce50e48520638f304d8ce"
},
"downloads": -1,
"filename": "color_correction_asdfghjkl-0.0.1a2.tar.gz",
"has_sig": false,
"md5_digest": "0fb0fb1c70504d9a09fcfb4e25f6c1b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 109275,
"upload_time": "2025-01-27T02:32:34",
"upload_time_iso_8601": "2025-01-27T02:32:34.951346Z",
"url": "https://files.pythonhosted.org/packages/53/a6/011f3c7e54497d3b16ea3f39dea845c17a79b4b55023eddb9f18191b7868/color_correction_asdfghjkl-0.0.1a2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-27 02:32:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "agfianf",
"github_project": "color-correction-asdfghjkl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "color-correction-asdfghjkl"
}