digital_image_processing.dithering.burkes ========================================= .. py:module:: digital_image_processing.dithering.burkes .. autoapi-nested-parse:: Implementation Burke's algorithm (dithering) Attributes ---------- .. autoapisummary:: digital_image_processing.dithering.burkes.burkes_instances Classes ------- .. autoapisummary:: digital_image_processing.dithering.burkes.Burkes Module Contents --------------- .. py:class:: 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. .. py:method:: get_greyscale(blue: int, green: int, red: int) -> float :classmethod: >>> Burkes.get_greyscale(3, 4, 5) 4.185 >>> Burkes.get_greyscale(0, 0, 0) 0.0 >>> Burkes.get_greyscale(255, 255, 255) 255.0 .. py:method:: process() -> None .. py:attribute:: error_table .. py:attribute:: input_img .. py:attribute:: max_threshold :value: 0 .. py:attribute:: min_threshold :value: 0 .. py:attribute:: output_img .. py:attribute:: threshold .. py:data:: burkes_instances