CN111552451B - Display control method and device, computer readable medium and terminal equipment - Google Patents

Display control method and device, computer readable medium and terminal equipment Download PDF

Info

Publication number
CN111552451B
CN111552451B CN202010274861.4A CN202010274861A CN111552451B CN 111552451 B CN111552451 B CN 111552451B CN 202010274861 A CN202010274861 A CN 202010274861A CN 111552451 B CN111552451 B CN 111552451B
Authority
CN
China
Prior art keywords
drawn
pixels
proportion
image
color
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.)
Active
Application number
CN202010274861.4A
Other languages
Chinese (zh)
Other versions
CN111552451A (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.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications Co Ltd
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 Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to CN202010274861.4A priority Critical patent/CN111552451B/en
Publication of CN111552451A publication Critical patent/CN111552451A/en
Application granted granted Critical
Publication of CN111552451B publication Critical patent/CN111552451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure relates to the technical field of electronic devices, and in particular, to a display control method, a display control apparatus, a computer readable medium, and a terminal device. The method comprises the following steps: responding to target control operation, and acquiring a page to be converted; identifying the page to be converted to obtain an image to be drawn and/or an area to be drawn in the page to be converted; sampling the image to be drawn and/or the region to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points; invoking an image drawing strategy, and determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points; and/or calling a region drawing strategy, and determining a color transformation strategy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixel points. The display effect of the dark color mode can be improved.

Description

Display control method and device, computer readable medium and terminal equipment
Technical Field
The present disclosure relates to the technical field of electronic devices, and in particular, to a display control method, a display control apparatus, a computer readable medium, and a terminal device.
Background
Intelligent mobile terminal devices such as mobile phones and tablet computers occupy more and more time in daily life. When a user uses the mobile phone in an environment with darker light, if the display interface of the mobile phone always keeps higher screen brightness, the eyes of the user are stimulated, and adverse effects are caused.
In the prior art, the change of light can be adapted by adjusting the brightness of the screen. But such an approach would affect the overall content in the display interface. The contrast of the displayed content is easily reduced, and a certain difficulty is caused to the user to recognize the displayed content on the screen.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a display control method, a display control apparatus, a computer-readable medium, and a terminal device capable of implementing selective conversion of colors according to picture contents, adapted to a color control mode of a user on a terminal.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a display control method including:
responding to target control operation, and acquiring a page to be converted;
identifying the page to be converted to obtain an image to be drawn and/or an area to be drawn in the page to be converted;
sampling the image to be drawn and/or the region to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points;
invoking an image drawing strategy, and determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points; and/or
And calling an area drawing strategy, and determining a color transformation strategy of the area to be drawn based on the size of the area to be drawn and the proportion of various types of pixel points.
According to a second aspect of the present disclosure, there is provided a display control apparatus including:
the page to be converted acquisition module is used for responding to the target control operation and acquiring a page to be converted;
the page to be converted identification module is used for identifying the page to be converted to obtain an image to be drawn and/or an area to be drawn in the page to be converted;
the pixel point sampling module is used for sampling the image to be drawn and/or the area to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points;
The image drawing module is used for calling an image drawing strategy and determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points; and/or
And the region drawing module is used for calling a region drawing strategy and determining a color transformation strategy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixel points.
According to a third aspect of the present disclosure, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the display control method described above.
According to a fourth aspect of the present disclosure, there is provided a terminal device comprising:
one or more processors;
and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the display control method described above.
According to the display control method provided by the embodiment of the disclosure, the image to be drawn and the area to be drawn in the page to be converted are identified and the pixel points are sampled, so that the patterns, the contents and the color components of the image to be drawn and the area to be returned according to the pixel point occupation ratio, the image size and the image format can be determined, corresponding color return policies can be called, corresponding color transformation policies are executed on the image to be drawn and the area to be drawn respectively, color matching of all parts of the contents in the page in the color-changed dark mode is more reasonable, and the display effect of the dark mode is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
Fig. 1 schematically illustrates a flow chart of a display control method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic view of a page in a conventional display mode in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a page after performing a color transformation in an exemplary embodiment of the present disclosure;
fig. 4 schematically illustrates a composition diagram of a display control apparatus in an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates an electronic device structure of a terminal device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the existing intelligent terminal equipment, the color of the content in the page is generally displayed according to a default or custom theme, and the color configuration is generally fixed. When a user uses a terminal device in an environment where an optical fiber is dark, for example, when using a mobile phone or a tablet computer in a case where a light is turned off at night, the screen display content can be adjusted only by adjusting the brightness of the screen. However, this approach may result in a reduction in contrast of the page contents, a reduction in display effect, and a tendency to cause discomfort to eyes of the user.
In view of the above-described drawbacks and deficiencies of the prior art, a display control method is provided in the present exemplary embodiment. Referring to fig. 1, the display control method described above may include the steps of:
s11, responding to target control operation, and acquiring a page to be converted;
s12, identifying the page to be converted to obtain an image to be drawn and/or an area to be drawn in the page to be converted;
s13, sampling the image to be drawn and/or the region to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points;
s14, invoking an image drawing strategy, and determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points; and/or
S15, calling a region drawing strategy, and determining a color transformation strategy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixel points.
In the display control method provided in this exemplary embodiment, on one hand, by identifying the image to be drawn and the area to be drawn in the page to be converted and sampling the pixel points, the duty ratio, the image size, the format and the color composition of each type of pixel points according to the image to be drawn and the area to be drawn can be accurately obtained. On the other hand, the corresponding color transformation strategies can be executed for the image to be drawn and the area to be drawn according to the information, so that the color matching of the contents of each part in the color-changed page in the dark color mode is more reasonable, the display effect of the dark color mode is improved, and the stimulation to eyes of a user is reduced.
Next, each step of the display control method in the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
Step S11, responding to the target control operation, and acquiring a page to be converted.
In this example embodiment, the display control method described above may be applied to smart terminal devices such as a mobile phone, a tablet computer, and a notebook computer configured with a display. For example, a corresponding dark mode, dark mode or night mode, dim mode option may be configured in the system application list of the terminal device for performing color conversion for each page. The dark color mode/dark color mode can be defined as a deeper color scheme, the optimal contrast of the text foreground and the dark background is utilized to optimize the colors of the text and the system icons, the consistency of the viewing experience of eyes, the comfort and the readability of reading are ensured, and the method can be applied to system content and third party application.
Specifically, for the terminal device, the dark mode option may be selected in response to the user selecting the dark mode option in the interactive interface, for example, in the setting list or the system application list, so that the terminal device enters the dark mode.
After the terminal equipment enters the dark mode, all or part of the interactive interface views of the system and the application program can be obtained, and the interactive interface views are used as pages to be converted. The method comprises the steps that each interactive interface view of an application program running in the background at present can be used as a page to be converted; or taking the multi-level interactive interface view associated with the current interactive interface view as a page to be converted; or after a user starts a new application program, each interactive interface view formed by the application is used as a page to be converted, so that the situation that after entering a dark mode, the system needs to process too many pages to be converted at the same time is avoided, and the calculation pressure of a processor is increased.
Alternatively, in other exemplary embodiments of the present disclosure, the interactive interface views may be used as the pages to be converted in advance in the background during the idle period, so as to perform the color conversion in advance.
And step S12, identifying the page to be converted to acquire an image to be drawn and/or an area to be drawn in the page to be converted.
In this example embodiment, after entering the dark mode, each page to be converted may be identified, and contents such as each region to be drawn, an image to be drawn, and a text to be drawn in the page to be converted may be read. For example, the page to be converted may include text, pictures, buttons, controls, icons, parting lines, and the like. The text to be drawn and the image to be drawn can be displayed in a superimposed manner on the region to be drawn and displayed on an upper layer. For example, referring to the "setup" page in the normal/normal display mode shown in fig. 2, a plurality of images 201 to be drawn are included, for example: icon images corresponding to flight modes, bluetooth, search and the like; also included are a plurality of text to be rendered 202, such as: "setup", "woods day", "find cell phone", etc. Further, an area to be drawn 203 is also included. In addition, a parting line 204 is included.
In some exemplary embodiments of the present disclosure, the page to be converted may be further divided into a plurality of regions to be identified according to a dividing line included in the page to be converted, or according to typesetting and layout of the page, so that identification of contents and conversion of colors may be sequentially performed according to an arrangement order of the regions to be identified in the page.
For example, referring to fig. 2, the current page may be divided into a plurality of regions to be identified 205 according to dividing lines, and then the images to be drawn, the texts to be drawn and the regions to be drawn in the respective regions to be identified may be sequentially and respectively identified according to the arrangement order in the current page. Alternatively, multiple recognition task threads can be established to recognize and convert colors for multiple regions to be drawn simultaneously in an asynchronous manner. Therefore, the processing time is shortened, and the page rendering efficiency is improved.
And S13, sampling the image to be drawn and/or the area to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points.
In this example embodiment, after determining one or more images to be drawn and/or areas to be drawn included in a page to be drawn, the images to be drawn and the areas to be drawn may be sampled according to a preset sampling rule, and occupation ratios of pixel points of each type may be calculated.
Specifically, the sampling rule may be: the pixels of the picture are uniformly and symmetrically divided into 10 rows and 10 columns, and 100 points are acquired in total. Meanwhile, in order to avoid that no pixel points are acquired on the boundary, 10 points are acquired on the transverse boundary and the longitudinal boundary of the picture respectively, so that the total acquisition amount is about 120. The pixel may include: any one or more of a color pixel, a transparent pixel, a white pixel, a black pixel, and a gray pixel.
After sampling the pixels, the percentages of the five pixels can be calculated. Specifically, the following calculation methods may be employed, including:
percentage of color pixels = total number of color pixels/(total number of pixel points-total number of transparent pixels);
transparent pixel percentage = transparent pixel total/pixel dot total;
percentage of white pixels = total number of white pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
percentage of black pixels = total number of black pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
percentage of gray pixels = total number of gray pixels/(total number of white pixels + total number of black pixels + total number of gray pixels).
And S14, invoking an image drawing strategy, and determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points.
In the present exemplary embodiment, for an image to be drawn, which may be displayed superimposed on an area to be drawn, as shown in fig. 2, the format of the image to be drawn may be first identified.
Specifically, when the proportion of the color pixels of the image to be drawn is greater than a first threshold value, an ignoring operation is performed on the image to be drawn. For example, the first threshold may be set to any value between 6% and 10%. For example, when the color pixel percentage is >8%, it is determined that the image to be drawn tends to be color, no processing is performed for such an image.
Alternatively, in some exemplary embodiments, when the image to be drawn is identified as in the.9 format and the proportion of the white pixels is greater than a second threshold, performing a white background inverse operation on the image to be drawn; or when the image to be drawn is identified to be in a.9 format, and the sum of the proportion of the white pixels and the proportion of the black pixels is larger than a third threshold value, and the proportion of the white pixels is larger than the proportion of the black pixels, executing white background color reversing operation on the image to be drawn.
For example, the second threshold may be configured to be 80% and the third threshold may be configured to be 90%. When the image to be drawn is a.9 diagram, if the white pixel percentage is >80%, or the white pixel percentage is greater than 90% in addition to the black pixel percentage, and the white pixel percentage is higher, it is determined that the image to be drawn is mostly white and is background, and it is necessary to invert the color thereof to black.
And S15, calling a region drawing strategy, and determining a color transformation strategy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixel points.
In this example embodiment, for the region to be drawn, the foreground and the background may be determined according to the size of the region to be drawn. Specifically, when the size of the area to be drawn is recognized to be smaller than the target size and the proportion of the white pixels is larger than a fourth threshold value, performing white background color reversal operation on the area to be drawn; or alternatively
When the size of the to-be-drawn area is identified to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold value, and the proportion of the white pixels is larger than the fifth threshold value, executing white foreground color reversing operation on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold, the proportion of the black pixels is larger than the fifth threshold, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing grey foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be smaller than the target size and the proportion of the grey pixels exceeds a fifth threshold value.
For example, the target size described above may be configured to be 50dp; the fourth threshold may be configured to be 95%; the fifth threshold may be configured to be 50%.
When the region to be drawn is within 50dp, the possibility of judging as the foreground is relatively large, so when the percentage of white pixels is >95%, it is judged as the white background. And may reverse the white background to a black background.
A white foreground is determined if the transparent pixel percentage >50% and the white pixel percentage > 50%. No processing may be done.
If the transparent pixel percentage is >50% and the black pixel percentage is >50%, then a black foreground is determined. The black foreground may be inverted to a white foreground.
If the gray percentage exceeds 50%, a gray foreground is determined, and the gray foreground may be inverted to a white foreground.
In this example embodiment, for an area to be drawn, when it is identified that the size of the area to be drawn is greater than a target size, and the proportion of the transparent pixels is in a first transparent pixel interval, the proportion of the white pixels is greater than a second threshold, a white background color reversal operation is performed on the area to be drawn; or,
when the size of the to-be-drawn area is recognized to be larger than the target size, the proportion of the transparent pixels is in a first transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black background color reversing operation is carried out on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the white pixels is larger than a second threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, the proportion of the white pixels is larger than a third threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing black foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, and the proportion of the black pixels is larger than a third threshold value.
For example, the target size may be configured to be 50%, and the first transparent pixel interval may be configured to be less than 25%; the second transparent pixel interval may be configured to be 25% -50%; the third pixel interval may be configured to be greater than 80%.
When the drawn picture area exceeds 50dp and the transparent pixel percentage is less than 25%, judging that the picture area is a white background if the white pixel percentage is more than 80%; if the percentage of black pixels is >80%, it is determined as a black background. At this time, the white background may be inverted to a black background; alternatively, no treatment is done on the background to be black.
If the transparent pixel percentage is within 25% and 50%, if the white pixel percentage is >80%, then determining that the white foreground; if the black pixel percentage is >80%, a black foreground is determined. At this time, the white prospect can be left untreated; alternatively, the black foreground is flipped to the white foreground.
If the transparent pixel exceeds 80%, if the percentage of the white pixels is 60%, judging that the transparent pixel is a white foreground; if the black pixel percentage is >60%, then a black foreground is determined. At this time, the white foreground can be left untreated; alternatively, the black foreground is inverted to a white foreground.
In addition, other white foreground and black background can be left untreated, and the original color can be maintained. The configuration of the values in the above embodiments is an exemplary illustration, and may be specifically configured according to the needs of the user.
Further, in other exemplary embodiments of the present disclosure, as shown with reference to fig. 2, text to be drawn may also be displayed superimposed on the region to be drawn. For the text to be drawn, the text to be drawn can be configured to be a target color according to the color of the region to be drawn after the color reversing operation. For example, as shown with reference to fig. 3, the text to be rendered may be modified to be white or gray. Or if the color of the region to be drawn, which is superimposed by the text to be drawn, is white after being converted, the text to be drawn can be changed into black or other colors with higher contrast with the color of the region to be drawn.
Based on the foregoing, in other exemplary embodiments of the present disclosure, the method may further include: and acquiring brightness and/or contrast information of the color-transformed image to be drawn and/or the region to be drawn and current environment information, and executing optimization operation on the color-transformed image to be drawn according to the current environment information.
For example, after performing a color transformation, the brightness of the current environment may be collected and the color of the page arrangement may be evaluated. By combining the ambient brightness, one or more of brightness, contrast, or definition, color saturation, color temperature, hue and other parameters of each part in the page can be optimized, so that the page after color conversion accords with the ambient brightness, and the display effect is improved. For example, the parameters can be finely tuned by using preset optimization rules.
According to the method provided by the embodiment of the disclosure, the content contained in the page can be accurately obtained by identifying the content such as the image to be drawn, the region to be drawn, the text to be drawn and the like in the page to be converted. By sampling the pixel points of the region to be drawn and the image to be drawn, the color composition of the region to be drawn and the image to be drawn can be accurately obtained, the format or the size of the image is combined to judge, the foreground, the background and the corresponding color can be accurately judged, and therefore the corresponding color transformation strategy can be accurately executed. Therefore, the display effect of the dark mode can be effectively improved. In addition, after the color conversion, the color of the page after the color conversion is optimized by combining the light intensity of the current environment of the terminal equipment, so that the color of the page can be more in line with the environmental characteristics and the actual demands of users, and the damage to eyes of the users is avoided.
It is noted that the above-described figures are only schematic illustrations of processes involved in a method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Further, referring to fig. 4, there is also provided a display control apparatus 40 in the embodiment of the present example, applied to a terminal device configured with a display screen, including: the device comprises a page to be converted acquisition module 401, a page to be converted identification module 402, a pixel sampling module 403, an image drawing module 404 and an area drawing module 405. Wherein,,
the page to be converted obtaining module 401 may be configured to obtain a page to be converted in response to a target control operation.
The page to be converted identifying module 402 may be configured to identify the page to be converted to obtain an image to be drawn and/or an area to be drawn in the page to be converted.
The pixel sampling module 403 may be configured to sample the image to be drawn and/or the area to be drawn, so as to obtain a target number of pixels, and calculate the proportion of each type of pixels.
The image rendering module 404 may be configured to invoke an image rendering policy, and determine a color transformation policy of the image to be rendered based on a format of the image to be rendered and a ratio of various types of pixels.
The region drawing module 405 may be configured to invoke a region drawing policy, and determine a color transformation policy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixels.
In one example of the present disclosure, the pixel includes: any one or more of a color pixel, a transparent pixel, a white pixel, a black pixel, and a gray pixel.
In one example of the present disclosure, the image rendering module 404 may include: a first image drawing unit (not shown in the figure).
The first image drawing unit may be configured to perform a neglect operation on the image to be drawn when a ratio of color pixels of the image to be drawn is greater than a first threshold.
In one example of the present disclosure, the image rendering module 404 may include: a second image drawing unit (not shown in the figure).
The second image drawing unit may be configured to perform a white background color reversal operation on the image to be drawn when the image to be drawn is identified as a.9 format and the proportion of the white pixels is greater than a second threshold; or,
And when the image to be drawn is identified to be in a.9 format, and the sum of the proportion of the white pixels and the proportion of the black pixels is larger than a third threshold value, and the proportion of the white pixels is larger than the proportion of the black pixels, executing white background color reversing operation on the image to be drawn.
In one example of the present disclosure, the image to be drawn is displayed superimposed on the area to be drawn.
In one example of the present disclosure, the region drawing module 405 may include: a first region drawing unit (not shown in the figure).
The first region drawing unit may be configured to perform a white background color reversal operation on the region to be drawn when it is recognized that the size of the region to be drawn is smaller than a target size and the proportion of the white pixels is greater than a fourth threshold; or alternatively
When the size of the to-be-drawn area is identified to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold value, and the proportion of the white pixels is larger than the fifth threshold value, executing white foreground color reversing operation on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold, the proportion of the black pixels is larger than the fifth threshold, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing grey foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be smaller than the target size and the proportion of the grey pixels exceeds a fifth threshold value.
In one example of the present disclosure, the region drawing module 405 may further include: a second region drawing unit (not shown in the figure).
The second region drawing unit may be configured to perform a white background inverse operation on the region to be drawn when it is identified that the size of the region to be drawn is greater than a target size, the proportion of the transparent pixels is in a first transparent pixel interval, and the proportion of the white pixels is greater than a second threshold; or,
when the size of the to-be-drawn area is recognized to be larger than the target size, the proportion of the transparent pixels is in a first transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black background color reversing operation is carried out on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the white pixels is larger than a second threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, the proportion of the white pixels is larger than a third threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing black foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, and the proportion of the black pixels is larger than a third threshold value.
In one example of the disclosure, the text to be drawn is displayed superimposed on the region to be drawn; the apparatus may further comprise a text rendering module (not shown in the figures).
The text drawing module may be configured to configure the text to be drawn to a target color according to the color of the region to be drawn after the color reversal operation.
In one example of the present disclosure, the calculating the proportion of each type of pixel point includes:
percentage of color pixels = total number of color pixels/(total number of pixel points-total number of transparent pixels);
transparent pixel percentage = transparent pixel total/pixel dot total;
percentage of white pixels = total number of white pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
Percentage of black pixels = total number of black pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
percentage of gray pixels = total number of gray pixels/(total number of white pixels + total number of black pixels + total number of gray pixels).
In one example of the present disclosure, the apparatus may further include: an optimization execution module (not shown in the figure).
The optimization execution module can be used for collecting brightness and/or contrast information of the image to be drawn and/or the area to be drawn after color conversion and current environment information, and executing optimization operation on the image to be drawn after color conversion according to the current environment information.
The specific details of each module in the above display control apparatus are described in detail in the corresponding display control method, so that the details are not repeated here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Fig. 5 shows a schematic diagram of a wireless communication device suitable for use in implementing embodiments of the present invention.
It should be noted that the electronic device 600 shown in fig. 5 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 600 may specifically include: processor 610, internal memory 621, external memory interface 622, universal serial bus (Universal Serial Bus, USB) interface 630, charge management module 640, power management module 641, battery 642, antenna 1, antenna 2, mobile communication module 650, wireless communication module 660, audio module 670, speaker 671, receiver 672, microphone 673, ear-piece interface 674, sensor module 680, display 690, camera module 691, indicator 692, motor 693, keys 694, and user identification module (subscriber identification module, SIM) card interface 695, among others. The sensor module 680 may include a depth sensor 6801, a pressure sensor 6802, a gyroscope sensor 6803, a barometric sensor 6804, a magnetic sensor 6805, an acceleration sensor 6806, a distance sensor 6807, a proximity light sensor 6808, a fingerprint sensor 6809, a temperature sensor 6810, a touch sensor 6811, an ambient light sensor 6812, and a bone conduction sensor 6813, among others.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 600. In other embodiments of the application, electronic device 600 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 610 may include one or more processing units, such as: the processor 610 may include an application processor (Application Processor, AP), a modem processor, a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processor, ISP), a controller, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and/or a Neural network processor (Neural-etwork Processing Unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 610 for storing instructions and data. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transfer instructions, and notification instructions, and are controlled to be executed by the processor 610. In some embodiments, the memory in the processor 610 is a cache memory. The memory may hold instructions or data that the processor 610 has just used or recycled. If the processor 610 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided, reducing the latency of the processor 610 and thus improving the efficiency of the system.
In some embodiments, the processor 610 may include one or more interfaces. The interfaces may include an integrated circuit (Inter-Integrated Circuit, I2C) interface, an integrated circuit built-in audio (Inter-Integrated Circuit Sound, I2S) interface, a pulse code modulation (Pulse Code Modulation, PCM) interface, a universal asynchronous receiver transmitter (Universal Asynchronous Receiver/rransmiter, UART) interface, a mobile industry processor interface (Mobile Industry Processor Interface, MIPI), a General-Purpose Input/Output (GPIO) interface, a subscriber identity module (Subscriber Identity Module, SIM) interface, and/or a universal serial bus (Universal Serial Bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous Serial bus, comprising a Serial Data line (SDA) and a Serial clock line (Serail Clock line, SCL). In some embodiments, the processor 610 may contain multiple sets of I2C buses. The processor 610 may be coupled to the touch sensor 6811, the charger, the flash, the camera module 691, etc. through different I2C bus interfaces, respectively. For example: the processor 610 may couple the touch sensor 6811 through an I2C interface, causing the processor 610 to communicate with the touch sensor 6811 through an I2C bus interface, implementing the touch functionality of the electronic device 600.
The I2S interface may be used for audio communication. In some embodiments, the processor 610 may contain multiple sets of I2S buses. The processor 610 may be coupled to the audio module 670 via an I2S bus to enable communication between the processor 610 and the audio module 670. In some embodiments, the audio module 670 may communicate audio signals to the wireless communication module 660 via the I2S interface to enable phone answering via a bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 670 and the wireless communication module 660 may be coupled by a PCM bus interface. In some embodiments, the audio module 670 may also transmit audio signals to the wireless communication module 660 via the PCM interface to enable phone answering via the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 610 with the wireless communication module 660. For example: the processor 610 communicates with a bluetooth module in the wireless communication module 660 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 670 may transmit audio signals to the wireless communication module 660 through a UART interface to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 610 to peripheral devices such as the display 690, camera module 691, etc. The MIPI interfaces include camera serial interfaces (Camera Serial Interface, CSI), display serial interfaces (Display Serial Interface, DSI), and the like. In some embodiments, the processor 610 and the camera module 691 communicate through a CSI interface to implement the shooting function of the electronic device 600. The processor 610 and the display 690 communicate via a DSI interface to implement the display functions of the electronic device 600.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 610 with the camera module 691, the display 690, the wireless communication module 660, the audio module 670, the sensor module 680, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 630 is an interface conforming to the USB standard specification, and may specifically be a MiniUSB interface, a micro USB interface, a USB type c interface, or the like. The USB interface 630 may be used to connect a charger to charge the electronic device 600, or may be used to transfer data between the electronic device 600 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 600. In other embodiments of the present application, the electronic device 600 may also use different interfacing manners, or a combination of multiple interfacing manners, as in the above embodiments.
The charge management module 640 is used to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 640 may receive a charging input of a wired charger through the USB interface 630. In some wireless charging embodiments, the charge management module 640 may receive wireless charging input through a wireless charging coil of the electronic device 600. The charging management module 640 may also provide power to the electronic device through the power management module 641 while charging the battery 642.
The power management module 641 is used for connecting the battery 642, the charge management module 640 and the processor 610. The power management module 641 receives input from the battery 642 and/or the charge management module 640 to power the processor 610, the internal memory 621, the display 690, the camera module 691, the wireless communication module 660, and the like. The power management module 641 may also be configured to monitor battery capacity, battery cycle times, battery health (leakage, impedance), and other parameters. In other embodiments, the power management module 641 may also be disposed in the processor 610. In other embodiments, the power management module 641 and the charge management module 640 may be disposed in the same device.
The wireless communication function of the electronic device 600 may be implemented by the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 600 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 650 may provide a solution for wireless communication, including 2G/3G/4G/5G, as applied to the electronic device 600. The mobile communication module 650 may include at least one filter, switch, power amplifier, low noise amplifier (Low Noise Amplifier, LNA), etc. The mobile communication module 650 may receive electromagnetic waves from the antenna 1, perform processes such as filtering and amplifying the received electromagnetic waves, and transmit the electromagnetic waves to the modem processor for demodulation. The mobile communication module 650 may amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate the electromagnetic waves. In some embodiments, at least some of the functional modules of the mobile communication module 650 may be disposed in the processor 610. In some embodiments, at least some of the functional modules of the mobile communication module 650 may be disposed in the same device as at least some of the modules of the processor 610.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 671, the receiver 672, etc.), or displays images or videos through the display 690. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 650 or other functional module, independent of the processor 610.
The wireless communication module 660 may provide solutions for wireless communication including wireless local area network (Wireless Local Area Networks, WLAN) (e.g., wireless fidelity (Wireless Fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (Global Navigation Satellite System, GNSS), frequency modulation (Frequency Modulation, FM), near field wireless communication technology (Near Field Communication, NFC), infrared technology (IR), etc., as applied to the electronic device 600. The wireless communication module 660 may be one or more devices that integrate at least one communication processing module. The wireless communication module 660 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 610. The wireless communication module 660 may also receive signals to be transmitted from the processor 610, frequency modulate them, amplify them, and convert them to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 650 of electronic device 600 are coupled, and antenna 2 and wireless communication module 660 are coupled, such that electronic device 600 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (Global System for Mobile communications, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), time division code division multiple access (Time-Division Code Division Multiple Access, TDSCDMA), long term evolution (Long Term Evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (Global Positioning System, GPS), a global navigation satellite system (Global Navigation Satellite System, GLONASS), a beidou satellite navigation system (Beidou avigation satellite system, BDS), a Quasi zenith satellite system (Quasi-Zenith Satellite System, QZSS) and/or a satellite based augmentation system (Satellite Based Augmentation Systems, SBAS).
The electronic device 600 implements display functions through a GPU, a display 690, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 690 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or change display information.
The display 690 is used to display images, videos, and the like. The display 690 includes a display panel. The display panel may employ a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), an Active-Matrix Organic Light Emitting Diode (AMOLED), a flexible Light-Emitting Diode (flex), a mini, a Micro-OLED, a quantum dot Light-Emitting Diode (Quantum dot Light Emitting Diodes, QLED), or the like. In some embodiments, the electronic device 600 may include 1 or N displays 690, N being a positive integer greater than 1.
The electronic device 600 may implement a photographing function through an ISP, a camera module 691, a video codec, a GPU, a display 690, an application processor, and the like.
The ISP is used to process the data fed back by the camera module 691. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, an ISP may be provided in camera module 691.
The camera module 691 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (Charge Coupled Device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 600 may include 1 or N camera modules 691, where N is a positive integer greater than 1, and if the electronic device 600 includes N cameras, one of the N cameras is a master camera.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 600 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 600 may support one or more video codecs. In this way, the electronic device 600 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (Moving Picture Experts Group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a Neural-Network (NN) computing processor, and can rapidly process input information by referencing a biological Neural Network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 600 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 622 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 600. The external memory card communicates with the processor 610 through an external memory interface 622 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 621 may be used to store computer-executable program code that includes instructions. The internal memory 621 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 600 (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 621 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 610 performs various functional applications of the electronic device 600 and data processing by executing instructions stored in the internal memory 621 and/or instructions stored in a memory provided in the processor.
The electronic device 600 may implement audio functions through an audio module 670, a speaker 671, a receiver 672, a microphone 673, an ear-headphone interface 674, an application processor, and the like. Such as music playing, recording, etc.
The audio module 670 is used to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 670 may also be used to encode and decode audio signals. In some embodiments, the audio module 670 may be disposed in the processor 610, or some of the functional modules of the audio module 670 may be disposed in the processor 610.
The speaker 671, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The electronic device 600 may listen to music, or to hands-free conversations, through the speaker 671.
A receiver 672, also called an "earpiece", is used to convert the audio electrical signal into a sound signal. When the electronic device 600 is answering a telephone call or voice message, the voice can be heard by placing the receiver 672 close to the human ear.
A microphone 673, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 673 through the mouth, inputting a sound signal to the microphone 673. The electronic device 600 may be provided with at least one microphone 673. In other embodiments, the electronic device 600 may be provided with two microphones 673, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 600 may also be provided with three, four, or more microphones 673 to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The ear-piece interface 674 is for connecting a wired ear-piece. The ear piece interface 674 may be a USB interface 630 or a 3.5mm open mobile electronic device platform (Open Mobile Terminal Platform, OMTP) standard interface, a american cellular telecommunications industry association (CellularTelecommunications Industry Association of the USA, CTIA) standard interface.
The depth sensor 6801 is used to acquire depth information of a scene. In some embodiments, a depth sensor may be provided at the camera module 691.
The pressure sensor 6802 is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 6802 may be provided to the display 690. The pressure sensor 6802 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 6802, the capacitance between the electrodes changes. The electronics 600 determine the strength of the pressure from the change in capacitance. When a touch operation is applied to the display 690, the electronic apparatus 600 detects the intensity of the touch operation according to the pressure sensor 6802. The electronic device 600 may also calculate the location of the touch based on the detection signal of the pressure sensor 6802. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 6803 may be used to determine a motion gesture of the electronic device 600. In some embodiments, the angular velocity of the electronic device 600 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 6803. The gyro sensor 6803 may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 6803 detects the shake angle of the electronic device 600, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 600 through the reverse motion, so as to realize anti-shake. The gyro sensor 6803 may also be used for navigating, somatosensory game scenes.
The air pressure sensor 6804 is used to measure air pressure. In some embodiments, the electronic device 600 calculates altitude from barometric pressure values measured by the barometric pressure sensor 6804, aiding in positioning and navigation.
The magnetic sensor 6805 includes a hall sensor. The electronic device 600 may detect the opening and closing of the flip holster using the magnetic sensor 6805. In some embodiments, when the electronic device 600 is a flip machine, the electronic device 600 may detect the opening and closing of the flip according to the magnetic sensor 6805. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 6806 may detect the magnitude of acceleration of the electronic device 600 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 600 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 6807 for measuring distance. The electronic device 600 may measure the distance by infrared or laser. In some embodiments, the electronic device 600 may range using the distance sensor 6807 to achieve fast focus.
The proximity light sensor 6808 can include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 600 emits infrared light outward through the light emitting diode. The electronic device 600 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that an object is in the vicinity of the electronic device 600. When insufficient reflected light is detected, the electronic device 600 may determine that there is no object in the vicinity of the electronic device 600. The electronic device 600 may use the proximity sensor 6808 to detect that the user is holding the electronic device 600 in close proximity to the ear for power saving purposes by automatically extinguishing the screen. The proximity light sensor 6808 can also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The fingerprint sensor 6809 is used for capturing a fingerprint. The electronic device 600 may utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 6810 is used to detect temperature. In some embodiments, the electronic device 600 performs a temperature processing strategy using the temperature detected by the temperature sensor 6810. For example, when the temperature reported by temperature sensor 6810 exceeds a threshold, electronic device 600 performs a reduction in the performance of a processor located near temperature sensor 6810 in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 600 heats the battery 642 to avoid the low temperature causing the electronic device 600 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 600 performs boosting of the output voltage of the battery 642 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 6811 is also referred to as a "touch device". The touch sensor 6811 may be disposed on the display 690, and the touch sensor 6811 and the display 690 form a touch screen, which is also called a "touch screen". The touch sensor 6811 is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display 690. In other embodiments, the touch sensor 6811 may also be disposed on the surface of the electronic device 600 at a different location than the display 690.
The ambient light sensor 6812 is used to sense ambient light. The electronic device 600 may adaptively adjust the brightness of the display 690 based on the perceived ambient light level. The ambient light sensor 6812 may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 6812 may also cooperate with the proximity light sensor 6808 to detect if the electronic device 600 is in a pocket to prevent false touches.
The bone conduction sensor 6813 may acquire a vibration signal. In some embodiments, bone conduction sensor 6813 may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 6813 may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 6813 may also be provided in the headset, in combination with an osteoinductive headset. The audio module 670 may parse out a voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 6813, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 6813, so as to realize a heart rate detection function.
The keys 694 include a power on key, a volume key, etc. The keys 694 may be mechanical keys. Or may be a touch key. The electronic device 600 may receive key inputs, generate key signal inputs related to user settings and function controls of the electronic device 600.
The motor 693 may generate a vibration alert. The motor 693 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 693 may also correspond to different vibration feedback effects by touching different areas of the display 690. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 692 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message, a missed call, a notification, or the like.
The SIM card interface 695 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 695, or removed from the SIM card interface 695 to enable contact and separation with the electronic device 600. The electronic device 600 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 695 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 695 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 695 may also be compatible with different types of SIM cards. SIM card interface 695 may also be compatible with external memory cards. The electronic device 600 interacts with the network through the SIM card to perform functions such as talking and data communication. In some embodiments, the electronic device 600 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 600 and cannot be separated from the electronic device 600.
In particular, according to embodiments of the present application, the processes described below with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. When being executed by a Central Processing Unit (CPU), performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
It should be noted that, as another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by one of the electronic devices, cause the electronic device to implement the methods described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 1.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A display control method, characterized by comprising:
responding to target control operation, and acquiring a page to be converted;
identifying and dividing the page to be converted to obtain a plurality of images to be drawn and/or areas to be drawn in the page to be converted;
sampling the image to be drawn and/or the region to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points; the pixel includes: any of a plurality of color pixels, transparent pixels, white pixels, black pixels, and gray pixels;
invoking an image drawing strategy, determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points, wherein the method comprises the following steps: when the proportion of the color pixels of the image to be drawn is larger than a first threshold value, executing neglect operation on the image to be drawn; and/or
And calling an area drawing strategy, and determining a color transformation strategy of the area to be drawn based on the size of the area to be drawn and the proportion of various types of pixel points.
2. The method of claim 1, wherein the invoking the image rendering policy, determining the color transformation policy of the image to be rendered based on the format of the image to be rendered and the ratio of the types of pixels, comprises:
executing white background color reversing operation on the image to be drawn when the image to be drawn is identified to be in a.9 format and the proportion of the white pixels is larger than a second threshold value; or,
and when the image to be drawn is identified to be in a.9 format, and the sum of the proportion of the white pixels and the proportion of the black pixels is larger than a third threshold value, and the proportion of the white pixels is larger than the proportion of the black pixels, executing white background color reversing operation on the image to be drawn.
3. A method according to claim 1 or 2, characterized in that the image to be drawn is displayed superimposed on the area to be drawn.
4. The method according to claim 1, wherein the calling the region drawing policy, determining the color transformation policy of the region to be drawn based on the size of the region to be drawn and the proportion of the pixel points of each type, includes:
executing white background color reversing operation on the to-be-drawn area when the size of the to-be-drawn area is recognized to be smaller than the target size and the proportion of the white pixels is larger than a fourth threshold value; or alternatively
When the size of the to-be-drawn area is identified to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold value, and the proportion of the white pixels is larger than the fifth threshold value, executing white foreground color reversing operation on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be smaller than the target size, the proportion of the transparent pixels is larger than a fifth threshold, the proportion of the black pixels is larger than the fifth threshold, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing grey foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be smaller than the target size and the proportion of the grey pixels exceeds a fifth threshold value.
5. The method according to claim 1, wherein the calling the region drawing policy, determining the color transformation policy of the region to be drawn based on the size of the region to be drawn and the proportion of the pixel points of each type, includes:
when the size of the to-be-drawn area is recognized to be larger than the target size, the proportion of the transparent pixels is in a first transparent pixel interval, the proportion of the white pixels is larger than a second threshold value, and white background color reversal operation is carried out on the to-be-drawn area; or,
When the size of the to-be-drawn area is recognized to be larger than the target size, the proportion of the transparent pixels is in a first transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black background color reversing operation is carried out on the to-be-drawn area; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the white pixels is larger than a second threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a second transparent pixel interval, the proportion of the black pixels is larger than a second threshold value, and black foreground color reversing operation is carried out on the area to be drawn; or alternatively
When the size of the image to be drawn is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, the proportion of the white pixels is larger than a third threshold value, and white foreground color reversing operation is carried out on the area to be drawn; or alternatively
And executing black foreground color reversing operation on the to-be-drawn area when the size of the to-be-drawn image is recognized to be larger than the target size, the proportion of the transparent pixels is in a third transparent pixel interval, and the proportion of the black pixels is larger than a third threshold value.
6. The method according to claim 4 or 5, characterized in that the text to be drawn is displayed superimposed on the area to be drawn;
the method further comprises the steps of: and configuring the text to be drawn to be a target color according to the color of the region to be drawn after the color reversing operation.
7. The method according to claim 1, wherein the calculating the proportion of each type of pixel point comprises:
percentage of color pixels = total number of color pixels/(total number of pixel points-total number of transparent pixels);
transparent pixel percentage = transparent pixel total/pixel dot total;
percentage of white pixels = total number of white pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
percentage of black pixels = total number of black pixels/(total number of white pixels + total number of black pixels + total number of gray pixels);
percentage of gray pixels = total number of gray pixels/(total number of white pixels + total number of black pixels + total number of gray pixels).
8. The method according to claim 1, wherein the method further comprises:
and acquiring brightness and/or contrast information of the color-transformed image to be drawn and/or the region to be drawn and current environment information, and executing optimization operation on the color-transformed image to be drawn according to the current environment information.
9. A display control apparatus, comprising:
the page to be converted acquisition module is used for responding to the target control operation and acquiring a page to be converted;
the page to be converted identification module is used for identifying and dividing the page to be converted to obtain a plurality of images to be drawn and/or areas to be drawn in the page to be converted;
the pixel point sampling module is used for sampling the image to be drawn and/or the area to be drawn to obtain a target number of pixel points, and calculating the proportion of each type of pixel points; the pixel includes: any of a plurality of color pixels, transparent pixels, white pixels, black pixels, and gray pixels;
the image drawing module is used for calling an image drawing strategy, determining a color transformation strategy of the image to be drawn based on the format of the image to be drawn and the proportion of various types of pixel points, and comprises the following steps: when the proportion of the color pixels of the image to be drawn is larger than a first threshold value, executing neglect operation on the image to be drawn; and/or
And the region drawing module is used for calling a region drawing strategy and determining a color transformation strategy of the region to be drawn based on the size of the region to be drawn and the proportion of various types of pixel points.
10. A computer-readable medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the display control method according to any one of claims 1 to 8.
11. A terminal device, comprising:
one or more processors;
storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the display control method of any of claims 1 to 8.
CN202010274861.4A 2020-04-09 2020-04-09 Display control method and device, computer readable medium and terminal equipment Active CN111552451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010274861.4A CN111552451B (en) 2020-04-09 2020-04-09 Display control method and device, computer readable medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010274861.4A CN111552451B (en) 2020-04-09 2020-04-09 Display control method and device, computer readable medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN111552451A CN111552451A (en) 2020-08-18
CN111552451B true CN111552451B (en) 2023-08-22

Family

ID=71998590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010274861.4A Active CN111552451B (en) 2020-04-09 2020-04-09 Display control method and device, computer readable medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN111552451B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813492B (en) * 2020-08-19 2024-05-03 深圳市欢太科技有限公司 Display method and device for quick application, electronic equipment and storage medium
CN114119778A (en) * 2020-08-27 2022-03-01 华为技术有限公司 Deep color mode generation method of user interface, electronic equipment and storage medium
CN112116670B (en) * 2020-09-04 2024-07-30 北京小米移动软件有限公司 Information processing method and device, electronic equipment and storage medium
CN114449231B (en) * 2020-10-31 2023-11-24 荣耀终端有限公司 Image conversion method and device
CN112650434A (en) * 2020-12-29 2021-04-13 微医云(杭州)控股有限公司 Scale generation method and device, electronic equipment and storage medium
CN114911545B (en) * 2021-02-09 2024-10-11 华为技术有限公司 Color mode conversion method, electronic device and readable medium thereof
CN114047447B (en) * 2021-11-10 2024-07-02 京东方科技集团股份有限公司 Electric quantity prompting method, electronic sign, system and storage medium
CN116806333A (en) * 2022-05-17 2023-09-26 北京小米移动软件有限公司 Interface display method, device, terminal and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009010983A (en) * 1996-02-26 2009-01-15 Richard A Holub Method of associating different image display devices, color error detection method, and color measurement device
CN101625618A (en) * 2008-07-09 2010-01-13 纬创资通股份有限公司 Screen display area segmenting method, screen display area segmenting system and computer program product
WO2015039567A1 (en) * 2013-09-17 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and user apparatus for window coloring
CN104657465A (en) * 2015-02-10 2015-05-27 腾讯科技(深圳)有限公司 Webpage display control method and device
CN104657417A (en) * 2014-12-17 2015-05-27 东软集团股份有限公司 Thermodynamic diagram processing method and thermodynamic diagram processing system
CN106603838A (en) * 2016-12-06 2017-04-26 深圳市金立通信设备有限公司 Image processing method and terminal
CN108198146A (en) * 2017-12-29 2018-06-22 努比亚技术有限公司 A kind of noise-reduction method, equipment and computer readable storage medium
CN108877734A (en) * 2018-06-14 2018-11-23 Oppo广东移动通信有限公司 The color temperature adjusting method and Related product of touching display screen

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8351713B2 (en) * 2007-02-20 2013-01-08 Microsoft Corporation Drag-and-drop pasting for seamless image composition
US10475186B2 (en) * 2016-06-23 2019-11-12 Intel Corportation Segmentation of objects in videos using color and depth information
CN106682424A (en) * 2016-12-28 2017-05-17 上海联影医疗科技有限公司 Medical image adjusting method and medical image adjusting system
US10685459B2 (en) * 2018-06-01 2020-06-16 Adobe Inc. Generating enhanced digital images by selectively transforming raster images to vector drawing segments

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009010983A (en) * 1996-02-26 2009-01-15 Richard A Holub Method of associating different image display devices, color error detection method, and color measurement device
CN101625618A (en) * 2008-07-09 2010-01-13 纬创资通股份有限公司 Screen display area segmenting method, screen display area segmenting system and computer program product
WO2015039567A1 (en) * 2013-09-17 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and user apparatus for window coloring
CN104657417A (en) * 2014-12-17 2015-05-27 东软集团股份有限公司 Thermodynamic diagram processing method and thermodynamic diagram processing system
CN104657465A (en) * 2015-02-10 2015-05-27 腾讯科技(深圳)有限公司 Webpage display control method and device
CN106603838A (en) * 2016-12-06 2017-04-26 深圳市金立通信设备有限公司 Image processing method and terminal
CN108198146A (en) * 2017-12-29 2018-06-22 努比亚技术有限公司 A kind of noise-reduction method, equipment and computer readable storage medium
CN108877734A (en) * 2018-06-14 2018-11-23 Oppo广东移动通信有限公司 The color temperature adjusting method and Related product of touching display screen

Also Published As

Publication number Publication date
CN111552451A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN111552451B (en) Display control method and device, computer readable medium and terminal equipment
CN110347269B (en) Empty mouse mode realization method and related equipment
CN113810600B (en) Terminal image processing method and device and terminal equipment
CN113810601B (en) Terminal image processing method and device and terminal equipment
CN113448482B (en) Sliding response control method and device of touch screen and electronic equipment
CN112651510B (en) Model updating method, working node and model updating system
WO2022022319A1 (en) Image processing method, electronic device, image processing system and chip system
CN113436576A (en) OLED display screen dimming method and device applied to two-dimensional code scanning
CN113473013A (en) Display method and device for beautifying effect of image and terminal equipment
CN112037157B (en) Data processing method and device, computer readable medium and electronic equipment
CN114095602B (en) Index display method, electronic device and computer readable storage medium
CN115665632B (en) Audio circuit, related device and control method
CN115412678B (en) Exposure processing method and device and electronic equipment
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment
CN116055859B (en) Image processing method and electronic device
CN109285563B (en) Voice data processing method and device in online translation process
CN116048831B (en) Target signal processing method and electronic equipment
CN117593236A (en) Image display method and device and terminal equipment
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN117319369A (en) File delivery method, electronic device and storage medium
CN115706869A (en) Terminal image processing method and device and terminal equipment
CN113467747A (en) Volume adjustment method, electronic device, storage medium, and computer program product
CN114332331A (en) Image processing method and device
CN113391735A (en) Display form adjusting method and device, electronic equipment and storage medium
CN116048769B (en) Memory recycling method and device and terminal equipment

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