CN115424588A - Character display edge processing method and device, terminal equipment and storage medium - Google Patents

Character display edge processing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115424588A
CN115424588A CN202211242756.8A CN202211242756A CN115424588A CN 115424588 A CN115424588 A CN 115424588A CN 202211242756 A CN202211242756 A CN 202211242756A CN 115424588 A CN115424588 A CN 115424588A
Authority
CN
China
Prior art keywords
gray scale
gray
aliasing
display
value
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202211242756.8A
Other languages
Chinese (zh)
Other versions
CN115424588B (en
Inventor
潘峥韵
朱增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ONYX INTERNATIONAL Inc
Original Assignee
ONYX INTERNATIONAL Inc
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 ONYX INTERNATIONAL Inc filed Critical ONYX INTERNATIONAL Inc
Priority to CN202211242756.8A priority Critical patent/CN115424588B/en
Publication of CN115424588A publication Critical patent/CN115424588A/en
Application granted granted Critical
Publication of CN115424588B publication Critical patent/CN115424588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/34Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
    • G09G3/3433Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using light modulating elements actuated by an electric field and being other than liquid crystal devices and electrochromic devices
    • G09G3/344Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using light modulating elements actuated by an electric field and being other than liquid crystal devices and electrochromic devices based on particles moving in a fluid or in a gas, e.g. electrophoretic devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/32Digital ink

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention discloses a character display edge processing method, a device, a terminal device and a storage medium, wherein the character display edge processing method is used for an ink screen device, when the character display edge processing method is used for displaying characters on the ink screen device, according to the size relation between a target gray scale number supported by a current refresh mode of the ink screen device and a preset reference display gray scale, the edge of a character image subjected to anti-aliasing processing is adjusted under the condition that the current refresh mode exceeds the reference display gray scale, or after an anti-aliasing layer is generated in the anti-aliasing processing process, the anti-aliasing layer is subjected to gray scale adjustment, the specific adjustment basis is a gray scale mapping table designed based on the actual character display characteristics, and when the characters are displayed in the current supported refresh mode after the gray scale adjustment, the proportion of the saw teeth generated by the part corresponding to the anti-aliasing layer can be effectively weakened.

Description

Character display edge processing method and device, terminal equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of display, in particular to a method and a device for processing a character display edge, a terminal device and a storage medium.
Background
The electronic ink screen realizes display change under the driving change of voltage through the electronic ink capsule, liquid charges are usually arranged in the electronic capsule, wherein positive charges are white, negative charges are black, when positive and negative voltages are applied to the electronic ink screen, the liquid with the charges can be respectively attracted and repelled, and through the mode, each pixel point can display white or black, so that black and white display of contents is realized.
The terminal equipment based on the electronic ink screen is the ink screen equipment, because the electronic ink screen display refreshes at a slow speed, and the color that can show is less, for the display refresh demand that adapts to ink screen equipment under different application scenes, designs various modes of refreshing in order to correspond various display refresh demands and provide balanced display effect as far as possible. For example, the A2 refresh mode, in which the refresh area displays only pure black and pure white gray, and supports the transition from black to white or white to black, and is suitable for video animation playing and web browsing scenes. For another example, DU refresh mode, in which conversion from any gray level to black level or white level is supported, and which is suitable for handwriting input. And for the GC16 refresh mode, 16 independent gray levels exist, and the method is suitable for the reading scene of a common electronic book.
In the process of displaying different contents by the ink screen device, different content processing mechanisms are correspondingly arranged. For example, when displaying a character, the character font is usually anti-aliased, and a gradually changing gray level is filled between the font and the background, so that the character stroke edge looks relatively smooth. The anti-aliasing processing is usually implemented at a fixed gray level, but the display of character strokes may occur in different display contents of different application scenes, so that characters subjected to anti-aliasing processing at the fixed gray level may occur, the gray level part generated by the anti-aliasing processing cannot be completely displayed in a corresponding manner during actual display, and the character edge has an aliasing problem instead.
Disclosure of Invention
The invention provides a character display edge processing method, a character display edge processing device, terminal equipment and a storage medium, and aims to solve the technical problems that in the prior art, an ink screen may have negative display effects such as display blockage, interaction response delay and the like.
In a first aspect, an embodiment of the present invention provides a text display edge processing method, which is used for an ink screen device, and includes:
acquiring a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing;
confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
acquiring an initial gray value corresponding to an edge pixel of the first page element;
determining a target gray value corresponding to each initial gray value according to a preset gray scale mapping relation, wherein the gray scale mapping relation is used for representing the gray value of the anti-aliasing design gray value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation;
replacing the initial gray value corresponding to the edge pixel with a corresponding target gray value to obtain a second page element;
and correspondingly replacing the first page element with the second page element in the page to be displayed, and generating a target page for displaying on the ink screen equipment.
Acquiring an initial gray value corresponding to an edge pixel of the first page element includes:
acquiring an original character image corresponding to the first page element;
and filtering the corresponding original text image from the first page element, taking the rest pixels as edge pixels, and taking the corresponding pixel gray value as an initial gray value.
Acquiring an initial gray value corresponding to an edge pixel of the first page element includes:
and identifying the pixel gray value of the first page element, extracting the pixel of which the pixel gray value is in the gray scale level range corresponding to the anti-aliasing processing as an edge pixel, wherein the corresponding pixel gray value is an initial gray value.
Wherein the reference display gray scale is equal to the anti-aliasing gray scale level.
The number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refreshing mode.
Wherein, the original text corresponding to the text image comprises at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
Wherein the display attribute comprises one or more of a font, a font size, and a font style.
Wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
In a second aspect, an embodiment of the present invention provides a text display edge processing method, which is used for an ink screen device, and includes:
anti-aliasing processing is carried out on characters to be displayed, and an initial anti-aliasing layer corresponding to the characters to be displayed is generated;
confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
determining a target gray value corresponding to the initial gray value of each pixel in the initial anti-aliasing layer according to a preset gray scale mapping relationship, wherein the gray scale mapping relationship is used for representing the gray value of the design gray value processed by the anti-aliasing layer mapped in the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship;
correspondingly replacing the initial gray value with a target gray value to obtain a second anti-aliasing layer;
and synthesizing the second anti-aliasing layer to the original character image of the corresponding character to be displayed to generate a target character image for displaying on the ink screen equipment.
Wherein the reference display gray scale is equal to the anti-aliasing gray scale level.
The number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refreshing mode.
The characters to be displayed comprise at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
Wherein the display attribute comprises one or more of a font, a font size, and a font style.
Wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
In a third aspect, an embodiment of the present invention provides a text display edge processing apparatus for an ink screen device, where the text display edge processing apparatus includes:
the page element acquisition unit is used for acquiring a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing;
the gray scale support confirming unit is used for confirming that the number of target gray scale levels supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
the pixel gray scale acquisition unit is used for acquiring an initial gray scale value corresponding to an edge pixel of the first page element;
the first gray scale mapping unit is used for confirming a target gray scale value corresponding to each initial gray scale value according to a preset gray scale mapping relation, the gray scale mapping relation is used for representing the gray scale value of the anti-aliasing processed design gray scale value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation;
the first gray level replacing unit is used for replacing the initial gray level value corresponding to the edge pixel with a corresponding target gray level value to obtain a second page element;
and the target page generating unit is used for correspondingly replacing the second page element with the first page element in the page to be displayed and generating a target page for displaying on the ink screen device.
Wherein the pixel gray scale acquiring unit includes:
the original character acquisition module is used for acquiring an original character image corresponding to the first page element;
and the character image filtering module is used for filtering the corresponding original character image from the first page element, taking the rest pixels as edge pixels, and taking the corresponding pixel gray value as an initial gray value.
Wherein the pixel gray scale acquiring unit includes:
and the gray value identification module is used for identifying the pixel gray value of the first page element, extracting the pixel of which the pixel gray value is in the gray level scale range corresponding to the anti-aliasing processing as an edge pixel, and taking the corresponding pixel gray value as an initial gray value.
Wherein the reference display gray scale is equal to the anti-aliasing gray scale level.
The number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refreshing mode.
The original text corresponding to the text-image comprises at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
Wherein the display attribute comprises one or more of a font, a font size, and a font style.
Wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
In a fourth aspect, an embodiment of the present invention provides a text display edge processing apparatus for an ink screen device, where the text display edge processing apparatus includes:
the anti-aliasing processing unit is used for performing anti-aliasing processing on characters to be displayed and generating an initial anti-aliasing layer corresponding to the characters to be displayed;
the gray scale support confirming unit is used for confirming that the number of target gray scale levels supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
the second gray scale mapping unit is used for determining a target gray scale value corresponding to the initial gray scale value of each pixel in the initial anti-aliasing layer according to a preset gray scale mapping relationship, wherein the gray scale mapping relationship is used for representing the gray scale value of the design gray scale value processed by the anti-aliasing layer mapped in the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship;
the second gray level replacing unit is used for correspondingly replacing the initial gray level value with a target gray level value to obtain a second anti-aliasing layer;
and the character image generating unit is used for synthesizing the second anti-aliasing layer to the corresponding original character image of the character to be displayed and generating a target character image for displaying on the ink screen equipment.
Wherein the reference display gray scale is equal to the anti-aliasing gray scale level.
The number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refreshing mode.
The characters to be displayed comprise at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
Wherein the display attribute comprises one or more of a font, a font size, and a font style.
Wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
In a fifth aspect, an embodiment of the present invention provides a terminal device, including:
an ink screen;
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the terminal device is enabled to implement the text display edge processing method according to any one of the first aspect and the second aspect.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the text display edge processing method according to any one of the first aspect and the second aspect.
When the character display edge processing method is used for character display of the ink screen equipment, the edge of a character image after anti-aliasing processing is adjusted under the condition that the current refreshing mode exceeds the reference display gray scale according to the size relation between the target gray scale number supported by the current refreshing mode of the ink screen equipment and the preset reference display gray scale, or after an anti-aliasing layer is generated in the anti-aliasing processing process, the anti-aliasing layer is subjected to gray scale adjustment, the specific adjustment basis is a gray scale mapping table designed based on the actual character display characteristics, and when characters are displayed in the current supported refreshing mode after the gray scale adjustment, the sawtooth proportion generated by the part corresponding to the anti-aliasing layer can be effectively weakened.
Drawings
FIG. 1 is a flowchart illustrating a text display edge processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of pixel gray scale after anti-aliasing;
FIG. 3 is a schematic diagram of actual pixel gray scale when displaying anti-aliasing processed text in the prior art;
FIG. 4 is a schematic diagram illustrating a gray level of a pixel when displaying anti-aliasing text in the text display edge processing method according to the embodiment of the invention;
FIG. 5 is a diagram illustrating the effect of anti-aliasing of text in the prior art;
FIG. 6 is a schematic diagram of the pixel gray scale distribution of the character stroke portion of FIG. 5;
FIG. 7 is a diagram illustrating the effect of anti-aliasing text display in the text display edge processing method according to the embodiment of the present invention;
FIG. 8 is a schematic diagram of the pixel intensity distribution of the portion of the stroke of the character of FIG. 7;
FIG. 9 is a flowchart illustrating another exemplary method for processing text display edges according to the present invention;
FIG. 10 is a block diagram of a text display edge processing apparatus according to an embodiment of the present invention;
FIG. 11 is a block diagram of another exemplary embodiment of a text-display edge processing apparatus;
fig. 12 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that, for the sake of brevity, this description does not exhaust all alternative embodiments, and it should be understood by those skilled in the art after reading this description that any combination of features may constitute an alternative embodiment as long as the features are not mutually inconsistent.
In the ink screen device, due to the display principle of the electronic ink screen, the electronic ink screen has unique characteristics in aspects of rich color degree, fine display degree and refreshing speed during display. The method is suitable for the characteristics of the electronic ink screen, and various targeted processing processes are available when a processor of the ink screen equipment processes the original pictures of various applications into display data suitable for being displayed by the electronic ink screen. Taking the control of the degree of fineness of display as an example, the text is usually subjected to anti-aliasing processing before the display screen is generated, the edge of the display image corresponding to the text is subjected to gray level setting in a predetermined manner, for example, in 16-level gray level during the anti-aliasing processing, as shown in fig. 2, a schematic gray level diagram of pixels after the anti-aliasing processing is shown, each square is a pixel, fig. 2 is a gray level state of pixels after the edge processing of a certain part of a stroke of the text, 9 pixels at positions (4, 1), (5, 1), (4, 2), (3, 3), and the like are set as a first gray level, 3 pixels at positions (5, 2), (3, 4), and (1, 6) are set as a third gray level, 2 pixels at positions (4, 3), (2, 5) are set as a third gray level, and the first gray level, the second gray level, and the third gray level are sequentially reduced within 16-level gray levels, that is, the color is sequentially lightened. And generating a display picture according to the corresponding character image and other picture elements after anti-aliasing processing.
If the gray scale can be correspondingly and normally displayed according to the anti-aliasing processing result in the display process of the display picture, the stroke shown in FIG. 2 has only one pixel in the change of the row and column and has transition of various gray scale levels, and the appearance of the aliasing can be effectively controlled in the display process; however, in actual display, the refresh mode of the ink screen device may not support 16-level gray scale display, and further processing for adapting the gray scale of each pixel in the display screen to the refresh mode is required. For example, when a 16-level gray scale is processed to a 4-level gray scale, the 16-level gray scale can be linearly mapped according to a ratio of 4 to 1, that is, 0 to 3 levels are processed to be 0 levels, 4 to 7 levels are processed to be 1 levels, 8 to 11 levels are processed to be 2 levels, and 12 to 15 levels are processed to be 3 levels. Under this processing mechanism, the gray level of the pixel after the gray level processing shown in fig. 2 is as shown in fig. 3, when the 2 pixels with the positions of (4, 3) and (2, 5) are processed to be 0 (i.e. white), the gray level of the remaining pixels may be processed to be 3 (i.e. black), and the actual display can be completed according to the gray level shown in fig. 3, the stroke shown in fig. 3 is changed on the row and column by two pixels, and the area of the sawtooth structure is 4 times that of the sawtooth structure shown in fig. 2. Text that has been anti-aliased will still have significant aliasing when actually displayed. Aiming at the display insufficiency, the text display edge processing scheme is provided in the application, so that the display effect of the text is optimized, the proportion of sawteeth is reduced, and the reading experience of a user is improved.
The following provides a detailed description of various embodiments of the invention.
Fig. 1 is a flowchart of a text display edge processing method according to an embodiment of the present invention. The text display edge processing method is used for a terminal device, especially for a terminal device using an electronic ink screen for display, namely an ink screen device, as shown in fig. 1, and comprises steps S110 to S160:
step S110: the method comprises the steps of obtaining a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing.
The page to be displayed is the display content which needs to be displayed in an electronic ink screen of the ink screen equipment according to the display content change of the current application and is updated to the user, and the display content is formed by the combination processing of an application window or the application window. The application window is not a static page, but is formed by arranging various elements at different positions and combining the elements to obtain the application window. The process of confirming the page to be displayed is actually obtained by recombining the confirmed component elements according to the response operation (for example, triggering a certain control) of the application window or according to the display change of the application window (for example, automatically turning pages). These combined elements include elements that are recorded in text form and need to be displayed as text images. The character form recording means that the character is recorded in the form of character data when stored, the character has information attribute, the display as a character image means that the visual effect required to be displayed is confirmed according to the character, and the character image is only a set of a plurality of pixels arranged in a specified mode in the display process.
After the most initial characters are obtained, the corresponding basic character images can be firstly confirmed, then anti-aliasing processing is carried out on the basic character images, the characters in the page to be displayed are directly processed in the anti-aliasing mode, and the anti-aliasing character images are defined as first page elements in the scheme.
The edge of the first page element is provided with an anti-aliasing layer obtained by anti-aliasing treatment, the anti-aliasing layer exists in a mode of pixels with gradually changed gray scales (as shown in figure 2), the anti-aliasing layer has different treatment modes and correspondingly anti-aliasing parameters, different results can be obtained for the same character in different anti-aliasing treatment modes, but the general law of the gradually changed gray scales is met on the whole, and the anti-aliasing layer also belongs to the treatment object of the scheme. For a single character, the number of the specific anti-aliasing layers can be 1 or more. The distribution pattern may have an inner edge anti-aliasing layer and an outer edge anti-aliasing layer according to the font. A character may have strokes located in different positions and may accordingly have anti-aliasing layers located in different positions corresponding to different strokes, or even located in different positions corresponding to the same stroke. In this case, all of the different anti-aliasing layers are generally treated.
Step S120: and confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale.
In the specific processing process, if the target gray scale level supported by the current refresh mode can meet the display requirements of all gray scale values in the anti-aliasing layer, the page to be displayed can be directly generated according to the first page element. In a specific processing procedure, the reference display gray scale may be set to be equal to the anti-aliasing gray scale level, that is, the target gray scale level supported by the current refresh mode is smaller than the anti-aliasing gray scale level, and it is determined that a subsequent processing procedure is required if the display of all gray scale values in the anti-aliasing layer cannot be realized. Of course, if the target gray scale level supported by the current refresh mode can substantially satisfy the display requirement of the anti-aliasing layer, the subsequent processing procedure may not be performed, for example, the target gray scale level supported by the current refresh mode is smaller than the gray scale level of the anti-aliasing processing, but the difference is smaller, and the text display effect does not seriously affect the reading experience of the user.
Step S130: and acquiring an initial gray value corresponding to the edge pixel of the first page element.
The source of the jaggies generated in the text image display process is an edge, and accordingly, for the first page element, all corresponding pixels may not be processed, but only edge pixels, specifically, pixels corresponding to the anti-jaggy layer may be processed. The gray value of the pixels of the part, namely the gray value obtained in the anti-aliasing process, is acquired firstly during the processing.
In a specific implementation procedure, step S130 may include step S131 and step S132:
step S131: and acquiring an original text image corresponding to the first page element.
Step S132: and filtering the corresponding original text image from the first page element, taking the rest pixels as edge pixels, and taking the corresponding pixel gray value as an initial gray value.
In the specific processing, the original text image, namely the basic text image corresponding to the most initial text, can be obtained firstly, and the image is not related to the shape of the final display, but is generated completely depending on the data corresponding to the text. Based on the original character image, filtering corresponding pixels in the corresponding first page elements, reserving the remaining pixels as edge pixels, and obtaining the corresponding pixel gray value as an initial gray value. In this way, edge pixels can be quickly identified directly by comparison.
In another specific implementation process, step S130 may be specifically implemented as step S133:
and identifying the pixel gray value of the first page element, extracting the pixel of which the pixel gray value is in the gray scale range corresponding to the anti-aliasing processing as an edge pixel, and taking the corresponding pixel gray value as an initial gray value.
In the specific processing, pixels in the gray scale level range corresponding to the anti-aliasing processing can be extracted as edge pixels through the identification of the gray scale values of the pixels, and the processing mode can directly confirm the edge pixels from the anti-aliasing layer without depending on other data.
Step S140: and determining a target gray value corresponding to each initial gray value according to a preset gray scale mapping relation, wherein the gray scale mapping relation is used for representing the gray value of the anti-aliasing design gray value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation.
The process of determining the target gray value corresponding to the initial gray value according to the gray scale mapping relationship is to actually map the gray value at a higher gray scale level to the gray value at a lower gray scale level, and the mapping process is not direct linear mapping but adopts a nonlinear mapping mode. For example, when mapping 16 th order to 4 th order, 0-6, 7-10, 11-13, 14-15 correspond to 0, 1, 2, 3; for example, when 16 th order is mapped to 2 nd order, 0-10, 11-15 correspond to 0, 1, respectively; this uneven phase mapping is one of the non-linear mappings.
In a specific processing procedure, the number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refresh mode. The gray scale levels supported by different refresh modes may be different, and their corresponding gray scale mappings may also be different. For example, the gray scale levels supported by the A2 refresh mode and the DU refresh mode are 2 and 4, respectively. The corresponding gray scale mapping is also compatible with 2 and 4.
In addition, in a specific implementation process, the original characters corresponding to the text image comprise at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship. The display properties include one or more of font (corresponding property parameters such as Song style, regular style, bold), font size (corresponding property parameters such as three, four, 10 pounds) and font style (corresponding property parameters such as bold, italics).
For the display content (i.e. the original text), the display effects corresponding to different display attributes also have differences, and in order to reflect the difference of the display effects, the gray scale mapping relationship also has corresponding designs. The specific display attributes are synchronously obtained from the time of obtaining the original characters. Of course, the characters may also be detected to identify the corresponding display attributes. Taking white background black characters as an example, the strokes of the Song Dynasty are thinner than the black body in comparison with the display effect of the same character, so that the saw teeth of the Song Dynasty are more obvious than the black body when displayed on the same device. Therefore, the target gray value of the sons body is larger than that of the black body on the premise that the initial gray values are the same. Specifically, if the target pixels are all gray (16 th order, target gray value of 7) and the target gray scale level is 2, the edge pixels of the song body are directly white and the edge pixels of the black body are directly black. Of course, the gray scale mapping relationships corresponding to each attribute parameter of each display attribute are not different from each other, and the gray scale mapping relationships corresponding to various conditions may be the same.
In a specific implementation process, the gray scale mapping relation can be designed according to the equipment attribute of the ink screen equipment. The ink screen device includes at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation. Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
For different equipment version numbers, equipment resolution, visual moment detection parameters, environment detection light intensity, front light parameters and the like, software and hardware configurations of ink screen equipment may be different, so that corresponding text display modes may be different. Therefore, the gray scale mapping relation corresponding to the software and hardware configuration of the ink screen equipment can be adapted according to the equipment attributes of different ink screen equipment.
It should be noted that, when the gray-scale mapping relationship is applied specifically, there is a confirmation mechanism for referring to which attribute corresponds to the gray-scale mapping relationship. Generally speaking, the more basic the display requirements, the higher the priority, e.g. refresh mode has the highest priority, font has the next highest priority, and the ambient detected light intensity has a lower priority. The gray scale mapping relation of the refresh mode is determined firstly, the gray scale mapping relation is the most basic gray scale mapping relation, and the number of the finally usable gray scale levels and the basic gray scale mapping relation are determined. After confirming the gray scale mapping relation of the refresh mode, further confirming the gray scale mapping relation of the font, if the font has the gray scale mapping relation matched with the corresponding gray scale number, such as a special rule that 16-level gray scale is mapped to 2-level gray scale or 16-level gray scale is mapped to 4-level gray scale, processing according to the gray scale mapping relation of the font. In general, the specific gray scale mapping relationship between the gray scale support of the refresh mode and the present mode is needed, and if the font has the corresponding equivalent gray scale mapping relationship (for example, a2 supports 2-level, the font also has 2-level gray scale mapping relationship), the gray scale mapping relationship of the font is used to replace the gray scale mapping relationship of the refresh mode. If the font is not available, for example, the font has only 16-level gray scale mapped to 2-level gray scale, but now 16-level gray scale mapped to 4-level gray scale, then the font can only be processed according to the gray scale mapping relationship of the refresh mode. Overall, the gray-scale mapping relationship of the refresh mode can ensure correct results, and the gray-scale mapping relationship of the font is to make the display effect better under the condition of correct results.
Step S150: and replacing the initial gray value corresponding to the edge pixel with a corresponding target gray value to obtain a second page element.
And under the condition that the corresponding position information of the edge pixel in the first page element is not changed, replacing the initial gray value of the edge pixel, namely actually using the corresponding target gray value by the display parameter of the edge pixel, so as to obtain a second page element.
Reference may be made to fig. 3 and 4 for a comparison of the effect of the prior art and the present solution, respectively, on the anti-aliasing layer shown in fig. 2. When the anti-aliasing layer shown in fig. 2 cannot perform display of all gray levels in the current refresh mode, it is processed into pixel gray levels as shown in fig. 3 based on the prior art, and it is obvious that the aliasing on the oblique stroke is an isosceles right triangle with the waist length of 2 pixels. The pixel gray scale shown in fig. 4 can be processed based on the scheme, wherein the sawtooth on the oblique stroke is an isosceles right triangle with the waist length of 1 pixel, the area of the sawtooth is only one fourth of that in fig. 3, and the change of the proportion can bring obvious visual improvement when in specific display.
From the more specific improvement of the actual character display effect, reference may be made to fig. 5 and fig. 7, where fig. 5 is an effect diagram actually displayed on a character in the prior art when the character after antialiasing processing cannot be displayed in all gray levels in the current refresh mode, and fig. 7 is an effect diagram actually displayed on the character in the present scheme, it is obvious that in fig. 5, jaggies also appear at the edge positions 11 of the horizontal and vertical strokes, rather than at the edge positions of the oblique strokes; while the jaggies of the edge positions of the diagonal strokes in fig. 7 are improved, the edge positions 21 of the horizontal and vertical strokes can be eliminated. For the characters, in order to ensure the display style of the font, when the anti-aliasing process is actually performed, the horizontal strokes are not completely processed into black and then displayed on the white background, but the horizontal strokes are processed into pixel gray levels lower than the black at the edge of the white background as shown in fig. 6, and the pixel gray levels at the edge are not single pixel gray levels but have gray level changes, but the gray level changes are continuous in the anti-aliasing process, so that the aliasing can be eliminated or weakened during normal display, meanwhile, a better character display style can be presented, and obvious gray level changes in the horizontal direction can be seen at the upper left corner as shown in fig. 6. Such gray scale changes cause that if the gray scale of the pixel of the anti-aliasing layer is processed into the gray scale that can be supported by the current refresh mode according to the conventional linear mapping logic when the current refresh mode cannot be supported by the display, the edge with continuous gray scale originally has abrupt gray scale changes between adjacent pixels, and then the aliasing shown as edge position 11 in fig. 5 appears when the display is performed.
If based on the scheme, when the pixel gray scale corresponding to the anti-aliasing layer cannot be displayed and supported in the current refresh mode, the whole anti-aliasing layer can adapt to the display characteristics of the characters, and the corresponding gray scale mapping relation is used, so that the edge position 21 of the stroke in fig. 7 still keeps the state of continuous pixel gray scale as shown in fig. 8, and when the display is performed based on the pixel gray scale shown in fig. 8, the display style of the characters can be ensured to be basically unchanged, and the aliasing is effectively eliminated.
Step S160: and correspondingly replacing the first page element with the second page element in the page to be displayed, and generating a target page for displaying on the ink screen equipment.
And combining the second page elements and the display elements in the page to be displayed according to the corresponding layout positions to generate a target page for displaying on the ink screen equipment. Of course, there may be processing procedures such as gray scale conversion and error diffusion for other display elements in the generating process, and the processing procedures can be implemented by referring to the existing ink screen picture generating process.
The process of displaying on the ink screen device after the target page is generated is a basic processing process of the ink screen device, is not an improvement focus of the scheme, and is not repeatedly described.
The character display edge processing method is used for ink screen equipment, and comprises the following steps: acquiring a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing; confirming that the target gray scale level number supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale; acquiring an initial gray value corresponding to an edge pixel of the first page element; determining a target gray value corresponding to each initial gray value according to a preset gray scale mapping relation, wherein the gray scale mapping relation is used for representing the gray value of the anti-aliasing design gray value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation; replacing the initial gray value corresponding to the edge pixel with a corresponding target gray value to obtain a second page element; and correspondingly replacing the first page element with the second page element in the page to be displayed, and generating a target page for displaying on the ink screen equipment. The method is based on a gray scale mapping table designed based on the display characteristics of actual characters, gray scale adjustment is carried out on the content corresponding to the anti-aliasing treatment, and the proportion of the jaggies generated by the part corresponding to the anti-aliasing layer can be effectively weakened when the characters are displayed in the current supported refreshing mode.
Fig. 9 is a flowchart of a text display edge processing method according to an embodiment of the present invention. As shown in fig. 9, the text display edge processing method is applied to a terminal device, especially a terminal device that uses an electronic ink screen to perform display, that is, an ink screen device, and includes steps S210 to S250:
step S210: and performing anti-aliasing treatment on the characters to be displayed to generate an initial anti-aliasing layer corresponding to the characters to be displayed.
Step S220: and confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale.
Wherein the reference display gray scale is equal to the anti-aliasing gray scale level.
Step S230: and determining a target gray value corresponding to the initial gray value of each pixel in the initial anti-aliasing layer according to a preset gray-scale mapping relation, wherein the gray-scale mapping relation is used for representing the gray value of the design gray value processed by the anti-aliasing layer mapped in the range of the target gray-scale level, and the gray-scale mapping relation is a nonlinear mapping relation.
The number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refreshing mode.
The characters to be displayed comprise at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
Wherein the display attribute comprises one or more of a font, a font size, and a font style.
Wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
Wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
Step S240: and correspondingly replacing the initial gray value with a target gray value to obtain a second anti-aliasing layer.
Step S350: and synthesizing the second anti-aliasing layer to the original character image of the corresponding character to be displayed to generate a target character image for displaying on the ink screen equipment.
The implementation process in this embodiment is the same as the overall implementation principle of the previous embodiment, and the main change is that after the anti-aliasing process is completed, the anti-aliasing layer generated directly by the anti-aliasing process performs gray-scale value replacement of pixels based on a gray-scale mapping relationship, thereby generating a second anti-aliasing layer. And then, directly generating a target character image based on the anti-aliasing layer, and then generating a target page for display based on the target character image, wherein the specific processing details refer to the previous embodiment.
The character display edge processing method is used for ink screen equipment, and comprises the following steps: anti-aliasing processing is carried out on characters to be displayed, and an initial anti-aliasing layer corresponding to the characters to be displayed is generated; confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale; determining a target gray value corresponding to the initial gray value of each pixel in the initial anti-aliasing layer according to a preset gray scale mapping relationship, wherein the gray scale mapping relationship is used for representing the gray value of the design gray value processed by the anti-aliasing layer mapped in the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship; correspondingly replacing the initial gray value with a target gray value to obtain a second anti-aliasing layer; and synthesizing the second anti-aliasing layer to the original character image of the corresponding character to be displayed to generate a target character image for displaying on the ink screen equipment. The method is based on a gray scale mapping table designed based on the display characteristics of actual characters, gray scale adjustment is carried out on the content corresponding to the anti-aliasing treatment, and the proportion of the jaggies generated by the part corresponding to the anti-aliasing layer can be effectively weakened when the characters are displayed in the current supported refreshing mode.
Fig. 10 is a schematic structural diagram of a text display edge processing apparatus according to an embodiment of the present invention. Referring to fig. 11, the text display edge processing apparatus is used for an ink screen device, and includes a page element obtaining unit 310, a gray support confirming unit 320, a pixel gray obtaining unit 330, a first gray mapping unit 340, a first gray replacing unit 350, and a target page generating unit 360.
The page element acquiring unit 310 is configured to acquire a first page element in a page to be displayed, where the first page element is a text image after anti-aliasing processing; a gray scale support confirming unit 320, configured to confirm that a target gray scale level supported by the current refresh mode of the ink screen device is smaller than a preset reference display gray scale; a pixel gray scale obtaining unit 330, configured to obtain an initial gray scale value corresponding to an edge pixel of the first page element; the first gray scale mapping unit 340 is configured to determine a target gray scale value corresponding to each initial gray scale value according to a preset gray scale mapping relationship, where the gray scale mapping relationship is used to represent a gray scale value of the anti-aliasing design gray scale value mapped within the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship; a first gray replacement unit 350, configured to replace the initial gray value corresponding to the edge pixel with a corresponding target gray value, so as to obtain a second page element; and a target page generating unit 360, configured to correspondingly replace the first page element with the second page element in the page to be displayed, and generate a target page for displaying on the ink screen device.
On the basis of the above embodiment, the pixel gray scale obtaining unit 330 includes:
the original character acquisition module is used for acquiring an original character image corresponding to the first page element;
and the character image filtering module is used for filtering the corresponding original character image from the first page element, taking the rest pixels as edge pixels, and taking the corresponding pixel gray value as an initial gray value.
On the basis of the above embodiment, the pixel gradation acquiring unit includes:
and the gray value identification module is used for identifying the pixel gray value of the first page element, extracting the pixel of which the pixel gray value is in the gray level scale range corresponding to the anti-aliasing processing as an edge pixel, and taking the corresponding pixel gray value as an initial gray value.
On the basis of the above embodiment, the reference display gray scale is equal to the gray scale level of the anti-aliasing process.
On the basis of the above embodiment, the number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refresh mode.
On the basis of the embodiment, the original text corresponding to the text image comprises at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
On the basis of the above embodiment, the display attribute includes one or more of a font, a font size, and a font style.
On the basis of the above embodiment, the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
On the basis of the above embodiment, the device attribute includes one or more of a device version, a device resolution, a visual moment detection parameter, an environment detection light intensity, and a front light parameter.
Fig. 11 is a schematic structural diagram of another text display edge processing apparatus according to an embodiment of the present invention. Referring to fig. 12, the text display edge processing apparatus is used for an ink screen device, and includes an anti-aliasing processing unit 410, a gray level support confirmation unit 420, a second gray level mapping unit 430, a second gray level replacement unit 440, and a text image generation unit 450.
The anti-aliasing processing unit 410 is configured to perform anti-aliasing processing on characters to be displayed, and generate an initial anti-aliasing layer corresponding to the characters to be displayed; a gray scale support confirming unit 420, configured to confirm that a target gray scale level supported by the current refresh mode of the ink screen device is smaller than a preset reference display gray scale; the second gray scale mapping unit 430, configured to determine, by using english according to a preset gray scale mapping relationship, a target gray scale value corresponding to the initial gray scale value of each pixel in the initial anti-aliasing layer, where the gray scale mapping relationship is used to represent a gray scale value of a design gray scale value processed by the anti-aliasing layer, which is mapped in a range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship; a second gray level replacing unit 440, configured to correspondingly replace the initial gray level value with a target gray level value, so as to obtain a second anti-aliasing layer; and a text image generating unit 450, configured to synthesize the second anti-aliasing layer into an original text image of the corresponding text to be displayed, and generate a target text image for displaying on the ink screen device.
On the basis of the above embodiment, the reference display gray scale is equal to the gray scale level of the anti-aliasing process.
On the basis of the above embodiment, the number of the gray scale mapping relations is multiple, and each gray scale mapping relation corresponds to a refresh mode.
On the basis of the above embodiment, the text to be displayed includes at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
On the basis of the above embodiment, the display attribute includes one or more of a font, a font size, and a font style.
On the basis of the above embodiment, the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
On the basis of the above embodiment, the device attribute includes one or more of a device version, a device resolution, a visual moment detection parameter, an environment detection light intensity, and a front light parameter.
The text display edge processing device provided by the embodiment of the invention is contained in the terminal equipment, can be used for executing the text display edge processing method provided by the embodiment, and has corresponding functions and beneficial effects.
It should be noted that, in the embodiment of the text display edge processing apparatus, the units and modules included in the text display edge processing apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Fig. 12 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 12, the terminal device includes a processor 510, a memory 520, an input means 530, an output means 540, and a communication means 550; the number of the processors 510 in the terminal device may be one or more, and one processor 510 is taken as an example in fig. 12; the processor 510, the memory 520, the input device 530, the output device 540 and the communication device 550 in the terminal equipment may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 12.
The memory 520 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the text display edge processing method in the embodiment of the present invention (for example, the page element acquiring unit 310, the gray support confirming unit 320, the pixel gray level acquiring unit 330, the first gray level mapping unit 340, the first gray level replacing unit 350, and the target page generating unit 360 in the text display edge processing apparatus). The processor 510 executes various functional applications and data processing of the terminal device by running software programs, instructions and modules stored in the memory 520, that is, implements the above-described text display edge processing method.
The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to a terminal device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. The output device 540 in this embodiment is an ink screen, and may further include a sound output device or other display devices.
The terminal equipment comprises a character display edge processing device, can be used for executing any character display edge processing method, and has corresponding functions and beneficial effects.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements related operations in the text display edge processing method provided in any embodiment of the present application, and has corresponding functions and beneficial effects.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product.
Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. Those skilled in the art will appreciate that the present invention is not limited to the particular embodiments described herein, and that various obvious changes, rearrangements and substitutions will now be apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (20)

1. A character display edge processing method is used for ink screen equipment and is characterized by comprising the following steps:
acquiring a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing;
confirming that the target gray scale level supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
acquiring an initial gray value corresponding to an edge pixel of the first page element;
determining a target gray value corresponding to each initial gray value according to a preset gray scale mapping relation, wherein the gray scale mapping relation is used for representing the gray value of the anti-aliasing design gray value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation;
replacing the initial gray value corresponding to the edge pixel with a corresponding target gray value to obtain a second page element;
and correspondingly replacing the first page element with the second page element in the page to be displayed, and generating a target page for displaying on the ink screen equipment.
2. The method for processing the edge of a text display according to claim 1, wherein the obtaining an initial gray value corresponding to an edge pixel of the first page element comprises:
acquiring an original character image corresponding to the first page element;
and filtering the corresponding original text image from the first page element, taking the rest pixels as edge pixels, and taking the corresponding pixel gray value as an initial gray value.
3. The method for processing the edge of a text display according to claim 1, wherein the obtaining an initial gray value corresponding to an edge pixel of the first page element comprises:
and identifying the pixel gray value of the first page element, extracting the pixel of which the pixel gray value is in the gray scale level range corresponding to the anti-aliasing processing as an edge pixel, wherein the corresponding pixel gray value is an initial gray value.
4. The method of any of claims 1-3, wherein the reference display gray scale is equal to a gray scale level of the antialiasing processing.
5. The method as claimed in any one of claims 1-3, wherein the number of said gray-scale mappings is plural, and each of said gray-scale mappings corresponds to a refresh mode.
6. The text display edge processing method of any one of claims 1-3, wherein the original text corresponding to the text image comprises at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
7. The method of claim 6, wherein the display attribute comprises one or more of a font, a font size, and a font style.
8. The text display edge processing method of any one of claims 1-3, wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
9. The method of claim 8, wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
10. A character display edge processing method is used for ink screen equipment and is characterized by comprising the following steps:
anti-aliasing processing is carried out on characters to be displayed, and an initial anti-aliasing layer corresponding to the characters to be displayed is generated;
confirming that the target gray scale level number supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
determining a target gray value corresponding to the initial gray value of each pixel in the initial anti-aliasing layer according to a preset gray scale mapping relationship, wherein the gray scale mapping relationship is used for representing a gray value of a design gray value processed by the anti-aliasing layer, which is mapped in the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship;
correspondingly replacing the initial gray value with a target gray value to obtain a second anti-aliasing layer;
and synthesizing the second anti-aliasing layer to the original character image of the corresponding character to be displayed to generate a target character image for displaying on the ink screen equipment.
11. The method of claim 10, wherein the reference display gray scale is equal to a gray scale level of the antialiasing processing.
12. The method as claimed in claim 10, wherein the number of the gray-scale mappings is plural, and each gray-scale mapping corresponds to a refresh mode.
13. The method of claim 10, wherein the text to be displayed includes at least one display attribute; each attribute parameter of each display attribute corresponds to a gray scale mapping relationship.
14. The method of claim 13, wherein the display attributes comprise one or more of font, font size, and font style.
15. The text display edge processing method of claim 10, wherein the ink screen device comprises at least one device attribute; and each attribute parameter corresponding to each equipment attribute corresponds to a gray scale mapping relation.
16. The method of claim 15, wherein the device attributes include one or more of device version, device resolution, view moment detection parameters, ambient detection light intensity, and front light parameters.
17. Word display edge processing apparatus for ink screen equipment, its characterized in that includes:
the page element acquisition unit is used for acquiring a first page element in a page to be displayed, wherein the first page element is a character image subjected to anti-aliasing processing;
the gray scale support confirming unit is used for confirming that the target gray scale grade supported by the current refreshing mode of the ink screen equipment is less than a preset reference display gray scale;
the pixel gray scale acquisition unit is used for acquiring an initial gray scale value corresponding to an edge pixel of the first page element;
the first gray scale mapping unit is used for confirming a target gray scale value corresponding to each initial gray scale value according to a preset gray scale mapping relation, the gray scale mapping relation is used for representing the gray scale value of the anti-aliasing design gray scale value mapped in the range of the target gray scale level, and the gray scale mapping relation is a nonlinear mapping relation;
the first gray level replacing unit is used for replacing the initial gray level value corresponding to the edge pixel with a corresponding target gray level value to obtain a second page element;
and the target page generating unit is used for correspondingly replacing the second page element with the first page element in the page to be displayed and generating a target page for displaying on the ink screen device.
18. Word display edge processing apparatus for ink screen equipment, its characterized in that includes:
the anti-aliasing processing unit is used for performing anti-aliasing processing on characters to be displayed and generating an initial anti-aliasing layer corresponding to the characters to be displayed;
the gray scale support confirming unit is used for confirming that the number of target gray scale levels supported by the current refresh mode of the ink screen equipment is smaller than a preset reference display gray scale;
the second gray scale mapping unit is used for determining a target gray scale value corresponding to the initial gray scale value of each pixel in the initial anti-aliasing layer according to a preset gray scale mapping relationship, wherein the gray scale mapping relationship is used for representing the gray scale value of the design gray scale value processed by the anti-aliasing layer mapped in the range of the target gray scale level, and the gray scale mapping relationship is a nonlinear mapping relationship;
the second gray level replacing unit is used for correspondingly replacing the initial gray level value with a target gray level value to obtain a second anti-aliasing layer;
and the character image generating unit is used for synthesizing the second anti-sawtooth layer to the corresponding original character image of the character to be displayed and generating a target character image for displaying on the ink screen equipment.
19. A terminal device, comprising:
an ink screen;
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the terminal device to implement the text display edge processing method according to any one of claims 1-16.
20. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of text display edge processing according to any one of claims 1 to 16.
CN202211242756.8A 2022-10-11 2022-10-11 Text display edge processing method and device, terminal equipment and storage medium Active CN115424588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211242756.8A CN115424588B (en) 2022-10-11 2022-10-11 Text display edge processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211242756.8A CN115424588B (en) 2022-10-11 2022-10-11 Text display edge processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115424588A true CN115424588A (en) 2022-12-02
CN115424588B CN115424588B (en) 2023-06-20

Family

ID=84205469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211242756.8A Active CN115424588B (en) 2022-10-11 2022-10-11 Text display edge processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115424588B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011120307A1 (en) * 2010-04-01 2011-10-06 广州奥熠电子科技有限公司 Electrophoretic display and drive method thereof
CN105787891A (en) * 2016-01-31 2016-07-20 厦门美图之家科技有限公司 Image processing method, system and shooting terminal for optimizing edge aliasing
CN106128369A (en) * 2016-08-31 2016-11-16 长沙丰灼通讯科技有限公司 A kind of interface processing method reducing electronic ink screen ghost
CN111508039A (en) * 2020-04-20 2020-08-07 青岛海信移动通信技术股份有限公司 Word processing method of ink screen and communication terminal
CN112925596A (en) * 2021-02-25 2021-06-08 青岛海信移动通信技术股份有限公司 Mobile terminal and display method of display object thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011120307A1 (en) * 2010-04-01 2011-10-06 广州奥熠电子科技有限公司 Electrophoretic display and drive method thereof
CN105787891A (en) * 2016-01-31 2016-07-20 厦门美图之家科技有限公司 Image processing method, system and shooting terminal for optimizing edge aliasing
CN106128369A (en) * 2016-08-31 2016-11-16 长沙丰灼通讯科技有限公司 A kind of interface processing method reducing electronic ink screen ghost
CN111508039A (en) * 2020-04-20 2020-08-07 青岛海信移动通信技术股份有限公司 Word processing method of ink screen and communication terminal
CN112925596A (en) * 2021-02-25 2021-06-08 青岛海信移动通信技术股份有限公司 Mobile terminal and display method of display object thereof

Also Published As

Publication number Publication date
CN115424588B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN108733336B (en) Page display method and device
US5805153A (en) Method and system for resizing the subtitles of a video
US5952994A (en) Method for scaling an image
CN111179862B (en) Refreshing method of display page, reader and computer storage medium
CN114974148B (en) Font display enhancement method, device, equipment and storage medium for ink screen
CN111476852B (en) Reader refresh method, computing device, and computer storage medium
US11551392B2 (en) Graphic drawing method and apparatus, device, and storage medium
US6714218B1 (en) Scaling images
CN111788554A (en) Adaptive interface conversion across display screens
US10043298B2 (en) Enhanced document readability on devices
US5838291A (en) Display control method and apparatus
CN115831061B (en) Ink screen display method, device, terminal equipment and storage medium
US6597365B1 (en) Indicating device with and without antialiasing
CN115994875A (en) Method and system for improving digital image quality
CN115424588B (en) Text display edge processing method and device, terminal equipment and storage medium
US20220028360A1 (en) Method, computer program and apparatus for generating an image
CN115705829A (en) Partition dimming control method and device, terminal equipment and storage medium
CN100349203C (en) Co-screen displaying device supporting scale chracter shape and method thereof
CN110795096A (en) Slice layer special effect realization method based on openlayers
CN115691434B (en) Text display method, device and equipment based on ink screen and storage medium
US11816817B2 (en) Method and apparatus for processing an image
CN102629467B (en) Image processor, font screen display device and display method
CN117153118B (en) Picture updating method, device and equipment of ink screen and storage medium
US8717628B1 (en) Flexible image processing apparatus and method
CN116188292A (en) Method and device for processing board book image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant