Image processing method and device, computer equipment and computer readable storage medium

By diffusing the edge pixels of the text in the high-color gamut display device, the problem of color edges and phantoms when displaying text is solved, and the clarity and visual comfort of the text are improved.

CN119648601APending Publication Date: 2025-03-18SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411619111.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

High-color gamut display devices are prone to color edges and phantom problems when displaying text, which affects the clarity and visual comfort of the text.

Method used

By obtaining the image information to be processed and the target ambient light brightness, diffusion processing is performed on the edge pixels of the text, diffusion width and reference brightness information are determined, and edge pixel values ​​of the text are adjusted to reduce color edges and phantoms.

Benefits of technology

It effectively reduces the color edges and phantoms of high-color gamut display devices when displaying text, and improves the clarity and visual comfort of text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648601A_ABST
    Figure CN119648601A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and apparatus, a computer device and a computer readable storage medium. The method comprises the steps of obtaining to-be-processed image information and target ambient light brightness; performing detection processing on characters in the to-be-processed image information to obtain edge position information and character width information of the characters; and performing diffusion processing on edge pixels of the character based on the target ambient light brightness, the edge position information and the character width information to obtain target image information. By adopting the method provided by the invention, the problems of color edges and ghosting generated when the high-color-gamut display equipment displays the characters can be reduced, and the definition and visual comfort of the characters are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and in particular to an image processing method, apparatus, computer equipment, and computer-readable storage medium. Background Art

[0002] With the rapid development of display technology, consumers have higher and higher requirements for the image quality of display devices. High color gamut display devices have a wide range of applications in photography, video production, film production, etc., as they cover a wider range of colors and can show more color details. However, high color gamut display devices have increased color separation, and there are problems with color edges and ghosting when displaying text. Summary of the invention

[0003] The embodiments of the present application provide an image processing method, apparatus, computer device, and computer-readable storage medium, which can reduce the color edge and ghosting problems generated by high color gamut display devices when displaying text, and improve the clarity and visual comfort of the text.

[0004] The technical solution adopted by the present invention to solve the problem is as follows:

[0005] In a first aspect, the present application provides an image processing method, comprising:

[0006] Obtaining the image information to be processed and the target ambient light brightness;

[0007] Detect and process the text in the image information to be processed to obtain the edge position information and text width information of the text;

[0008] Based on the target ambient light brightness, edge position information and text width information, the edge pixels of the text are diffused to obtain the target image information.

[0009] In some embodiments of the present application, the edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain target image information, including:

[0010] Determine diffusion width information based on target ambient light brightness and text width information;

[0011] Based on the edge position information, determine edge brightness information;

[0012] The edge pixels of the text are diffused based on the diffusion width information and the edge brightness information to obtain the target image information.

[0013] In some embodiments of the present application, based on the target ambient light brightness and text width information, the diffusion width information is determined, including:

[0014] Determine first width information based on target ambient light brightness and text width information;

[0015] If the first width information is less than or equal to the first width threshold, determining the first width information as diffusion width information;

[0016] If the first width information is greater than the first width threshold, the first width threshold is determined as the diffusion width information.

[0017] In some embodiments of the present application, diffusion processing is performed on edge pixels of text based on diffusion width information and edge brightness information to obtain target image information, including:

[0018] comparing the diffusion width information with a second width threshold;

[0019] If the diffusion width information is less than or equal to the second width threshold, diffusion processing is performed on the edge pixels of the text based on the edge brightness information to obtain target image information;

[0020] If the diffusion width information is greater than a second width threshold, determining reference brightness information based on the diffusion width information and the edge brightness information;

[0021] The edge pixels of the text are diffused based on the reference brightness information to obtain the target image information.

[0022] In some embodiments of the present application, diffusion processing is performed on edge pixels of text based on reference brightness information to obtain target image information, including:

[0023] Determine first brightness information of each diffusion layer corresponding to the text based on the reference brightness information and the preset brightness attenuation parameter;

[0024] The brightness values ​​corresponding to each diffusion layer are adjusted based on the first brightness information to obtain target image information.

[0025] In some embodiments of the present application, after the edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain the target image information, the following steps are included:

[0026] Get the window size information corresponding to the characters in the target image information;

[0027] Based on the window size information and the target ambient light brightness, determine the target brightness information and target color information corresponding to the text;

[0028] Based on the target brightness information and the target color information, the text in the target image information is adjusted.

[0029] In some embodiments of the present application, based on the window size information and the target ambient light brightness, the target brightness information and the target color information corresponding to the text are determined, including:

[0030] Dividing the target ambient light brightness by the reference ambient light brightness to obtain first parameter information;

[0031] Dividing the window size information and the reference size information to obtain second parameter information;

[0032] Determine target brightness information corresponding to the text based on the reference brightness information, the first parameter information, and the second parameter information;

[0033] Based on the reference color information and the first parameter information, target color information corresponding to the text is determined.

[0034] In a second aspect, an embodiment of the present invention further provides an image processing device, including:

[0035] An information acquisition module is used to acquire the image information to be processed and the target ambient light brightness;

[0036] An image detection module is used to detect and process the text in the image information to be processed to obtain the edge position information and text width information of the text;

[0037] The image processing module is used to perform diffusion processing on the edge pixels of the text based on the target ambient light brightness, edge position information and text width information to obtain the target image information.

[0038] In a third aspect, the present application further provides a computer device, the computer device comprising:

[0039] one or more processors;

[0040] Memory; and

[0041] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement any image processing method in the first aspect.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the image processing methods in the first aspect.

[0043] The beneficial effects of the present invention are as follows: by detecting and processing the text in the image information to be processed to obtain the edge position information and text width information of the text, and based on the target ambient light brightness, edge position information and text width information, the edge pixels of the text are diffused to obtain the target image information, which can reduce the color edge and ghosting problems generated by high color gamut display devices when displaying text, and improve the clarity and visual comfort of the text. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention 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 recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 is a schematic diagram of a flow chart of an image processing system provided by an embodiment of the present invention;

[0046] Figure 2 is a flowchart of an image processing method provided by an embodiment of the present invention;

[0047] Figure 3 It is a schematic diagram of a specific embodiment of the process of diffusing edge pixels of text provided by an embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of a specific scenario of performing diffusion processing on edge pixels of text provided by an embodiment of the present invention;

[0049] Figure 5 is another flowchart of the image processing method provided by an embodiment of the present invention;

[0050] Figure 6 is a principle block diagram of an image processing device provided by an embodiment of the present invention;

[0051] Figure 7 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0053] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, features defined as "first", "second", "third" and the like may explicitly or implicitly include one or more of the said features.

[0054] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0055] It should be noted that since the method of the embodiment of the present application is executed in a computer device, the processing objects of each computer device exist in the form of data or information. For example, time is actually time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data for processing by the computer device. The details will not be repeated here.

[0056] The embodiments of the present application provide an image processing method, apparatus, computer device, and computer-readable storage medium, which are described in detail below.

[0057] See also Figure 1 , Figure 1 Schematic diagram of a scene of an image processing system provided in an embodiment of the present application. The image processing system may include a computer device 100, in which an image processing device is integrated, such as Figure 1 Computer equipment in.

[0058] In the embodiment of the present application, the computer device 100 is mainly used to obtain the image information to be processed and the target ambient light brightness; detect and process the text in the image information to be processed to obtain the edge position information and text width information of the text; based on the target ambient light brightness, edge position information and text width information, diffuse the edge pixels of the text to obtain the target image information, which can reduce the color edges and ghosting problems generated by high color gamut display devices when displaying text, and improve the clarity and visual comfort of the text.

[0059] In the embodiment of the present application, the computer device 100 may be an independent server, or a server network or server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0060] It is understandable that the computer device 100 used in the embodiments of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The computer device 100 may specifically be a desktop terminal or a mobile terminal, and the computer device 100 may specifically be one of a mobile phone, a tablet computer, a laptop computer, and the like.

[0061] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or less computer equipment as shown in Figure 1 Only one computer device is shown in the figure. It can be understood that the image processing system can also include one or more other services, which are not specifically limited here.

[0062] In addition, if Figure 1 As shown, the image processing system may further include a memory 200 for storing data, such as image information, such as image information to be processed, target image information, etc., such as width information, such as diffusion width information, a first width threshold, a second width threshold, etc.

[0063] It should be noted that Figure 1The scene diagram of the image processing system shown is only an example. The image processing system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the image processing system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0064] First, an image processing method is provided in an embodiment of the present application. The executor of the image processing method is an image processing device, and the image processing device is applied to a computer device. The image processing method includes: obtaining image information to be processed and target ambient light brightness; detecting and processing text in the image information to be processed to obtain edge position information and text width information of the text; and diffusing edge pixels of the text based on the target ambient light brightness, edge position information and text width information to obtain target image information.

[0065] like Figure 2 FIG. 2 is a flow chart of an embodiment of an image processing method in an embodiment of the present application. The image processing method may include the following steps S201 to S203, which are as follows:

[0066] Step S201: Obtain image information to be processed and target ambient light brightness.

[0067] In the embodiment of the present application, the image information to be processed is an image containing text acquired by a computer device. The image information to be processed may be image information acquired by an imaging module configured by the computer device itself, or image information acquired by an imaging module of other computer devices through the network, Bluetooth, infrared, etc., which is not limited in the present embodiment. For example, when the image processing method of the present application is applied to a smart phone, the smart phone can directly acquire the image information to be processed through the imaging module configured by itself; when the image processing method of the present application is applied to a server, the server can acquire the image information to be processed through the imaging module of the smart phone, and acquire the image information to be processed from the smart phone through the network, Bluetooth, infrared, etc.

[0068] Furthermore, the image information to be processed is displayed by a target display device, and the target ambient light brightness is the light intensity of the environment surrounding the target display device, which directly affects the display effect of the target display device and the visual experience of the user. The target display device and the computer device can be the same device, or they can be different devices. The target display device is a high color gamut display device, such as a TV, a mobile phone, a tablet computer, etc., which is not limited in this embodiment.

[0069] Optionally, the target ambient light brightness may be collected in real time by a light sensor disposed on the target display device. For example, when the target display device is a mobile phone, the ambient light brightness may be monitored in real time by a front or rear light sensor of the mobile phone.

[0070] Step S202: Detect and process the text in the image information to be processed to obtain the text edge position information and text width information.

[0071] In the embodiment of the present application, the edge position information represents the edge position of the text in the image information to be processed in the image information to be processed, and the edge position information can be obtained by performing edge detection on the text in the image information to be processed using an edge detection algorithm. The edge detection algorithm can use a Sobel operator, or a Canny edge detection algorithm, which is not limited in this embodiment.

[0072] Furthermore, the text width information represents the text width in the image information to be processed. The text width information can be used to identify the text in the image information to be processed through optical character recognition (OCR) technology, thereby determining the text width in the image information to be processed. The text width information can also be used to locate the text area in the image information to be processed through deep learning technology, thereby obtaining the text width, which is not limited in this embodiment.

[0073] Step S203: performing diffusion processing on edge pixels of the text based on the target ambient light brightness, edge position information and text width information to obtain target image information.

[0074] In the embodiment of the present application, edge pixels refer to pixels at the edge of text, for example, Figure 3 As shown, pixel 21 is an edge pixel. Diffusion processing of edge pixels refers to a process in which the pixel values ​​from the edge pixels to the direction away from the text gradually transition from large to small or from small to large. For example, referring to Figure 3 As shown, pixel 21 is a 0% grayscale pixel, pixel 22 is a 50% grayscale pixel, and pixel 23 is a 90% grayscale pixel, or pixel 21 is a 90% grayscale pixel, pixel 22 is a 50% grayscale pixel, and pixel 23 is a 0% grayscale pixel.

[0075] Furthermore, the target image information is the processed image information obtained by diffusion processing the edge pixels of the text. The embodiment of the present application detects and processes the text in the image information to be processed to obtain the edge position information and text width information of the text. The edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain the target image information. This can reduce the color edges and ghosting problems generated by high color gamut display devices when displaying text, thereby improving the clarity and visual comfort of the text.

[0076] In a specific implementation, referring to Figure 4 As shown, in the above step S203, the edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain the target image information, which may include steps S301 to S303, which are specifically as follows:

[0077] Step S301: Determine diffusion width information based on target ambient light brightness and text width information.

[0078] In an embodiment of the present application, the diffusion width information represents the width of the characters in the image information to be processed that need to be diffused, and the unit of the diffusion width information is pixel. For example, the diffusion width information is 3 pixels, the diffusion width information is 4 pixels, the diffusion width information is 5 pixels, etc.

[0079] In a specific embodiment, the step of determining the diffusion width information based on the target ambient light brightness and text width information specifically includes: determining the first width information based on the target ambient light brightness and text width information; if the first width information is less than or equal to the first width threshold, determining the first width information as the diffusion width information; if the first width information is greater than the first width threshold, determining the first width threshold as the diffusion width information.

[0080] In an embodiment of the present application, based on the target ambient light brightness and the text width information, the step of determining the first width information specifically includes: multiplying the text width information and the third parameter information to obtain the fourth parameter information; multiplying the target ambient light brightness and the fifth parameter information to obtain the sixth parameter information; adding the fourth parameter information and the sixth parameter information to obtain the first width information.

[0081] Optionally, the process of determining the first width information can be expressed as: D = λ1 × W f +k×Lenv, where D represents the first width information, W f Indicates the text width information, Lenv indicates the target ambient light brightness, λ1 indicates the third parameter information, k indicates the fifth parameter information, and the third parameter information and the fifth parameter information can be set as needed. In a specific embodiment, 0<λ1<1, optionally, λ1=0.1, then D=0.1×W f +k×Lenv.

[0082] Furthermore, the process of determining the diffusion width information can be expressed as: d =min(D, M), D represents the first width information, M represents the first width threshold, W d Indicates the diffusion width information. For example, when λ = 0.1, W d =min(λ1×W f+k×Lenv,M).

[0083] Step S302: Determine edge brightness information based on edge position information.

[0084] In the embodiment of the present application, the edge brightness information is the brightness value of the edge pixels in the image information to be processed. After the edge position information is determined, the pixel value of the position corresponding to the edge position information in the image information to be processed is obtained to obtain the edge brightness information.

[0085] Step S303: perform diffusion processing on edge pixels of the text based on the diffusion width information and the edge brightness information to obtain target image information.

[0086] In a specific embodiment, the above-mentioned step of performing diffusion processing on the edge pixels of the text based on the diffusion width information and the edge brightness information to obtain the target image information specifically includes: comparing the diffusion width information with the second width threshold; if the diffusion width information is less than or equal to the second width threshold, performing diffusion processing on the edge pixels of the text based on the edge brightness information to obtain the target image information; if the diffusion width information is greater than the second width threshold, determining the reference brightness information based on the diffusion width information and the edge brightness information; and performing diffusion processing on the edge pixels of the text based on the reference brightness information to obtain the target image information.

[0087] In an embodiment of the present application, the second width threshold is a pre-set threshold for measuring the size of the diffusion width information. The second width threshold can be set as needed. For example, the second width threshold can be set to 3 pixels, the second width threshold can also be set to 4 pixels, and the second width threshold can also be set to 5 pixels. This embodiment is not limited.

[0088] In some embodiments, if the diffusion width information is less than or equal to the second width threshold, the step of diffusing the edge pixels of the text based on the edge brightness information to obtain the target image information specifically includes: determining the first brightness information of each diffusion layer corresponding to the text based on the edge brightness information; adjusting the brightness value corresponding to each diffusion layer based on the first brightness information to obtain the target image information. For example, if the second width threshold is 3 pixels and the edge brightness information is 100% grayscale pixels, if the diffusion width information is 2 pixels, the first brightness information of the first diffusion layer is determined to be 50% grayscale pixels based on the edge brightness information, and the first brightness information of the second diffusion layer is determined to be 0% grayscale pixels.

[0089] In other embodiments, if the diffusion width information is greater than the second width threshold, the reference brightness information is determined based on the diffusion width information and the edge brightness information, and the edge pixels of the text are diffused based on the reference brightness information to obtain the target image information. For example, if the second width threshold is 3 pixels and the diffusion width information is 4 pixels, the reference brightness information is determined based on the diffusion width information and the edge brightness information, and the edge pixels of the text are diffused based on the reference brightness information to obtain the target image information.

[0090] In a specific embodiment, the step of determining the reference brightness information based on the diffusion width information and the edge brightness information specifically includes: determining the seventh parameter information based on the diffusion width information and the reference width information; and multiplying the seventh parameter information and the edge brightness information to obtain the reference brightness information.

[0091] Optionally, the determination process of the seventh parameter information can be expressed as: The determination process of the reference brightness information can be expressed as: d =B0×R,B d represents the reference brightness information, R represents the seventh parameter information, B0 represents the edge brightness information, λ2 represents the eighth parameter information, W d Represents the diffusion width information, W max The eighth parameter information and the reference width information can be set according to actual needs. For example, when λ2=3,

[0092] In a specific embodiment, the step of diffusing the edge pixels of the text based on the reference brightness information to obtain the target image information specifically includes: determining the first brightness information of each diffusion layer corresponding to the text based on the reference brightness information and a preset brightness attenuation parameter; and adjusting the brightness value corresponding to each diffusion layer based on the first brightness information to obtain the target image information.

[0093] Optionally, the process of determining the first brightness information can be expressed as: d,i =B d ×(1-α×(i-1)), where B d,i represents the first brightness information of the i-th diffusion layer, B d represents the reference brightness information, α represents the brightness attenuation parameter, and the brightness attenuation parameter α can be set according to actual needs.

[0094] In a specific implementation, referring to Figure 5 As shown, in the above step S203, after the edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain the target image information, steps S401 to S403 may be included, which are specifically as follows:

[0095] Step S401: Obtain window size information corresponding to the characters in the target image information.

[0096] In the embodiment of the present application, the window size information represents the size of the program window on the display screen, and determines the size of the space occupied by the program window on the screen. In the programming environment, the window size information can be obtained by querying the properties of the window object. For example, in many graphical user interface libraries, methods such as getWidth() and getHeight() can be called to obtain the width and height of the window, thereby obtaining the window size information.

[0097] Step S402: Determine target brightness information and target color information corresponding to the text based on the window size information and the target ambient light brightness.

[0098] In a specific embodiment, the steps of determining the target brightness information and target color information corresponding to the text based on the window size information and the target ambient light brightness specifically include: dividing the target ambient light brightness and the reference ambient light brightness to obtain the first parameter information; dividing the window size information and the reference size information to obtain the second parameter information; determining the target brightness information corresponding to the text based on the reference brightness information, the first parameter information and the second parameter information; and determining the target color information corresponding to the text based on the reference color information and the first parameter information.

[0099] In an embodiment of the present application, the step of determining the target brightness information corresponding to the text based on the reference brightness information, the first parameter information and the second parameter information specifically includes: multiplying the reference brightness information, the first parameter information and the second parameter information to obtain the target brightness information corresponding to the text.

[0100] Optionally, the process of determining the target brightness information can be expressed as: text =B base ×(Lenv / Lmax)×Fsize, where B text Indicates the target brightness information, B base represents the reference brightness information, Lenv represents the target ambient light brightness, Lmax represents the reference ambient light brightness, and Fsize represents the second parameter information.

[0101] Furthermore, the window size information includes first width information and first height information, the reference size information includes second width information and second height information, and the determination process of the second parameter information can be expressed as: Wherein, W represents the first width information, H represents the first height information, and W max Indicates the second width information, H max Indicates the second height information.

[0102] In a specific embodiment, the step of determining the target color information corresponding to the text based on the reference color information and the first parameter information specifically includes: subtracting the ninth parameter information from the first parameter information to obtain the tenth parameter information; multiplying the tenth parameter information and the preset color adjustment amplitude to obtain the eleventh parameter information; adding the eleventh parameter information and the reference color information to obtain the target color information corresponding to the text.

[0103] Optionally, the process of determining the target color information can be expressed as: text =C base +ΔC×(λ3-Lenv / Lmax), where C text Indicates the target color information, C base represents the reference color information, ΔC represents the preset color adjustment range, λ3 represents the ninth parameter information, Lenv represents the target ambient light brightness, and Lmax represents the reference ambient light brightness. base , the color adjustment amplitude ΔC can be set according to actual needs. In a specific embodiment, 0<λ3≤1, optionally, λ3=1, then C text =C base +ΔC×(1-Lenv / Lmax).

[0104] Step S403: Based on the target brightness information and the target color information, the text in the target image information is adjusted.

[0105] The embodiment of the present application determines the target brightness information and target color information corresponding to the text based on the window size information and the target ambient light brightness, and adjusts the text in the target image information based on the target brightness information and the target color information, which can further improve the clarity and comfort of the text display.

[0106] In order to better implement the image processing method in the embodiment of the present application, based on the image processing method, an image processing device is also provided in the embodiment of the present application, such as Figure 6 As shown, the image processing device 600 includes:

[0107] The information acquisition module 610 is used to acquire the image information to be processed and the target environment brightness;

[0108] An image detection module 620 is used to detect and process the text in the image information to be processed, and obtain the edge position information and text width information of the text;

[0109] The image processing module 630 is used to perform diffusion processing on edge pixels of text based on target ambient light brightness, edge position information and text width information to obtain target image information.

[0110] In an embodiment of the present application, the edge position information and text width information of the text are obtained by detecting and processing the text in the image information to be processed, and the edge pixels of the text are diffused based on the target ambient light brightness, edge position information and text width information to obtain the target image information. This can reduce the color edges and ghosting problems caused by high color gamut display devices when displaying text, thereby improving the clarity and visual comfort of the text.

[0111] In some embodiments of the present application, the image processing module 630 performs diffusion processing on edge pixels of text based on target ambient light brightness, edge position information and text width information to obtain target image information, including:

[0112] Determine diffusion width information based on target ambient light brightness and text width information;

[0113] Based on the edge position information, determine edge brightness information;

[0114] The edge pixels of the text are diffused based on the diffusion width information and the edge brightness information to obtain the target image information.

[0115] In some embodiments of the present application, the image processing module 630 determines the diffusion width information based on the target ambient light brightness and the text width information, including:

[0116] Determine first width information based on target ambient light brightness and text width information;

[0117] If the first width information is less than or equal to the first width threshold, determining the first width information as diffusion width information;

[0118] If the first width information is greater than the first width threshold, the first width threshold is determined as the diffusion width information.

[0119] In some embodiments of the present application, the image processing module 630 performs diffusion processing on edge pixels of text based on diffusion width information and edge brightness information to obtain target image information, including:

[0120] comparing the diffusion width information with a second width threshold;

[0121] If the diffusion width information is less than or equal to the second width threshold, diffusion processing is performed on the edge pixels of the text based on the edge brightness information to obtain target image information;

[0122] If the diffusion width information is greater than a second width threshold, determining reference brightness information based on the diffusion width information and the edge brightness information;

[0123] The edge pixels of the text are diffused based on the reference brightness information to obtain the target image information.

[0124] In some embodiments of the present application, the image processing module 630 performs diffusion processing on edge pixels of text based on reference brightness information to obtain target image information, including:

[0125] Determine first brightness information of each diffusion layer corresponding to the text based on the reference brightness information and the preset brightness attenuation parameter;

[0126] The brightness values ​​corresponding to each diffusion layer are adjusted based on the first brightness information to obtain target image information.

[0127] In some embodiments of the present application, the image processing module 630 performs diffusion processing on edge pixels of text based on target ambient light brightness, edge position information and text width information. After obtaining target image information, the image processing module 630 is further used to:

[0128] Get the window size information corresponding to the characters in the target image information;

[0129] Based on the window size information and the target ambient light brightness, determine the target brightness information and target color information corresponding to the text;

[0130] Based on the target brightness information and the target color information, the text in the target image information is adjusted.

[0131] In some embodiments of the present application, the image processing module 630 determines the target brightness information and target color information corresponding to the text based on the window size information and the target ambient light brightness, including:

[0132] Dividing the target ambient light brightness by the reference ambient light brightness to obtain first parameter information;

[0133] Dividing the window size information and the reference size information to obtain second parameter information;

[0134] Determine target brightness information corresponding to the text based on the reference brightness information, the first parameter information, and the second parameter information;

[0135] Based on the reference color information and the first parameter information, target color information corresponding to the text is determined.

[0136] The embodiment of the present application further provides a computer device, which integrates any one of the image processing devices provided in the embodiment of the present application, and the computer device includes:

[0137] one or more processors;

[0138] Memory; and

[0139] One or more applications, wherein the one or more applications are stored in the memory and are configured to execute, by the processor, the steps of the image processing method in any of the above-mentioned image processing method embodiments.

[0140] The present application also provides a computer device that integrates any image processing device provided in the present application. Figure 7 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:

[0141] The computer device may include one or more processing core processors 801, one or more computer-readable storage media memories 802, a power supply 803, an input unit 804 and other components. Those skilled in the art will appreciate that Figure 7 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0142] The processor 801 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.

[0143] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0144] The computer device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 803 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0145] The computer device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0146] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802, thereby realizing various functions, as follows:

[0147] Obtaining the image information to be processed and the target ambient light brightness;

[0148] Detect and process the text in the image information to be processed to obtain the edge position information and text width information of the text;

[0149] Based on the target ambient light brightness, edge position information and text width information, the edge pixels of the text are diffused to obtain the target image information.

[0150] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0151] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any image processing method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:

[0152] Obtaining the image information to be processed and the target ambient light brightness;

[0153] Detect and process the text in the image information to be processed to obtain the edge position information and text width information of the text;

[0154] Based on the target ambient light brightness, edge position information and text width information, the edge pixels of the text are diffused to obtain the target image information.

[0155] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0156] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0157] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0158] The above is a detailed introduction to an image processing method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An image processing method, characterized in that: include: Obtaining the image information to be processed and the target ambient light brightness; Detecting and processing the text in the image information to be processed to obtain edge position information and text width information of the text; The edge pixels of the text are diffused based on the target ambient light brightness, the edge position information and the text width information to obtain target image information.

2. The method according to claim 1, characterized in that The step of performing diffusion processing on edge pixels of the text based on the target ambient light brightness, the edge position information and the text width information to obtain target image information includes: Determining diffusion width information based on the target ambient light brightness and the text width information; Based on the edge position information, determining edge brightness information; The edge pixels of the text are diffused based on the diffusion width information and the edge brightness information to obtain target image information.

3. The method according to claim 2, characterized in that The step of determining diffusion width information based on the target ambient light brightness and the text width information includes: Determining first width information based on the target ambient light brightness and the text width information; If the first width information is less than or equal to a first width threshold, determining the first width information as diffusion width information; If the first width information is greater than the first width threshold, the first width threshold is determined as the diffusion width information.

4. The method according to claim 2, characterized in that: The step of performing diffusion processing on edge pixels of the text based on the diffusion width information and the edge brightness information to obtain target image information includes: comparing the diffusion width information with a second width threshold; If the diffusion width information is less than or equal to the second width threshold, diffusion processing is performed on edge pixels of the text based on the edge brightness information to obtain target image information; If the diffusion width information is greater than the second width threshold, determining reference brightness information based on the diffusion width information and the edge brightness information; The edge pixels of the text are diffused based on the reference brightness information to obtain target image information.

5. The method according to claim 4, characterized in that The step of performing diffusion processing on edge pixels of the text based on the reference brightness information to obtain target image information includes: Determining first brightness information of each diffusion layer corresponding to the text based on the reference brightness information and a preset brightness attenuation parameter; The brightness values ​​corresponding to the respective diffusion layers are adjusted based on the first brightness information to obtain target image information.

6. The method according to any one of claims 1 to 5, characterized in that: After the edge pixels of the text are diffused based on the target ambient light brightness, the edge position information and the text width information to obtain the target image information, the method includes: Obtaining window size information corresponding to the characters in the target image information; Based on the window size information and the target ambient light brightness, determining the target brightness information and the target color information corresponding to the text; Based on the target brightness information and the target color information, the text in the target image information is adjusted.

7. The method according to claim 6, characterized in that The determining, based on the window size information and the target ambient light brightness, target brightness information and target color information corresponding to the text includes: Dividing the target ambient light brightness and the reference ambient light brightness to obtain first parameter information; Dividing the window size information and the reference size information to obtain second parameter information; Determining target brightness information corresponding to the text based on reference brightness information, the first parameter information, and the second parameter information; Based on the reference color information and the first parameter information, target color information corresponding to the text is determined.

8. An image processing device, characterized in that: include: An information acquisition module is used to acquire the image information to be processed and the target ambient light brightness; An image detection module is used to detect and process the text in the image information to be processed to obtain edge position information and text width information of the text; The image processing module is used to perform diffusion processing on the edge pixels of the text based on the target ambient light brightness, the edge position information and the text width information to obtain target image information.

9. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the image processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the image processing method according to any one of claims 1 to 7.