Character display method, character display device, vehicle and storage medium

By obtaining and analyzing the color complexity of the background image on the smart terminal screen, and determining the target color using corresponding color adjustment methods, the problem of unclear character display caused by wallpaper replacement is solved, and character highlighting and user experience are improved.

CN120126431APending Publication Date: 2025-06-10GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311685598.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

On the smart terminal screen, wallpaper replacement may cause unclear characters to be displayed, reducing user experience.

Method used

By obtaining a background image overlapping with the character display area in the target image of the terminal screen, the color complexity of the current color in the background image is determined. If the color complexity is less than or equal to the preset threshold, use the color inverted adjustment method to determine the target color; if the color complexity exceeds the threshold, use the color inverted adjustment method to determine the target color, and display characters based on the target color in the character display area.

Benefits of technology

Make characters more prominent on the display image of the terminal screen, and improve the convenience and experience of the user when reading the character content displayed in the terminal screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126431A_ABST
    Figure CN120126431A_ABST
Patent Text Reader

Abstract

The invention provides a character display method, a character display device, a vehicle and a storage medium, and relates to the technical field of terminals. The method comprises the following steps: acquiring a background image overlapped with the position of a character display area in a terminal screen in a target image of the terminal screen; determining the color complexity of the current color in the background image; wherein the color complexity is used for representing the distribution of the current color; if the color complexity is smaller than or equal to a preset complex threshold value, determining a target color of the character based on a color inversion adjustment mode and the current color; if the color complexity is greater than a preset complex threshold value, determining a target color based on an adjustment mode of adding a pure color image and an adjustment mode of color inversion; and displaying the character based on the target color in the character display area. According to the method, the characters can be highlighted on the display image of the terminal screen, so that a user can read the character content displayed in the terminal screen more easily.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and more particularly, to a method for displaying characters, a device for displaying characters, a vehicle, and a storage medium in the technical field of terminals. Background Art

[0002] With the rapid development of intelligent terminals, intelligent terminals are widely used in people's daily lives, providing great convenience for people's lives. When users use intelligent terminals, they can change the wallpapers displayed on the screens of the intelligent terminals according to their preferences. However, the replaced wallpapers may cause the characters to be unable to be clearly displayed, making it difficult for users to read the character content displayed on the terminal screens and reducing the user experience.

[0003] Therefore, how to make the characters prominently displayed on the terminal screen is an urgent problem to be solved currently. Summary of the Invention

[0004] This application provides a method for displaying characters, a device for displaying characters, a vehicle, and a storage medium. This method can make the characters prominently displayed on the display image of the terminal screen, enabling users to more easily read the character content displayed on the terminal screen.

[0005] In a first aspect, a method for displaying characters is provided. The method includes:

[0006] Obtain a background image in a target image of a terminal screen that overlaps with a character display area on the terminal screen; determine the color complexity of the current color in the background image, where the color complexity is used to represent the distribution of the current color; if the color complexity is less than or equal to a preset complexity threshold, determine the target color of the character based on the adjustment method of color inversion and the current color; if the color complexity is greater than the preset complexity threshold, determine the target color based on the adjustment method of adding a solid color image and the adjustment method of color inversion; and display the character in the character display area based on the target color.

[0007] In an embodiment of the present application, after obtaining a background image that overlaps with the position of the character display area on the target image of the terminal screen, the complexity of the current color distribution in the background image (which can be referred to as "color complexity") can be determined; furthermore, if the color complexity is less than or equal to a preset complexity threshold, it can be indicated that the color distribution of the current color in the background image is relatively simple, that is, the background image for displaying characters is not an image with a high complexity; by using a color inversion adjustment method to obtain a color opposite to the current color from the current color in the background image and using this color as the target color of the character, the display color of the character can form a large color contrast with the current color in the background image, enabling the character to be more prominently displayed on the display image of the terminal screen and making it easier for the user to read the characters displayed on the terminal screen.

[0008] Moreover, if the color complexity is greater than the preset complexity threshold, it can be indicated that the color distribution of the current color in the background image is relatively complex, that is, the background image for displaying characters is an image with a high complexity; by combining an adjustment method of adding a solid color image and an adjustment method of color inversion, the character can be displayed on a solid color image whose color is the opposite of its own color, thereby enabling the character to be more prominently displayed on the display image of the terminal screen and making it easier for the user to read the characters displayed on the terminal screen.

[0009] Combined with the first aspect, in some implementation manners of the first aspect, the above-mentioned determination of the target color of the character based on the adjustment method of color inversion and the current color when the color complexity is less than or equal to the preset complexity threshold includes:

[0010] If the color complexity is less than or equal to the preset complexity threshold, determine the target adjustment method for the target color; wherein, the target adjustment method includes the adjustment method of color inversion; based on the adjustment method of color inversion and the current color, determine the opposite color of the current color, and use the opposite color of the current color as the target color.

[0011] In an embodiment of the present application, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, it can be indicated that the color distribution of the current color in the background image is relatively simple, that is, the background image for displaying characters is not an image with a high complexity; the current color in the background image can be inverted by using the adjustment method of color inversion, and the color obtained by inverting the current color in the background image is used as the display color of the character, which can make the display color of the character form a large color contrast with the current color in the background image, enabling the character to be more prominently displayed on the display image of the terminal screen and making it easier for the user to read the characters displayed on the terminal screen.

[0012] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, when the color complexity is greater than a preset complexity threshold, determining a target color based on the adjustment manner of adding a solid color image and the adjustment manner of color inversion includes:

[0013] When the color complexity is greater than a preset complexity threshold, determining a target adjustment manner for the target color; wherein, the target adjustment manner includes the adjustment manner of adding a solid color image and the adjustment manner of color inversion; based on the adjustment manner of adding a solid color image, adding a solid color image to the background image; based on the adjustment manner of color inversion, determining the inverse color of the solid color image color, and taking the inverse color of the solid color image color as the target color.

[0014] In the embodiments of the present application, when the color complexity of the current color in the background image is greater than a preset complexity threshold, it can be stated that the color distribution of the current color in the background image is relatively complex, that is, the background image for displaying characters is an image with a relatively high complexity; if the current color in the background image is inverted through the adjustment manner of color inversion and the inverted color of the current color in the background image is used as the display color of the characters, it may cause the display color of the characters to be relatively complex, that is, there are too many display colors of the characters, resulting in difficulty for the user to read the characters; therefore, by adding a solid color image to the background image through the adjustment manner of adding a solid color image, and then obtaining the color that is the inverse color of the solid color image color through the adjustment manner of color inversion as the display color of the characters, the characters can be more prominently displayed on the solid color image that is the inverse color of their own color, making it easier for the user to read the characters displayed on the terminal screen.

[0015] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, determining the inverse color of the current color based on the adjustment manner of color inversion and the current color, and taking the inverse color of the current color as the target color includes:

[0016] Determining the proportion of each color in the current color; based on the adjustment manner of color inversion, determining the inverse color of the color corresponding to the maximum value in the proportion of each color; taking the inverse color of the color corresponding to the maximum value as the target color.

[0017] In the embodiments of the present application, when the color complexity of the background image is less than or equal to a preset complexity threshold, the color corresponding to the maximum value in the proportion of each color in the background image can be inverted through the adjustment manner of color inversion, and the inverse color of the color corresponding to the maximum value is taken as the target color of the characters, which can avoid the display color of the characters being too complex after inverting each color in the background image, resulting in the characters not being accurately read by the user; since the target color is the inverse color of the color with the largest area in the background image, the characters can be more prominently displayed on the background image.

[0018] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the determining the color complexity of the current color in the background image includes:

[0019] Obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain a plurality of sub-regions; determine the difference in the number between the plurality of sub-regions and a preset number threshold; based on the difference in number, query the color complexity corresponding to the difference in number in a preset correspondence relationship; wherein the preset correspondence relationship is used to represent the correspondence relationship between the difference in number and the color complexity.

[0020] In the embodiments of the present application, at least two pixel points with the same color and adjacent positions in the background image are classified to obtain a plurality of sub-regions; and the difference in the number between the plurality of sub-regions and a preset number threshold is calculated; since at least two pixel points with the same color and adjacent positions are classified before calculating the difference in number, the possibility of taking each pixel point as a sub-region is avoided, the number of sub-regions is reduced, the subsequent process of calculating the difference in number is simplified, thereby improving the acquisition efficiency of the color complexity, so as to improve the acquisition efficiency of the display color of characters.

[0021] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the determining the color complexity of the current color in the background image includes:

[0022] Obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain a plurality of sub-regions; determine the area of each sub-region in the plurality of sub-regions; add the areas of at least two sub-regions with the same color in each sub-region to obtain the distribution area of each color; determine the area difference between the target area and the area of the background image in the distribution area; wherein the target area is used to represent the largest distribution area in the distribution area; based on the area difference, query the color complexity corresponding to the area difference in a preset association relationship; wherein the preset association relationship is used to represent the correspondence relationship between the area difference and the color complexity.

[0023] In the embodiments of the present application, after classifying at least two pixel points with the same color and adjacent positions in the background image to obtain multiple sub-regions, the areas of at least two sub-regions with the same color among the multiple sub-regions are added to obtain the distribution area of each color; and the area difference between the largest distribution area and the area of the background image in the distribution area of each color is calculated; since when calculating the area and adding the areas of at least two sub-regions with the same color to obtain the distribution area of each color, that is, there are as many distribution areas as there are colors in the background image, thus avoiding the possibility of taking each sub-region as a target area and only obtaining the largest distribution area, simplifying the subsequent process of calculating the area difference, thereby improving the acquisition efficiency of color complexity and improving the acquisition efficiency of the display color of characters.

[0024] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the method further includes:

[0025] Obtain the color lightness of the current color; perform a difference calculation on the color lightness, and determine the color lightness after the difference calculation as the target lightness, where the color lightness is different from the target lightness; the above-mentioned displaying the character based on the target color in the character display area includes: in the character display area, displaying the character based on the target color and the target lightness.

[0026] In the embodiments of the present application, by performing a difference calculation on the color lightness of the current color in the background image, the color lightness after the difference calculation is determined as the target lightness, and the color lightness is different from the target lightness; since the color lightness is different from the target lightness, the color lightness of the current color in the background image and the color lightness of the character color are different, that is, a light and dark difference is generated; for example, if the color lightness of the current color in the background image is large, the color lightness of the corresponding character color is small, so that a contrast is formed between the color lightness of the current color in the background image and the color lightness of the character color, thereby enabling the user to more accurately read the character content due to the light and dark difference between the color lightness of the character color and the color lightness of the current color in the background image when reading the character.

[0027] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the method further includes:

[0028] Store the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, query the target color in the mapping relationship; where the mapping relationship is used to represent the one-to-one correspondence between the target color and the identifier of the target image.

[0029] In the embodiments of the present application, the relationship between the target color and the identifier of the target image displayed on the terminal screen can be stored in a one-to-one correspondence, which is convenient for quickly calling the target color corresponding to the identifier of the target image based on the stored mapping relationship between the identifier of the target image and the target color when the same image is displayed on the terminal screen next time, without having to calculate the display color of the characters again. This enables the acquisition of the target color to be more timely, so that the replacement of the character color can be more timely, allowing the user to read the accurate character content more quickly.

[0030] In a second aspect, a device for displaying characters is provided. The device includes:

[0031] An acquisition module: used to acquire the background image that overlaps the position of the character display area on the terminal screen in the target image of the terminal screen; a first determination module: used to determine the color complexity of the current color in the background image, where the color complexity is used to represent the distribution of the current color; a second determination module: used to, if the color complexity is less than or equal to a preset complexity threshold, determine the target color of the character based on the adjustment method of color inversion and the current color; a third determination module: used to, if the color complexity is greater than the preset complexity threshold, determine the target color based on the adjustment method of adding a solid-color image and the adjustment method of color inversion; a display module: used to display the character in the character display area based on the target color.

[0032] In combination with the second aspect, in some implementation manners of the second aspect, the second determination module is specifically used for:

[0033] If the color complexity is less than or equal to the preset complexity threshold, determine the target adjustment method of the target color, where the target adjustment method includes the adjustment method of color inversion; based on the adjustment method of color inversion and the current color, determine the inverse color of the current color, and use the inverse color of the current color as the target color.

[0034] In combination with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the third determination module is specifically used for:

[0035] If the color complexity is greater than the preset complexity threshold, determine the target adjustment method of the target color, where the target adjustment method includes the adjustment method of adding a solid-color image and the adjustment method of color inversion; based on the adjustment method of adding a solid-color image, add a solid-color image to the background image; based on the adjustment method of color inversion, determine the inverse color of the color of the solid-color image, and use the inverse color of the color of the solid-color image as the target color.

[0036] In combination with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the second determination module is specifically used for:

[0037] Determine the proportion of each color in the current color; based on the adjustment method of the complementary color, determine the complementary color of the color corresponding to the maximum value among the proportions of each color; use the complementary color of the color corresponding to the maximum value as the target color.

[0038] Combined with the second aspect and the above implementation, in some implementations of the second aspect, the first determination module is specifically configured to:

[0039] Obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determine the difference in the number between the number of multiple sub-regions and the preset number threshold; based on the difference in number, query the color complexity corresponding to the difference in number in the preset correspondence; where the preset correspondence is used to represent the correspondence between the difference in number and the color complexity.

[0040] Combined with the second aspect and the above implementation, in some implementations of the second aspect, the first determination module is specifically configured to:

[0041] Obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determine the area of each sub-region among the multiple sub-regions; add the areas of at least two sub-regions with the same color in each sub-region to obtain the distribution area of each color; determine the area difference between the target area and the area of the background image in the distribution area; where the target area is used to represent the largest distribution area in the distribution area; based on the area difference, query the color complexity corresponding to the area difference in the preset association relationship; where the preset association relationship is used to represent the correspondence between the area difference and the color complexity.

[0042] Combined with the second aspect and the above implementation, in some implementations of the second aspect, the device further includes a difference module for:

[0043] Obtain the color lightness of the current color; perform a difference calculation on the color lightness, and determine the color lightness after the difference calculation as the target lightness, where the color lightness is different from the target lightness; the display module is specifically configured to: in the character display area, display the character based on the target color and the target lightness.

[0044] Combined with the second aspect and the above implementation, in some implementations of the second aspect, the device further includes a storage module for:

[0045] Store the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, query the target color in the mapping relationship; where the mapping relationship is used to represent the one-to-one correspondence between the target color and the identifier of the target image.

[0046] In a third aspect, a vehicle is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the vehicle executes the method in the first aspect or any possible implementation manner of the first aspect above.

[0047] In a fourth aspect, a computer program product is provided, including: computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect above.

[0048] In a fifth aspect, a computer-readable storage medium is provided, which stores computer program code, and when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect above. Description of the Drawings

[0049] Figure 1 is a schematic diagram of a scenario for displaying characters provided by an embodiment of the present application.

[0050] Figure 2 is a flowchart of a method for displaying characters provided by an embodiment of the present application.

[0051] Figure 3 is a schematic diagram of the wallpaper color distribution provided by an embodiment of the present application.

[0052] Figure 4 is a flowchart of another method for displaying characters provided by an embodiment of the present application.

[0053] Figure 5 is a schematic diagram of the structure of a device for displaying characters provided by an embodiment of the present application.

[0054] Figure 6 is a schematic diagram of the structure of a vehicle provided by an embodiment of the present application. Detailed Embodiments

[0055] Hereinafter, the technical solutions in the present application will be clearly and elaborately described in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B: "and / or" in the text is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.

[0056] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.

[0057] Currently, during the process of using a smart terminal, a user can change the wallpaper displayed on the screen of the smart terminal according to their preferences. However, the replaced wallpaper may cause the characters to be not clearly displayed, making it difficult for the user to read the character content displayed on the terminal screen and reducing the user experience.

[0058] Optionally, the terminal screen may include, but is not limited to, a central control screen in a vehicle, a mobile phone, a computer, a wearable device, etc. Moreover, it is not limited that the wallpaper on the terminal screen causes the characters to be not clearly displayed. It can also be that the currently displayed image on the terminal screen causes the characters to be not clearly displayed.

[0059] To more clearly illustrate that the characters cannot be clearly displayed on the smart terminal, the scenarios of the smart terminal displaying characters can be introduced through Figure 1 the scenarios of the smart terminal displaying characters.

[0060] Figure 1 is a schematic diagram of the scenarios of displaying characters provided by an embodiment of the present application.

[0061] Exemplarily, as shown in (a) of Figure 1 , Figure 1 in (a) includes a central control screen 110 in a vehicle, a wallpaper 111 displayed on the central control screen 110, and the operating parameters of the vehicle, such as the vehicle speed value (68 km / h) and gear information (P gear), displayed in area 112 of the wallpaper 111. Among them, area 113 is an enlarged display of area 112.

[0062] Referring to Figure 1 , the wallpaper 111 is alternately composed of "black" and "white" squares (i.e., pixel points), and when the color of the operating parameters of the vehicle is black, it is the same as the color of some black squares. As shown in (b) of Figure 1 , layer 120 is the layer where the wallpaper 111 is located, and layer 130 is the layer where the operating parameters of the vehicle are located. When layer 130 is above layer 120, there may be a corresponding area 121 on layer 120 in the area 131 for displaying the operating parameters of the vehicle. When the color of area 121 is similar to the color of the operating parameters of the vehicle, or the color of area 121 is too complex, it may cause the operating parameters in area 131 to not be clearly displayed (as shown in (a) of Figure 1 ).

[0063] It should be understood that the area 121 should include the area 131, and the area of the area 121 is greater than or equal to the area of the area 131. In addition, the wallpaper 111 is only for illustrative purposes, and the patterns and colors in the central control screen are not limited in the embodiments of the present application.

[0064] For the driving safety of the vehicle, the regulations of our country require that the operating parameters of the vehicle can be clearly displayed to the user on the central control screen 110. The user can set the wallpaper of the vehicle central control screen according to personal preferences. If the set wallpaper is Figure 1 the wallpaper 111 as shown, the operating parameters of the vehicle cannot be clearly displayed, which increases the difficulty for the user to read the operating parameters and may easily pose a threat to the driving safety of the vehicle.

[0065] To solve the problem that characters are not clearly displayed on the terminal screen, the present application proposes a method for displaying characters, a device for displaying characters, a vehicle, and a storage medium.

[0066] Next, in combination with Figures 2 to 4 the method for displaying characters provided in the embodiments of the present application will be described in detail.

[0067] Figure 2 FIG. is a schematic flow chart of a method for displaying characters provided in the embodiments of the present application. This method can be executed by the vehicle, or by the host in the vehicle.

[0068] Exemplarily, as Figure 2 shown, the method 200 includes the following implementation processes:

[0069] S210, obtaining a background image in the target image of the terminal screen that overlaps with the position of the character display area in the terminal screen.

[0070] Optionally, the target image can be used to represent the image currently displayed on the terminal screen. For example, as Figure 1 the wallpaper shown in (a) in, or the current interface of a certain application software (Application, APP), etc.

[0071] Optionally, the character display area is used to display text or icons on the terminal screen, such as Figure 1 the area 131 shown in (b) in; the background image is the overlapping area corresponding to the character display area in the target image, such as Figure 1 the area 121 shown in (b) in; wherein, the character display area and the background image are not in the same layer, and the layer of the character display area is above the layer of the background image, so that the characters included in the character display area can be displayed on the background image.

[0072] Exemplarily, it is possible to obtain the image currently displayed on the terminal screen (for example, as Figure 1the wallpaper shown in (a) therein) and the position of the character display area in the terminal screen (such as Figure 1 the area 131 shown in (b) therein), and then obtain the area image (which can be called the "background image") that overlaps with the position of the character display area in the image, such as Figure 1 the area 121 shown in (b) therein.

[0073] S220. Determine the color complexity of the current color in the background image.

[0074] Among them, the color complexity is used to represent the distribution of the current color in the background image.

[0075] Optionally, there is a corresponding relationship between the color complexity and the distribution of the current color in the background image. If the distribution of the current color in the background image is more disordered, the corresponding color complexity is higher.

[0076] Exemplarily, after obtaining the background image that overlaps with the position of the character display area in the image, the color complexity of the current color in the background image can be calculated.

[0077] In a possible implementation manner, the above determination of the color complexity of the current color in the background image may include: obtaining the positions and colors of each pixel point in the background image; classifying at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determining the difference in the number between the multiple sub-regions and a preset number threshold; and querying the color complexity corresponding to the number difference in the preset corresponding relationship based on the number difference.

[0078] Among them, the preset corresponding relationship can be used to represent the corresponding relationship between the number difference and the color complexity. For example, the color complexity corresponding to the number difference from 3 to 5 is 20%, and the color complexity corresponding to the number difference from 6 to 8 is 50%. The embodiments of the present application do not limit this.

[0079] Optionally, the greater the difference in the number between the multiple sub-regions and the preset number threshold (such as Figure 3 shown in (a) therein), the greater the corresponding color complexity. And the preset number threshold is related to the area size of the background image and may also be related to the user's acceptance degree of the number of colors, with individual differences. The embodiments of the present application do not limit this.

[0080] Optionally, since the preset quantity threshold may be related to the area size of the background image, the preset quantity threshold can be adjusted according to the area of the background image; specifically, the larger the area of the background image, the larger the corresponding preset quantity threshold, and the smaller the area of the background image, the smaller the corresponding preset quantity threshold. For example, when the area of the background image is 20, the corresponding preset quantity threshold is set to 10; when the area of the background image is 12, the corresponding preset quantity threshold is set to 5, so that the preset quantity threshold matches the area size of the background image more, making the determined color complexity of the current color in the background image more accurate.

[0081] Exemplarily, the background image is composed of multiple pixel points. The color complexity of the current color in the background image can be obtained from the positions and colors of each pixel point in the background image. Among them, the pixel points in the background image can be represented by multiple "black" and multiple "white" squares with equal areas in region 113 as shown in (a) of Figure 1 and the size of each square is the same.

[0082] Exemplarily, the positions and colors of each pixel point in the background image can be obtained, as shown in (b) of Figure 3 The color of the pixel point at position 310 is black, the color of the pixel point at position 320 is black, the color of the pixel point at position 330 is white, and the color of the pixel point at position 340 is black.

[0083] Optionally, the background graphic can be segmented into multiple sub-regions according to the obtained positions and colors of each pixel point, and the color in each sub-region is the same, as shown in (b) of Figure 3 The color in sub-region 311 is all black.

[0084] Exemplarily, at least two pixel points with the same color and adjacent positions in the background image can be classified, as shown in (b) of Figure 3 Since the pixel point at position 310 and the pixel point at position 320 are adjacent in position and both have a color of black, the pixel point at position 310 and the pixel point at position 320 can be classified into the same region, that is, sub-region 311; similarly, at least two other pixel points with the same color and adjacent positions in the background image are also classified, thus obtaining multiple sub-regions.

[0085] Optionally, if there are at least two pixel points with the same color and adjacent positions among all the pixel points, the two sub-regions can be clustered by the color aggregation vector algorithm to obtain multiple clustered sub-regions.

[0086] Exemplarily, as shown in Figure 3As shown in (a) therein, the pixel points of "black" and "white" alternate with each other, and there are no two adjacent pixel points with the same color. Therefore, Figure 3 the background image shown in (a) therein does not meet the classification conditions; while Figure 3 in (b) therein, there are at least two adjacent pixel points with the same color. For example, the pixel point at position 310 and the pixel point at position 320; since the colors of the pixel point at position 310 and the pixel point at position 320 are both black, the pixel point at position 310 and the pixel point at position 320 can be clustered by the color aggregation vector algorithm, that is, the pixel point at position 310 and the pixel point at position 320 are classified into the same region, namely the sub-region 311 after clustering; on the contrary, Figure 3 although the pixel point at position 330 in (b) therein has the color white and the pixel point at position 320 are adjacent but have different colors, the pixel point at position 330 and the pixel point at position 320 cannot be clustered. Or, Figure 3 although the pixel point at position 310 and the pixel point at position 340 in (b) therein have the same color but are not adjacent, the pixel point at position 310 and the pixel point at position 340 cannot be clustered either.

[0087] Furthermore, count the number of multiple sub-regions after classification. As Figure 3 shown in (a) therein, Figure 3 the number of sub-regions of the background image in (a) therein is counted as 20; and, as Figure 3 shown in (b) therein, Figure 3 the number of sub-regions of the background image in (b) therein is counted as 9; by comparison, it can be obtained that Figure 3 the number of sub-regions of the background image in (a) therein is much larger than Figure 3 the number of sub-regions of the background image in (b) therein, which indicates that Figure 3 the color complexity of the current color in the background image in (a) therein is much larger than Figure 3 the color complexity of the current color in the background image in (b) therein.

[0088] Optionally, when the area of the background image is 12, the corresponding preset number threshold is set to 5, and the difference in the number of sub-regions obtained after region segmentation in the background image and the preset number threshold can be calculated; as Figure 3 shown in (a) therein, Figure 3 the number of sub-regions of the background image in (a) therein is counted as 20, calculate Figure 3 the difference in the number of sub-regions of the background image in (a) therein and the preset number threshold, that is, "20 - 5 = 15"; as Figure 3as shown in (b) therein Figure 3 In (b) therein, the number of sub-regions of the background image is counted as 9, and calculate Figure 3 In (b) therein, the difference in the number between the number of sub-regions of the background image and the preset number threshold, that is, "9 - 5 = 4"; through comparison, it can be obtained that Figure 3 In (a) therein, the difference in the number between the number of sub-regions of the background image and the preset number threshold is much larger than Figure 3 In (b) therein, the difference in the number between the number of sub-regions of the background image and the preset number threshold, that is Figure 3 In (b) therein, the number of sub-regions of the background image is much smaller than Figure 3 In (a) therein, the number of sub-regions of the background image, then it can be explained that Figure 3 In (a) therein, the color complexity of the current color in the background image is much larger than Figure 3 In (b) therein, the color complexity of the current color in the background image.

[0089] Optionally, it can also be through Figure 3 In (b) therein, the difference in the number between the number of sub-regions of the background image and the preset number threshold, that is, "9 - 5 = 4", query the color complexity corresponding to the number difference 4 in the preset correspondence relationship, and obtain that the color complexity corresponding to the number difference 4 is 20%, which can indicate that the color complexity corresponding to the number difference 4 is relatively low.

[0090] It should be noted that Figure 3 In (a) therein and Figure 3 The patterns and colors shown in (b) therein are only for illustrative purposes, and the patterns and colors in the target image displayed on the terminal screen are not limited in the embodiments of the present application.

[0091] In the embodiments of the present application, at least two pixel points with the same color and adjacent positions in the background image are classified to obtain a plurality of sub-regions; and the difference in the number between the number of these sub-regions and the preset number threshold is calculated; since at least two pixel points with the same color and adjacent positions are classified before calculating the difference in the number, the possibility of taking each pixel point as a sub-region is avoided, the number of sub-regions is reduced, the process of calculating the difference in the number subsequently is simplified, thereby improving the acquisition efficiency of the color complexity, so as to improve the acquisition efficiency of the display color of the characters.

[0092] In a possible implementation, the determination of the color complexity of the current color in the background image may include: obtaining the positions and colors of each pixel point in the background image; classifying at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determining the area of each sub-region among the multiple sub-regions; adding the areas of at least two sub-regions with the same color in each sub-region to obtain the distribution area of each color; determining the area difference between the target area and the area of the background image in the distribution area; where the target area is used to represent the largest distribution area in the distribution area; based on the area difference, query the color complexity corresponding to the area difference in the preset association relationship.

[0093] Among them, the preset association relationship can be used to represent the corresponding relationship between the area difference and the color complexity. For example, the color complexity corresponding to the area difference of 5 to 10 is 30%, and the color complexity corresponding to the area difference of 11 to 15 is 40%. The embodiments of the present application do not limit this.

[0094] Optionally, the larger the area difference between the largest distribution area and the area of the background image, the greater the corresponding color complexity; conversely, the smaller the area difference between the largest distribution area and the area of the background image, the smaller the corresponding color complexity.

[0095] Exemplarily, the positions and colors of each pixel point in the background image can be obtained; at least two pixel points with the same color and adjacent positions among each pixel point can be classified to obtain multiple sub-regions; since the specific method for obtaining multiple sub-regions is introduced in the above related content, it will not be elaborated here.

[0096] Furthermore, the area of each sub-region among the multiple sub-regions can be calculated, and the areas of at least two sub-regions with the same color can be added up to obtain the distribution area corresponding to each color. As Figure 3 shown in (b) of Figure 3 In (b) of Figure 3 there are two colors, "black" and "white". The areas of all sub-regions with the color of black can be added up to obtain the distribution area of black as 12; the areas of all sub-regions with the color of white can be added up to obtain the distribution area of white as 8. And,

[0097] Further, the area difference between the maximum distribution area and the area of the background image can be calculated, i.e., "20 - 12 = 8"; then, query the color complexity corresponding to the area difference of 8 in the preset association relationship, and the color complexity corresponding to the area difference of 8 is obtained as 30%, which can indicate that the color complexity corresponding to the area difference of 8 is relatively low.

[0098] It should be noted that since the area difference between the maximum distribution area and the area of the background image is calculated for each color's distribution area, if the area difference is smaller, it can indicate that the color of most areas in the background image is the color corresponding to the maximum distribution area, and further indicate that the color complexity of the current color in the background image is smaller; if the area difference is larger, it can indicate that there are more colors in the background image and the distribution area is smaller, and further indicate that the color complexity of the current color in the background image is larger. Therefore, through the area difference between the maximum distribution area and the area of the background image in each color's distribution area of the background image, the size of the color complexity of the current color in the background image can also be obtained.

[0099] In the embodiment of the present application, after classifying at least two pixel points with the same color and adjacent positions in the background image to obtain multiple sub-regions, the areas of at least two sub-regions with the same color in the multiple sub-regions are also added together to obtain the distribution area of each color; and calculate the area difference between the maximum distribution area and the area of the background image in the distribution area of each color; since when calculating the area and adding the areas of at least two sub-regions with the same color, the distribution area of each color is obtained, that is, there are as many distribution areas as there are colors in the background image, thus avoiding the possibility of taking each sub-region as a target area and only obtaining the maximum distribution area, simplifying the subsequent process of calculating the area difference, thereby improving the acquisition efficiency of the color complexity and improving the acquisition efficiency of the display color of the characters.

[0100] S230, if the color complexity is less than or equal to the preset complexity threshold, based on the adjustment method of color inversion and the current color, determine the target color of the character.

[0101] Optionally, the preset complexity threshold can be used to represent the critical value of the color complexity. For example, 50%; this preset threshold can be set according to user requirements, and the embodiment of the present application does not limit this.

[0102] Optionally, the adjustment method of color inversion can invert the red (R), green (G), and blue (B) values in the color to generate a color with a large contrast to the current color in the background image. For example, the inverse color of red is green; the inverse color of black is white.

[0103] Exemplarily, the magnitude relationship between the color complexity of the current color in the background image and the preset complexity threshold can be determined in the above manner. If the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, the display color (i.e., the target color) of the character can be determined based on the color inversion adjustment method and the current color.

[0104] Optionally, if the color complexity is less than or equal to the preset complexity threshold, determining the target color of the character based on the color inversion adjustment method and the current color may include: if the color complexity is less than or equal to the preset complexity threshold, determining the target adjustment method for the target color; wherein the target adjustment method includes the color inversion adjustment method; based on the color inversion adjustment method and the current color, determining the inverse color of the current color, and taking the inverse color of the current color as the target color.

[0105] Exemplarily, if the color complexity of the current color in the background image is 30%, which is less than the preset complexity threshold of 50%, it can be determined that the adjustment method for the target color of the character is the color inversion adjustment method. Furthermore, by using the color inversion adjustment method to invert the current color in the background image, a target color that is the inverse color of the current color in the background image is obtained, and the target color is used as the display color of the character.

[0106] In the embodiments of the present application, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, it can be explained that the color distribution of the current color in the background image is relatively simple, that is, the background image for displaying the character is not an image with a high complexity. The current color in the background image can be inverted by using the color inversion adjustment method, and the color obtained by inverting the current color in the background image is used as the display color of the character, which can make the display color of the character form a large color contrast with the current color in the background image, enabling the character to be more prominently displayed on the display image of the terminal screen and making it easier for the user to read the character displayed on the terminal screen.

[0107] In a possible implementation manner, determining the inverse color of the current color based on the color inversion adjustment method and the current color, and taking the inverse color of the current color as the target color may include: determining the proportion of each color in the current color; based on the color inversion adjustment method, determining the inverse color of the color corresponding to the maximum proportion among the proportions of each color; and taking the inverse color of the color corresponding to the maximum proportion as the target color.

[0108] Exemplarily, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, the areas of each color in the background image can be counted, and the ratio of the area of each color to the total area of the background image can be calculated, so as to obtain the proportion of each color in the background image. For example Figure 3As shown in (b) therein, the proportion of black is 75% and the proportion of white is 25%. Sorting the proportions of black and white in sequence, it is obtained that the proportion of black is the largest; the black corresponding to the largest proportion of 75% is inverted through the above color inversion adjustment method to generate the inverted color of black, that is, white, and white is determined as the display color of the character.

[0109] In the embodiment of the present application, if the color complexity of the background image is less than or equal to the preset complexity threshold, the color corresponding to the maximum proportion value of each color in the background image can be inverted through the color inversion adjustment method, and the inverted color of the color corresponding to the maximum value is used as the target color of the character, which can avoid that after inverting each color in the background image, the display color of the character is too complex, resulting in the character not being accurately read by the user; since the target color and the color with the largest area in the background image are inverted to each other, the character can be more prominently displayed on the background image.

[0110] S240, if the color complexity is greater than the preset complexity threshold, determine the target color based on the adjustment method of adding a pure color image and the adjustment method of color inversion.

[0111] Optionally, the adjustment method of adding a pure color image can add an image above the background image. In order to avoid too high color complexity of the colors in the added image, the color of the added image is set to a pure color, that is, the added image only contains one color (which can be called a "pure color image"). For example, in Figure 1 As shown in (b), between region 121 and region 131, a pure color image that completely overlaps region 121 is added, so that the background image corresponding to the character in region 131 is replaced with a pure color image, that is, after the pure color image is added, it can also be used as the background image corresponding to the character in region 131. Among them, the color of the pure color image can be preset to black or white, etc.; it can also be the color corresponding to the above maximum distribution area, so as to make the added pure color image fit the background image as much as possible, avoid the problem that the color of the pure color image is quite different from the current color in the background image, and improve the user's visual experience.

[0112] Optionally, the adjustment method of adding a pure color image can also represent pure color filling of the background image, so that the color in the background image is the same color, and the color of the pure color filling can be preset to black or white, etc.; it can also be the color corresponding to the above maximum distribution area.

[0113] Exemplarily, through the above method, the size between the color complexity of the current color in the background image and the preset complexity threshold can be determined. If the color complexity of the current color in the background image is greater than the preset complexity threshold, the target color can be determined based on the adjustment method of adding a pure color image and the adjustment method of color inversion.

[0114] It should be noted that in the above adjustment method of adding a solid-color image, the color of the image has been limited, and the color of the image is a solid color; therefore, by adjusting the color of the image through color inversion, the inverse color of the color of the image can be obtained.

[0115] Optionally, if the color complexity is greater than a preset complexity threshold, based on the adjustment method of adding a solid-color image and the adjustment method of color inversion, determining the target color may include: if the color complexity is greater than the preset complexity threshold, determining the target adjustment method for the target color; wherein, the target adjustment method includes the adjustment method of adding a solid-color image and the adjustment method of color inversion; based on the adjustment method of adding a solid-color image, adding a solid-color image to the background image; based on the adjustment method of color inversion, determining the inverse color of the color of the solid-color image, and using the inverse color of the color of the solid-color image as the target color.

[0116] Exemplarily, if the color complexity of the current color in the background image is 80%, which is greater than the preset complexity threshold of 50%, it can be determined that the adjustment method for the target color of the character is a combination of the adjustment method of adding a solid-color image and the adjustment method of color inversion. Furthermore, a solid-color image is added to the background image through the adjustment method of adding a solid-color image; then, based on the adjustment method of color inversion, the color of the added solid-color image is inverted to obtain a target color that is the inverse color of the color of the solid-color image, and the target color is used as the display color of the character.

[0117] Alternatively, if the color complexity of the current color in the background image is greater than the preset complexity threshold, the background image can be filled with a solid color to obtain a solid-color background image; then, based on the adjustment method of color inversion, the color of the background image after solid-color filling is inverted to obtain a target color that is the inverse color of the color of the background image after solid-color filling, and the target color is used as the display color of the character.

[0118] Or, if the color complexity of the current color in the background image is greater than the preset complexity threshold, the color of the character can also be inverted to generate the inverse color of the character color, and the inverse color of the character color is used as the color of the solid-color image, which can also form a large contrast between the display color of the character and the color of the solid-color image.

[0119] Optionally, if the background image is currently in a dynamically changing state, that is, the terminal screen changes the displayed image multiple times within a preset duration, a solid-color background whose color is the inverse of the character color can be added between the background image and the character display area, so that the character is displayed on a static solid-color background, which can avoid the problem that the background image changes too fast, causing visual fatigue of the user and making the user dizzy and unable to see the character clearly, so that the character can also be prominently displayed on the dynamic image and clearly seen by the user.

[0120] It should be noted that S230 and S240 are not executed simultaneously. When the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, S230 is executed; or when the color complexity of the current color in the background image is greater than the preset complexity threshold, S240 is executed.

[0121] In the embodiments of the present application, when the color complexity of the current color in the background image is greater than the preset complexity threshold, it can be explained that the color distribution of the current color in the background image is relatively complex, that is, the background image for displaying characters is an image with a higher complexity; if the current color in the background image is inverted through the color inversion adjustment method, and the inverted color of the current color in the background image is used as the display color of the character, it may cause the display color of the character to be relatively complex, that is, there are too many display colors of the character, making it difficult for the user to read the character; therefore, by adding a solid color image through the adjustment method of adding a solid color image to the background image, and then obtaining the color that is the inverse of the solid color image through the color inversion adjustment method as the display color of the character, the character can be more prominently displayed on the solid color image that is the inverse of its own color, making it easier for the user to read the characters displayed on the terminal screen.

[0122] In a possible implementation, store the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, the target color is queried in the mapping relationship.

[0123] Among them, the mapping relationship is used to represent that the target color corresponds one-to-one with the identifier of the target image.

[0124] Exemplarily, a mapping relationship can be established between the target color (for example, white) and the identifier of the target image (for example, image coding and name, etc.), and this mapping relationship is stored. For example, store the mapping relationship between white and image A, so that when the display image on the terminal screen is image A again, the character can be directly displayed in white without calculating the display color of the character again.

[0125] In the embodiments of the present application, the relationship between the target color and the identifier of the target image displayed on the terminal screen can be stored one-to-one, which is convenient for when the same image is displayed on the terminal screen next time, without calculating the display color of the character again. Based on the mapping relationship between the stored identifier of the target image and the target color, the target color corresponding to the identifier of the target image can be quickly called, so that the acquisition of the target color can be more timely, and thus the replacement of the character color can be more timely, enabling the user to read the accurate character content more quickly.

[0126] S250, display the character in the character display area based on the target color.

[0127] Exemplarily, in the character display area 131 as shown in Figure 1 Figure, the obtained target color can be used to display characters, so that the characters can be clearly displayed on the background image.

[0128] In Figure 2 the method 200 shown in Figure, after obtaining the background image that overlaps with the position of the character display area in the target image of the terminal screen, the complexity of the current color distribution in the background image (which can be called "color complexity") can be determined; furthermore, if the color complexity is less than or equal to a preset complexity threshold, it can be indicated that the current color distribution in the background image is relatively simple, that is, the background image for displaying characters is not an image with a high complexity. By using the adjustment method of color inversion to obtain a color opposite to the current color in the background image and using this color as the target color of the character, the display color of the character forms a large color contrast with the current color in the background image, enabling the character to be more prominently displayed on the display image of the terminal screen and making it easier for the user to read the characters displayed on the terminal screen.

[0129] In addition, if the color complexity is greater than the preset complexity threshold, it can be indicated that the current color distribution in the background image is relatively complex, that is, the background image for displaying characters is an image with a high complexity. By combining the adjustment method of adding a pure color image and the adjustment method of color inversion, the character can be displayed on a pure color image whose color is the opposite of its own color, so that the character is more prominently displayed on the display image of the terminal screen and making it easier for the user to read the characters displayed on the terminal screen.

[0130] Moreover, since the target color of the character is not only obtained based on the current color in the background image, but first determines the corresponding adjustment method based on the color complexity of the current color in the background image. That is, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, the determined adjustment method is the color inversion adjustment method; if the color complexity of the current color in the background image is greater than the preset complexity threshold, the determined adjustment method is the combination of the adjustment method of adding a pure color image and the adjustment method of color inversion; then, based on the determined adjustment method, the target color of the character is obtained, so that the determined target color of the character can be more accurate.

[0131] In a possible implementation, the color lightness of the background image is obtained; the difference calculation is performed on the color lightness, and the lightness after the difference calculation is determined as the target lightness; in the above-mentioned character display area, based on the target color to display the running parameters, including: in the character display area, displaying the character based on the target color and the target lightness.

[0132] Among them, the color lightness is different from the target lightness, that is, the lightness of the current color in the background image is different from the lightness of the character color.

[0133] Exemplarily, in addition to obtaining the display color of the character, the lightness of the current color in the background image and the lightness of the character color can be set so that the lightness of the current color in the background image is different from the lightness of the character color, that is, a light and dark difference is generated, so that the character can be prominently displayed on the background image.

[0134] Optionally, the color corresponding to the largest area in the current color of the background image can be obtained, and the difference between the color lightness (for example, 60%) of the color corresponding to the largest area and the standard lightness can be calculated to obtain "100% - 60% = 40%", that is, 40% is used as the target lightness; furthermore, in the character display area, the corresponding character can be displayed with the target color (for example, white) and 40% lightness.

[0135] It should be noted that the color lightness refers to the brightness of the color. Colors have changes in depth and lightness. For example, yellow colors such as dark yellow, medium yellow, light yellow, and lemon yellow are different in lightness, and red colors such as blood red, deep red, rose red, big red, vermilion, and orange red are also different in brightness. These different changes in lightness and depth of colors are the changes in color lightness. And the standard lightness can be preset and related to the user's preference, and the embodiments of the present application do not limit this.

[0136] In the embodiments of the present application, by calculating the difference in the color lightness of the current color in the background image, the color lightness after the difference calculation is determined as the target lightness, and the color lightness is different from the target lightness; because the color lightness is different from the target lightness, the lightness of the current color in the background image is different from the lightness of the character color, that is, a light and dark difference is generated; for example, if the lightness of the current color in the background image is large, the lightness of the corresponding character color is small, so that a contrast is formed between the lightness of the current color in the background image and the lightness of the character color, so that when the user reads the character, due to the light and dark difference between the lightness of the character color and the lightness of the current color in the background image, the character content can be read more accurately.

[0137] Figure 4 It is a schematic flowchart of another method for displaying characters provided by the embodiments of the present application.

[0138] Exemplarily, as Figure 4 shown, the method 400 includes the following implementation processes:

[0139] S401, obtain the background image that overlaps with the position of the character display area in the target image of the terminal screen.

[0140] For example, the image currently displayed on the terminal screen can be obtained (for example, Figure 1 The wallpaper shown in (a) in the figure) and the position of the character display area in the terminal screen (such as Figure 1 After the area 131 shown in (b) in the figure is obtained, an image of the area in the image that overlaps with the position of the character display area (which may be referred to as a "background image") is obtained, such as Figure 1 The area 121 shown in (b) in FIG.

[0141] Optionally, if a replacement process of the current wallpaper of the terminal screen is detected, the ratio of the size of the target wallpaper to the size of the terminal screen can be calculated; based on the ratio, the background image corresponding to the character display area after the new wallpaper is replaced can be calculated.

[0142] Exemplarily, when it is detected that the current wallpaper of the terminal screen has been replaced, the ratio of the size of the new wallpaper (which may be called "target wallpaper") to the size of the target screen can be calculated, and the background image of the character display area corresponding to the replacement of the new wallpaper can be calculated based on the ratio. That is, when the user selects a new wallpaper, the background image of the character display area can be directly calculated by the ratio of the size of the new wallpaper to the size of the target screen. There is no need to obtain the background image after the new wallpaper is displayed on the target screen. That is, the time for obtaining the background image is advanced, so that the acquisition of the background image is more timely, and on the basis of obtaining the background image more timely, the target color can be determined faster, so that the characters are displayed more quickly and prominently on the background image.

[0143] S402 obtains the position and color of each pixel in the background image.

[0144] For example, the position and color of each pixel in the background image can be obtained, such as Figure 3 As shown in (b), the color of the pixel at position 310 is black, the color of the pixel at position 320 is black, and the color of the pixel at position 330 is white.

[0145] S403: Classify at least two pixels with the same color and adjacent positions among the pixels to obtain a plurality of sub-regions.

[0146] For example, at least two pixels in the background image that have the same color and are adjacent to each other may be classified, such as Figure 3 As shown in (b), the pixel at position 310 and the pixel at position 320 can be classified into the same area, namely, sub-area 311; similarly, at least two other pixels of the same color and adjacent positions in the background image are also classified to obtain multiple sub-areas.

[0147] S404. Determine the difference in the number between the number of multiple sub-regions and a preset number threshold.

[0148] Exemplarily, the number of the classified multiple sub-regions can be counted, and the difference in the number between the number of sub-regions obtained after region segmentation in the background image and the preset number threshold can be calculated (for example, the difference in number is 4).

[0149] S405. Based on the difference in number, query the color complexity corresponding to the difference in number in the preset corresponding relationship.

[0150] Exemplarily, through the difference in number 4, the color complexity corresponding to the difference in number 4 can be queried in the preset corresponding relationship, and the color complexity corresponding to the difference in number 4 is obtained as 20%.

[0151] S406. Determine the area of each sub-region among the multiple sub-regions.

[0152] Exemplarily, after region segmentation of the background image to obtain multiple sub-regions, the area of each sub-region among the multiple sub-regions can also be calculated.

[0153] S407. Add the areas of at least two sub-regions with the same color among each sub-region to obtain the distribution area of each color.

[0154] Exemplarily, the areas of at least two sub-regions of the same color can be added up to obtain the distribution area corresponding to each color. As Figure 3 shown in (b) of Figure 3 in (b) includes two colors, "black" and "white". The areas of all sub-regions with the color of black can be added up to obtain the distribution area of black as 12; the areas of all sub-regions with the color of white can be added up to obtain the distribution area of white as 8. And, Figure 3 the area of the background image in (b) is 20.

[0155] S408. Determine the difference in area between the largest distribution area in the distribution areas and the area of the background image.

[0156] Exemplarily, the distribution areas of each color in the background image are sorted from largest to smallest in turn to obtain the largest distribution area among the multiple distribution areas. For example, the distribution area of black is 12. Further, calculate the difference in area between the largest distribution area and the area of the background image, that is, "20 - 12 = 8", that is, the difference in area is 8.

[0157] S409. Based on the difference in area, query the color complexity corresponding to the difference in area in the preset association relationship.

[0158] Exemplarily, the color complexity corresponding to the area difference 8 can be queried in the preset association relationship through the area difference 8, and the color complexity corresponding to the area difference 8 is obtained as 30%.

[0159] It should be noted that any one of S404 and S405, and S406, S407, S408, and S409 can be executed to obtain the color complexity.

[0160] Optionally, after obtaining multiple sub-regions, the color, position identifier, and area of each sub-region in the multiple sub-regions can be obtained. This can be illustrated by Table 1:

[0161] Table 1

[0162] Position identifier of the sub-region Color of the sub-region Area of the sub-region A Red 5 B Yellow 11 C Red 22 D Red 8 E Blue 7 F Green 4

[0163] From Table 1, the position identifier, corresponding color, and area of each sub-region in the background image can be obtained. For example, the color of sub-region A is red and the area is 5; the color of sub-region B is red and the area is 11; similarly, the color of sub-region F is green and the area is 4. This is not listed one by one here and can be referred to the above introduction.

[0164] Optionally, according to the preset classification rules, for example, the colors of each region can be divided into a cold color system and a warm color system according to the warm and cold color systems of the colors. Referring to Table 1, it can be obtained that red and yellow belong to the warm color system, and blue and green belong to the cold color system.

[0165] Optionally, a corresponding weight value can be set for each color according to the warm and cold degree of the color. For example, the weight value of red is 0.4, and the weight value of yellow is 0.3; the weight value of blue is 0.2, and the weight value of green is 0.6. The weight value corresponding to each color can be set according to user needs, and the embodiments of the present application do not limit this.

[0166] Exemplarily, the warm color value of the current color in the background image can be calculated through formula (1); and the cold color value of the current color in the background image can be calculated through formula (2).

[0167] Warm color value = weight 红 × area 红 + weight 黄 × area 黄 / total area of warm color sub-regions (1)

[0168] Cold color value = weight 蓝 × area 蓝 + weight 绿 × area 绿 / total area of warm color sub-regions (2)

[0169] Exemplarily, it can be seen from formula (1) that the warm color value of the current color in the background image is calculated by first calculating the product value of the weight of each color and its own area, then summing up multiple product values and calculating the ratio to the total area of the warm color region in the background image. Referring to Table 1, the warm color value = 0.4×(5 + 22 + 8) + 0.3×11 / (5 + 22 + 8 + 11) = 0.38.

[0170] Exemplarily, it can be seen from formula (2) that the calculation of the cool color value of the current color in the background image is the same as that of the warm color value, which is also to first calculate the product value of the weight of each color and its own area, then sum up multiple product values and calculate the ratio to the total area of the warm color region in the background image. Referring to Table 1, the cool color value = 0.2×7 + 0.6×4 / (7 + 4) = 0.23.

[0171] Further, compare the calculated warm color value and cool color value. If the warm color value > the cool color value, the total area of the sub-regions where the color belongs to the warm color system can be calculated, and the area difference between this total area and the area of the background image can be calculated; if the calculated area difference is smaller, it can indicate that there are more warm color system colors in the current color of the background image, and the corresponding color complexity is smaller.

[0172] Conversely, if the warm color value < the cool color value, the total area of the sub-regions where the color belongs to the cool color system can be calculated, and the area difference between this total area and the area of the background image can be calculated; if the calculated area difference is smaller, it can indicate that there are more cool color system colors in the current color of the background image, and the corresponding color complexity is smaller.

[0173] Optionally, if it is obtained that the warm color value > the cool color value, the color complexity of the current color in the background image can be obtained through the sub-regions where the color belongs to the warm color system and the areas of the corresponding sub-regions are before the preset sorting.

[0174] Exemplarily, the areas of the sub-regions of the warm color system can be sorted from large to small. Referring to Table 1, the obtained position sorting corresponding to the area size is: sub-region C > sub-region B > sub-region D > sub-region A; if the preset sorting is set to 2, the larger sub-regions C and B in the warm color system can be screened out. By calculating the sum of the areas of sub-region C and sub-region B, that is, "22 + 11 = 33", and calculating the percentage of this area sum 33 to the area of the background image, if the calculated percentage is greater than the preset percentage (for example, 70%), it can indicate that the color complexity of the current color in the background image is lower. This is because the calculated percentage is greater than 70%, which can indicate that the sub-regions of the warm color system in the background image are larger than those of the cool color system, and there are large same-color sub-regions in the sub-regions of the warm color system, thus indicating that the color complexity of the current color in the background image is lower.

[0175] Optionally, if the obtained warm color value < cold color value, the color complexity of the current color in the background image can be obtained through the sub-regions where the colors belong to the cold color system and the areas of the corresponding sub-regions are before the preset sorting.

[0176] Exemplarily, the areas of the sub-regions of the cold color system can be sorted in descending order. Referring to Table 1, the position sorting corresponding to the area sizes can be obtained: Sub-region E > Sub-region F; if the preset sorting is set to 1, the sub-region E with the largest area in the cold color system can be screened out. By calculating the percentage of the area of sub-region F to the area of the background image, if the calculated percentage is greater than the preset percentage (for example, 70%), it can be explained that the color complexity of the current color in the background image is relatively low. This is because the calculated percentage is greater than 70%, indicating that the sub-regions of the cold color system in the background image are larger than those of the warm color system, and there are sub-regions with relatively large areas of the same color in the sub-regions of the cold color system, thus indicating that the color complexity of the current color in the background image is relatively low.

[0177] It should be noted that the preset percentage can be set according to the user's preference, which can be 70% or 60%, etc. The embodiments of the present application do not limit this.

[0178] S410. Determine whether the color complexity is greater than the preset complexity threshold. If not, execute S411; if so, execute S413.

[0179] Exemplarily, after calculating the color complexity, it can be determined whether the color complexity of the current color in the background image is greater than the preset complexity threshold.

[0180] S411. Determine that the target adjustment method of the target color of the character is the adjustment method of color inversion.

[0181] Exemplarily, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, it can be determined that the target adjustment method of the target color of the character is the adjustment method of color inversion.

[0182] S412. Based on the adjustment method of color inversion and the current color in the background image, determine the inverse color of the current color, and use the inverse color of the current color as the target color of the character.

[0183] Exemplarily, if the color complexity of the current color in the background image is less than or equal to the preset complexity threshold, the current color in the background image can be inverted through the determined adjustment method of color inversion to obtain the target color that is the inverse color of the current color in the background image, and use the target color as the display color of the character.

[0184] S413. Determine that the target adjustment methods for the target color of the character are the adjustment method of adding a solid-color image and the adjustment method of color inversion.

[0185] Exemplarily, if the color complexity of the current color in the background image is greater than a preset complexity threshold, it can be determined that the adjustment methods for the target color of the character are a combination of the adjustment method of adding a solid-color image and the adjustment method of color inversion.

[0186] S414. Based on the adjustment method of adding a solid-color image, add a solid-color image to the background image; based on the adjustment method of color inversion, determine the inverse color of the solid-color image, and use the inverse color of the solid-color image as the target color of the character.

[0187] Exemplarily, if the color complexity of the current color in the background image is greater than a preset complexity threshold, a solid-color image can be added to the background image by the determined adjustment method of adding a solid-color image; then, the color of the added solid-color image is inverted based on the adjustment method of color inversion to obtain a target color that is the inverse color of the solid-color image, and the target color is used as the display color of the character.

[0188] Optionally, in S409, if the sum of the areas of the relatively large sub-region C in the warm color system and the area of sub-region B, when calculated as a percentage of the area of the background image, is greater than a preset percentage, the color of the character can be set to black, or it can be the inverse color of the color corresponding to the largest sub-region C in the warm color system.

[0189] Optionally, in S409, if the percentage calculated by calculating the percentage of the area of the relatively large sub-region E in the cool color system and the area of the background image is greater than a preset percentage, the color of the character can be set to white, or it can be the inverse color of the color corresponding to the largest sub-region E in the cool color system.

[0190] S415. In the character display area, display the character based on the target color.

[0191] Exemplarily, in the character display area 131 as Figure 1 shown, the obtained target color can be used to display the character, so that the character can be prominently displayed.

[0192] Optionally, the color lightness of the current color in the background image can also be obtained, the difference calculation is performed on the obtained color lightness of the current color, and the lightness after the difference calculation is determined as the target lightness of the character display area, for example, 40%; furthermore, in the character display area, the character can be displayed through the target color (for example, white) and 40% lightness, thereby improving the prominence of the character display.

[0193] S416, store the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, the target color can be queried in the mapping relationship.

[0194] Exemplarily, a mapping relationship can be established between the target color (e.g., white) of a character and the identifier of the target image (e.g., image coding and name, etc.), and this mapping relationship can be stored. Thus, when the displayed image on the terminal screen is the A image again, the character can be directly displayed in white.

[0195] Optionally, a mapping relationship (which can be called the "second mapping relationship") can be established between the target color (e.g., white), the target brightness (40%), and the name of the target image, and this mapping relationship can be stored. For example, store the mapping relationship between white, 40% brightness, and the A image. Thus, when the displayed image on the terminal screen is the A image again, the character can be directly displayed in white with 40% brightness.

[0196] It should be noted that Figure 4 all the steps in Figure 2 have been introduced in detail in the corresponding embodiments, and will not be elaborated here.

[0197] It should be understood that the above examples are for helping those skilled in the art to understand the embodiments of the present application, rather than limiting the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can clearly make various equivalent modifications or changes according to the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0198] As described above in combination with Figures 1 to 4 the method for displaying characters provided by the embodiments of the present application has been described in detail; below, in combination with Figure 5 and Figure 6 the device embodiments of the present application will be described in detail. It should be understood that the devices in the embodiments of the present application can execute various methods of the foregoing embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the foregoing method embodiments.

[0199] Figure 5 is a schematic structural diagram of the device for displaying characters provided by the embodiments of the present application.

[0200] Exemplarily, as Figure 5 shown, the device 500 includes:

[0201] An acquisition module 510: configured to acquire the background image in the target image of the terminal screen that overlaps with the position of the character display area on the terminal screen;

[0202] The first determination module 520: used to determine the color complexity of the current color in the background image; wherein, the color complexity is used to represent the distribution of the current color;

[0203] The second determination module 530: used to determine the target color of the character based on the adjustment method of color inversion and the current color if the color complexity is less than or equal to a preset complexity threshold;

[0204] The third determination module 540: used to determine the target color based on the adjustment method of adding a pure color image and the adjustment method of color inversion if the color complexity is greater than the preset complexity threshold;

[0205] The display module 550: used to display the character in the character display area based on the target color.

[0206] In a possible implementation manner, the second determination module 530 is specifically used to: determine the target adjustment method of the target color if the color complexity is less than or equal to a preset complexity threshold; wherein, the target adjustment method includes the adjustment method of color inversion; determine the inverse color of the current color based on the adjustment method of color inversion and the current color, and use the inverse color of the current color as the target color.

[0207] In a possible implementation manner, the third determination module 540 is specifically used to: determine the target adjustment method of the target color if the color complexity is greater than the preset complexity threshold; wherein, the target adjustment method includes the adjustment method of adding a pure color image and the adjustment method of color inversion; add a pure color image to the background image based on the adjustment method of adding a pure color image; determine the inverse color of the pure color image color based on the adjustment method of color inversion, and use the inverse color of the pure color image color as the target color.

[0208] In a possible implementation manner, the second determination module 530 is specifically used to: determine the proportion of each color in the current color; determine the inverse color of the color corresponding to the maximum value in the proportion of each color based on the adjustment method of color inversion; use the inverse color of the color corresponding to the maximum value as the target color.

[0209] In a possible implementation manner, the first determination module 520 is specifically used to: obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determine the difference between the number of multiple sub-regions and the number of a preset number threshold; query the color complexity corresponding to the number difference in a preset correspondence relationship; wherein, the preset correspondence relationship is used to represent the correspondence relationship between the number difference and the color complexity.

[0210] In a possible implementation, the first determination module 520 is specifically configured to: obtain the positions and colors of each pixel point in the background image; classify at least two pixel points with the same color and adjacent positions among each pixel point to obtain multiple sub-regions; determine the area of each sub-region among the multiple sub-regions; add the areas of at least two sub-regions with the same color among each sub-region to obtain the distribution area of each color; determine the area difference between the target area and the area of the background image in the distribution area; where the target area is used to represent the largest distribution area in the distribution area; based on the area difference, query the color complexity corresponding to the area difference in the preset association relationship; where the preset association relationship is used to represent the corresponding relationship between the area difference and the color complexity.

[0211] Optionally, the device 500 further includes a difference module, configured to obtain the color lightness of the current color; perform a difference calculation on the color lightness, and determine the color lightness after the difference calculation as the target lightness, where the color lightness is different from the target lightness; the display module 550 is specifically configured to: display characters in the character display area based on the target color and the target lightness.

[0212] Optionally, the device 500 further includes a storage module, configured to store the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, query the target color in the mapping relationship; where the mapping relationship is used to represent the one-to-one correspondence between the target color and the identifier of the target image.

[0213] It should be noted that the above device 500 is embodied in the form of functional modules. The term "module" here can be implemented in software and / or hardware forms, and no specific limitation is made thereto.

[0214] For example, the "module" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, a memory, a merged logic circuit, and / or other suitable components that support the described functions.

[0215] Therefore, the modules in the examples described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such an implementation should not be considered to exceed the scope of the present application.

[0216] Figure 6It is a schematic structural diagram of a vehicle provided by an embodiment of the present application.

[0217] Exemplarily, as Figure 6 shown, the vehicle 600 includes: a memory 610 and a processor 620. Among them, an executable program code 6101 is stored in the memory 610, and the processor 620 is used to call and execute the executable program code 6101 to execute a method for displaying characters.

[0218] The present application can divide the functions of the vehicle according to the above method examples. For example, it can correspond to each functional module, or integrate two or more functions into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0219] In the case of dividing each functional module according to each function, the vehicle may include: an acquisition module, a first determination module, a second determination module, a third determination module, a display module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be repeated here.

[0220] The vehicle provided by the present application is used to execute the above method for displaying characters, so it can achieve the same effect as the above implementation method.

[0221] In the case of adopting an integrated unit, the vehicle may include a processing module and a storage module. Among them, the processing module can be used to control and manage the actions of the vehicle. The storage module can be used to support the vehicle to execute mutual program codes and data, etc.

[0222] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory.

[0223] In some possible embodiments, in Figure 6In the vehicle shown, the processor 620 can be used to call the program instructions stored in the memory 610 and specifically perform the following operations: obtain a background image that overlaps with the position of the character display area in the target image of the terminal screen; determine the color complexity of the current color in the background image, where the color complexity is used to represent the distribution of the current color; if the color complexity is less than or equal to a preset complexity threshold, determine the target color of the character based on the color inversion adjustment method and the current color; if the color complexity is greater than the preset complexity threshold, determine the target color based on the adjustment method of adding a solid color image and the color inversion adjustment method; and display the character in the character display area based on the target color.

[0224] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps of the method in any of the foregoing embodiments. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical discs, DVDs (Digital Video Discs), CD-ROMs (Compact Disc Read-Only Memories), microdrives, and magneto-optical discs, ROMs (Read-Only Memories), RAMs (Random Access Memories), EPROMs (Erasable Programmable Read-Only Memories), EEPROMs (Electrically Erasable Programmable Read-Only Memories), DRAMs (Dynamic Random Access Memories), VRAMs (Video Random Access Memories), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0225] The present application also provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the above-related steps to implement a method for displaying characters in the above embodiments.

[0226] In addition, the vehicle provided in the embodiments of the present application may specifically be a chip, a component, or a module. The vehicle may include a processor and a memory connected thereto. Among them, the memory is used to store instructions. When the vehicle runs, the processor can call and execute the instructions to cause the chip to execute a method for displaying characters in the above embodiments.

[0227] Among them, the vehicle, computer-readable storage medium, computer program product, or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0228] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and conciseness of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0229] In the embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0230] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A method for displaying characters, characterized in that, the method includes: obtaining a background image that overlaps with the position of the character display area in the target image of the terminal screen; determining the color complexity of the current color in the background image; wherein, the color complexity is used to represent the distribution of the current color; if the color complexity is less than or equal to a preset complexity threshold, determining the target color of the character based on the adjustment method of color inversion and the current color; if the color complexity is greater than the preset complexity threshold, determining the target color based on the adjustment method of adding a solid color image and the adjustment method of color inversion; displaying the character in the character display area based on the target color.

2. The method according to claim 1, characterized in that, the step of if the color complexity is less than or equal to a preset complexity threshold, determining the target color of the character based on the adjustment method of color inversion and the current color includes: if the color complexity is less than or equal to the preset complexity threshold, determining the target adjustment method of the target color; wherein, the target adjustment method includes the adjustment method of color inversion; based on the adjustment method of color inversion and the current color, determining the inverse color of the current color, and taking the inverse color of the current color as the target color.

3. The method according to claim 1, characterized in that, the step of if the color complexity is greater than the preset complexity threshold, determining the target color based on the adjustment method of adding a solid color image and the adjustment method of color inversion includes: if the color complexity is greater than the preset complexity threshold, determining the target adjustment method of the target color; wherein, the target adjustment method includes the adjustment method of adding a solid color image and the adjustment method of color inversion; based on the adjustment method of adding a solid color image, adding the solid color image to the background image; based on the adjustment method of color inversion, determining the inverse color of the color of the solid color image, and taking the inverse color of the color of the solid color image as the target color.

4. The method according to claim 2, characterized in that, the step of based on the adjustment method of color inversion and the current color, determining the inverse color of the current color, and taking the inverse color of the current color as the target color includes: determining the proportion of each color in the current color; based on the adjustment method of color inversion, determining the inverse color of the color corresponding to the maximum value in the proportions of each color; taking the inverse color of the color corresponding to the maximum value as the target color.

5. The method according to any one of claims 1 to 4, characterized in that, the step of determining the color complexity of the current color in the background image includes: obtaining the positions and colors of each pixel point in the background image; classifying at least two pixel points with the same color and adjacent positions among the pixel points to obtain a plurality of sub-regions; determining the difference in the number between the plurality of sub-regions and a preset number threshold; Query the color complexity corresponding to the quantity difference in a preset correspondence relationship, where the preset correspondence relationship is used to represent the correspondence relationship between the quantity difference and the color complexity.

6. The method according to any one of claims 1 to 4, wherein, determining the color complexity of the current color in the background image includes: obtaining the positions and colors of each pixel point in the background image; classifying at least two pixel points with the same color and adjacent positions among the pixel points to obtain a plurality of sub-regions; determining the area of each sub-region in the plurality of sub-regions; adding the areas of at least two sub-regions with the same color in each sub-region to obtain the distribution area of each color; determining the area difference between the target area in the distribution area and the area of the background image, where the target area is used to represent the largest distribution area in the distribution area; querying the color complexity corresponding to the area difference in a preset association relationship, where the preset association relationship is used to represent the correspondence relationship between the area difference and the color complexity.

7. The method according to any one of claims 1 to 4, wherein, the method further includes: obtaining the color lightness of the current color; performing a difference calculation on the color lightness, and determining the color lightness after the difference calculation as the target lightness, where the color lightness is different from the target lightness; displaying the character in the character display area based on the target color includes: displaying the character in the character display area based on the target color and the target lightness.

8. The method according to any one of claims 1 to 4, wherein, the method further includes: storing the mapping relationship between the target color and the target image, so that when the target image is displayed again on the terminal screen, query the target color in the mapping relationship, where the mapping relationship is used to represent the one-to-one correspondence between the target color and the identifier of the target image.

9. A device for displaying characters, wherein, the device includes: an acquisition module, configured to acquire a background image in a target image of a terminal screen that overlaps with the position of a character display area in the terminal screen; a first determination module, configured to determine the color complexity of the current color in the background image, where the color complexity is used to represent the distribution of the current color; a second determination module, configured to, if the color complexity is less than or equal to a preset complexity threshold, determine the target color of the character based on an adjustment method of color inversion and the current color; a third determination module, configured to, if the color complexity is greater than the preset complexity threshold, determine the target color based on an adjustment method of adding a pure color image and the adjustment method of color inversion; a display module, configured to display the character in the character display area based on the target color.

10. A vehicle, wherein, the vehicle includes: a memory, configured to store executable program code; A processor for calling and running the executable program code from the memory, such that the vehicle executes the method according to any one of claims 1 to 8.