A screen color filter system and method based on graphics acceleration
Through the screen color filter system based on graphics acceleration, the core rendering module and control module are accelerated by GPU hardware, the problems of complex switching of filter effects and large performance overhead in the existing technology are solved, and flexible and fast color filter switching and customization effects are achieved, improving the user experience.
Patent Information
- Application Number
- CN202510272466.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-03-10
AI Technical Summary
Existing screen color filter technology cannot support multiple filter effects at the same time, it is complex in operation and slow in switching speed, lacks flexibility and customization options, and has high performance overhead, which leads to lag when running on low-performance devices.
The screen color filter system based on graphics acceleration is adopted, and the core rendering module is accelerated by GPU hardware, combined with the control module and user settings interface, to realize the switching and customization of various filter effects, optimize the user experience through the D-bus service interface and shortcut key functions, and reduce system load.
It realizes natural and smooth switching between multiple screen color filters, improves flexibility and efficiency, reduces system load, and improves the user experience of color blind and color-weak users.
Smart Images

Figure CN119781892B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image display technology, and in particular provides a screen color filter system and method based on graphics acceleration. Background Art
[0002] With the popularization of modern electronic devices, the use of devices such as smartphones, computers, and tablets is becoming more and more frequent. For user groups with special visual needs such as color blindness and color weakness, traditional display screens have obvious obstacles in color recognition. These users cannot correctly distinguish certain colors in their daily lives, work, or entertainment, which makes it difficult to obtain information, thereby affecting their user experience and work efficiency. In order to solve the color recognition problems encountered by color-blind and color-weak users when using electronic devices, the market demand for technologies that can optimize screen color performance and improve color differentiation is increasing. At the same time, color differentiation is also critical in scenarios such as design, image processing, and map reading. Some users have special visual needs, such as the need to enhance contrast or adjust the display effects of specific colors in specific environments or light to ensure clear communication of information.
[0003] Existing screen display technologies mostly use standardized color representation, lacking flexibility. This limits their ability to address color recognition issues for users with color blindness or color deficiency, and they are unable to effectively adjust to different visual impairments, making it difficult to meet these personalized needs. Therefore, there is an urgent need for a technology that can flexibly adapt to different visual needs and enhance color recognition capabilities to improve the experience of people with color blindness, color deficiency, and other special needs when using electronic devices.
[0004] Screen color filter technology changes the color appearance of images by adjusting screen display color parameters such as brightness, contrast, and saturation, and does have a certain effect on enhancing users' color recognition ability. However, existing screen color filter technology in Linux systems has the following main shortcomings:
[0005] 1. Unable to support multiple filters at the same time
[0006] Existing algorithms for different types of screen color filters are mostly implemented independently, requiring separate development for each filter effect, rather than a unified approach. When users need to switch between different color filters (such as grayscale mode, inverted color mode, and various color blindness modes), the system typically needs to switch to different software paths. This means that each filter must be processed separately, and multiple filter effects cannot be applied simultaneously. During this switching process, users may need to manually adjust or reload new filter configurations, resulting in complex operations and slow switching speeds, impacting the user experience.
[0007] 2. Lack of flexibility and customization options
[0008] The existing screen color filter function is relatively fixed. Users can only use several preset filter modes and cannot perform customized settings according to their specific needs. For example, color-blind users may need enhancement or adjustment of specific colors, but existing filters often only provide several general color adjustment modes and cannot accurately adapt to the individual visual needs. This limits the actual application range of color filters and makes it difficult to meet the personalized needs of different user groups.
[0009] 3. High performance overhead
[0010] Many existing screen color filters will increase the computational burden of the system when applied. Especially on resource-constrained devices (such as old computers or low-performance hardware), running the filter may lead to significant performance degradation, such as frame stuttering or latency. This is mainly because the filter needs to process colors in real time at the display level, especially on high-refresh-rate displays, which poses high requirements on the system's image processing capabilities. Summary of the invention
[0011] In order to overcome the above defects, the present invention is proposed to provide a solution to solve or at least partially solve the technical problems of poor flexibility, high performance requirements, complex operations and slow switching speed when applying multiple filter effects in the existing screen color filter technology.
[0012] In a first aspect, the present invention provides a screen color filter system based on graphics acceleration, including a core rendering module, a control module and a user setting interface.
[0013] The core rendering module is used to receive the color correction matrix input by the upper control module and the screen image to be displayed, process the screen image to be displayed according to the color correction matrix, and send the processed screen image for display.
[0014] The control module is used to dynamically adjust the color correction matrix of the core rendering module. The control module exposes a part of the D-bus service interface for screen color filter settings, and the D-bus service interface is used when responding to the operations of the user setting interface to switch the color filter type or turn on / off the color filter.
[0015] The user setting interface has functions such as a color filter switch, a color filter type switch, a color filter shortcut key function switch, and a color filter effect preview function, which are used for users to turn on / off the screen color filter, switch the color filter type, set the shortcut key switch of the color filter according to their needs, and display the real-time changing filter effects.
[0016] Further, the operations of the user setting interface also include shortcut key operations. Both the shortcut key operations and the user setting interface are used as user inputs. When the color filter shortcut key function is turned on, the system shortcut key manager notifies the control module when the color filter is opened / closed through the preset shortcut keys.
[0017] Further, the core rendering module is implemented based on hardware acceleration and runs within the GPU. The control module and the core rendering module run in the same process.
[0018] Further, the control module is also preset with a screen color correction matrix corresponding to multiple color filter types.
[0019] Further, the D-bus service interface can also be used by the time manager in the system to dynamically adjust the color filter type according to the time.
[0020] In a second aspect, the present invention provides a method for screen color filters based on graphics acceleration, which runs on the screen color filter system, and includes the following steps:
[0021] S1. After the system boots up, initialize the hardware detection and compile the OpenGL Shader program required during the operation of the screen color filter system;
[0022] S2. Start and initialize the core rendering module, and guide the GPU to load the compiled OpenGL Shader program;
[0023] S3. Start the control module and initialize the color correction matrix corresponding to multiple preset screen color filter types;
[0024] S4. Determine whether there is a user configuration file. If so, initialize the color filter state according to the user configuration file. If not, initialize the color filter state according to the system configuration file; after initializing the color filter state, start the screen color filter rendering;
[0025] S5. The control module registers the system shortcut keys and responds to the system shortcut keys by listening to the shortcut key events;
[0026] S6. The control module registers the D-bus service interface, associates the D-bus service interface with the screen color filter interface, and controls the core rendering module to respond to specific interface instructions by listening to the D-bus service interface;
[0027] S7. Initialize the user setting interface, complete the initialization of the user setting interface by obtaining the current screen color filter state through the D-bus service interface, listen to the operations of the user on the user setting interface, and control the change of the screen color filter state through the D-bus service interface.
[0028] Further, the method further includes synchronously updating the configuration file when changing the state of the screen color filter,
[0029] judging whether the new color correction matrix is consistent with the system configuration file:
[0030] (1) If so, directly end;
[0031] (2) If not, judge whether there is a user configuration file:
[0032] ① If not, create a blank user configuration file and write the current parameters into the user configuration file;
[0033] ② If so, judge whether the new color correction matrix is consistent with the user configuration file: if so, directly end, if not, write the new color correction matrix into the user configuration file.
[0034] Further, the preset screen color filter types include red - color - blindness filter, green - color - blindness filter, blue - color - blindness filter, grayscale filter, and inverse - color filter.
[0035] The working principle and beneficial effects of the present invention:
[0036] In implementing the technical solution of the present invention, it realizes the unification of various implementation schemes of screen color filters, supports natural and smooth switching between different types of screen color filters. It provides an intuitive and user - friendly setting interface, supports users to control the screen color filter through the interface, supports inputting a custom screen color correction matrix to achieve a custom screen color filter effect, and improves the flexibility of the screen color filter. It integrates the screen color filter algorithm into the rendering process of the Linux system display server, places all core rendering modules to run in the GPU, can achieve zero - copy in the core rendering process, optimizes the color filter calculation method, pre - calculates the screen color correction matrix, improves the efficiency of the color filter, and can achieve the screen color filter effect with extremely low system load. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Referring to the accompanying drawings, the disclosure of the present invention will become more understandable. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the protection scope of the present invention. In addition, similar numbers in the figures are used to represent similar components, where:
[0038] Figure 1 is a structural block diagram of a screen color filter system based on graphics acceleration of the present invention;
[0039] Figure 2 is a schematic diagram of the implementation process of the custom screen color filter function of the present invention;
[0040] Figure 3 It is a schematic diagram of the main steps of a screen color filter method based on graphics acceleration according to the present invention. Specific implementation manners
[0041] The following describes some implementation manners of the present invention with reference to the accompanying drawings. Those skilled in the art should understand that these implementation manners are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention. Embodiment 1
[0042] In an embodiment of the present invention, a screen color filter system based on graphics acceleration is proposed, which supports multiple color filters simultaneously and can be freely expanded, optimizing the performance of traditional screen color filters, so that the computer system can better serve users with color blindness, color weakness and other special visual needs. Figure 1 It is a structural block diagram of a screen color filter system based on graphics acceleration according to the present invention. As Figure 1 shown, a screen color filter system based on graphics acceleration in this embodiment includes the following three modules.
[0043] 1. Core rendering module of screen color filter
[0044] The core rendering module of the screen color filter, as the core functional module of the screen color filter, is the underlying foundation of the entire screen color filter system. The core rendering module is all implemented based on the method of hardware acceleration and runs in the GPU.
[0045] The core rendering module of the screen color filter involves three sub-modules:
[0046] The main function of the input module is to receive the screen color filter parameters (i.e., the four-dimensional screen color correction matrix) input by the upper control module and the original screen image to be displayed;
[0047] Figure 1 The hardware acceleration calculation module processes the original screen image to be displayed according to the screen color filter parameters (corresponding to "rendering the color filter effect" in
[0048] The output module sends the screen image after color filter processing for display (corresponding to "outputting the image after color filter rendering" in Figure 1 <(
[0049] In this embodiment, the core rendering module dynamically adjusts the screen color through a four-dimensional screen color correction matrix, which can support stepless adjustment of the screen color and achieve any variety of different types of screen color filter effects. It supports upper-layer custom color filters, unifies various screen color filter schemes, avoids the problem of one filter for one scheme, can easily complete the expansion of color filter types, improves the flexibility of screen color filters, can significantly reduce the software volume of screen color filters, and can achieve natural and smooth switching between different types of screen color filters. At the same time, the core rendering module runs inside the GPU, can directly access the video memory content and output image data to the video memory, all based on hardware acceleration. During the color filter rendering process, there is no mutual copy between the memory and the video memory, which improves the rendering efficiency. At the same time, through the optimized color filter algorithm to pre-calculate the screen color correction matrix and GPU accelerated calculation, it significantly reduces the CPU load during the operation of the screen color filter. During the operation, only the upper-layer control module needs to transfer the new screen color correction matrix to the core rendering module, and the intermediate process does not involve CPU operation, greatly reducing the operation load. Even when running on a machine with poor performance, it will not cause obvious performance degradation, improving the performance of the screen color filter.
[0050] In one embodiment, the principle of controlling the core rendering module based on a four-dimensional color correction matrix to achieve color filter effects is as follows:
[0051] In a computer system, the representation of color is usually represented by three channels of R, G, B (i.e., the red channel, the green channel, and the blue channel). By adjusting the values of these three channels, specific screen color effects can be achieved. Taking the three color blindness modes of red, green, and blue as an example, the color filters for the three color blindness modes of red, green, and blue map the color values that color-blind patients cannot perceive to the color channels they can perceive in a certain way.
[0052] In a typical OpenGL Shader program, the color value is represented by a vec4 type variable. The input color of the screen color filter can be represented by a three-dimensional vector [R, G, B]. However, for the convenience of calculation in the OpenGL Shader program, it is expanded into a four-dimensional vector [R, G, B, 1]. The four-dimensional color correction matrix is represented by a mat4 type variable in the OpenGL shader program. Assume that the value of the four-dimensional color correction matrix is [m 11 , m 12 , m 13 , m 14 ; m 21 , m 22 , m 23 , m 24 ; m 31 , m 32 , m 33 , m 34; m 41 , m 42 , m 43 , m 44 , multiply the four - dimensional color correction matrix by the input color value:
[0053] ;
[0054] According to matrix multiplication, the output is a four - dimensional vector [R’, G’, B’, N] (where N is a meaningless value, and the fourth channel N will be replaced by 1 when the screen color filter core rendering module outputs). Among them,
[0055] ;
[0056] ;
[0057] ;
[0058] [R’, G’, B’] is the color value finally output by the core rendering module.
[0059] Based on this principle, the core rendering module based on the four - dimensional color correction matrix can be compatible with various different color filter effects. Taking the implementation of the grayscale filter effect as an example, according to the grayscale conversion formula, Gray = 0.39 R + 0.5 G + 0.11 B, the following color correction matrix can be constructed to achieve the grayscale effect:
[0060] ;
[0061] 2. Screen Color Filter Control Module
[0062] The screen color filter control module runs in the same process as the core rendering module. The role of the control module is to dynamically adjust the screen color correction matrix of the core rendering module (that is, output the corresponding filter parameters to the core rendering module), so as to realize the dynamic adjustment of the screen color filter effect (corresponding to Figure 1 the "core rendering module control" function in). The control module will preset the screen color correction matrices corresponding to several common color filters, which is convenient for users without personalized customization needs to quickly set the screen color filter (corresponding to Figure 1 the "load and write color filter configuration" function in). The control module will expose a part of the setting interfaces of the screen color filter (that is, the D - bus service interface). These interfaces are used in response to the operations of the user setting interface to control the switching of the screen color filter or customize the screen color filter. These interfaces can also be used by other components in the system. For example, they can be used by the time manager in the system to dynamically adjust the screen color filter according to the time.
[0063] In one embodiment, the control module has a shortcut key function. By providing a shortcut key interface, the user can directly use the shortcut key to turn on and off the color filter function.
[0064] 3. User settings interface
[0065] The user settings interface has functions such as color filter switch, color filter type switching, color filter shortcut key function switch, and color filter effect preview. It allows the user to turn on and off the screen color filter, switch the screen color filter, customize the color filter, and set the shortcut key switch of the color filter through the man-machine interaction interface according to personal needs, and display the real-time changing filter effect.
[0066] The color filter switch is used to control the startup of the filter, and the color filter shortcut key function switch is used to control the start and stop of the shortcut key. The color filter switch on the user settings interface is implemented by calling the D-bus interface, and the color filter shortcut key function switch is directly responded by the core control module. When the color filter shortcut key function switch is off, the user can only call the D-bus interface through the color filter switch on the user settings interface to turn on or off the color filter.
[0067] In this embodiment, the user settings interface supports the user to freely define the screen color filter and adjust specific colors. Figure 2 It is a schematic diagram of the implementation process of the custom screen color filter function of the present invention. As Figure 2 shown, the user can select several preset color filter types through the user settings interface, or input a custom screen color filter through the user settings interface to generate a corresponding configuration file, which is sent to the control module through the D-bus interface. The control module reads and writes the configuration file to obtain the corresponding screen color correction matrix, which is used as the screen color parameter and input into the core rendering module together with the original screen image to be displayed, so as to achieve the custom screen color filter effect.
[0068] Figure 2 In, the user input represents all the keyboard, mouse, and touch operations of the user, including shortcut key operations and inputs on the user settings interface. The input on the user settings interface represents the operations on the front-end interface of the color filter and the call of the D-bus interface provided by the core control module; the shortcut key operation only supports the user to press the keyboard key combination that can be responded by the color filter to control the color filter switch, and the shortcut key operation can only be used to control the color filter switch when the shortcut key function is turned on. The rest requires the user to operate the color filter interface or call the D-bus interface provided by the core control module.
[0069] When the user operates the user setting interface, the user setting interface will notify the control module through D-bus. When performing shortcut key operations (currently, the shortcut key operations only include turning on and off the color filter), it is notified to the control module by the system shortcut key manager and directly responded by the control module. Therefore, it does not need to go through D-bus.
[0070] A screen color filter system based on graphics acceleration composed of the above architecture unifies various implementation schemes of screen color filters of different types, supports natural and smooth switching between different types of screen color filters. It provides an intuitive and user-friendly setting interface, supports users to control the screen color filter through the interface, supports inputting a custom screen color correction matrix, realizes a custom screen color filter effect, and improves the flexibility of the screen color filter. The screen color filter algorithm is integrated into the rendering process of the Linux system display server, and all core rendering modules are placed in the GPU to run, which can achieve zero-copy in the core rendering process, optimize the color filter calculation method, pre-calculate the screen color correction matrix, improve the efficiency of the color filter, and can achieve the screen color filter effect with extremely low system load. Embodiment 2
[0071] In the embodiment of the present invention, a screen color filter method based on graphics acceleration is proposed, which is implemented based on the system shown in Embodiment 1. Figure 3 It is a schematic diagram of the main step flow of a screen color filter method based on graphics acceleration of the present invention. As Figure 3 shown, a screen color filter method based on graphics acceleration in this embodiment mainly includes the following steps S1 - step S7.
[0072] S1. After the system boots up, initialize the hardware detection and compile the OpenGL Shader program required during the operation of the screen color filter system.
[0073] After the system boots up, the screen color filter system will start following the graphics system. First, initialize the core rendering module of the screen color filter, including but not limited to pre-compiling the OpenGL Shader program required during the operation of the color filter. The OpenGL Shader program is a computing program running on the GPU, which uses the parallel computing power of the GPU to efficiently process the rendering tasks of the screen color filter. Compared with the CPU performing a large number of matrix operations, this method not only reduces the load on the CPU, but also greatly improves the rendering efficiency. By receiving the original screen color data of the screen image and the color correction matrix as inputs, the color filter OpenGL Shader program can output the color with the color filter effect added, thus realizing the screen color filter effect based on graphics acceleration.
[0074] S2. Start and initialize the core rendering module, and guide the GPU to load the compiled OpenGL Shader program;
[0075] S3. Start the control module, and initialize the color correction matrices corresponding to several preset screen color filter types (red color blindness filter, green color blindness filter, blue color blindness filter, grayscale filter, inverse color filter).
[0076] S4. Determine whether there is a user configuration file. If so, initialize the color filter state according to the user configuration file; if not, initialize the color filter state according to the system configuration file. Then start the screen color filter rendering, including the type of the current color filter, the switch state of the color filter, and the switch state of the shortcut key function of the color filter, and send the corresponding screen color correction matrix to the core rendering module according to the screen color filter type specified in the configuration file.
[0077] In this embodiment, the directories where the user configuration file and the system configuration file are located are different. The system configuration file is located in the system directory, and the user configuration file is located in the user's own directory; the read and write permissions are different. The system configuration file supports modification by the administrator user, and ordinary users only have read permissions. Ordinary users have read and write permissions for their own user configuration files. There is no difference in their content, but there is a priority order. When the user configuration file exists, the color filter will automatically ignore the system configuration file.
[0078] In this embodiment, the configuration file is directly read and written by the core control module of the color filter. The input of the user setting interface is notified to the control module through the D-bus method for the control module to respond. The shortcut key function sends the message of the shortcut key press to the control module by the shortcut key manager and then the control module directly responds.
[0079] S5. The control module registers the system shortcut keys. By listening to the shortcut key events, the control module responds to the system shortcut keys to support users to quickly enable the screen color filter through the shortcut keys.
[0080] In one embodiment, register the Win+C system shortcut key for the switch of the color filter, listen to the shortcut key. When the Win+C shortcut key is pressed, determine whether the shortcut key function is enabled. If it is enabled, the control module changes the screen color filter state, sends out a color filter state change signal, the control module writes a new color correction matrix to the core rendering module, and performs a full-screen refresh once.
[0081] S6. The control module registers the D-bus service interface, associates the D-bus service interface with the screen color filter interface, and by listening to the D-bus service interface, the control module controls the core rendering module to respond to specific interface instructions.
[0082] The D-bus service, as a convenient cross-process communication method, enables cross-process function interface calls. Through this binding mechanism, the user settings interface can indirectly call the screen color filter function interface provided by the control module by accessing the D-bus service interface registered by the access control module. When the user settings interface calls the D-bus interface, the control module changes the screen color filter state, emits a color filter state change signal, and the control module writes a new color correction matrix to the core rendering module and performs a full-screen refresh.
[0083] Specifically, the control module will control the core rendering module to perform operations including the on / off control of the screen color filter, type switching, shortcut key start / stop function control, and filter parameter adjustment according to the specific interface instructions called. Among them, the on / off, type switching, and parameter adjustment of the color filter are all achieved by adjusting the screen color correction matrix of the core rendering module, while the shortcut key start / stop function is implemented inside the control module.
[0084] Meanwhile, when the color filter state changes, the control module will also notify the user settings interface through D-bus to update the preview of the color filter effect displayed on the interface.
[0085] S7. Initialize the user settings interface, obtain the current screen color filter state through the D-bus service interface to complete the initialization of the user settings interface, monitor the operations of the user on the user settings interface, and control the change of the screen color filter state through the D-bus service interface.
[0086] Meanwhile, monitor the D-bus interface, and when the shortcut key function is disabled, synchronize this state when judging whether the shortcut key function is enabled.
[0087] When the screen color filter state is changed under any of the above conditions S5 - S7, including opening / closing the color filter by listening to the shortcut key event and the user operations (color filter switch, color filter type switch) of listening to the D-bus service interface, the configuration file is also synchronized and updated, specifically including:
[0088] Judge whether the current parameters (new color correction matrix) are consistent with the system configuration file.
[0089] (1) If so, directly end.
[0090] (2) If not, judge whether there is a user configuration file (it will not exist when the user logs out):
[0091] ① If not, create a blank user configuration file and write the current parameters into the user configuration file.
[0092] ②If so, determine whether the current parameters are consistent with the user profile: if so, directly end; if not, write the current parameters into the user profile.
[0093] It should be noted that although the above embodiments describe the steps in a specific order, those skilled in the art can understand that, in order to achieve the effects of the present invention, it is not necessary for different steps to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the protection scope of the present invention.
[0094] So far, the technical solution of the present invention has been described in conjunction with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the protection scope of the present invention.
Claims
1. A screen color filter system based on graphics acceleration, characterized in that, It includes a core rendering module, a control module, and a user settings interface. The core rendering module is used to receive the color correction matrix input by the upper-level control module and the screen image to be displayed, process the screen image to be displayed according to the color correction matrix, and display the processed screen image. The control module is used to dynamically adjust the color correction matrix of the core rendering module. The control module exposes a part of the D-bus service interface for screen color filter settings. The D-bus service interface is used when responding to the operations of the user settings interface to switch the color filter type or turn on / off the color filter. The user settings interface has functions such as a color filter switch, a color filter type switch, a color filter shortcut key function switch, and a color filter effect preview function, which are used for the user to turn on / off the screen color filter, switch the color filter type, and set the shortcut key switch of the color filter according to needs, and display the real-time changing filter effect. The core rendering module is implemented in a hardware-accelerated manner and runs in the GPU. The control module and the core rendering module run in the same process. The D-bus service interface can also be used by the time manager in the system to dynamically adjust the color filter type according to time.
2. The screen color filter system based on graphics acceleration according to claim 1, characterized in that The operations of the user settings interface also include shortcut key operations. The shortcut key operations and the user settings interface are both used as user inputs. When the color filter shortcut key function is turned on and the color filter is turned on / off through the preset shortcut keys, the system shortcut key manager notifies the control module.
3. A screen color filter system based on graphics acceleration according to claim 1, characterized in that The control module also pre-sets the screen color correction matrix corresponding to multiple color filter types.
4. A screen color filter method based on graphics acceleration, running on the screen color filter system according to any one of claims 1-3, characterized in that, It includes the following steps: S1. After the system boots up, initialize the hardware detection and compile the OpenGL Shader program required during the operation of the screen color filter system. S2. Start and initialize the core rendering module, and guide the GPU to load the compiled OpenGL Shader program. S3. Start the control module and initialize the color correction matrix corresponding to multiple pre-set screen color filter types. S4. Determine whether there is a user configuration file. If so, initialize the color filter state according to the user configuration file. If not, initialize the color filter state according to the system configuration file. After initializing the color filter state, start the screen color filter rendering. S5. The control module registers the system shortcut keys and responds to the system shortcut keys by listening to the shortcut key events. S6. The control module registers the D-bus service interface, associates the D-bus service interface with the screen color filter interface, and controls the core rendering module to respond to specific interface instructions by listening to the D-bus service interface. S7. Initialize the user settings interface, complete the initialization of the user settings interface by obtaining the current screen color filter state through the D-bus service interface, listen to the operations of the user in the user settings interface, and control the change of the screen color filter state through the D-bus service interface.
5. A method for screen color filter based on graphics acceleration according to claim 4, characterized in that, It also includes synchronously updating the configuration file when changing the screen color filter state. Determine whether the new color correction matrix is consistent with the system configuration file: (1) If it is, directly end; (2) If not, determine whether there is a user configuration file: ① If not, create a blank user configuration file and write the current parameters into the user configuration file; ② If so, determine whether the new color correction matrix is consistent with the user configuration file: if it is, directly end; if not, write the new color correction matrix into the user configuration file.
6. A method for screen color filter based on graphics acceleration according to claim 4, characterized in that, The preset screen color filter types include red color blindness filter, green color blindness filter, blue color blindness filter, grayscale filter, and inverse color filter.
Citation Information
Patent Citations
Terminal interface color correction method and device, electronic equipment and terminal
CN111796889A
Image processing method and device, equipment and storage medium
CN113810675A
Display device and filter effect display method
CN119110122A