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.
PIL, colorsys, numpy
sudo pip install Pillow numpy
git clone https://github.com/tsarjak/Simulate-Correct-ColorBlindness.git
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
Simulated Image:
(How protanopes will percieve the image!) :
Original Image and How Protanopes will Perceive it :
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! :
Currently Corrects only Protanopia Color Blindness via transformation. Deutranopia and Tritanopia to be added soon!