WO2013082892A1 - Text display method and device - Google Patents

Text display method and device Download PDF

Info

Publication number
WO2013082892A1
WO2013082892A1 PCT/CN2012/072008 CN2012072008W WO2013082892A1 WO 2013082892 A1 WO2013082892 A1 WO 2013082892A1 CN 2012072008 W CN2012072008 W CN 2012072008W WO 2013082892 A1 WO2013082892 A1 WO 2013082892A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
background color
color contrast
contrast
display
Prior art date
Application number
PCT/CN2012/072008
Other languages
French (fr)
Chinese (zh)
Inventor
彭文斌
马翠霞
余剑飞
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013082892A1 publication Critical patent/WO2013082892A1/en

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/14Display of multiple viewports
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/066Adjustment of display parameters for control of contrast
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/14Solving problems related to the presentation of information to be displayed

Definitions

  • the present invention relates to the field of communications, and in particular to a character display method and apparatus.
  • BACKGROUND OF THE INVENTION With the continuous development of liquid crystal display technology of electronic terminals, colors that can be displayed through liquid crystal displays are becoming more and more abundant. More and more people like to use the colorful theme background color as the theme desktop display of the electronic terminal, and get a new visual enjoyment.
  • For mobile terminals there is generally a clock function that displays time on the desktop. In the case of a colorful background color as a desktop theme, the font display requirements of the clock are also getting higher and higher. It is necessary for users to enjoy the colorful background image, but also to display the time and other information, especially when the user can select some multimedia devices or processed photos, pictures, etc.
  • the display method brings a variety of problems.
  • the contrast between font color and background color is not clear enough, which makes it difficult for users to distinguish the font of the clock or the font is not conspicuous.
  • the following method is generally used to highlight the display of the text, that is, special processing is performed on the area of the theme background picture selected by the user to display the clock, for example, highlighting or darkening the area, thereby making the font Can be displayed more clearly.
  • this practice is undoubtedly a kind of damage to the user's background image display, affecting the user's appreciation of the entire picture on the desktop.
  • a text display method comprising: acquiring a background color contrast of an area for displaying characters in an electronic terminal; calculating a text color contrast matching the background color contrast; and displaying the text using the text color contrast.
  • obtaining the background color contrast of the area for displaying the text in the electronic terminal comprises: determining whether the background color of the area for displaying the text changes during the displaying of the text; if the background color changes during the displaying of the text, Obtaining the contrast of the background color from the display buffer of the electronic terminal; if the background color does not change during the display of the text, the contrast of the background color is obtained from the display buffer of the electronic terminal last time.
  • determining whether the background color of the area for displaying the text changes during the display of the text comprises: detecting whether the user performs an operation of setting the background; if yes, determining the background color of the area for displaying the text is displaying the text process There has been a change.
  • obtaining the background color contrast of the area for displaying the text in the electronic terminal comprises: calculating the background color contrast using the two rectangular superposition algorithm, wherein the two rectangular superposition algorithms comprise: obtaining two rectangles in the area for displaying the text And calculate the color contrast of the two rectangles separately; the color contrast of the two rectangles is superimposed by the Fourier transform to obtain the background color contrast.
  • calculating the text color contrast matching the background color contrast comprises: inverting the background color contrast by a predetermined value to obtain a text color contrast.
  • the background color contrast is inversed by a predetermined value to obtain a text color contrast comprising: calculating the text color contrast as follows: The text color contrast is equal to the difference between the predetermined value and the background color contrast.
  • a text display apparatus comprising: an acquisition module configured to acquire a background color contrast of an area for displaying text in an electronic terminal; and a calculation module configured to calculate a contrast matching with a background color Text color contrast; display module, set to display text using text color contrast.
  • the device further includes: a determining module, configured to determine whether a background color of the area for displaying the text changes during the displaying of the text; the obtaining module is further configured to: when the determining result of the determining module is yes, Obtaining the contrast of the background color in the display buffer of the electronic terminal; and when the judgment result of the judging module is no, the contrast of the background color is obtained from the display buffer of the electronic terminal last time.
  • the obtaining module includes: a superimposition calculating unit configured to calculate a background color contrast using two rectangular superposition algorithms, wherein the two rectangular superposition algorithms comprise: obtaining two rectangles in an area for displaying characters, and respectively calculating two The color contrast of the rectangles; the color contrast of the two rectangles is superimposed by the Fourier transform to obtain the background color contrast.
  • the calculating module comprises: a negating unit configured to invert the background color contrast by a predetermined value to obtain a text color contrast.
  • the background color contrast of the area in which the text is displayed is acquired, and then the text color contrast matching the background color contrast is calculated and the text is displayed in the text color contrast, thereby solving the text displayed under the colorful background color.
  • FIG. 1 is a flow chart of a character display method according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a structure of a character display device according to an embodiment of the present invention
  • FIG. 3 is a first preferred text according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a second preferred character display device according to an embodiment of the present invention
  • FIG. 5 is a block diagram showing the structure of a third preferred character display device according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of an LCD display content according to a preferred embodiment of the present invention
  • FIG. 8 is a schematic diagram of an LCD display device according to a preferred embodiment of the present invention
  • Step S102 Acquire a background color contrast of an area for displaying characters in an electronic terminal
  • Step S104 calculating a text color contrast matching the background color contrast
  • Step S106 displaying the text using the text color contrast.
  • the background color contrast of the area where the text is displayed is obtained, and then the text color contrast matching the background color contrast is calculated and the text is displayed with the text color contrast, without changing the background image.
  • Matching the displayed text with the background color thus solving the problem that the text displayed under the colorful background color is difficult to distinguish or not conspicuous, thereby making the contrast between the displayed font and the background clearer, and improving the user experience. degree.
  • the final displayed text is not effective.
  • the background color contrast of the area for displaying the text in the acquisition electronic terminal may include: determining the area for displaying the text. Whether the background color changes during the display of the text; if the background color changes during the display of the text, the contrast of the background color is obtained from the display buffer of the electronic terminal; if the background color does not change during the display of the text, then the color is used The contrast of the background color was obtained from the display cache of the electronic terminal last time. In this way, the color contrast of the displayed font and the background can be made clearer when the background color of the area in which the text is displayed changes, and the scope of application of the scheme is expanded.
  • a relatively simple manner of determining is provided: detecting whether the user performs the setting of the background; if yes, Then, it is determined that the background color of the area for displaying the text changes during the display of the text.
  • This method is accurate and simple.
  • the background color of the area for displaying the text can be directly calculated to obtain the background color contrast of the area, but in order to make the background color contrast of the area for displaying the text in the obtained electronic terminal more accurate,
  • the background color contrast is calculated using two rectangular overlay algorithms.
  • the two rectangular superposition algorithms may include: obtaining two rectangles in an area for displaying characters, and respectively calculating color contrasts of the two rectangles; and superimposing the color contrast of the two rectangles by Fourier transform to obtain a background Color contrast.
  • the positions of the two rectangles only need to satisfy that the two rectangles can intersect and intersect the area as the display area.
  • the size of the two rectangles can be twice the size of the displayed text area.
  • the background color contrast obtained in this way is more accurate, and the text color contrast calculated by applying the background color contrast is better for displaying the text.
  • the background color contrast is reversed according to a predetermined value
  • the text color contrast is obtained as follows:
  • the text color contrast is calculated as follows:
  • the text color contrast is equal to the difference between the predetermined value and the background color contrast, for example, the maximum contrast is set to 65535,
  • FIG. 2 is a structural block diagram of a text display device according to an embodiment of the present invention.
  • the device includes: an acquisition module 22 and a calculation module 24 And a display module 26.
  • the obtaining module 22 is configured to acquire a background color contrast of an area for displaying characters in the electronic terminal.
  • the calculating module 24 is coupled to the obtaining module 22 and configured to calculate a background color contrast matched by the acquiring module 22.
  • Text color contrast; display module 26, coupled to computing module 24, is arranged to display text using the text color contrast calculated by computing module 24 described above.
  • the background color contrast of the area in which the text is displayed is obtained by the acquisition module 22, the calculation module 24 calculates the text color contrast matching the background color contrast, and the display module 26 displays the text in the text color contrast manner.
  • the displayed text is matched with the background color, thereby solving the problem that the text displayed under the colorful background color is difficult to distinguish or not conspicuous, and thus the displayed font and background color
  • the contrast is clearer and the user experience is improved.
  • the device further includes: a determining module 32 coupled to the acquiring module 22 and configured to determine an area for displaying characters.
  • the obtaining module 22 is further configured to: obtain the contrast of the background color from the display buffer of the electronic terminal when the determination result of the determining module 32 is YES; and the judgment result of the determining module 32 If no, the contrast of the background color is obtained from the display buffer of the electronic terminal last time.
  • 4 is a structural block diagram of a second preferred character display device according to an embodiment of the present invention. As shown in FIG.
  • the obtaining module 22 includes: a superimposition calculation unit 222 configured to calculate a background color contrast using two rectangular superposition algorithms, wherein The two rectangular superposition algorithms may include: obtaining two rectangles in an area for displaying characters, and respectively calculating color contrasts of the two rectangles; and superimposing the color contrast of the two rectangles by Fourier transform to obtain a background color Contrast.
  • FIG. 5 is a structural block diagram of a third preferred character display device according to an embodiment of the present invention. As shown in FIG. 5, the calculation module 24 includes: a reversing unit 242 configured to invert a background color contrast according to a predetermined value to obtain a text. Color contrast.
  • Step S601 determining whether a background color changes, and if yes, proceeding to step S602, otherwise Go to step S603.
  • step S602 if the background color changes, for example, the user changes the theme background of the display by setting the background, etc., the two rectangular superimposed values of the area are first obtained from the display buffer of the device, and the process proceeds to step S604.
  • the display cache of the above device refers to outputting data to be displayed to a buffer memory area of the display device.
  • Step S603 if the background color does not change, that is, the background color of the bottom of the text area to be displayed does not change during the process of displaying the font, then in the area where the text is to be displayed, two rectangular superposition algorithms are used, and the background is in the two The background color contrast of the sub-superimposed portion is calculated, and the flow proceeds to step S604.
  • the process proceeds to step S607, and the flow ends.
  • the above two rectangular superposition algorithm may be: First, for the area where the text needs to be displayed, two rectangles are obtained, wherein the intersection of the two rectangles is exactly the area to be displayed; secondly, the color is calculated for the two rectangular areas respectively. Contrast; Then, by Fourier rectangle superposition, the color contrast value of the intersection of two rectangular regions is obtained.
  • Step S604 inverting the calculated background color contrast value to obtain a corresponding contrast value (for example, the maximum value of the contrast can be defined as 65535, the interval is 0-65535, and if the obtained contrast value is 628, firstly The conversion to hexadecimal is 0x274, and each byte is inverted, and 0xFC8B is obtained, converted to decimal, which is 64651), and the process proceeds to step S605. If the abnormality is reversed, the process proceeds to step S607, and the flow ends. In step S605, when the character is displayed, the contrast value obtained by inverting step S604 is set to the text color, and the process proceeds to step S606.
  • a corresponding contrast value for example, the maximum value of the contrast can be defined as 65535, the interval is 0-65535, and if the obtained contrast value is 628, firstly The conversion to hexadecimal is 0x274, and each byte is inverted, and 0xFC8B is obtained
  • step S607 the display text is refreshed, and if the refresh is abnormal, the process proceeds to step S607.
  • step S607 the process ends.
  • the background color extraction and font display method provided by the preferred embodiment can automatically extract the background color and according to the extracted background color, compared with the cutting display area commonly used in the industry and the method of displaying after the local special processing of the background theme. Contrast calculates the color of the text to be displayed, which makes the color contrast between the font and the background clearer, giving the user a more beautiful visual experience.
  • 7 is a schematic diagram of a display content of an LCD according to a preferred embodiment of the present invention. As shown in FIG.
  • an LCD or other device display area may be divided into display areas of A, B, C, D, E, etc., each of which The color contrast of the display area may be different. If you want to display the text correctly in multiple display areas such as A, B, C, D, E, etc., you need to get the color contrast of the background.
  • 8 is a schematic diagram of an LCD display device in accordance with a preferred embodiment of the present invention. As shown in FIG. 8, the overall LCD display or display area of other display devices.
  • 9 is a schematic diagram of each display area according to a preferred embodiment of the present invention. As shown in FIG. 9, it is shown that an area of the LCD or other display device is again divided into A, B, C, D, E, and the like.
  • the area, ⁇ is separated into a single display area, which is then split into new multiple display areas, and gradually refined.
  • the color contrast of the obtained background will be more accurate and reliable.
  • the embodiment of the present invention solves the problem that the characters displayed under the colorful background color are difficult to distinguish or are not conspicuous, thereby making the contrast between the displayed font and the background clearer and improving the user experience. degree.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the computing device may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A text display method and device. The method comprises: obtaining the background color contrast of an area for displaying a text in an electronic terminal (S102); calculating the text color contrast matching the background color contrast (S104); displaying the text by using the text color contrast (S106). The present invention solves the problem that the text displayed cannot be well discerned or is not sufficiently visible if the background color is glaring and colorful, thereby making the displayed text in clear contrast to the background color.

Description

文字显示方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种文字显示方法及装置。 背景技术 随着电子终端液晶显示技术的不断发展, 能通过液晶显示屏显示的色彩越来越丰 富。 越来越多的人们喜欢利用色彩绚丽的主题背景色作为电子终端的主题桌面显示, 并从中得到了全新的视觉享受。 对于移动终端来说, 一般都具有桌面上显示时间的时钟功能。 在绚丽多彩的背景 色作为桌面主题的情况下, 时钟的字体显示要求也越来越高。 既要让用户能够欣赏到 绚丽多彩的背景图片, 又要醒目地显示出时间等信息, 尤其是当用户可以随意挑选一 些经过多媒体设备或处理过的照片、 图片等作为主题背景时, 固定的字体显示方法会 带来各种各样的问题。 例如, 字体颜色和背景色对比不够鲜明, 导致用户很难分辨出 时钟的字体或者字体不够醒目等。 在相关技术中, 通常采用如下做法来突出文字的显示, 即, 对用户选择的主题背 景图片中将要显示时钟的区域进行特殊处理, 例如, 对该区域进行加亮或变暗等, 从 而使字体能够更加清晰地显示出来。 但是, 这种做法无疑是对用户背景图片显示的一 种破坏, 影响用户在桌面上对整幅图片的欣赏。 针对相关技术中在绚丽多彩的背景色下显示的文字难以分辨或者不够醒目的问 题, 目前尚未提出有效的解决方案。 发明内容 针对在绚丽多彩的背景色下显示的文字难以分辨或者不够醒目的问题, 本发明提 供了一种文字显示方法及装置, 以至少解决上述问题。 根据本发明的一个方面, 提供了一种文字显示方法, 包括: 获取电子终端中用于 显示文字的区域的背景颜色对比度; 计算与背景颜色对比度匹配的文字颜色对比度; 使用文字颜色对比度显示文字。 优选地, 获取电子终端中用于显示文字的区域的背景颜色对比度包括: 判断用于 显示文字的区域的背景颜色是否在显示文字过程中发生变化; 如果背景颜色在显示文 字过程中发生变化, 则从电子终端的显示缓存中获取背景颜色的对比度; 如果背景颜 色在显示文字过程中不发生变化, 则沿用上一次从电子终端的显示缓存中获取背景颜 色的对比度。 优选地, 判断用于显示文字的区域的背景颜色是否在显示文字过程中发生变化包 括: 检测用户是否进行设置背景的操作; 如果是, 则确定用于显示文字的区域的背景 颜色在显示文字过程中发生变化。 优选地, 获取电子终端中用于显示文字的区域的背景颜色对比度包括: 使用两次 矩形叠加算法计算背景颜色对比度, 其中, 两次矩形叠加算法包括: 在用于显示文字 的区域取得两个矩形, 并分别计算两个矩形的颜色对比度; 将两个矩形的颜色对比度 通过傅里叶变换进行矩形叠加, 得到背景颜色对比度。 优选地, 计算与背景颜色对比度匹配的文字颜色对比度包括: 将背景颜色对比度 按照预定值取反, 得到文字颜色对比度。 优选地, 将背景颜色对比度按照预定值取反, 得到文字颜色对比度包括: 按照以 下方式计算文字颜色对比度: 文字颜色对比度等于预定值与背景颜色对比度之差。 根据本发明的另一方面, 提供了一种文字显示装置, 包括: 获取模块, 设置为获 取电子终端中用于显示文字的区域的背景颜色对比度; 计算模块, 设置为计算与背景 颜色对比度匹配的文字颜色对比度; 显示模块, 设置为使用文字颜色对比度显示文字。 优选地, 上述装置还包括: 判断模块, 设置为判断用于显示文字的区域的背景颜 色是否在显示文字过程中发生变化; 所述获取模块还设置为在判断模块的判断结果为 是时, 从电子终端的显示缓存中获取背景颜色的对比度; 以及在判断模块的判断结果 为否时, 沿用上一次从电子终端的显示缓存中获取背景颜色的对比度。 优选地, 上述获取模块包括: 叠加计算单元, 设置为使用两次矩形叠加算法计算 背景颜色对比度, 其中, 两次矩形叠加算法包括: 在用于显示文字的区域取得两个矩 形, 并分别计算两个矩形的颜色对比度; 将两个矩形的颜色对比度通过傅里叶变换进 行矩形叠加, 得到背景颜色对比度。 优选地, 上述计算模块包括: 取反单元, 设置为将背景颜色对比度按照预定值取 反, 得到文字颜色对比度。 通过本发明, 采用获取显示文字的区域的背景颜色对比度, 然后计算与该背景颜 色对比度匹配的文字颜色对比度并以该文字颜色对比度显示文字的方式, 解决了在绚 丽多彩的背景色下显示的文字难以分辨或者不够醒目的问题, 进而使显示出的字体和 背景的颜色对比更加清晰, 提高了用户体验度。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的文字显示方法的流程图; 图 2是根据本发明实施例的文字显示装置的结构框图; 图 3是根据本发明实施例的第一优选文字显示装置的结构框图; 图 4是根据本发明实施例的第二优选文字显示装置的结构框图; 图 5是根据本发明实施例的第三优选文字显示装置的结构框图; 图 6是根据本发明优选实施例的字体显示方法的核心算法的流程图; 图 7是根据本发明优选实施例的 LCD显示内容的示意图; 图 8是根据本发明优选实施例的 LCD显示器件的示意图; 图 9是根据本发明优选实施例的各显示区域的示意图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 考虑到目前在绚丽多彩的背景色下显示的文字难以分辨或者不够醒目的问题, 本 实施例提供了一种文字显示方法, 以使在不影响背景图片的整体美观性的前提下使字 体和背景的颜色对比更加清晰。 图 1是根据本发明实施例的文字显示方法的流程图, 如图 1所示, 该方法包括以下步骤: 步骤 S102, 获取电子终端中用于显示文字的区域的背景颜色对比度; 步骤 S104, 计算与该背景颜色对比度匹配的文字颜色对比度; 步骤 S106, 使用该文字颜色对比度显示文字。 本实施例通过上述方法, 采用获取显示文字的区域的背景颜色对比度, 然后计算 与该背景颜色对比度匹配的文字颜色对比度并以该文字颜色对比度显示文字的方式, 在不改变背景图片的前提下, 使显示出的文字与背景颜色相匹配, 从而解决了在绚丽 多彩的背景色下显示的文字难以分辨或者不够醒目的问题, 进而使显示出的字体和背 景的颜色对比更加清晰, 提高了用户体验度。 考虑到在按照本实施例的方法显示文字的过程中, 用于显示文字的区域的背景颜 色如果发生变化, 则会导致最终显示出的文字效果不佳。 所以, 为了使得本实施例的 方法能够适用于在显示文字过程中背景颜色发生变化的情况, 在获取电子终端中用于 显示文字的区域的背景颜色对比度可以包括: 判断用于显示文字的区域的背景颜色是 否在显示文字过程中发生变化; 如果背景颜色在显示文字过程中发生变化, 则从电子 终端的显示缓存中获取背景颜色的对比度; 如果背景颜色在显示文字过程中不发生变 化, 则沿用上一次从电子终端的显示缓存中获取背景颜色的对比度。 通过这种方式能 够在显示文字的区域的背景颜色发生变化的情况下使显示出的字体和背景的颜色对比 更加清晰, 扩大了方案的适用范围。 判断用于显示文字的区域的背景颜色是否在显示文字过程中发生变化的方式有很 多种, 本实施例中提供了一种比较简便的判断方式: 检测用户是否进行设置背景的操 作; 如果是, 则确定用于显示文字的区域的背景颜色在显示文字过程中发生变化。 这 种方式判断准确且简单易行。 通常, 可以直接对获取到的用于显示文字的区域的背景颜色进行计算得到该区域 的背景颜色对比度, 但为了使获取到的电子终端中用于显示文字的区域的背景颜色对 比度更加精确, 可以使用两次矩形叠加算法计算背景颜色对比度。 其中, 两次矩形叠 加算法可以包括: 在用于显示文字的区域取得两个矩形, 并分别计算两个矩形的颜色 对比度; 将两个矩形的颜色对比度通过傅里叶变换进行矩形叠加, 得到背景颜色对比 度。 其中, 两个矩形的位置只需要满足两个矩形可以相交且相交的区域为显示区域即 可, 在两个矩形选取时, 两个矩形的大小可以分别为显示文字区域的大小的 2倍。 通 过这种方式获得的背景颜色对比度更精确, 进而应用该背景颜色对比度计算出的文字 颜色对比度显示文字的显示效果更佳。 计算与背景颜色对比度匹配的文字颜色对比度的方式有很多, 例如, 将背景颜色 对比度的负数作为文字颜色对比度, 或者将背景颜色对比度与指定值相加后作为文字 颜色对比度, 本实施例中提供一种效果更佳的计算与背景颜色对比度匹配的文字颜色 对比度的方式: 将背景颜色对比度按照预定值取反, 得到文字颜色对比度。 其中, 将 背景颜色对比度按照预定值取反, 得到文字颜色对比度包括: 按照以下方式计算文字 颜色对比度: 文字颜色对比度等于预定值与背景颜色对比度之差, 例如, 设置对比度 的最大值为 65535, 则文字颜色对比度可以按照十进制将该最大值与得到的背景颜色 对比度值按字节相减 (即, 取反), 即文字颜色对比度 =65535-背景颜色对比度; 也可 以按照其他进制, 例如十六进制, 将该最大值转换成十六进制, 并与转换成十六进制 的背景颜色对比度值按字节相减 (即, 取反)。 对应于上述方法, 本实施例还提供了一种文字显示装置, 图 2是根据本发明实施 例的文字显示装置的结构框图, 如图 2所示, 该装置包括: 获取模块 22、 计算模块 24 以及显示模块 26。其中, 获取模块 22, 设置为获取电子终端中用于显示文字的区域的 背景颜色对比度; 计算模块 24, 与获取模块 22相耦合, 设置为计算与上述获取模块 22获取到的背景颜色对比度匹配的文字颜色对比度; 显示模块 26, 与计算模块 24相 耦合, 设置为使用上述计算模块 24计算得到的文字颜色对比度显示文字。 本实施例通过上述装置, 通过获取模块 22 获取显示文字的区域的背景颜色对比 度, 计算模块 24计算与该背景颜色对比度匹配的文字颜色对比度, 显示模块 26以该 文字颜色对比度显示文字的方式, 在不改变背景图片的前提下, 使显示出的文字与背 景颜色相匹配, 从而解决了在绚丽多彩的背景色下显示的文字难以分辨或者不够醒目 的问题, 进而使显示出的字体和背景的颜色对比更加清晰, 提高了用户体验度。 图 3是根据本发明实施例的第一优选文字显示装置的结构框图, 如图 3所示, 该 装置还包括: 判断模块 32, 与获取模块 22相耦合, 设置为判断用于显示文字的区域 的背景颜色是否在显示文字过程中发生变化; 获取模块 22还设置为在判断模块 32的 判断结果为是时, 从电子终端的显示缓存中获取背景颜色的对比度; 以及在判断模块 32的判断结果为否时, 沿用上一次从电子终端的显示缓存中获取背景颜色的对比度。 图 4是根据本发明实施例的第二优选文字显示装置的结构框图, 如图 4所示, 上 述获取模块 22包括: 叠加计算单元 222, 设置为使用两次矩形叠加算法计算背景颜色 对比度, 其中, 两次矩形叠加算法可以包括: 在用于显示文字的区域取得两个矩形, 并分别计算两个矩形的颜色对比度; 将两个矩形的颜色对比度通过傅里叶变换进行矩 形叠加, 得到背景颜色对比度。 图 5是根据本发明实施例的第三优选文字显示装置的结构框图, 如图 5所示, 上 述计算模块 24包括: 取反单元 242, 设置为将背景颜色对比度按照预定值取反, 得到 文字颜色对比度。 下面结合一个优选实施例进行说明, 该优选实施例结合了上述实施例及优选实施 方式。 本优选实施例中提供一种背景色自动提取和字体显示的方法, 该方法可以应用于 具有显示器的任何电子终端中,例如,可以为带有液晶显示屏(Liquid Crystal Display, 简称为 LCD)的便携电子终端,下面结合附图对本优选实施例进行进一步地详细说明。 图 6是根据本发明优选实施例的字体显示方法的核心算法的流程图,如图 6所示, 该方法包括以下步骤: 步骤 S601 , 判断背景色是否发生变化, 如果是, 进入步骤 S602, 否则进入步骤 S603。 步骤 S602, 如果背景色发生变化, 例如, 用户通过设置背景等操作, 导致显示的 主题背景发生变化, 则先从设备的显示缓存中取得该区域的两次矩形叠加值, 转入步 骤 S604。 其中, 上述设备的显示缓存, 是指将要显示的数据输出到显示设备的缓冲内存区。 步骤 S603 , 如果背景色不发生变化, 即需要显示的文字区域底部背景颜色不会在 显示字体的过程中发生变化, 则在将要显示文字的区域, 采用两次矩形叠加算法, 将 背景在此两次叠加的部分的背景颜色对比度计算出来, 转入步骤 S604, 如果算法叠加 异常则进入步骤 S607, 该流程结束。 例如, 上述的两次矩形叠加算法可以是: 首先, 对于需要显示文字的区域, 取得 两个矩形, 其中, 两个矩形的交集正好是要显示的区域; 其次, 分别对两个矩形区域 求颜色对比度; 然后, 通过傅里叶矩形叠加, 得到两个矩形区域交集的颜色对比值。 步骤 S604,将计算出来的背景颜色对比度值进行取反,得到相应的对比值(例如, 可以将对比度的最大值定义为 65535, 区间为 0-65535, 若获取的对比度值为 628, 先 将其换算为 16进制, 为 0x274, 分别按照每个字节取反, 得到 0xFC8B, 换算为十进 制, 为 64651 ), 转入步骤 S605, 如果取反异常则进入步骤 S607, 该流程结束。 步骤 S605, 在显示文字的时候, 将步骤 S604取反得到的对比值设置为文字颜色, 转入步骤 S606, 如果设置异常则进入步骤 S607, 该流程结束。 步骤 S606, 刷新显示文字, 如果刷新异常, 则进入步骤 S607。 步骤 S607, 流程结束。 与业界通常使用的切割显示区域、 对背景主题的局部特殊处理后进行显示的方法 相比, 本优选实施例提供的背景色提取和字体显示的方法可以自动提取背景色, 并根 据提取的背景色对比度计算得出将要显示的文字的颜色, 从而使字体和背景的颜色对 比更加清晰, 给用户更加美观的视觉感受。 图 7是根据本发明优选实施例的 LCD显示内容的示意图, 如图 7所示, LCD或 者是其他设备显示区域可以划分为 A、 B、 C、 D、 E等多个的显示区域, 每个显示区 域的颜色对比度都可能不一样, 如果要在 A、 B、 C、 D、 E等多个的显示区域正确显 示文字, 则需要获取背景的颜色对比度。 图 8是根据本发明优选实施例的 LCD显示器件的示意图, 如图 8所示, 整体的 LCD显示或者是其他显示设备的显示区。 图 9是根据本发明优选实施例的各显示区域 的示意图,如图 9所示,表示在 LCD或者是其他显示设备的某个区域被再次划分为 A、 B、 C、 D、 E等多个区域, δΡ, 是分离出来的单个显示区域中, 将其再拆分新的多个 显示区域, 逐步进行细化, 通过矩形的叠加, 获取到的背景的颜色对比度将更加精确 可靠。 综上所述可以看出, 本发明实施例解决了在绚丽多彩的背景色下显示的文字难以 分辨或者不够醒目的问题, 进而使显示出的字体和背景的颜色对比更加清晰, 提高了 用户体验度。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a character display method and apparatus. BACKGROUND OF THE INVENTION With the continuous development of liquid crystal display technology of electronic terminals, colors that can be displayed through liquid crystal displays are becoming more and more abundant. More and more people like to use the colorful theme background color as the theme desktop display of the electronic terminal, and get a new visual enjoyment. For mobile terminals, there is generally a clock function that displays time on the desktop. In the case of a colorful background color as a desktop theme, the font display requirements of the clock are also getting higher and higher. It is necessary for users to enjoy the colorful background image, but also to display the time and other information, especially when the user can select some multimedia devices or processed photos, pictures, etc. as the theme background, the fixed font The display method brings a variety of problems. For example, the contrast between font color and background color is not clear enough, which makes it difficult for users to distinguish the font of the clock or the font is not conspicuous. In the related art, the following method is generally used to highlight the display of the text, that is, special processing is performed on the area of the theme background picture selected by the user to display the clock, for example, highlighting or darkening the area, thereby making the font Can be displayed more clearly. However, this practice is undoubtedly a kind of damage to the user's background image display, affecting the user's appreciation of the entire picture on the desktop. In view of the problem that the text displayed under the colorful background color in the related art is difficult to distinguish or is not conspicuous, an effective solution has not been proposed yet. SUMMARY OF THE INVENTION The present invention provides a text display method and apparatus for solving the above problems, in view of the problem that characters displayed under a colorful background color are difficult to distinguish or are not conspicuous. According to an aspect of the present invention, a text display method is provided, comprising: acquiring a background color contrast of an area for displaying characters in an electronic terminal; calculating a text color contrast matching the background color contrast; and displaying the text using the text color contrast. Preferably, obtaining the background color contrast of the area for displaying the text in the electronic terminal comprises: determining whether the background color of the area for displaying the text changes during the displaying of the text; if the background color changes during the displaying of the text, Obtaining the contrast of the background color from the display buffer of the electronic terminal; if the background color does not change during the display of the text, the contrast of the background color is obtained from the display buffer of the electronic terminal last time. Preferably, determining whether the background color of the area for displaying the text changes during the display of the text comprises: detecting whether the user performs an operation of setting the background; if yes, determining the background color of the area for displaying the text is displaying the text process There has been a change. Preferably, obtaining the background color contrast of the area for displaying the text in the electronic terminal comprises: calculating the background color contrast using the two rectangular superposition algorithm, wherein the two rectangular superposition algorithms comprise: obtaining two rectangles in the area for displaying the text And calculate the color contrast of the two rectangles separately; the color contrast of the two rectangles is superimposed by the Fourier transform to obtain the background color contrast. Preferably, calculating the text color contrast matching the background color contrast comprises: inverting the background color contrast by a predetermined value to obtain a text color contrast. Preferably, the background color contrast is inversed by a predetermined value to obtain a text color contrast comprising: calculating the text color contrast as follows: The text color contrast is equal to the difference between the predetermined value and the background color contrast. According to another aspect of the present invention, a text display apparatus is provided, comprising: an acquisition module configured to acquire a background color contrast of an area for displaying text in an electronic terminal; and a calculation module configured to calculate a contrast matching with a background color Text color contrast; display module, set to display text using text color contrast. Preferably, the device further includes: a determining module, configured to determine whether a background color of the area for displaying the text changes during the displaying of the text; the obtaining module is further configured to: when the determining result of the determining module is yes, Obtaining the contrast of the background color in the display buffer of the electronic terminal; and when the judgment result of the judging module is no, the contrast of the background color is obtained from the display buffer of the electronic terminal last time. Preferably, the obtaining module includes: a superimposition calculating unit configured to calculate a background color contrast using two rectangular superposition algorithms, wherein the two rectangular superposition algorithms comprise: obtaining two rectangles in an area for displaying characters, and respectively calculating two The color contrast of the rectangles; the color contrast of the two rectangles is superimposed by the Fourier transform to obtain the background color contrast. Preferably, the calculating module comprises: a negating unit configured to invert the background color contrast by a predetermined value to obtain a text color contrast. According to the present invention, the background color contrast of the area in which the text is displayed is acquired, and then the text color contrast matching the background color contrast is calculated and the text is displayed in the text color contrast, thereby solving the text displayed under the colorful background color. It is difficult to distinguish or not enough eye-catching, which makes the contrast between the displayed font and the background clearer and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 1 is a flow chart of a character display method according to an embodiment of the present invention; FIG. 2 is a block diagram showing a structure of a character display device according to an embodiment of the present invention; FIG. 3 is a first preferred text according to an embodiment of the present invention. FIG. 4 is a block diagram showing the structure of a second preferred character display device according to an embodiment of the present invention; FIG. 5 is a block diagram showing the structure of a third preferred character display device according to an embodiment of the present invention; A flowchart of a core algorithm of a font display method of a preferred embodiment; FIG. 7 is a schematic diagram of an LCD display content according to a preferred embodiment of the present invention; FIG. 8 is a schematic diagram of an LCD display device according to a preferred embodiment of the present invention; A schematic representation of each display area of a preferred embodiment of the invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. Considering the problem that the text displayed under the colorful background color is difficult to distinguish or not enough, the present embodiment provides a text display method to make the font and background without affecting the overall aesthetics of the background image. The color contrast is clearer. 1 is a flowchart of a text display method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps: Step S102: Acquire a background color contrast of an area for displaying characters in an electronic terminal; Step S104, calculating a text color contrast matching the background color contrast; Step S106, displaying the text using the text color contrast. In this embodiment, by using the above method, the background color contrast of the area where the text is displayed is obtained, and then the text color contrast matching the background color contrast is calculated and the text is displayed with the text color contrast, without changing the background image. Matching the displayed text with the background color, thus solving the problem that the text displayed under the colorful background color is difficult to distinguish or not conspicuous, thereby making the contrast between the displayed font and the background clearer, and improving the user experience. degree. In view of the fact that the background color of the area for displaying characters changes in the process of displaying characters according to the method of the present embodiment, the final displayed text is not effective. Therefore, in order to enable the method of the embodiment to be applied to the case where the background color changes during the display of the character, the background color contrast of the area for displaying the text in the acquisition electronic terminal may include: determining the area for displaying the text. Whether the background color changes during the display of the text; if the background color changes during the display of the text, the contrast of the background color is obtained from the display buffer of the electronic terminal; if the background color does not change during the display of the text, then the color is used The contrast of the background color was obtained from the display cache of the electronic terminal last time. In this way, the color contrast of the displayed font and the background can be made clearer when the background color of the area in which the text is displayed changes, and the scope of application of the scheme is expanded. There are many ways to determine whether the background color of the area for displaying the text changes during the display of the text. In this embodiment, a relatively simple manner of determining is provided: detecting whether the user performs the setting of the background; if yes, Then, it is determined that the background color of the area for displaying the text changes during the display of the text. This method is accurate and simple. Generally, the background color of the area for displaying the text can be directly calculated to obtain the background color contrast of the area, but in order to make the background color contrast of the area for displaying the text in the obtained electronic terminal more accurate, The background color contrast is calculated using two rectangular overlay algorithms. The two rectangular superposition algorithms may include: obtaining two rectangles in an area for displaying characters, and respectively calculating color contrasts of the two rectangles; and superimposing the color contrast of the two rectangles by Fourier transform to obtain a background Color contrast. The positions of the two rectangles only need to satisfy that the two rectangles can intersect and intersect the area as the display area. When the two rectangles are selected, the size of the two rectangles can be twice the size of the displayed text area. The background color contrast obtained in this way is more accurate, and the text color contrast calculated by applying the background color contrast is better for displaying the text. There are many ways to calculate the color contrast of a text that matches the contrast of the background color, for example, using the negative of the background color contrast as the text color contrast, or adding the background color contrast to the specified value as the text. Color contrast, in this embodiment, a more effective way of calculating the text color contrast matching the background color contrast is provided: the background color contrast is reversed according to a predetermined value to obtain a text color contrast. Wherein, the background color contrast is reversed according to a predetermined value, and the text color contrast is obtained as follows: The text color contrast is calculated as follows: The text color contrast is equal to the difference between the predetermined value and the background color contrast, for example, the maximum contrast is set to 65535, The text color contrast can be subtracted (ie, inverted) from the resulting background color contrast value in decimal, ie text color contrast = 65535 - background color contrast; can also be in other hexadecimal, eg sixteen In hexadecimal, the maximum value is converted to hexadecimal and subtracted (ie, inverted) from the background color contrast value converted to hexadecimal. Corresponding to the above method, the present embodiment further provides a text display device. FIG. 2 is a structural block diagram of a text display device according to an embodiment of the present invention. As shown in FIG. 2, the device includes: an acquisition module 22 and a calculation module 24 And a display module 26. The obtaining module 22 is configured to acquire a background color contrast of an area for displaying characters in the electronic terminal. The calculating module 24 is coupled to the obtaining module 22 and configured to calculate a background color contrast matched by the acquiring module 22. Text color contrast; display module 26, coupled to computing module 24, is arranged to display text using the text color contrast calculated by computing module 24 described above. In this embodiment, by the above device, the background color contrast of the area in which the text is displayed is obtained by the acquisition module 22, the calculation module 24 calculates the text color contrast matching the background color contrast, and the display module 26 displays the text in the text color contrast manner. Under the premise of not changing the background image, the displayed text is matched with the background color, thereby solving the problem that the text displayed under the colorful background color is difficult to distinguish or not conspicuous, and thus the displayed font and background color The contrast is clearer and the user experience is improved. 3 is a structural block diagram of a first preferred character display device according to an embodiment of the present invention. As shown in FIG. 3, the device further includes: a determining module 32 coupled to the acquiring module 22 and configured to determine an area for displaying characters. Whether the background color changes during the display of the text; the obtaining module 22 is further configured to: obtain the contrast of the background color from the display buffer of the electronic terminal when the determination result of the determining module 32 is YES; and the judgment result of the determining module 32 If no, the contrast of the background color is obtained from the display buffer of the electronic terminal last time. 4 is a structural block diagram of a second preferred character display device according to an embodiment of the present invention. As shown in FIG. 4, the obtaining module 22 includes: a superimposition calculation unit 222 configured to calculate a background color contrast using two rectangular superposition algorithms, wherein The two rectangular superposition algorithms may include: obtaining two rectangles in an area for displaying characters, and respectively calculating color contrasts of the two rectangles; and superimposing the color contrast of the two rectangles by Fourier transform to obtain a background color Contrast. FIG. 5 is a structural block diagram of a third preferred character display device according to an embodiment of the present invention. As shown in FIG. 5, the calculation module 24 includes: a reversing unit 242 configured to invert a background color contrast according to a predetermined value to obtain a text. Color contrast. The following description is made in conjunction with a preferred embodiment that incorporates the above-described embodiments and preferred embodiments. In the preferred embodiment, a method for automatic background color extraction and font display is provided. The method can be applied to any electronic terminal having a display, for example, a liquid crystal display (LCD). The portable electronic terminal will be further described in detail below with reference to the accompanying drawings. 6 is a flowchart of a core algorithm of a font display method according to a preferred embodiment of the present invention. As shown in FIG. 6, the method includes the following steps: Step S601: determining whether a background color changes, and if yes, proceeding to step S602, otherwise Go to step S603. In step S602, if the background color changes, for example, the user changes the theme background of the display by setting the background, etc., the two rectangular superimposed values of the area are first obtained from the display buffer of the device, and the process proceeds to step S604. The display cache of the above device refers to outputting data to be displayed to a buffer memory area of the display device. Step S603, if the background color does not change, that is, the background color of the bottom of the text area to be displayed does not change during the process of displaying the font, then in the area where the text is to be displayed, two rectangular superposition algorithms are used, and the background is in the two The background color contrast of the sub-superimposed portion is calculated, and the flow proceeds to step S604. If the algorithm superimposes the abnormality, the process proceeds to step S607, and the flow ends. For example, the above two rectangular superposition algorithm may be: First, for the area where the text needs to be displayed, two rectangles are obtained, wherein the intersection of the two rectangles is exactly the area to be displayed; secondly, the color is calculated for the two rectangular areas respectively. Contrast; Then, by Fourier rectangle superposition, the color contrast value of the intersection of two rectangular regions is obtained. Step S604, inverting the calculated background color contrast value to obtain a corresponding contrast value (for example, the maximum value of the contrast can be defined as 65535, the interval is 0-65535, and if the obtained contrast value is 628, firstly The conversion to hexadecimal is 0x274, and each byte is inverted, and 0xFC8B is obtained, converted to decimal, which is 64651), and the process proceeds to step S605. If the abnormality is reversed, the process proceeds to step S607, and the flow ends. In step S605, when the character is displayed, the contrast value obtained by inverting step S604 is set to the text color, and the process proceeds to step S606. If the setting is abnormal, the process proceeds to step S607, and the flow ends. In step S606, the display text is refreshed, and if the refresh is abnormal, the process proceeds to step S607. In step S607, the process ends. The background color extraction and font display method provided by the preferred embodiment can automatically extract the background color and according to the extracted background color, compared with the cutting display area commonly used in the industry and the method of displaying after the local special processing of the background theme. Contrast calculates the color of the text to be displayed, which makes the color contrast between the font and the background clearer, giving the user a more beautiful visual experience. 7 is a schematic diagram of a display content of an LCD according to a preferred embodiment of the present invention. As shown in FIG. 7, an LCD or other device display area may be divided into display areas of A, B, C, D, E, etc., each of which The color contrast of the display area may be different. If you want to display the text correctly in multiple display areas such as A, B, C, D, E, etc., you need to get the color contrast of the background. 8 is a schematic diagram of an LCD display device in accordance with a preferred embodiment of the present invention. As shown in FIG. 8, the overall LCD display or display area of other display devices. 9 is a schematic diagram of each display area according to a preferred embodiment of the present invention. As shown in FIG. 9, it is shown that an area of the LCD or other display device is again divided into A, B, C, D, E, and the like. The area, δΡ, is separated into a single display area, which is then split into new multiple display areas, and gradually refined. By the superposition of rectangles, the color contrast of the obtained background will be more accurate and reliable. As can be seen from the above, the embodiment of the present invention solves the problem that the characters displayed under the colorful background color are difficult to distinguish or are not conspicuous, thereby making the contrast between the displayed font and the background clearer and improving the user experience. degree. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claim
1. 一种文字显示方法, 包括: 1. A text display method, comprising:
获取电子终端中用于显示文字的区域的背景颜色对比度;  Obtaining a background color contrast of an area of the electronic terminal for displaying text;
计算与所述背景颜色对比度匹配的文字颜色对比度;  Calculating a text color contrast that matches the background color contrast;
使用所述文字颜色对比度显示文字。  The text is displayed using the text color contrast.
2. 根据权利要求 1所述的方法, 其中, 获取所述电子终端中用于显示文字的区域 的背景颜色对比度包括: 2. The method according to claim 1, wherein acquiring a background color contrast of an area for displaying text in the electronic terminal comprises:
判断用于显示文字的区域的背景颜色是否在显示文字过程中发生变化; 如果背景颜色在显示文字过程中发生变化, 则从所述电子终端的显示缓存 中获取所述背景颜色的对比度;  Determining whether the background color of the area for displaying the text changes during the display of the text; if the background color changes during the display of the text, obtaining the contrast of the background color from the display buffer of the electronic terminal;
如果背景颜色在显示文字过程中不发生变化, 则沿用上一次从所述电子终 端的显示缓存中获取所述背景颜色的对比度。  If the background color does not change during the display of the text, the contrast of the background color is obtained from the display buffer of the electronic terminal last time.
3. 根据权利要求 2所述的方法, 其中, 判断用于显示文字的区域的背景颜色是否 在显示文字过程中发生变化包括: 3. The method according to claim 2, wherein determining whether the background color of the area for displaying the text changes during the display of the text comprises:
检测用户是否进行设置背景的操作;  Detecting whether the user performs the operation of setting the background;
如果是, 则确定用于显示文字的区域的背景颜色在显示文字过程中发生变 化。  If so, it is determined that the background color of the area for displaying the text changes during the display of the text.
4. 根据权利要求 1至 3中任一项所述的方法, 其中, 获取所述电子终端中用于显 示文字的区域的背景颜色对比度包括: The method according to any one of claims 1 to 3, wherein acquiring a background color contrast of an area for displaying characters in the electronic terminal comprises:
使用两次矩形叠加算法计算所述背景颜色对比度, 其中, 所述两次矩形叠 加算法包括:  The background color contrast is calculated using two rectangular superposition algorithms, wherein the two rectangular superposition algorithms include:
在所述用于显示文字的区域取得两个矩形, 并分别计算所述两个矩形的颜 色对比度;  Obtaining two rectangles in the area for displaying characters, and calculating color contrasts of the two rectangles respectively;
将所述两个矩形的颜色对比度通过傅里叶变换进行矩形叠加, 得到所述背 景颜色对比度。 根据权利要求 1至 3中任一项所述的方法, 其中, 计算与所述背景颜色对比度 匹配的文字颜色对比度包括: The color contrast of the two rectangles is rectangularly superposed by Fourier transform to obtain the background color contrast. The method according to any one of claims 1 to 3, wherein calculating a text color contrast matching the background color contrast comprises:
将所述背景颜色对比度按照预定值取反, 得到所述文字颜色对比度。 根据权利要求 5所述的方法, 其中, 将所述背景颜色对比度按照预定值取反, 得到所述文字颜色对比度包括:  The background color contrast is inversed by a predetermined value to obtain the text color contrast. The method according to claim 5, wherein the background color contrast is inverted according to a predetermined value, and the text color contrast is obtained by:
按照以下方式计算所述文字颜色对比度:  Calculate the text color contrast as follows:
所述文字颜色对比度等于所述预定值与所述背景颜色对比度之差。 一种文字显示装置, 包括:  The text color contrast is equal to the difference between the predetermined value and the background color contrast. A text display device comprising:
获取模块,设置为获取电子终端中用于显示文字的区域的背景颜色对比度; 计算模块, 设置为计算与所述背景颜色对比度匹配的文字颜色对比度; 显示模块, 设置为使用所述文字颜色对比度显示文字。 根据权利要求 7所述的装置, 其中, 所述装置还包括: 判断模块, 设置为判断用于显示文字的区域的背景颜色是否在显示文字过 程中发生变化;  Obtaining a module, configured to obtain a background color contrast of an area for displaying text in the electronic terminal; a calculation module configured to calculate a text color contrast matching the background color contrast; a display module configured to display the text color contrast using the text Text. The device according to claim 7, wherein the device further comprises: a determining module configured to determine whether a background color of an area for displaying the text changes during the display of the text;
所述获取模块还设置为在所述判断模块的判断结果为是时, 从所述电子终 端的显示缓存中获取所述背景颜色的对比度; 以及在所述判断模块的判断结果 为否时,沿用上一次从所述电子终端的显示缓存中获取所述背景颜色的对比度。 根据权利要求 7或 8所述的装置, 其中, 所述获取模块包括:  The obtaining module is further configured to: when the determination result of the determining module is YES, obtain a contrast of the background color from a display buffer of the electronic terminal; and when the determining result of the determining module is negative, The contrast of the background color is obtained from the display cache of the electronic terminal last time. The device according to claim 7 or 8, wherein the obtaining module comprises:
叠加计算单元, 设置为使用两次矩形叠加算法计算所述背景颜色对比度, 其中,所述两次矩形叠加算法包括:在所述用于显示文字的区域取得两个矩形, 并分别计算所述两个矩形的颜色对比度; 将所述两个矩形的颜色对比度通过傅 里叶变换进行矩形叠加, 得到所述背景颜色对比度。 根据权利要求 7或 8所述的装置, 其中, 所述计算模块包括: 取反单元, 设置为将所述背景颜色对比度按照预定值取反, 得到所述文字 颜色对比度。  The superimposition calculation unit is configured to calculate the background color contrast using two rectangular superposition algorithms, wherein the two rectangular superposition algorithms include: obtaining two rectangles in the area for displaying characters, and calculating the two The color contrast of the rectangles; the color contrast of the two rectangles is rectangularly superposed by Fourier transform to obtain the background color contrast. The apparatus according to claim 7 or 8, wherein the calculation module comprises: a reversing unit configured to invert the background color contrast by a predetermined value to obtain the text color contrast.
PCT/CN2012/072008 2011-12-05 2012-03-06 Text display method and device WO2013082892A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110397993.7A CN103137103B (en) 2011-12-05 2011-12-05 Character displaying method and device
CN201110397993.7 2011-12-05

Publications (1)

Publication Number Publication Date
WO2013082892A1 true WO2013082892A1 (en) 2013-06-13

Family

ID=48496853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072008 WO2013082892A1 (en) 2011-12-05 2012-03-06 Text display method and device

Country Status (2)

Country Link
CN (1) CN103137103B (en)
WO (1) WO2013082892A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104076928B (en) * 2014-07-15 2017-11-07 深圳市金立通信设备有限公司 A kind of method for adjusting text importing image
CN104090764B (en) * 2014-07-15 2018-02-23 深圳市金立通信设备有限公司 A kind of terminal
CN104320583B (en) * 2014-11-03 2018-12-14 联想(北京)有限公司 Image processing method, image processing apparatus and electronic equipment
CN104461614B (en) * 2014-11-14 2018-01-02 北京搜狗科技发展有限公司 The processing method and electronic equipment of a kind of subject resource
CN105204807B (en) * 2015-09-24 2018-05-25 北京金山安全软件有限公司 Method and device for adjusting color of display content at front end of screen
CN105244009A (en) * 2015-11-19 2016-01-13 陕西宝成航空仪表有限责任公司 A control display device with high identifiability and display method thereof
CN105912321A (en) * 2016-04-01 2016-08-31 乐视控股(北京)有限公司 Word color setting method and device
CN106101433B (en) * 2016-07-04 2019-03-15 北京小米移动软件有限公司 Notification message display methods and device
CN106503707B (en) * 2016-10-21 2019-08-02 浙江宇视科技有限公司 Licence plate recognition method and device under a kind of infrared lighting condition
CN107704253B (en) * 2017-06-25 2021-05-07 平安科技(深圳)有限公司 Control character color transformation method and system and electronic device
CN108267459B (en) * 2018-01-19 2021-06-18 凌云光技术股份有限公司 Method and device for detecting low-contrast defect of printed matter in backlight mode
CN113920912B (en) * 2019-06-27 2023-03-03 华为技术有限公司 Display attribute adjusting method and related equipment
CN110503159B (en) * 2019-08-28 2022-10-11 北京达佳互联信息技术有限公司 Character recognition method, device, equipment and medium
CN113763256A (en) * 2020-07-06 2021-12-07 北京沃东天骏信息技术有限公司 Picture adaptation method and device
CN114647354A (en) * 2022-03-25 2022-06-21 掌阅科技股份有限公司 Processing method of reading setting items, electronic equipment and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6809741B1 (en) * 1999-06-09 2004-10-26 International Business Machines Corporation Automatic color contrast adjuster
US20060044324A1 (en) * 2004-09-01 2006-03-02 Microsoft Corporation Adaptive color schemes
CN101119499A (en) * 2007-09-06 2008-02-06 中兴通讯股份有限公司 Method for performing self-adaption paint to text focus on set up box
CN101706718A (en) * 2009-11-05 2010-05-12 中兴通讯股份有限公司 Method and device for automatically changing desktop text color
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6809741B1 (en) * 1999-06-09 2004-10-26 International Business Machines Corporation Automatic color contrast adjuster
US20060044324A1 (en) * 2004-09-01 2006-03-02 Microsoft Corporation Adaptive color schemes
CN101119499A (en) * 2007-09-06 2008-02-06 中兴通讯股份有限公司 Method for performing self-adaption paint to text focus on set up box
CN101706718A (en) * 2009-11-05 2010-05-12 中兴通讯股份有限公司 Method and device for automatically changing desktop text color
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method

Also Published As

Publication number Publication date
CN103137103A (en) 2013-06-05
CN103137103B (en) 2016-09-14

Similar Documents

Publication Publication Date Title
WO2013082892A1 (en) Text display method and device
CN105139792B (en) Display methods and display device
CN113225427B (en) Image display method and terminal equipment
US9899002B2 (en) Information processing methods for displaying parts of an object on multiple electronic devices
US20140327686A1 (en) Drawing Method, Apparatus, and Terminal
CN102663786B (en) Layer superposition method and mobile terminal employing the same
JP2014165766A (en) Content creation device, content distribution server, and content creation method
CN105447125A (en) Electronic equipment and makeup assisting method
CN106339224B (en) Readability enhancing method and device
US10991068B2 (en) Projection image construction method and device
US20180084302A1 (en) Method and apparatus for content insertion during video playback, and storage medium
CN104020928A (en) Image display method and device
WO2007038141A3 (en) Method and apparatus for superimposing characters on video
KR20090092035A (en) Method for generating mosaic image and apparatus for the same
CN106980482B (en) Information display method and first electronic equipment
WO2022262404A1 (en) Picture presentation method, picture presentation apparatus and electronic device
CN104299252A (en) Picture display switching transition method and system thereof
WO2014107983A1 (en) Display method for background of application program and mobile terminal
US20180052337A1 (en) Method, apparatus and storage medium for color gamut mapping
WO2017215156A1 (en) Wallpaper processing method and device
CN103678612A (en) Photo-wall distributing device and method
WO2018036526A1 (en) Display method and device
CN111325702B (en) Image fusion method and device
CN112882781A (en) Intelligent frame detection and same-screen method and storage device
CN113170229B (en) Display device, server, electronic device and control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12854854

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12854854

Country of ref document: EP

Kind code of ref document: A1