Screen color conversion method and device, electronic equipment and computer program product

By detecting color vision abnormal types and generating corresponding color conversion matrix, the problem that the existing technology cannot effectively help color blind and color-weak users distinguish screen colors, achieving a better visual experience.

CN119071453APending Publication Date: 2024-12-03TCL OVERSEAS ELECTRONIC (HUIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411167111.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Existing screen color adjustment technology cannot effectively help color blindness and color weak users distinguish the colors displayed on the screen, resulting in poor visual experience.

Method used

By detecting color vision abnormal types, obtaining the corresponding color projection matrix and error propagation matrix, generating the screen color conversion matrix, and performing color conversion to improve the visual recognition ability of color blind and color-weak users.

Benefits of technology

It realizes real-time adjustment of screen display colors according to different types of color blindness or color weakness, improving the visual recognition ability of people with color blindness and color weakness, so that they can better appreciate and understand screen content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071453A_ABST
    Figure CN119071453A_ABST
Patent Text Reader

Abstract

The invention discloses a screen color conversion method and device, electronic equipment and a computer program product, and relates to the technical field of screen display.The screen color conversion method comprises the steps that after an input color vision abnormality type is detected, a color projection matrix corresponding to the color vision abnormality type is obtained, obtaining an error propagation matrix corresponding to the color vision abnormality type; generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix; and performing screen color conversion according to the screen color conversion matrix. The screen display color can be adjusted in real time according to different types of color blindness or color weakness conditions, the visual recognition ability of color blindness and color weakness people is improved, and the people can better appreciate and understand the screen content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of screen display technology, and in particular to a screen color conversion method, device, electronic device and computer program product. Background Art

[0002] With the development of science and technology, screen display technology has become more and more advanced. However, for color blind and color weak users, even the most advanced display technology cannot fully meet their needs. According to statistics, about 300 million people in the world suffer from different degrees of color blindness or color weak. They face many challenges in their daily lives, especially when they cannot fully experience the color effects when watching TV programs.

[0003] Most of the screen color adjustment technologies currently available on the market use simple color enhancement or contrast adjustment strategies. Although this method can help color-blind and color-weak users to a certain extent, it does not really solve the fundamental problem. For example, some technologies only increase color saturation or contrast, but this cannot effectively help color-blind users distinguish colors; and for color-weak users, simply enhancing colors may cause color distortion, which in turn affects the viewing experience.

[0004] Therefore, how to enable people with color blindness or color weakness to more accurately distinguish the colors displayed on the screen to obtain a better visual experience has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of this application is to provide a screen color conversion method, device, electronic device and computer program product, aiming to solve the technical problem of how to enable people with color blindness or color weakness to more accurately distinguish the screen display colors to obtain a better visual experience.

[0006] To achieve the above object, the present application provides a screen color conversion method, comprising:

[0007] After detecting the input color vision abnormality type, obtaining a color projection matrix corresponding to the color vision abnormality type, and obtaining an error propagation matrix corresponding to the color vision abnormality type;

[0008] Generate a screen color conversion matrix based on the color projection matrix and the error propagation matrix;

[0009] Screen color conversion is performed according to the screen color conversion matrix.

[0010] In one embodiment, the step of obtaining a color projection matrix corresponding to the type of color vision abnormality includes:

[0011] Obtain a preset RGB-to-LMS conversion matrix, wherein the RGB-to-LMS conversion matrix is ​​a color conversion matrix from an RGB color space to an LMS color space;

[0012] According to the RGB-to-LMS conversion matrix, the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space are determined, the color blindness plane normal vector corresponding to the color vision abnormality type is calculated according to the monochrome point coordinates, and the color projection matrix corresponding to the color vision abnormality type is generated according to the color blindness plane normal vector.

[0013] In one embodiment, the step of generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix includes:

[0014] Obtain a preset LMS-to-RGB conversion matrix, wherein the LMS-to-RGB conversion matrix is ​​a color conversion matrix from an LMS color space to an RGB color space;

[0015] Generate a screen color conversion matrix according to the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix, the error propagation matrix, and a preset screen color conversion matrix generation formula;

[0016] Wherein, the screen color conversion matrix generation formula is:

[0017] Transform=lms2rgb·(simulation·rgb2lms+correction·(rgb2lms-simulation·rgb2lms));

[0018] Among them, Transform is the screen color conversion matrix, lms2rgb is the LMS-to-RGB conversion matrix, rgb2lms is the RGB-to-LMS conversion matrix, simulation is the color projection matrix, and correction is the error propagation matrix.

[0019] In one embodiment, the steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include:

[0020] When the color vision abnormality type is red color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0021] Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0022] Inputting the red-green color blindness plane normal vector into a preset red-green color blindness color projection matrix calculation formula to calculate a red-green color blindness color projection matrix, and determining the red-green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0023] Wherein, the red-blind color projection matrix calculation formula is:

[0024]

[0025] Among them, lms2lmsp is the red-green color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0026] In one embodiment, the steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include:

[0027] When the color vision abnormality type is green color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0028] Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0029] Inputting the red-green color blindness plane normal vector into a preset green color blindness color projection matrix calculation formula to calculate a green color blindness color projection matrix, and determining the green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0030] Wherein, the green blindness color projection matrix calculation formula is:

[0031]

[0032] Among them, lms2lmsd is the green-color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0033] In one embodiment, the steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include:

[0034] When the color vision abnormality type is blue color vision abnormality, determining the white point coordinates and the red point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0035] Calculate the blue-yellow color blind plane normal vector according to the white point coordinates, the red point coordinates, and the origin coordinates of the LMS color space;

[0036] Inputting the blue-yellow color blindness plane normal vector into a preset blue-blindness color projection matrix calculation formula to calculate a blue-blindness color projection matrix, and determining the blue-blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0037] The blue blindness color projection matrix calculation formula is:

[0038]

[0039] Among them, lms2lmst is the blue-blind color projection matrix, p1 is the blue-yellow-blind plane normal vector, p1.l is the L-axis component of the blue-yellow-blind plane normal vector, p1.m is the M-axis component of the blue-yellow-blind plane normal vector, and p1.s is the S-axis component of the blue-yellow-blind plane normal vector.

[0040] In one embodiment, the step of obtaining the error propagation matrix corresponding to the color vision abnormality type includes:

[0041] When the color vision abnormality type is red color vision abnormality, obtaining a preset red weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0042] When the color vision abnormality type is green color vision abnormality, obtaining a preset green weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0043] When the color vision abnormality type is blue color vision abnormality, a preset blue weak error propagation matrix is ​​obtained as the error propagation matrix corresponding to the color vision abnormality type.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a screen color conversion device, the device comprising:

[0045] A first conversion module, configured to, after detecting the input color vision abnormality type, obtain a color projection matrix corresponding to the color vision abnormality type, and obtain an error propagation matrix corresponding to the color vision abnormality type;

[0046] A second conversion module, used for generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix;

[0047] The third conversion module is used to perform screen color conversion according to the screen color conversion matrix.

[0048] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a screen color conversion program stored in the memory and executable on the processor, wherein the screen color conversion program implements the screen color conversion method as described above when executed by the processor.

[0049] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned screen color conversion method when executed by a processor.

[0050] The embodiments of the present application provide a screen color conversion method, device, electronic device and computer program product. The technical solution of the embodiments of the present application is to obtain a color projection matrix corresponding to the color vision abnormality type after detecting the input color vision abnormality type, and obtain an error propagation matrix corresponding to the color vision abnormality type; generate a screen color conversion matrix based on the color projection matrix and the error propagation matrix; perform screen color conversion according to the screen color conversion matrix, so that the present application can adjust the screen display color in real time according to different types of color blindness or color weakness, improve the visual recognition ability of people with color blindness and color weakness, and enable them to better appreciate and understand the screen content. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0053] Figure 1A schematic diagram of a flow chart provided for the first embodiment of the screen color conversion method of the present application;

[0054] Figure 2 A flowchart diagram of the second embodiment of the screen color conversion method of the present application;

[0055] Figure 3 A flowchart diagram of the third embodiment of the screen color conversion method of the present application;

[0056] Figure 4 A flowchart diagram of the fourth embodiment of the screen color conversion method of the present application;

[0057] Figure 5 This is a schematic diagram of the module structure of the screen color conversion device according to an embodiment of the present application;

[0058] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the screen color conversion method in the embodiment of the present application.

[0059] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0061] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0062] The main solution of the embodiment of the present application is: after detecting the input color vision abnormality type, obtaining the color projection matrix corresponding to the color vision abnormality type, and obtaining the error propagation matrix corresponding to the color vision abnormality type; generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix; performing screen color conversion according to the screen color conversion matrix.

[0063] The embodiments of the present application can adjust the screen display color in real time according to different types of color blindness or color weakness, thereby improving the visual recognition ability of people with color blindness or color weakness, so that they can better appreciate and understand the screen content.

[0064] It should be noted that the execution subject of the embodiments of the present application is an electronic device with a display screen, which may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (Televisions), desktop computers, etc., or any electronic device that can achieve the above functions, and the embodiments of the present application do not specifically limit this. The following uses electronic devices as the execution subject as an example to illustrate the following embodiments of the present application.

[0065] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0066] Please refer to Figure 1 , Figure 1 A flowchart diagram of the first embodiment of the screen color conversion method of the present application.

[0067] The present application proposes a screen color conversion method according to a first embodiment, comprising steps S100 to S300:

[0068] Step S100, after detecting the input color vision abnormality type, obtaining a color projection matrix corresponding to the color vision abnormality type, and obtaining an error propagation matrix corresponding to the color vision abnormality type;

[0069] It should be noted that color vision abnormality refers to the situation where the human eye cannot correctly recognize certain colors. The types of color vision abnormalities are the types of color vision abnormalities, including but not limited to red color vision abnormality (such as red color weakness and red color blindness), green color vision abnormality (such as green color weakness and green color blindness), and blue color vision abnormality (such as blue color weakness and blue color blindness).

[0070] In addition, it should be noted that the color projection matrix is ​​a matrix used to simulate the color perception of users with color vision abnormalities. The color projection matrix can map normal colors in the eyes of users with normal color vision to abnormal colors in the eyes of users with color vision abnormalities. The error propagation matrix is ​​a matrix used to adjust the color differences generated by the color projection matrix during the color conversion process to ensure that the converted colors are easy to distinguish and not distorted for users with color vision abnormalities.

[0071] It is not difficult to understand that each type of color vision abnormality has a specific color projection matrix, which is used to simulate the color perception of users with this type of color vision abnormality, and to map the normal colors in the eyes of users with normal color vision into abnormal colors in the eyes of users with this type of color vision abnormality. Accordingly, each type of color vision abnormality has a specific error propagation matrix, which is used to adjust the color differences generated by the specific color projection matrix during the color conversion process, ensuring that the converted colors are easy to distinguish and not distorted for users with color vision abnormality.

[0072] This embodiment defines the color vision abnormality type in the Setting provided by the System Provider, and provides a corresponding setting interface to allow color-blind / color-weak users to select their own color vision abnormality type, then monitors the color vision abnormality type selected by the color-blind / color-weak user in the setting interface through the ColorDisplayService, and passes the monitored color vision abnormality type to the SurfaceFlinger component through the DisplayTransformManager. The SurfaceFlinger component calls the Daltonizer to calculate the screen color conversion matrix, and then performs screen color conversion according to the calculated screen color conversion matrix to change the screen display color, so that the color-blind / color-weak user can more easily distinguish different display colors, feel more realistic picture details, and thus better understand the screen display content.

[0073] It is not difficult to understand that in a feasible implementation manner, a corresponding color projection matrix and an error propagation matrix may be preset for each type of color vision abnormality, and a corresponding mapping relationship may be set, so that after the input color vision abnormality type is detected, the color projection matrix corresponding to the color vision abnormality type may be obtained from the storage space according to the mapping relationship between the preset color vision abnormality type and the color projection matrix, and the error propagation matrix corresponding to the color vision abnormality type may be obtained from the storage space according to the mapping relationship between the preset color vision abnormality type and the error propagation matrix.

[0074] Exemplarily, the step of obtaining the error propagation matrix corresponding to the color vision abnormality type includes steps A10 to A30:

[0075] Step A10, when the color vision abnormality type is red color vision abnormality, obtaining a preset red weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0076] It should be noted that, in this embodiment, the red weak error propagation matrix reduces the color difference between red and green produced by the color projection matrix by appropriately reducing the red component or appropriately increasing the green component during the color conversion process, so that the converted color is closer to the real visual experience of individuals with red color vision abnormalities, thereby better helping them understand and distinguish colors, ensuring that the converted color is easy to distinguish and not distorted for users with red color vision abnormalities.

[0077] Step A20, when the color vision abnormality type is green color vision abnormality, obtaining a preset green color weakness error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0078] It should be noted that in this embodiment, the green weak error propagation matrix reduces the color difference between red and green produced by the color projection matrix by appropriately reducing the green component or appropriately increasing the red component during the color conversion process, so that the converted color is closer to the real visual experience of individuals with green color vision abnormalities, thereby better helping them understand and distinguish colors, ensuring that the converted color is easy to distinguish and not distorted for users with green color vision abnormalities.

[0079] Step A30, when the color vision abnormality type is blue color vision abnormality, obtaining a preset blue weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type.

[0080] It should be noted that in this embodiment, the blue weak error propagation matrix reduces the color difference between blue and yellow produced by the color projection matrix by appropriately reducing the blue component or appropriately increasing the yellow component during the color conversion process, so that the converted color is closer to the real visual experience of individuals with blue color vision abnormalities, thereby better helping them understand and distinguish colors, ensuring that the converted color is easy to distinguish and not distorted for users with blue color vision abnormalities.

[0081] In this embodiment, a corresponding error propagation matrix is ​​preset for each color vision abnormality type. After the input color vision abnormality type is detected, the corresponding error propagation matrix can be directly obtained from the storage space based on the mapping relationship between the color vision abnormality type and the error propagation matrix. For example, for the red color vision abnormality type, a corresponding red weak error propagation matrix is ​​preset, for the green color vision abnormality type, a corresponding green weak error propagation matrix is ​​preset, and for the blue color vision abnormality type, a corresponding blue weak error propagation matrix is ​​preset. In addition, a mapping relationship between the color vision abnormality type and the error propagation matrix is ​​provided, so that after the input color vision abnormality type is detected, if it is red color vision abnormality, the preset red weak error propagation matrix is ​​directly obtained from the storage space according to the mapping relationship as the error propagation matrix corresponding to the color vision abnormality type; if it is green color vision abnormality, the preset green weak error propagation matrix is ​​directly obtained from the storage space according to the mapping relationship as the error propagation matrix corresponding to the color vision abnormality type; if it is blue color vision abnormality, the preset blue weak error propagation matrix is ​​directly obtained from the storage space according to the mapping relationship as the error propagation matrix corresponding to the color vision abnormality type.

[0082] In this embodiment, in addition to the above method of presetting the corresponding color projection matrix and error propagation matrix for each color vision abnormality type, the corresponding color projection matrix and error propagation matrix can also be generated in real time according to the input color vision abnormality type.

[0083] Exemplarily, in a feasible implementation manner, the step of obtaining the color projection matrix corresponding to the color vision abnormality type includes steps S110 to S120:

[0084] Step S110, obtaining a preset RGB-to-LMS conversion matrix, wherein the RGB-to-LMS conversion matrix is ​​a color conversion matrix from an RGB color space to an LMS color space;

[0085] As is known to those skilled in the art, the RGB (Red-Green-Blue) color space is a color space based on the three basic colors of red (R), green (G) and blue (B), and is mainly used in display devices. The RGB color space consists of three channels: red, blue and green, and the value range of each channel is usually between 0 and 255 or 0.0 and 1.0. These values ​​determine the intensity of light, with 0 representing no light and the maximum value (255 or 1.0) representing maximum brightness. In the RGB color space, any color can be created by mixing red, green and blue light of different intensities. For example, pure red is composed of maximum intensity red light plus no green and blue light.

[0086] Those skilled in the art also know that the LMS (Long-Medium-Short) color space is another color space based on the perception of the cone cells of the human eye to three different wavelengths of light: long (L), medium (M), and short (S). The LMS color space simulates the three types of cone cells in the human eye, namely cone cells that are sensitive to long-wave light, medium-wave light, and short-wave light. In the LMS color space, color can be represented by three values: L, M, and S, each of which corresponds to the response intensity of a cone cell type, where L represents the response of cone cells that are sensitive to long-wavelength light, M represents the response of cone cells that are sensitive to medium-wavelength light, and S represents the response of cone cells that are sensitive to short-wavelength light. The LMS color space is directly related to the response characteristics of the cone cells on the retina of the human eye, so it is closer to human visual perception and can simulate the perception of color by people with color vision abnormalities.

[0087] In this embodiment, the RGB-to-LMS (Red-Green-Blue to Long-Medium-Short) conversion matrix is ​​a color conversion matrix from an RGB color space to an LMS color space, and is used to convert color values ​​(i.e., RGB values) in an RGB color space into color values ​​(i.e., LMS values) in an LMS color space.

[0088] In this embodiment, the RGB-to-LMS conversion matrix can be based on CIE (Commission Internationale de The matrix of the International Commission on Illumination 1931 standard observer data, that is, the RGB-to-LMS conversion matrix can be:

[0089]

[0090] Step S120, according to the RGB-to-LMS conversion matrix, determine the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space, calculate the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generate a color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector.

[0091] It should be noted that a monochromatic point refers to a point of a single color in a color space. In this embodiment, the monochromatic points corresponding to red color vision abnormality and green color vision abnormality are white points and blue points, and the monochromatic points corresponding to blue color vision abnormality are white points and red points.

[0092] In addition, it should be noted that the color blindness plane refers to a plane in the color space where all colors on the plane are indistinguishable or difficult to distinguish for color vision abnormalities of a specific type. It is not difficult to understand that for the color blind group, all colors on the color blindness plane are indistinguishable, and for the color weak group, all colors on the color blindness plane are difficult to distinguish. In this embodiment, the color blind group and the color weak group of the same color correspond to the same color blindness plane.

[0093] In this embodiment, firstly, the coordinates of two monochrome points corresponding to the color vision abnormality type input in the LMS color space are obtained according to the RGB-to-LMS conversion matrix, and then the three points are combined with the coordinates of the origin of the LMS color space to determine a plane, and the normal vector of the color blindness plane corresponding to the color vision abnormality type is calculated, that is, the color blindness plane normal vector, and then the color projection matrix corresponding to the color vision abnormality type is generated according to the color blindness plane normal vector.

[0094] Step S200, generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix;

[0095] It should be noted that the screen color conversion matrix is ​​a mathematical matrix used to adjust the output color of a display device. The purpose of the screen color conversion matrix is ​​to enable users with color vision abnormalities to better perceive and distinguish the colors on the screen.

[0096] In this embodiment, the screen color conversion matrix can be obtained by a linear combination of a color projection matrix and an error propagation matrix.

[0097] Exemplarily, the step of generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix includes steps S210 to S220:

[0098] Step S210, obtaining a preset LMS-to-RGB conversion matrix, wherein the LMS-to-RGB conversion matrix is ​​a color conversion matrix from an LMS color space to an RGB color space;

[0099] In this embodiment, the LMS-to-RGB (Long-Medium-Short to Red-Green-Blue) conversion matrix is ​​a color conversion matrix from LMS color space to RGB color space, which is used to convert color values ​​in the LMS color space (i.e., LMS values) into color values ​​in the RGB color space (i.e., RGB values).

[0100] In this embodiment, the LMS-to-RGB conversion matrix can be based on CIE (Commission Internationale de The matrix of the International Commission on Illumination 1931 standard observer data, that is, the LMS-to-RGB conversion matrix can be:

[0101]

[0102] Step S220, generating a screen color conversion matrix according to the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix, the error propagation matrix, and a preset screen color conversion matrix generation formula;

[0103] Wherein, the screen color conversion matrix generation formula is:

[0104] Transform=lms2rgb·(simulation·rgb2lms+correction·(rgb2lms-simulation·rgb2lms));

[0105] Among them, Transform is the screen color conversion matrix, lms2rgb is the LMS-to-RGB conversion matrix, rgb2lms is the RGB-to-LMS conversion matrix, simulation is the color projection matrix, and correction is the error propagation matrix.

[0106] It should be noted that the screen color conversion matrix generation formula is predefined and is used to calculate the screen color conversion matrix formula based on the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix and the error propagation matrix.

[0107] In this embodiment, the screen color conversion matrix can be obtained by substituting the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix and the error propagation matrix into the preset screen color conversion matrix generation formula, and then the screen color conversion is performed according to the calculated screen color conversion matrix, so that the colors presented on the display screen are easier to be distinguished by users with color vision abnormalities, thereby helping people with color vision abnormalities to better understand and appreciate colorful content.

[0108] Step S300, performing screen color conversion according to the screen color conversion matrix.

[0109] Those skilled in the art will know that after determining the screen color conversion matrix, when performing screen color conversion, it is necessary to first obtain the pixel color values ​​to be converted on the current screen, which is mainly accomplished by reading the pixel data in the image file or obtaining the pixel color values ​​from the graphics buffer. After determining the pixel color values ​​to be converted, the screen color conversion matrix is ​​applied to perform a linear transformation on the color value of each pixel, that is, multiplying its RGB value with the screen color conversion matrix to obtain a new RGB value. The converted new color value is then applied to the corresponding pixel to update the display content on the screen. This step usually involves writing the modified pixel data back to the graphics buffer and triggering the display to redraw.

[0110] It should be noted that the new RGB value obtained after conversion may exceed the standard range (for example, less than 0 or greater than 1), and appropriate adjustments need to be made. Methods such as clamping or gamma correction can be used to process these out-of-range values ​​to ensure that the final color value is within the displayable range.

[0111] This embodiment simulates the effects of color blindness and other color vision abnormalities through a specific screen color conversion matrix, thereby making the design of the display device more inclusive, allowing people with color vision impairments to correctly identify color information, and improving the user's visual experience.

[0112] After detecting the type of color vision abnormality input, this embodiment obtains a color projection matrix corresponding to the type of color vision abnormality, and obtains an error propagation matrix corresponding to the type of color vision abnormality; generates a screen color conversion matrix based on the color projection matrix and the error propagation matrix; performs screen color conversion according to the screen color conversion matrix, so that this embodiment can adjust the screen display color in real time according to different types of color blindness or color weakness, improve the visual recognition ability of people with color blindness or color weakness, and enable them to better appreciate and understand the screen content.

[0113] Based on the above-mentioned first embodiment, a screen color conversion method of the second embodiment of the present application is proposed.

[0114] In the second embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later.

[0115] Please refer to Figure 2 , Figure 2 A flowchart diagram of the second embodiment of the screen color conversion method of the present application.

[0116] In this embodiment, the step of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector includes steps S121 to S123:

[0117] Step S121, when the color vision abnormality type is red color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0118] It should be noted that red color vision abnormality includes red color blindness and red color weakness. This type of color vision abnormality corresponds to white points and blue points. Through the white point coordinates and blue point coordinates in the LMS color space, the normal vector of the red-green color blindness plane can be determined, thereby calculating the corresponding color conversion torque.

[0119] This embodiment first determines the coordinates of the white point (255, 255, 255) and the coordinates of the blue point (0, 0, 255) in the RGB color space, and then multiplies the coordinates of the white point in the RGB color space by the RGB-to-LMS conversion matrix to obtain the coordinates of the white point in the LMS color space, and multiplies the coordinates of the blue point in the RGB color space by the RGB-to-LMS conversion matrix to obtain the coordinates of the blue point in the LMS color space.

[0120] Step S122, calculating a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0121] Those skilled in the art will know that in a three-dimensional space coordinate system, three points determine a plane. When the coordinates of the white point, the blue point and the origin in the LMS color space are known, the plane determined by the three points, i.e., the red-green color blindness plane, can be determined, and then the normal vector of the red-green color blindness plane, i.e., the red-green color blindness plane normal vector, can be calculated.

[0122] It should be noted that the red-green color blindness plane normal vector can be obtained by cross-producting the vector from the origin to the white point in the LMS color space with the vector from the origin to the blue point in the LMS color space.

[0123] Step S123, inputting the red-green color blindness plane normal vector into a preset red-green color blindness color projection matrix calculation formula, calculating a red-green color blindness color projection matrix, and determining the red-green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0124] Wherein, the red-blind color projection matrix calculation formula is:

[0125]

[0126] Among them, lms2lmsp is the red-green color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0127] It should be noted that the red-blind color projection matrix is ​​the color projection matrix corresponding to the red color vision abnormality type, which is used to simulate the color perception of users with red color vision abnormality, and map the normal colors in the eyes of users with normal color vision into abnormal colors in the eyes of users with red color vision abnormality.

[0128] In addition, it should be noted that the red-green color blindness color projection matrix calculation formula is preset and is used to eliminate the long-wavelength light response corresponding to red and redistribute it to the medium-wavelength light response and short-wavelength light response based on the red-green color blindness plane normal vector, thereby obtaining the color projection matrix corresponding to red color vision abnormality, that is, the red-green color blindness color projection matrix.

[0129] In this embodiment, when the color vision abnormality type input is red color vision abnormality, the coordinates of the white point and the blue point corresponding to the red color vision abnormality in the LMS color space are obtained, the red-green color blindness plane normal vector is obtained, and the red-green color blindness plane normal vector is substituted into the preset red color blindness color projection matrix calculation formula, so as to calculate the color projection matrix corresponding to the red color vision abnormality, that is, the red color blindness color projection matrix, which is used to more accurately simulate the world seen by the red color vision abnormality group, and then generate a screen color conversion matrix specially prepared for the red color vision abnormality group together with the corresponding propagation error matrix, convert the screen display color into a form that is easier for the red color vision abnormality group to distinguish and identify, thereby improving the visual recognition ability of the red color vision abnormality group, so that they can better appreciate and understand the screen content.

[0130] Based on the above-mentioned first embodiment, a screen color conversion method of the third embodiment of the present application is proposed.

[0131] In the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later.

[0132] Please refer to Figure 3 , Figure 3 A flowchart diagram of the third embodiment of the screen color conversion method of the present application.

[0133] In this embodiment, the step of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector includes steps S124 to S126:

[0134] Step S124, when the color vision abnormality type is green color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0135] It should be noted that green color vision abnormality includes green color blindness and green color weakness. This type of color vision abnormality corresponds to white points and blue points. Through the coordinates of the white point and the blue point in the LMS color space, the normal vector of the red-green color blindness plane can be determined, thereby calculating the corresponding color conversion torque.

[0136] This embodiment first determines the coordinates of the white point (255, 255, 255) and the coordinates of the blue point (0, 0, 255) in the RGB color space, and then multiplies the coordinates of the white point in the RGB color space by the RGB-to-LMS conversion matrix to obtain the coordinates of the white point in the LMS color space, and multiplies the coordinates of the blue point in the RGB color space by the RGB-to-LMS conversion matrix to obtain the coordinates of the blue point in the LMS color space.

[0137] Step S125, calculating a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0138] Those skilled in the art will know that in a three-dimensional space coordinate system, three points determine a plane. When the coordinates of the white point, the blue point and the origin in the LMS color space are known, the plane determined by the three points, i.e., the red-green color blindness plane, can be determined, and then the normal vector of the red-green color blindness plane, i.e., the red-green color blindness plane normal vector, can be calculated.

[0139] It should be noted that the red-green color blindness plane normal vector can be obtained by cross-producting the vector from the origin to the white point in the LMS color space with the vector from the origin to the blue point in the LMS color space.

[0140] Step S126, inputting the red-green color blindness plane normal vector into a preset green color blindness color projection matrix calculation formula, calculating a green color blindness color projection matrix, and determining the green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0141] Wherein, the green blindness color projection matrix calculation formula is:

[0142]

[0143] Among them, lms2lmsd is the green-color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0144] It should be noted that the green-blind color projection matrix is ​​the color projection matrix corresponding to the type of color vision abnormality, green color vision abnormality, and is used to simulate the color perception of users with green color vision abnormality, and to map normal colors in the eyes of users with normal color vision into abnormal colors in the eyes of users with green color vision abnormality.

[0145] In addition, it should be noted that the green-color blindness color projection matrix calculation formula is preset and is used to eliminate the long-wavelength light response corresponding to green according to the red-green color blindness plane normal vector, and redistribute it to the medium-wavelength light response and short-wavelength light response, thereby obtaining the color projection matrix corresponding to the green color vision abnormality, that is, the green-color blindness color projection matrix.

[0146] In this embodiment, when the color vision abnormality type input is green color vision abnormality, the coordinates of the white point and the blue point corresponding to the green color vision abnormality in the LMS color space are obtained, the red-green color blindness plane normal vector is obtained, and the vector is substituted into the preset green color blindness color projection matrix calculation formula, so as to calculate the color projection matrix corresponding to the green color vision abnormality, that is, the green color blindness color projection matrix, which is used to more accurately simulate the world seen by the green color vision abnormality group, and then generate a screen color conversion matrix specially prepared for the green color vision abnormality group together with the corresponding propagation error matrix, convert the screen display color into a form that is easier for the green color vision abnormality group to distinguish and identify, thereby improving the visual recognition ability of the green color vision abnormality group, so that they can better appreciate and understand the screen content.

[0147] Based on the above-mentioned first embodiment, a screen color conversion method of the fourth embodiment of the present application is proposed.

[0148] In the fourth embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later.

[0149] Please refer to Figure 4 , Figure 4 A flowchart diagram of the fourth embodiment of the screen color conversion method of the present application.

[0150] In this embodiment, the step of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector includes steps S127 to S129:

[0151] Step S127, when the color vision abnormality type is blue color vision abnormality, determining the white point coordinates and the red point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0152] It should be noted that blue color vision abnormality includes blue blindness and blue weakness. This type of color vision abnormality corresponds to white points and red points. Through the white point coordinates and red point coordinates in the LMS color space, the normal vector of the blue-yellow color blindness plane can be determined, thereby calculating the corresponding color conversion torque.

[0153] In this embodiment, the coordinates of the white point (255, 255, 255) and the coordinates of the red point (255, 0, 0) in the RGB color space are first determined, and then the coordinates of the white point in the LMS color space are obtained by multiplying the RGB-to-LMS conversion matrix with the coordinates of the white point in the RGB color space, and the coordinates of the red point in the LMS color space are obtained by multiplying the RGB-to-LMS conversion matrix with the coordinates of the red point in the RGB color space.

[0154] Step S128, calculating a blue-yellow color blind plane normal vector according to the white point coordinates, the red point coordinates, and the origin coordinates of the LMS color space;

[0155] Those skilled in the art will know that in a three-dimensional space coordinate system, three points determine a plane. When the coordinates of the three points of white point, red point and origin in the LMS color space are known, the plane determined by the three points, i.e., the blue-yellow color blindness plane, can be determined, and then the normal vector of the blue-yellow color blindness plane, i.e., the blue-yellow color blindness plane normal vector, can be calculated.

[0156] It should be noted that the normal vector of the blue-yellow color blind plane can be obtained by cross-producting the vector from the origin to the white point in the LMS color space with the vector from the origin to the red point in the LMS color space.

[0157] Step S129, inputting the blue-yellow color blindness plane normal vector into a preset blue-blindness color projection matrix calculation formula, calculating a blue-blindness color projection matrix, and determining the blue-blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0158] The blue blindness color projection matrix calculation formula is:

[0159]

[0160] Among them, lms2lmst is the blue-blind color projection matrix, p1 is the blue-yellow-blind plane normal vector, p1.l is the L-axis component of the blue-yellow-blind plane normal vector, p1.m is the M-axis component of the blue-yellow-blind plane normal vector, and p1.s is the S-axis component of the blue-yellow-blind plane normal vector.

[0161] It should be noted that the blue-blind color projection matrix is ​​the color projection matrix corresponding to the blue color vision abnormality type, which is used to simulate the color perception of users with blue color vision abnormality, and map the normal colors in the eyes of users with normal color vision into abnormal colors in the eyes of users with blue color vision abnormality.

[0162] In addition, it should be noted that the calculation formula for the blue-blind color projection matrix is ​​preset and is used to eliminate the long-wavelength light response corresponding to blue according to the normal vector of the blue-yellow color blindness plane, and redistribute it to the medium-wavelength light response and short-wavelength light response, thereby obtaining the color projection matrix corresponding to the blue color vision abnormality, that is, the blue-blind color projection matrix.

[0163] In this embodiment, when the color vision abnormality type input is blue color vision abnormality, the coordinates of the white point and the red point corresponding to the blue color vision abnormality in the LMS color space are obtained, the blue-yellow color blindness plane normal vector is obtained, and the blue-yellow color blindness plane normal vector is substituted into the preset blue color blindness color projection matrix calculation formula, so as to calculate the color projection matrix corresponding to the blue color vision abnormality, that is, the blue color blindness color projection matrix, which is used to more accurately simulate the world seen by the blue color vision abnormality group, and then generate a screen color conversion matrix specially prepared for the blue color vision abnormality group together with the corresponding propagation error matrix, convert the screen display color into a form that is easier for the blue color vision abnormality group to distinguish and identify, thereby improving the visual recognition ability of the blue color vision abnormality group, so that they can better appreciate and understand the screen content.

[0164] In addition, please refer to Figure 5 , Figure 5 This is a schematic diagram of the module structure of the screen color conversion device according to an embodiment of the present application;

[0165] The present application also provides a screen color conversion device, the screen color conversion device comprising:

[0166] The first conversion module 10 is used to obtain a color projection matrix corresponding to the color vision abnormality type after detecting the color vision abnormality type input, and obtain an error propagation matrix corresponding to the color vision abnormality type;

[0167] A second conversion module 20, configured to generate a screen color conversion matrix based on the color projection matrix and the error propagation matrix;

[0168] The third conversion module 30 is used to perform screen color conversion according to the screen color conversion matrix.

[0169] In one embodiment, the first conversion module 10 is further configured to:

[0170] Obtain a preset RGB-to-LMS conversion matrix, wherein the RGB-to-LMS conversion matrix is ​​a color conversion matrix from an RGB color space to an LMS color space;

[0171] According to the RGB-to-LMS conversion matrix, the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space are determined, the color blindness plane normal vector corresponding to the color vision abnormality type is calculated according to the monochrome point coordinates, and the color projection matrix corresponding to the color vision abnormality type is generated according to the color blindness plane normal vector.

[0172] In one embodiment, the first conversion module 10 is further configured to:

[0173] When the color vision abnormality type is red color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0174] Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0175] Inputting the red-green color blindness plane normal vector into a preset red-green color blindness color projection matrix calculation formula to calculate a red-green color blindness color projection matrix, and determining the red-green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0176] Wherein, the red-blind color projection matrix calculation formula is:

[0177]

[0178] Among them, lms2lmsp is the red-green color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0179] In one embodiment, the first conversion module 10 is further configured to:

[0180] When the color vision abnormality type is green color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0181] Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space;

[0182] Inputting the red-green color blindness plane normal vector into a preset green color blindness color projection matrix calculation formula to calculate a green color blindness color projection matrix, and determining the green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0183] Wherein, the green blindness color projection matrix calculation formula is:

[0184]

[0185] Among them, lms2lmsd is the green-color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

[0186] In one embodiment, the first conversion module 10 is further configured to:

[0187] When the color vision abnormality type is blue color vision abnormality, determining the white point coordinates and the red point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix;

[0188] Calculate the blue-yellow color blind plane normal vector according to the white point coordinates, the red point coordinates, and the origin coordinates of the LMS color space;

[0189] Inputting the blue-yellow color blindness plane normal vector into a preset blue-blindness color projection matrix calculation formula to calculate a blue-blindness color projection matrix, and determining the blue-blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type;

[0190] The blue blindness color projection matrix calculation formula is:

[0191]

[0192] Among them, lms2lmst is the blue-blind color projection matrix, p1 is the blue-yellow-blind plane normal vector, p1.l is the L-axis component of the blue-yellow-blind plane normal vector, p1.m is the M-axis component of the blue-yellow-blind plane normal vector, and p1.s is the S-axis component of the blue-yellow-blind plane normal vector.

[0193] In one embodiment, the first conversion module 10 is further configured to:

[0194] When the color vision abnormality type is red color vision abnormality, obtaining a preset red weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0195] When the color vision abnormality type is green color vision abnormality, obtaining a preset green weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type;

[0196] When the color vision abnormality type is blue color vision abnormality, a preset blue weak error propagation matrix is ​​obtained as the error propagation matrix corresponding to the color vision abnormality type.

[0197] In one embodiment, the first conversion module 10 is further configured to:

[0198] Obtain a preset LMS-to-RGB conversion matrix, wherein the LMS-to-RGB conversion matrix is ​​a color conversion matrix from an LMS color space to an RGB color space;

[0199] Generate a screen color conversion matrix according to the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix, the error propagation matrix, and a preset screen color conversion matrix generation formula;

[0200] Wherein, the screen color conversion matrix generation formula is:

[0201] Transform=lms2rgb·(simulation·rgb2lms+correction·(rgb2lms-simulation·rgb2lms));

[0202] Among them, Transform is the screen color conversion matrix, lms2rgb is the LMS-to-RGB conversion matrix, rgb2lms is the RGB-to-LMS conversion matrix, simulation is the color projection matrix, and correction is the error propagation matrix.

[0203] The screen color conversion device provided by the present application adopts the screen color conversion method in the above embodiment, which can solve the technical problem of how to enable people with color blindness or color weakness to more accurately distinguish the colors displayed on the screen to obtain a better visual experience. Compared with the prior art, the beneficial effects of the screen color conversion device provided by the present application are the same as the beneficial effects of the screen color conversion method provided by the above embodiment, and the other technical features in the screen color conversion device are the same as the features disclosed by the screen color conversion method in the above embodiment, which will not be repeated here.

[0204] In addition, please refer to Figure 6 , Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the screen color conversion method in the embodiment of the present application.

[0205] The present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the screen color conversion method in the above-mentioned embodiment.

[0206] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (Televisions), desktop computers, etc., or any electronic device capable of implementing the above functions. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0207] like Figure 6As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0208] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0209] The electronic device provided by the present application adopts the screen color conversion method in the above embodiment, which can solve the technical problem of how to enable people with color blindness or color weakness to more accurately distinguish the screen display colors to obtain a better visual experience. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the screen color conversion method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed by the screen color conversion method in the above embodiment, which will not be repeated here.

[0210] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0211] In addition, the present application also provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the screen color conversion method in the above-mentioned embodiment.

[0212] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0213] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0214] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: after detecting the input color vision abnormality type, obtains a color projection matrix corresponding to the color vision abnormality type, and obtains an error propagation matrix corresponding to the color vision abnormality type; generates a screen color conversion matrix based on the color projection matrix and the error propagation matrix; and performs screen color conversion according to the screen color conversion matrix.

[0215] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0216] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0217] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0218] The computer-readable storage medium provided by the present application stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned screen color conversion method, which can solve the technical problem of how to enable color-blind or color-weak people to more accurately distinguish the screen display colors to obtain a better visual experience. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the screen color conversion method provided by the above-mentioned embodiment, and will not be repeated here.

[0219] In addition, an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the screen color conversion method in the above embodiment is implemented.

[0220] The computer program product provided by the present application can solve the technical problem of how to enable color blind or color weak people to more accurately distinguish the colors displayed on the screen to obtain a better visual experience. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the screen color conversion method provided by the above embodiment, and will not be repeated here.

[0221] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A screen color conversion method, characterized in that: The method comprises: After detecting the input color vision abnormality type, obtaining a color projection matrix corresponding to the color vision abnormality type, and obtaining an error propagation matrix corresponding to the color vision abnormality type; Generate a screen color conversion matrix based on the color projection matrix and the error propagation matrix; Screen color conversion is performed according to the screen color conversion matrix.

2. The screen color conversion method according to claim 1, characterized in that: The step of obtaining a color projection matrix corresponding to the type of color vision abnormality includes: Obtain a preset RGB-to-LMS conversion matrix, wherein the RGB-to-LMS conversion matrix is ​​a color conversion matrix from an RGB color space to an LMS color space; According to the RGB-to-LMS conversion matrix, the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space are determined, the color blindness plane normal vector corresponding to the color vision abnormality type is calculated according to the monochrome point coordinates, and the color projection matrix corresponding to the color vision abnormality type is generated according to the color blindness plane normal vector.

3. The screen color conversion method according to claim 2, characterized in that: The step of generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix comprises: Obtain a preset LMS-to-RGB conversion matrix, wherein the LMS-to-RGB conversion matrix is ​​a color conversion matrix from an LMS color space to an RGB color space; Generate a screen color conversion matrix according to the LMS-to-RGB conversion matrix, the RGB-to-LMS conversion matrix, the color projection matrix, the error propagation matrix, and a preset screen color conversion matrix generation formula; Wherein, the screen color conversion matrix generation formula is: Transform=lms2rgb·(simulation·rgb2lms+correction·(rgb2lms-simulation·rgb2lms)); Among them, Transform is the screen color conversion matrix, lms2rgb is the LMS-to-RGB conversion matrix, rgb2lms is the RGB-to-LMS conversion matrix, simulation is the color projection matrix, and correction is the error propagation matrix.

4. The screen color conversion method according to claim 3, characterized in that: The steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include: When the color vision abnormality type is red color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix; Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space; Inputting the red-green color blindness plane normal vector into a preset red-green color blindness color projection matrix calculation formula to calculate a red-green color blindness color projection matrix, and determining the red-green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type; Wherein, the red-blind color projection matrix calculation formula is: Among them, lms2lmsp is the red-green color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

5. The screen color conversion method according to claim 3, characterized in that: The steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include: When the color vision abnormality type is green color vision abnormality, determining the white point coordinates and the blue point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix; Calculate a red-green color blindness plane normal vector according to the white point coordinates, the blue point coordinates, and the origin coordinates of the LMS color space; Inputting the red-green color blindness plane normal vector into a preset green color blindness color projection matrix calculation formula to calculate a green color blindness color projection matrix, and determining the green color blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type; Wherein, the green blindness color projection matrix calculation formula is: Among them, lms2lmsd is the green-color blindness color projection matrix, p0 is the red-green color blindness plane normal vector, p0.l is the L-axis component of the red-green color blindness plane normal vector, p0.m is the M-axis component of the red-green color blindness plane normal vector, and p0.s is the S-axis component of the red-green color blindness plane normal vector.

6. The screen color conversion method according to claim 3, characterized in that: The steps of determining the monochrome point coordinates corresponding to the color vision abnormality type in the LMS color space according to the RGB-to-LMS conversion matrix, calculating the color blindness plane normal vector corresponding to the color vision abnormality type according to the monochrome point coordinates, and generating the color projection matrix corresponding to the color vision abnormality type according to the color blindness plane normal vector include: When the color vision abnormality type is blue color vision abnormality, determining the white point coordinates and the red point coordinates in the LMS color space according to the RGB-to-LMS conversion matrix; Calculate the blue-yellow color blind plane normal vector according to the white point coordinates, the red point coordinates, and the origin coordinates of the LMS color space; Inputting the blue-yellow color blindness plane normal vector into a preset blue-blindness color projection matrix calculation formula to calculate a blue-blindness color projection matrix, and determining the blue-blindness color projection matrix as the color projection matrix corresponding to the color vision abnormality type; The blue blindness color projection matrix calculation formula is: Among them, lms2lmst is the blue-blind color projection matrix, p1 is the blue-yellow-blind plane normal vector, p1.l is the L-axis component of the blue-yellow-blind plane normal vector, p1.m is the M-axis component of the blue-yellow-blind plane normal vector, and p1.s is the S-axis component of the blue-yellow-blind plane normal vector.

7. The screen color conversion method according to claim 1, characterized in that: The step of obtaining the error propagation matrix corresponding to the color vision abnormality type comprises: When the color vision abnormality type is red color vision abnormality, obtaining a preset red weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type; When the color vision abnormality type is green color vision abnormality, obtaining a preset green weak error propagation matrix as an error propagation matrix corresponding to the color vision abnormality type; When the color vision abnormality type is blue color vision abnormality, a preset blue weak error propagation matrix is ​​obtained as the error propagation matrix corresponding to the color vision abnormality type.

8. A screen color conversion device, characterized in that: The device comprises: A first conversion module, configured to, after detecting the input color vision abnormality type, obtain a color projection matrix corresponding to the color vision abnormality type, and obtain an error propagation matrix corresponding to the color vision abnormality type; A second conversion module, used for generating a screen color conversion matrix based on the color projection matrix and the error propagation matrix; The third conversion module is used to perform screen color conversion according to the screen color conversion matrix.

9. An electronic device, characterized in that: include: A memory, a processor, and a screen color conversion program stored in the memory and executable on the processor, wherein the screen color conversion program, when executed by the processor, implements the screen color conversion method as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the screen color conversion method according to any one of claims 1 to 7 are implemented.