digital_image_processing.dithering.burkes

Implementation Burke’s algorithm (dithering)

Attributes

burkes_instances

Classes

Burkes

Burke's algorithm is using for converting grayscale image to black and white version

Module Contents

class digital_image_processing.dithering.burkes.Burkes(input_img, threshold: int)

Burke’s algorithm is using for converting grayscale image to black and white version Source: Source: https://en.wikipedia.org/wiki/Dither

Note:
  • Best results are given with threshold= ~1/2 * max greyscale value.

  • This implementation get RGB image and converts it to greyscale in runtime.

classmethod get_greyscale(blue: int, green: int, red: int) float
>>> Burkes.get_greyscale(3, 4, 5)
4.185
>>> Burkes.get_greyscale(0, 0, 0)
0.0
>>> Burkes.get_greyscale(255, 255, 255)
255.0
process() None
error_table
input_img
max_threshold = 0
min_threshold = 0
output_img
threshold
digital_image_processing.dithering.burkes.burkes_instances