Screen color adjustment method, device, equipment and storage medium
By obtaining the target color ratio, determining the pixel distance and target coefficient in the picture color adjustment method, and adjusting the picture color, the color mixing problem and preset color casting problem under color vision assistance functions are solved, and the viewing experience of color blind and color weak users is improved.
Patent Information
- Application Number
- CN202210175279.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-02-23
AI Technical Summary
After the color vision assistance function is turned on in the prior art, color blind users may not be able to distinguish the colors that were originally distinguished, and the preset color shift is severe, which is not friendly to people with color blindness and weak color.
By obtaining the color ratio of the target color in the current screen, when the color ratio is greater than the preset ratio, the pixel distance between the first target color area and the second target color area is determined, the target coefficient is determined based on the pixel distance, and the color of the area other than the preset color area is adjusted according to the target coefficient.
It avoids the inability of users to distinguish the colors that could be distinguished by color vision disorders, and reduces the problem of preset color casts, improving the viewing experience of users with color blindness and weak color.
Smart Images

Figure CN114527950B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of display terminals, and in particular to a method, device, equipment and storage medium for adjusting picture color. Background Art
[0002] Currently, TV manufacturers, computers, games, and various apps have developed "color vision assistance" functions for people with color vision impairment, helping them to more easily distinguish images that were originally indistinguishable.
[0003] The visual aids are:
[0004] After getting an RGB original image, the color blindness and color weakness simulation matrix can be used to calculate the image R'G'B' seen by the color vision impaired user. Subtracting the two will give the color that the color vision impaired user cannot see. Use the matrix to perform color conversion, map the information that the color vision impaired user cannot see to the color gamut (color channel) that they can see, and finally superimpose the mapped information on the RGB original image to obtain an optimized image. When the color vision impaired user views such an image, they can distinguish the color information that they could not see originally.
[0005] However, the above method has the following problems: for example, red-blind people cannot distinguish between red and green, so they will superimpose blue on red to turn it into purple, thus being able to distinguish between red and green. However, when red and blue / purple are both present in the picture, turning on "color vision assistance" will result in the inability to distinguish between red and blue / purple. In addition, since the monitor displays a variety of skin colors, such as reddish or greenish, the skin color may be adversely affected after passing through the visual assistance matrix, resulting in serious color cast, which is not very friendly to people with color blindness or color weakness.
[0006] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0007] The main purpose of the present invention is to provide a method, device, equipment and storage medium for adjusting the color of a picture, aiming to solve the technical problem of how to prevent the colors that can be distinguished by users with color vision impairment from being indistinguishable after the color vision assist function is turned on, and the color cast of preset colors in the prior art.
[0008] To achieve the above object, the present invention provides a method for adjusting picture color, the method comprising the following steps:
[0009] When the user turns on visual assistance, obtain the color ratio of the target color in the current screen;
[0010] When the color ratio is greater than a preset ratio, determining a pixel distance between a first target color area and a second target color area in the current picture;
[0011] determining a target coefficient according to the pixel distance;
[0012] The color of the area other than the preset color area in the current picture is adjusted according to the target coefficient.
[0013] Optionally, before obtaining the color ratio of the target color in the current picture, the method further includes:
[0014] Obtaining color information of each pixel in the current picture;
[0015] Determine the color type of each pixel according to the color information;
[0016] Wherein, obtaining the color ratio of the target color in the current picture includes:
[0017] The color ratio of the target color in the current picture is determined according to the color type.
[0018] Optionally, determining a color ratio of a target color in the current picture according to the color type includes:
[0019] Obtaining the total number of pixels in the current picture;
[0020] Determine a target pixel point corresponding to a target color type according to the color types of the pixel points;
[0021] The color ratio of the target color is determined according to the number of the target pixels and the total number of the pixels.
[0022] Optionally, determining the pixel distance between the first target color area and the second target color area in the current picture includes:
[0023] Determine a first target color area and a second target color area in the current picture according to the color type of each pixel in the current picture;
[0024] Determine a first position according to coordinate information of each pixel point in the first target color area;
[0025] Determine a second position according to coordinate information of each pixel point in the second target color area;
[0026] A pixel distance between the first target color area and the second target color area is determined according to the first position and the second position.
[0027] Optionally, adjusting the color of an area other than a preset color area in the current picture according to the target coefficient includes:
[0028] determining a color blindness matrix based on the user's selected color blindness category;
[0029] The color of an area other than a preset color area in the current picture is adjusted according to the target coefficient and the color blindness matrix.
[0030] Optionally, adjusting the color of an area other than a preset color area in the current picture according to the target coefficient and the color blindness matrix includes:
[0031] Determining a preset color area in the current picture according to the color type of each pixel in the current picture;
[0032] Determine the area to be adjusted in the current picture according to the preset color area;
[0033] The color in the area to be adjusted is adjusted according to the target coefficient and the color blindness matrix.
[0034] Optionally, the preset color area includes a skin color area.
[0035] In addition, to achieve the above-mentioned purpose, the present invention further provides a picture color adjustment device, the picture color adjustment device comprising:
[0036] A ratio acquisition module is used to obtain the color ratio of the target color in the current picture when the user turns on visual assistance;
[0037] A distance determination module, used for determining the pixel distance between the first target color area and the second target color area in the current picture when the color ratio is greater than a preset ratio;
[0038] A coefficient determination module, used for determining a target coefficient according to the pixel distance;
[0039] The color adjustment module is used to adjust the color of the area other than the preset color area in the current picture according to the target coefficient.
[0040] In addition, to achieve the above-mentioned purpose, the present invention also proposes a screen color adjustment device, which includes: a memory, a processor, and a screen color adjustment program stored in the memory and executable on the processor, wherein the screen color adjustment program is configured to implement the steps of the screen color adjustment method described above.
[0041] In addition, to achieve the above objective, the present invention further proposes a storage medium, on which a picture color adjustment program is stored, and when the picture color adjustment program is executed by a processor, the steps of the picture color adjustment method described above are implemented.
[0042] When the user turns on visual assistance, the present invention obtains the color ratio of the target color in the current picture; when the color ratio is greater than the preset ratio, the pixel distance between the first target color area and the second target color area in the current picture is determined; the target coefficient is determined according to the pixel distance; and the color of the area other than the preset color area in the current picture is adjusted according to the target coefficient. In the above manner, the color ratio of the target color in the current picture is determined. When the color ratio is greater than the preset ratio, it indicates that visual assistance may cause the colors that can be distinguished by users with color vision impairment to mix into similar colors. At this time, the colors other than the preset color area are optimized, thereby avoiding the problem that users with color vision impairment cannot distinguish the colors that can be distinguished originally and the color cast of the preset colors. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a structural schematic diagram of a screen color adjustment device in a hardware operating environment involved in an embodiment of the present invention;
[0044] Figure 2 It is a flowchart of a first embodiment of a method for adjusting picture color according to the present invention;
[0045] Figure 3 A schematic diagram of color regions according to an embodiment of a method for adjusting picture color of the present invention;
[0046] Figure 4 FIG. 4 is a structural block diagram of a first embodiment of a picture color adjustment device according to the present invention.
[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0049] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of a screen color adjustment device in a hardware operating environment involved in an embodiment of the present invention.
[0050] like Figure 1As shown, the screen color adjustment device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the picture color adjustment device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a screen color adjustment program.
[0053] exist Figure 1 In the picture color adjustment device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the picture color adjustment device of the present invention can be set in the picture color adjustment device, and the picture color adjustment device calls the picture color adjustment program stored in the memory 1005 through the processor 1001, and executes the picture color adjustment method provided by the embodiment of the present invention.
[0054] The embodiment of the present invention provides a method for adjusting the color of a picture, referring to Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a method for adjusting picture color according to the present invention.
[0055] In this embodiment, the picture color adjustment method includes the following steps:
[0056] Step S10: When the user turns on visual assistance, the color ratio of the target color in the current picture is obtained.
[0057] It should be understood that the executor of the method of this embodiment can be a screen color adjustment device with data processing and program running functions, such as a television, or other display devices that can achieve the same or similar functions, and this embodiment does not impose any restrictions on this.
[0058] It is understandable that the visual assistance mode is a mode specially set for color blind and color weak users. After the visual assistance mode is turned on, the user selects the corresponding visual assistance mode. For example, when the user is red-blind, the user can select the red-blind visual assistance mode. The above is only an example, and this embodiment is not limited.
[0059] In a specific implementation, based on different visual assistance modes, the corresponding target colors are also different. When it is a red blindness visual assistance mode, the target colors include red and blue / purple. When red and blue / purple exist at the same time in the current picture, it means that the visual assistance mode will cause the user to be unable to distinguish the colors that can be distinguished, thereby reducing the viewing experience. When they do not exist at the same time, the visual assistance mode will not affect the user's viewing experience, and there is no need to adjust the picture. Similarly, when the visual assistance mode is different, the corresponding target color is also different, and this embodiment does not limit this.
[0060] Furthermore, in order to more accurately determine the color ratio of the target color in the current picture, before obtaining the color ratio of the target color in the current picture, it also includes: obtaining color information of each pixel in the current picture; determining the color type of each pixel based on the color information; wherein, obtaining the color ratio of the target color in the current picture includes: determining the color ratio of the target color in the current picture based on the color type.
[0061] It should be noted that similar colors in the picture are not simply the same RGB value, for example: #f47983 is pink, #db596b is crabapple red, #c93756 is cherry red. They are different colors, but they are all red, and red-blind users cannot recognize these colors, so colors of the same category need to be determined as the same color.
[0062] Since the colors in the current picture are reflected in each pixel, the color information of each pixel in the current picture is first obtained. The color information includes saturation and hue value. The color of each pixel is arranged in the coordinate system with the hue value as the horizontal coordinate and the saturation as the vertical coordinate. Then the arranged colors are divided into multiple areas, for example, they can be divided into 36*9 areas, such as Figure 3As shown, the color areas in 1 are all skin color types, the color areas in 2 are all red types, and the color areas in 3 are all blue / purple types. After determining the color type to which each color belongs, the color type of the pixel is determined according to the color on the pixel.
[0063] Furthermore, determining the color ratio of the target color in the current picture according to the color type includes: obtaining the total number of pixels in the current picture; determining the target pixels corresponding to the target color type according to the color type of each pixel; and determining the color ratio of the target color according to the number of the target pixels and the total number of pixels.
[0064] In a specific implementation, since the carrier of the color displayed in the display is a pixel, the color ratio can be determined based on the pixel. The target color also has a corresponding color type. For example, the color type corresponding to the target color is the red type. Then, in the current picture, find the pixel points whose color belongs to the red type as the target pixel points, and then count the number of target pixel points. Divide the number of target pixel points by the total number of pixels in the current picture to get the color ratio of the target color. For example, the total number of pixels in the current picture is 1920*1080, and the number of target pixels is 100000. Then the color ratio of the target color is 100000 / (1920*1080)*100%=4.8%.
[0065] Step S20: When the color ratio is greater than a preset ratio, determining a pixel distance between a first target color area and a second target color area in the current image.
[0066] It is understandable that when the color ratio of the target color is greater than the preset ratio, it indicates that the visual aid may cause multiple colors that can be distinguished by color-deficient users to mix into similar colors, resulting in the color-deficient users being unable to distinguish the colors that they could originally distinguish. At this time, it is necessary to adjust the color conversion strategy of the visual aid mode to optimize the user's viewing experience.
[0067] It should be noted that when the user turns on the red visual assistance mode, the first target color area is the area where the color type of the pixel points in the picture is red, and the second target color area is the area where the color type of the pixel points in the picture is blue / purple. The first target color area and the second target color area are related to the visual assistance mode turned on by the user.
[0068] Further, determining the pixel distance between the first target color area and the second target color area in the current picture includes: determining the first target color area and the second target color area in the current picture according to the color type of each pixel point in the current picture; determining the first position according to the coordinate information of each pixel point in the first target color area; determining the second position according to the coordinate information of each pixel point in the second target color area; and determining the pixel distance between the first target color area and the second target color area according to the first position and the second position.
[0069] It is understandable that when the distance between the first target color area and the second target color area is too close, after the colors in the picture are converted by the visual assistance mode, the colors in the first target color area and the second target color area will be more similar, resulting in reduced viewability of the picture. Therefore, it is necessary to determine the degree of adjustment of the colors in the picture by the visual assistance based on the pixel distance between the first target color area and the second target color area.
[0070] In a specific implementation, the coordinate information is the pixel coordinates of the pixel point in the pixel. When the areas of the first target color area and the second target color area are both smaller than the preset area, the pixel mean coordinates of each pixel point in the first target color area and the first pixel mean coordinates are calculated, and the pixel mean coordinates are used as the position of the first target color area. Similarly, the position of the second target color area is calculated, and the difference between the two positions is the pixel distance. For example, if the pixel coordinates of pixel point A are (3, 4) and the pixel coordinates of pixel B are (5, 8), then the pixel mean coordinates are (4, 6).
[0071] It can be understood that when the area of any one of the first target color area and the second target color area is larger than the preset area, the pixel mean coordinate can only represent the center position of the first target color area, and the edges of the first target color area and the second target color area may be relatively close, which will also make the colors difficult to distinguish after the visual assistance mode is turned on. Therefore, when the area of any one of the first target color area and the second target color area is larger than the preset area, the distance between the nearest pixels between the two areas is used as the pixel distance.
[0072] Step S30: determining a target coefficient according to the pixel distance.
[0073] It should be understood that when the position distance is larger, the two areas are farther away, and it is easier to distinguish the colors between the two areas, so the target coefficient is also larger. When the position distance is smaller, the two areas are closer, and it is more difficult to distinguish the colors between the two areas, and the corresponding target coefficient is smaller.
[0074] It should be noted that the preset mapping relationship table stores the corresponding relationship between the pixel distance and the target coefficient, so after the pixel distance is determined, the corresponding target coefficient can be directly found in the preset mapping relationship table.
[0075] Step S40: adjusting the color of the area other than the preset color area in the current picture according to the target coefficient.
[0076] It can be understood that the preset colors in the preset color area can be set by the user or automatically determined according to the current picture content, wherein the preset color area includes a skin color area. For example, in order to prevent the skin color in the picture from being cast, the preset color can be set to the skin color. Therefore, there is no need to adjust the color of the skin color area in the picture. It is necessary to determine the skin color area in the current picture and then adjust the color outside the skin color area to optimize the user's viewing experience.
[0077] Further, adjusting the color of the area other than the preset color area in the current picture according to the target coefficient includes: determining a color blindness matrix based on the color blindness type selected by the user; and adjusting the color of the area other than the preset color area in the current picture according to the target coefficient and the color blindness matrix.
[0078] In the specific implementation, the types of color blindness include red color blindness, green color blindness, blue-yellow color blindness, etc. After turning on the visual aid, the user needs to select the corresponding visual aid mode. For example, when the user is red color blind, the corresponding visual aid mode is the red visual aid mode, and when the user is green color blind, the corresponding visual aid mode is the green visual aid mode. When different visual aid modes are selected, there are different color conversion strategies. For example, the color conversion strategy of the red visual aid mode is: R'G'B'=A+α×S×RGB, where RGB is the color matrix of the original color, R'G'B' is the color matrix after conversion, A is a matrix of fixed values, α is the target coefficient, and S is the matrix of the red visual aid mode. When the visual aid mode is different, the matrix corresponding to S is different. Through the above formula, the red color in the picture can be converted to other color channels, so that red color blind users can also see the color of the red area in the picture.
[0079] It should be noted that the target coefficient range is [0,1]. The larger the α is, the stronger the visual aid function is, and vice versa. When α is 0, it is equivalent to no visual aid function, and the original color is played.
[0080] Furthermore, adjusting the color of an area other than a preset color area in the current picture according to the target coefficient and the color blindness matrix includes: determining a preset color area in the current picture according to a color type of each pixel in the current picture; determining an area to be adjusted in the current picture according to the preset color area; and adjusting the color in the area to be adjusted according to the target coefficient and the color blindness matrix.
[0081] In a specific implementation, pixels belonging to a preset color category can be determined based on the color category corresponding to each pixel in the current image. The display area formed by the pixels of the preset color category is the preset color area. The display area other than the preset color area is the area to be adjusted. The color in the area to be adjusted can be adjusted through the above-mentioned color conversion strategy.
[0082] In this embodiment, when the user turns on visual assistance, the color ratio of the target color in the current screen is obtained; when the color ratio is greater than the preset ratio, the pixel distance between the first target color area and the second target color area in the current screen is determined; the target coefficient is determined according to the pixel distance; and the color of the area other than the preset color area in the current screen is adjusted according to the target coefficient. In the above manner, the color ratio of the target color in the current screen is determined. When the color ratio is greater than the preset ratio, it indicates that visual assistance may cause the colors that can be distinguished by users with color vision impairment to mix into similar colors. At this time, the colors other than the preset color area are optimized, thereby avoiding the problem that users with color vision impairment cannot distinguish the colors that can be distinguished originally and the color cast of the preset colors.
[0083] In addition, an embodiment of the present invention further provides a storage medium, on which a picture color adjustment program is stored. When the picture color adjustment program is executed by a processor, the steps of the picture color adjustment method described above are implemented.
[0084] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0085] Reference Figure 4 , Figure 4 FIG. 4 is a structural block diagram of a first embodiment of a picture color adjustment device according to the present invention.
[0086] like Figure 4 As shown, the picture color adjustment device proposed in the embodiment of the present invention includes:
[0087] A ratio acquisition module is used to obtain the color ratio of the target color in the current picture when the user turns on visual assistance;
[0088] A distance determination module, used for determining the pixel distance between the first target color area and the second target color area in the current picture when the color ratio is greater than a preset ratio;
[0089] The coefficient determination module is used to determine the target coefficient according to the pixel distance.
[0090] The color adjustment module is used to adjust the color of the area other than the preset color area in the current picture according to the target coefficient.
[0091] In one embodiment, the ratio acquisition module 10 is also used to obtain color information of each pixel in the current picture; determine the color type of each pixel based on the color information; wherein, obtaining the color ratio of the target color in the current picture includes: determining the color ratio of the target color in the current picture based on the color type.
[0092] In one embodiment, the ratio acquisition module 10 is also used to obtain the total number of pixels in the current picture; determine the target pixels corresponding to the target color type according to the color type of each pixel; and determine the color ratio of the target color according to the number of the target pixels and the total number of pixels.
[0093] In one embodiment, the distance determination module 20 is also used to determine the first target color area and the second target color area in the current picture according to the color type of each pixel point in the current picture; determine the first position according to the coordinate information of each pixel point in the first target color area; determine the second position according to the coordinate information of each pixel point in the second target color area; determine the pixel distance between the first target color area and the second target color area according to the first position and the second position.
[0094] In one embodiment, the color adjustment module 40 is further configured to determine a color blindness matrix based on the color blindness type selected by the user; and adjust the color of an area other than a preset color area in the current image according to the target coefficient and the color blindness matrix.
[0095] In one embodiment, the color adjustment module 40 is further used to determine a preset color area in the current picture according to the color type of each pixel in the current picture; determine the area to be adjusted in the current picture according to the preset color area; and adjust the color in the area to be adjusted according to the target coefficient and the color blindness matrix.
[0096] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0097] In this embodiment, when the user turns on visual assistance, the color ratio of the target color in the current screen is obtained; when the color ratio is greater than the preset ratio, the pixel distance between the first target color area and the second target color area in the current screen is determined; the target coefficient is determined according to the pixel distance; and the color of the area other than the preset color area in the current screen is adjusted according to the target coefficient. In the above manner, the color ratio of the target color in the current screen is determined. When the color ratio is greater than the preset ratio, it indicates that visual assistance may cause the colors that can be distinguished by users with color vision impairment to mix into similar colors. At this time, the colors other than the preset color area are optimized, thereby avoiding the problem that users with color vision impairment cannot distinguish the colors that can be distinguished originally and the color cast of the preset colors.
[0098] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0099] In addition, for technical details not fully described in this embodiment, reference may be made to the picture color adjustment method provided in any embodiment of the present invention, and will not be repeated here.
[0100] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0101] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0103] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for adjusting picture color, characterized in that: The picture color adjustment method comprises: When the user turns on visual assistance, obtaining a color ratio of a target color in the current picture, wherein the target color includes a color that the user cannot distinguish after turning on the visual assistance; When the color ratio is greater than a preset ratio, determining a pixel distance between a first target color area and a second target color area in the current picture; Based on a preset mapping relationship table, determining a target coefficient according to the pixel distance; Adjusting the color of the area other than the preset color area in the current picture according to the target coefficient; The step of adjusting the color of an area other than a preset color area in the current picture according to the target coefficient includes: determining a color blindness matrix based on the user's selected color blindness category; The color of an area other than a preset color area in the current picture is adjusted according to the target coefficient and the color blindness matrix.
2. The method according to claim 1, characterized in that Before obtaining the color ratio of the target color in the current picture, the method further includes: Obtaining color information of each pixel in the current picture; Determine the color type of each pixel according to the color information; Wherein, obtaining the color ratio of the target color in the current picture includes: The color ratio of the target color in the current picture is determined according to the color type.
3. The method according to claim 2, characterized in that Determining the color ratio of the target color in the current picture according to the color type includes: Obtaining the total number of pixels in the current picture; Determine a target pixel point corresponding to a target color type according to the color types of the pixel points; The color ratio of the target color is determined according to the number of the target pixels and the total number of the pixels.
4. The method according to claim 1, characterized in that The determining of the pixel distance between the first target color area and the second target color area in the current picture includes: Determine a first target color area and a second target color area in the current picture according to the color type of each pixel in the current picture; Determine a first position according to coordinate information of each pixel point in the first target color area; Determine a second position according to coordinate information of each pixel point in the second target color area; A pixel distance between the first target color area and the second target color area is determined according to the first position and the second position.
5. The method according to claim 1, characterized in that The adjusting the color of an area other than a preset color area in the current picture according to the target coefficient and the color blindness matrix includes: Determining a preset color area in the current picture according to the color type of each pixel in the current picture; Determine the area to be adjusted in the current picture according to the preset color area; The color in the area to be adjusted is adjusted according to the target coefficient and the color blindness matrix.
6. The method according to any one of claims 1 to 5, characterized in that: The preset color area includes a skin color area.
7. A picture color adjustment device, characterized in that: The picture color adjustment device comprises: A ratio acquisition module, used for acquiring a color ratio of a target color in a current picture when a user turns on visual assistance, wherein the target color includes a color that the user cannot distinguish after turning on the visual assistance; A distance determination module, used for determining the pixel distance between the first target color area and the second target color area in the current picture when the color ratio is greater than a preset ratio; A coefficient determination module, used to determine a target coefficient according to the pixel distance based on a preset mapping relationship table; The color adjustment module is used to determine a color blindness matrix based on the color blindness type selected by the user, and adjust the color of the area other than the preset color area in the current picture according to the target coefficient and the color blindness matrix.
8. A picture color adjustment device, characterized in that: The device comprises: a memory, a processor, and a picture color adjustment program stored in the memory and executable on the processor, wherein the picture color adjustment program is configured to implement the picture color adjustment method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a screen color adjustment program, and when the screen color adjustment program is executed by the processor, the screen color adjustment method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Color identification system, color identification method and display device
CN104821000A
Color conversion method and device, equipment and storage medium
CN112801858A