Video Processing in Visual System for Color Detection for People with Tritanopia

Nazneen A. Pendhari *    Raghavendra R. Sedamkar **
* Assistant Professor, Department of Computer Engineering, M.H. Saboo Siddik College of Engineering, Mumbai, Maharashtra, India.
** Professor and Academic Dean, Department of Computer Engineering, Thakur College of Engineering and Technology, Mumbai, India.

Abstract

Video re-coloring and wavelength adjustment algorithm that have been performed for the anomalous Trichromats subtype Tritanomaly is presented in this paper. A method to handle the weaknesses faced by the anomalous Trichromacy was proposed and finally an interface is built that will bridge the gap for the color blind to view visual media without any hindrance. The RGB to LMS theory has been utilized for the required purpose. The detailed study about the RGB to LMS theory with respect to the required equations and pseudo code pertaining to the type Tritanomaly, i.e. Blue-Yellow weakness has been proposed to be done here using color Compensation Algorithm. Certain merits include Easy Detection, RGB to LMS Mapping, and Mapping of Frames to Easy Access of Videos.

Keywords :

Introduction

Color seems to be the most pleasing and attractive characteristic for human beings and also most valuable in today's world of technology and digital media. As there are two faces to every coin, where we enjoy this luxury with great comfort at the same time, there are people who are deprived of this necessity. After luminance striking the human eye, the next most important entity that plays a vital role in human visual perception is color which is then categorized. Many individuals all over the globe suffer from distinct forms of color blindness. Some category of colors becomes completely unperceivable by the color blind (Machado et al., 2009).

Consequently, they may encounter numerous trifle and drastic accidents in their personal and professional lives. A system needs to be developed that helps to provide the people affected in their basic necessity so that they can eradicate the problem on a permanent basis and live a more fulfilling and happy lives (Machado et al., 2009).

Color is a visual perception property of the human eye to form different sensation of an object. Color are perceived by the photoreceptor cell found in the retina. The photoreceptor converts the color light into the signals which are passed to the brain. There are two types of photoreceptor cells (Ro & Yang, 2004), i.e. rods and cones. Rods works in low light conditions to help night vision, but cones work in daylight and are responsible for color discrimination (Yang et al., 2006).

Color Vision Deficiency (CVD) is the vision problem, where the person is unable to perceive colors such as red, green, and blue. There are three types of cone cells, namely s-cones, m-cones, and l-cones and each type has a different sensitivity to light wavelengths (Srividhya et al., 2011). S-cones perceives short wavelength color, mcones perceives medium wavelength color and the lcones perceives long wavelength color (Srividhya et al., 2011).

The majority of color vision deficient are caused by genetic disorder. The gene responsible for color blindness is carried on the x-chromosome, which causes more men to get affected to color blindness than women. Protanopia and deuteranopia are two of the most common forms of color blindness and third one being tritanopia caused by genetic disorder (Webexhibits, 1999). Diseases, drugs, and chemicals may cause color blindness. Color blindness occurs due to amentia caused due to shaken baby syndrome or by accident. Deficiency of ‘vitamin A’ may also be one of the causes of color blindness and the analysis of color blindness is shown in Table 1 (Nigam & Bhattacharya, 2013).

Table 1. Analysis of Color Blindness (Nigam & Bhattacharya, 2013)

There is no treatment to cure color vision deficiencies. However, people with color blindness may be able to use a special set of lenses to help them perceive colors more accurately (Webexhibits, 1999). These lenses are very expensive. These lenses can only be used outdoors under bright lighting conditions thus making it difficult to use (Kim et al., 2012).

Color blindness currently is a conundrum. It is difficult to read color-coded information like bar graphs or pie charts. It is more troubling for children who are not yet diagnosed with color blindness, since educational materials often includes color-coded information (Color Vision Testing, 2017). Children with color blindness may find it difficult to read a colored chalk on blackboard (Kim et al., 2012). Art classes which require selecting appropriate colors of paint or crayons, may be challenging (Oliveira, 2013).

Simple everyday tasks which includes cooking meat or selecting ripe produce can be a challenge for some housewives. Traffic signal lights may also cause complication to color blind people (You & Park, 2016). Since most lights are positioned horizontally, they can mentally learn to adapt, but if the position are changed then it may cause a big problem (You & Park, 2016).

In this paper, the authors have focused on how to re-color visual media involving images and videos for anomalous subdivision type Tritanomaly. They have advanced it with a simple approach by using an image coloring method with any previous theory applied on every frame of a video, as every video is divided into individual frames and considering each frame as an image (Colblindor, n.d.). The issue over here is that similar color appearance in distinct frames cannot be assured to be mapped and to be similar or twin new color because the temporal coherence between the different frames is not surfaced (Huang et al., 2011).

The purpose of visual correction is to improve the perspicacity viewing color information in images or videos with this type of deficiency. Basically, the core idea behind this algorithm is to re-map the colors of the original image for accommodating the trichromacy in order to provide a better color representation in the image and videos (Huang et al., 2011). However, in this paper, RGB to LMS conversion for the visual correction is used. The detail of the approach is discussed (Masra et al., 2018).

1. Objectives

The objectives of the research work are as follows.

2. Proposed System

The system that has been developed is divided into two leading parts, namely the front end and back end of a system.

2.1 Front End System

It is built keeping the end user in mind, wherein the color blind can log into the system, load the media he/she wishes to recolor, and accordingly get the output of the loaded image or video as shown in Figure 1. Note that the color compensation algorithm works only for the color blindness type Tritanomaly so the images and videos will be converted accordingly. The steps for the working of the interface are as follows:

Figure 1. Block Diagram of the System

2.2 Back End System

The back end of the system describes the working of the color compensation algorithm for image and video recoloring. Here the steps or procedure are not visible to the color blind person. It involves step by step process to obtain the transformed recolored image/ video. The steps include as follows:

3. Implementation Algorithm

Step 1: Convert the video into individual frames

Since video file has a number of frames, it can vary from a hundred frames to even thousand frames. We can operate on the video all at once. Hence, we need to operate on single frame basis. Therefore, the video is converted into individual frames to process them.

Step 2: Extract the RGB color space of a frame

Each frame has various attributes associated with it, such as frame size, height, width, and the pixel values. By default, the frame has RGB color space. Hence, it is extracted to process it and modify the colors.

Step 3: Convert the RGB into LMS color space

Color blindness is associated with cones of our eyes. The cones such as long median or short are affected. Hence it is easier to work in LMS workspace. RGB is converted to LMS color space.

Step 4: Transform to colorblind LMS values

The authors have worked on people with Tritanomaly. They has s-cone absent. The matrix LMS2LMST converts the LMS matrix to the new LMS matrix which shows us how the person with Tritanopia sees the image.

Step 5: Transform the new LMS values back to RGB values

After the processing, the frame is converted from LMS space to RGB space.

    NEWRGB = LMST * INVERSE (RGB2LMS)

Step 6: Calculate the error between original RGB and new RGB

Now we have the new RGB values, which is used to calculate the error. Error is calculated by subtracting the new RGB value from old RGB value.

Step 7: Modify the error for people with Tritanopia

Once the error is calculated, one knows what parts the affected people cannot see. These errors are modified so that people with Tritanomaly can easily distinguish colors.

Step 8: Add the error to original RGB

Now add the corrected error to the original image. This will keep the original image same and modify the colors, which people with Tritanomaly could not distinguish earlier.

Step 9: Merge the individual frames to finally make the new video

Once all the frames are processed individually, they are merged to get the output. The output is stored in avi file.

This whole process can be summarized as:

This program takes in media files and first makes the RGB to LMS conversion. Then assuming s-cone is missing, it deletes information related to the cone, and then reconverts it into the RGB space. This image roughly represents the normal image perceived by a Trichromat. Then, subtracting this from the original image, we find the information lost when the image is seen by a Trichromat. Then a transformation on the error function is made so as to map it to something that could be perceived by a Trichromat. Finally, new modified error function is added to the original image. So, the previously invisible details become visible.

4. Results

4.1 Time to Run Video in Seconds

Color correction is a lengthy and performance heavy task (Table 2). It requires a huge amount of time and computing for process. The time is directly proportional to the number of frames we process (Color blindness, n.d.). For higher number of frames, the time required is higher and for low number of frames, the time required is lower.

Table 2. Performance Table

It can be noted that the time per frame is similar whether we take a longer or shorter video.

This software was run on MATLAB r2015a on Intel i5 7200u processor with 2.71GHz speed and 8 GB RAM. We can predict a better performance result, if we run the same piece of code on better CPUs.

The original image and daltonized image of Balloons, Color spectrum, and Tibet are shown in Figures 2 to 4, respectively.

Figure 2. Comparative View of Image Processing using Balloons

Figure 3. Comparative View of Image Processing using Color Spectrum

Figure 4. Comparative View of Image Processing using Tibet

In terms of video processing, the video is divided into frames. Each frame is then processed on the same algorithm of the image processing for the respected type of color blindness. These recolor frames are then combined to form the video. The resulting video appears vivid to CVD (Daltonize, n.d.).

4.2 Results of Survey

This system was tested by color blind people and the results were gathered. Each respondent was asked to give rating to the new recolored media file. Worst means the condition, if image deteriorated further. Some people saw no changes in the new and original media, whereas significant number of respondents found the system to be better. The people who responded much better were able to distinguish the colors, which they were unable to do so before. The survey was conducted online using social media and the recolor of frames are shown in Figure 5 and Table 3.

Figure 5. Recolor on Frames

Table 3. Survey Results

Conclusion

The details about Tritanomaly was studied and designed as a visual system for color vision deficient people. The system is designed keeping the front end with respect to the colour blind person. This system takes input in the form of image or video, processes from mapping RGB to LMS recoloring, and gives the extant output irrespective of the time of frames for shorter and longer videos used in the processes. This system can be implemented real time and used by various social medias and online websites such as YouTube and Facebook.

References

[1]. Colblindor. (n.d.). Color Blindness – learn all about it. Retrieved from https://www.color-blindness.com/
[2]. Color Blindness.(n.d.). In Wikipedia. Retrieved from https://en.wikipedia.org/wiki/Color_blindness
[3]. Color Vision Testing. (2017). Waggoner. Retrieved from http://www.colorvisiontesting.com/
[4]. Daltonize. (n.d.). There is not just one color blindness. Retrieved from http://www.daltonize.org/
[5]. Huang, C. R., Chiu, K. C., & Chen, C. S. (2011). Temporal color consistency-based video reproduction for dichromats. IEEE Transactions on Multimedia, 13(5), 950-960.
[6]. Kim, H. J., Jeong, J. Y., Yoon, Y. J., Kim, Y. H., & Ko, S. J. (2012). Color modification for color-blind viewers using the dynamic color transformation. In Consumer Electronics (ICCE), 2012 IEEE International Conference on (pp. 602-603). IEEE.
[7]. Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A physiologically-based model for simulation of color vision deficiency. IEEE Transactions on Visualization and Computer Graphics, 15(6), 1291-1298.
[8]. Masra, S. M. W., Shafiee, A. A. M. A., & Muhammad, M. S. (2018). Color Blind Image Correction. Universiti Malaysia Sarawak (UNIMAS), Kota Samarahan, Sarawak, Malaysia. Retrieved from http://docplayer.net/37839502- Color-blind-image-correction.html
[9]. Nigam, P. K., & Bhattacharya, M. (2013). Colour vision deficiency correction in image processing. In Bioinformatics and Biomedicine (BIBM), 2013 IEEE International Conference on (pp. 79-79). IEEE.
[10]. Oliveira, M. M. (2013). Towards more accessible visualizations for color-vision-deficient individuals. Computing in Science & Engineering, 15(5), 80-87.
[11]. Ro, Y. M., & Yang, S. (2004). Color adaptation for anomalous trichromats. International Journal of Imaging Systems and Technology, 14(1), 16-20.
[12]. Srividhya, J. P., Sivakumar, P., & Rajaram, M. (2011). The color blindness removal technique in image by using gradient map method. In Signal Processing, Communication, Computing and Networking Technologies (ICSCCN), 2011 International Conference on (pp. 24-29). IEEE.
[13]. Webexhibits. (1999). Causes of Color. Retrieved from http://www.webexhibits.org/
[14]. Yang, S., Ro, Y. M., Wong, E. K., & Lee, J. H. (2006). Color compensation for anomalous trichromats based on error score of FM-100 Hue Test. In Engineering in th Medicine and Biology Society, 2005. IEEE-EMBS 2005. 27 Annual International Conference of the (pp. 6571-6574). IEEE.
[15]. You, J. I., & Park, K. C. (2016). Image processing with color compensation using LCD display for color vision deficiency. Journal of Display Technology, 12(6), 562-566.