https://github.com/utkarsh-deshmukh/image-dithering-python
multiple python implementations for image dithering
https://github.com/utkarsh-deshmukh/image-dithering-python
Last synced: 3 months ago
JSON representation
multiple python implementations for image dithering
- Host: GitHub
- URL: https://github.com/utkarsh-deshmukh/image-dithering-python
- Owner: Utkarsh-Deshmukh
- License: bsd-2-clause
- Created: 2021-01-06T21:54:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T02:20:04.000Z (about 1 year ago)
- Last Synced: 2025-04-11T05:48:36.591Z (3 months ago)
- Language: Python
- Size: 104 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-dithering-python
multiple python implementations for image ditheringimage dithering - wikipedia definition:
Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data.# implementation:
## method 1:
```pip install PyDither```
```
import cv2
import Ditherimg = cv2.imread('images/img1.jpg', 0) # read image
out = Dither.dither(img, 'simple2D', resize=True) # perform image dithering
cv2.imshow('dithered image', out)
cv2.waitKey(0)
```
## method 2:
Run the file main.py# Results:
# Theory:
this repository implements 3 different types of error diffusion based image dithering algorithms.
# License:
This project is licensed under the BSD 2 License - see the LICENSE.md file for details