Skip to main content

The ByakuganVisualizer repository hosts a Python tool designed to compare images and highlight their differences. It simplifies the process of identifying disparities between images, making it ideal for tasks like testing and quality assurance. Additionally, it offers options for customization, which can be helpful for color-blind users.

Project description

ByakuganVisualizer

The ByakuganVisualizer repository hosts a Python tool designed to compare images and highlight their differences. It simplifies the process of identifying disparities between images, making it ideal for tasks like testing and quality assurance. Moreover, it offers a color filter that can be used to correct images for color-blind users.

Installation

pip install byakuganvisualizer

Usage

usage: byakugan_vision [-h] [--version] [--diff DIFF] [--filter {red,blue,green,yellow}] [--images IMAGES] [--deuteranomaly DEUTERANOMALY]
                       [--protanomaly PROTANOMALY] [--out_dir OUT_DIR]

ByakuganVisualizer: Tool for correcting the color palett for color blind people and highlighting differences of images.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --diff DIFF           String containing a list of tuples "Path_To_Image1a,Path_To_Image2a;Path_To_Image1b,Path_To_Image2b...". Each tuple
                        contains two paths to images to be compared.
  --filter {red,blue,green,yellow}
                        Filter type (red, blue, green, yellow)
  --images IMAGES       List of image names to be manipulated by a filter. E.g.: A,B,C,D
  --deuteranomaly DEUTERANOMALY
                        Expresses your degree of deuteranomaly, which will be used to correct the image. Default is 1.
  --protanomaly PROTANOMALY
                        Expresses your degree of protanomaly, which will be used to correct the image. Default is 1.
  --out_dir OUT_DIR     Output directory for the difference images

Image Correction for Color Blind People

In the following examples the image is corrected for deuteranomaly and protanomaly.

Note: The float values for deuteranomaly and protanomaly are between 0 and 10. The default value is 1. The used algorithm is based on the following paper: https://arxiv.org/abs/1711.10662.

The image used in the example is from the following source: https://www.anime2you.de/news/606180/naruto-feiert-20-anime-jubilaeum/

Deuteranomaly Correction

byakugan_vision --images "tests/test_images/naruto.jpg" --deuteranomaly 2

Protanomaly Correction

byakugan_vision --images "tests/test_images/naruto.jpg" --protanomaly 2

Deuteranomaly and Protanomaly Correction

byakugan_vision --images "tests/test_images/naruto.jpg" --deuteranomaly 2 --protanomaly 2
byakugan_vision --images "tests/test_images/naruto.jpg" --deuteranomaly 0.5 --protanomaly 0.5

Filter an Image

byakugan_vision --images "tests/test_images/naruto.jpg" --filter red

Differences between images

The left image used in the example is from the following source: https://www.anime2you.de/news/606180/naruto-feiert-20-anime-jubilaeum/

First Image Second Image

Difference with no Filter

byakugan_vision --diff "tests/test_images/naruto.jpg,tests/test_images/naruto_modified.jpg" --out_dir tests/test_images/diff

Note: The output depends on the order of the images in the tuple. The first image is subtracted from the second image. That is why the following command results in a different output:

byakugan_vision --diff "tests/test_images/naruto_modified.jpg,tests/test_images/naruto.jpg" --out_dir tests/test_images/diff

Red Filtered Difference

byakugan_vision --diff "tests/test_images/naruto.jpg,tests/test_images/naruto_modified.jpg" --filter red --out_dir tests/test_images/diff

Blue Filtered Difference

byakugan_vision --diff "tests/test_images/naruto.jpg,tests/test_images/naruto_modified.jpg" --filter blue --out_dir tests/test_images/diff

Green Filtered Difference

byakugan_vision --diff "tests/test_images/naruto.jpg,tests/test_images/naruto_modified.jpg" --filter green --out_dir tests/test_images/diff

Yellow Filtered Difference

byakugan_vision --diff "tests/test_images/naruto.jpg,tests/test_images/naruto_modified.jpg" --filter yellow --out_dir tests/test_images/diff

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ByakuganVisualizer-0.2.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

ByakuganVisualizer-0.2.0-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page