Skip to content

This Script converts images to simulate Colour blindness using Daltonization Algorithm. The converted image is what is perceived by colour blind people. It also converts the image to help colour blind people differentiate between certain colours in an Image, using and HSV-Shifting Algorithm.

License

Notifications You must be signed in to change notification settings

penpenLoveUwU/Simulate-Correct-ColorBlindness

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulate-Correct-ColorBlindness

This Script converts images to simulate Colour blindness using Daltonization Algorithm. The converted image is what is perceived by colour blind people. It also converts the image to help colour blind people differentiate between certain colours in an Image, using and HSV-Shifting Algorithm.

Libraries Required:

PIL, colorsys, numpy

sudo pip install Pillow numpy

To Install

git clone https://github.com/tsarjak/Simulate-Correct-ColorBlindness.git

To run the code

In terminal:

#In Home Directory or the Directory in which you cloned/downloaded/installed the script

python transform.py -input <input file name> -output <output file name> -sp

python transform.py --help #For Help from terminal

#-sp to Simulate Protanopia
#-sd to Simulate Deutranopia
#-st to Simulate Tritanopia
#-correct to correct the image for protanopia patients

Examples

Simulating Protanopia

Original Image : plate15

Simulated Image: plate15sim (How protanopes will percieve the image!) :

Correcting Protanopia

Original Image and How Protanopes will Perceive it : before_1

Correcting the above original image and then Simulating it for Protanopes. The number which were unreadable for protanopes have now become clear enough to be recognised! : comb26022017053044

Currently Corrects only Protanopia Color Blindness via transformation. Deutranopia and Tritanopia to be added soon!

About

This Script converts images to simulate Colour blindness using Daltonization Algorithm. The converted image is what is perceived by colour blind people. It also converts the image to help colour blind people differentiate between certain colours in an Image, using and HSV-Shifting Algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%