CN114442894B - Screen display picture adjusting method and device and electronic equipment - Google Patents

Screen display picture adjusting method and device and electronic equipment Download PDF

Info

Publication number
CN114442894B
CN114442894B CN202210355977.XA CN202210355977A CN114442894B CN 114442894 B CN114442894 B CN 114442894B CN 202210355977 A CN202210355977 A CN 202210355977A CN 114442894 B CN114442894 B CN 114442894B
Authority
CN
China
Prior art keywords
background
adjusted
screen
color value
point
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
CN202210355977.XA
Other languages
Chinese (zh)
Other versions
CN114442894A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210355977.XA priority Critical patent/CN114442894B/en
Publication of CN114442894A publication Critical patent/CN114442894A/en
Application granted granted Critical
Publication of CN114442894B publication Critical patent/CN114442894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The application is applicable to the field of image processing, and provides a screen display picture adjusting method and device and electronic equipment. In the screen display picture adjusting method, the electronic equipment determines background points to be adjusted of a background image in the screen rotation process, adjusts the color values of the background points to be adjusted according to a first color value of a reference point in a foreground image or a reference point in the background image in the screen picture to be displayed to obtain an adjusted target background image, displays the foreground image and the adjusted target background image in the rotation process, and displays a picture consisting of the foreground image and the adjusted target background image on the screen; the color difference between the foreground image and the target background image is weakened, so that the visual effect of a display picture in the screen turning process is improved, and the visual impact of a user is reduced; the color distribution of the background image in the display picture is enriched, and the visual effect in the screen turning process is enhanced.

Description

Screen display picture adjusting method and device and electronic equipment
Technical Field
The present application relates to the field of image processing, and in particular, to a method and an apparatus for adjusting a screen display image, and an electronic device.
Background
With the development of science and technology, display screens of electronic devices have an automatic rotation function. Under the condition that the automatic rotation function of the screen is activated, when the electronic equipment identifies the change of the screen in the horizontal and vertical directions, the control picture synchronously rotates along with the rotation direction of the screen.
At present, before and after a screen rotates, a displayed picture needs to be adapted to a display mode of electronic equipment in a horizontal screen or a vertical screen; in the process of switching the horizontal screen display mode or the vertical screen display mode of the display picture, certain visual impact can be caused to a user due to the color difference between the foreground and the background of the whole display interface of the screen, and visual discomfort of the user is easily caused.
Disclosure of Invention
The application provides a screen display picture adjusting method and device and electronic equipment, which can reduce visual impact caused by the electronic equipment in a screen rotation process and improve user experience.
A first aspect of the present application provides a method for adjusting a screen display image, including:
the method comprises the steps that the electronic equipment responds to a first operation of rotating a screen by a user, and background points to be adjusted in a background image of a first picture to be displayed on the screen are obtained; the background point to be adjusted is at least one pixel point in the background image; according to a first color value of a reference point in a foreground image or a background image of a first to-be-displayed picture, the electronic equipment adjusts the color value of a background point to be adjusted to obtain an adjusted target background image; the difference value between the color value of the adjusted background point to be adjusted and the first color value is within a color threshold range; the reference point is at least one pixel point in the foreground image, wherein the distance between the reference point and the background point to be adjusted is within a preset neighborhood range, or at least one pixel point in the background image, wherein the distance between the reference point and the background point to be adjusted is within the preset neighborhood range, and the color value of the pixel point is adjusted; the electronic equipment displays a picture consisting of the foreground image and the adjusted target background image on a screen.
By the method, the color values of the background points to be adjusted in the background image are adjusted one by one based on the color values of the reference points of the foreground image and the adjusted color values of the background points to be adjusted to obtain the adjusted target background image, so that the color difference between the foreground image and the target background image is weakened, the visual effect of a display picture in the screen turning process is improved, and the visual impact of a user is reduced; the color distribution of the background image in the display picture is enriched, and the visual effect in the screen turning process is enhanced.
In a possible implementation manner of the first aspect, adjusting a color value of a background point to be adjusted according to a first color value of a reference point in a foreground image or a background image of a first to-be-displayed picture to obtain an adjusted target background image includes:
the electronic equipment calculates a second color value corresponding to the background point to be adjusted according to a first color value of a reference point in a foreground image or a background image of a first picture to be displayed; adjusting the color value of the background point to be adjusted to the second color value to obtain the target background image; wherein a difference of the first color value and the second color value is within the color threshold range.
Exemplarily, taking background points to be adjusted as sampling points, taking foreground points in a foreground image and background points with adjusted color values in the background image as reference points, calculating second color values of the sampling points according to first color values of the reference points through a neighborhood sampling algorithm, and adjusting color values of the background to be adjusted into the second color values; by calculating and adjusting the color values of the sampling points one by one, the color distribution of the background image in the display picture is enriched, and the color difference between the foreground image and the background image is weakened.
In a possible implementation manner of the first aspect, the acquiring a background point to be adjusted in a background image of a first to-be-displayed picture on a screen includes:
and periodically acquiring the background points to be adjusted in the background image according to the frame rate of the display pictures of the screen in the rotating process.
For example, the frame rate of the displayed picture during the rotation of the screen may be a frame rate at which the displayed picture is dynamically displayed according to the change of the rotation angle, for example, when a certain picture is displayed, different rotation angles display different regions of the picture or display the picture in different regions of the screen; or a frame rate that is dynamically displayed as a function of the refresh rate of the screen display, such as successive frames displayed while playing video during a screen rotation. The electronic equipment periodically acquires background points to be adjusted in the background image according to the frame rate of the display image; for example, if the frame rate of the display screen is 60 frames/second, the period for acquiring the background points to be adjusted in the background image is 1/60 seconds/frame.
In one possible implementation manner of the first aspect, after obtaining background points to be adjusted in a background image of a first to-be-displayed picture of a screen, the method further includes:
and determining the reference point with the distance from the position coordinate of the background point to be adjusted to the position coordinate of the background point to be adjusted within the preset neighborhood range according to the position coordinate of the background point to be adjusted.
For example, the background image and the foreground image in each frame of the to-be-displayed picture correspond to corresponding position areas on the screen, for example, the position areas may be represented by coordinate ranges on the screen, and for example, a system status bar of a display interface corresponding to a certain application may be represented by a coordinate range on the screen as (0, 0, 1080, 80). Correspondingly, the coordinate range on the screen corresponds to the position coordinates of the pixel points of the screen. The background point to be adjusted in the background image, the background point with the adjusted color value and the foreground point in the foreground image can correspond to one or more pixel points; for example, when a pixel point is corresponding, the position coordinate of the pixel point is the coordinate of the foreground point or the background point to be adjusted, and when a plurality of pixel points are corresponding, the coordinate of the plurality of pixel points in the screen is the coordinate of the foreground point or the background point to be adjusted. The predetermined domain range may be a range of pixel matrices or dot matrices of a predetermined order, for example 3-order or 5-order equi-matrices.
In a possible implementation manner of the first aspect, calculating, according to a first color value of a reference point in a foreground image or in a background image of the first to-be-displayed picture, a second color value corresponding to a background point to be adjusted includes:
calculating second color values respectively corresponding to all background points to be adjusted in the background image according to the first color values of the reference points and the traversing direction of the background points to be adjusted aiming at the background image corresponding to each frame of first images to be displayed in the rotating process of the screen; and adjusting the color values of all background points to be adjusted in the background image into second color values to obtain an adjusted target background image.
Exemplarily, taking background points to be adjusted as sampling points, sequentially traversing all the sampling points in a background image area, and calculating a second color value corresponding to the sampling points; the traversal direction may be a direction from a point near the edge of the foreground image to a point away from the edge of the foreground image in sequence.
For example, the foreground image and the background image may correspond to different image layers, and the different image layers correspond to different area ranges of the screen; when the layers are rendered, second color values of pixel points in a corresponding area range in the background layer corresponding to the background image are calculated, and color adjustment of the pixel points in the area range of the whole background image is carried out.
In a possible implementation manner of the first aspect, calculating, according to a first color value of a reference point in a foreground image or in a background image of the first to-be-displayed picture, a second color value corresponding to a background point to be adjusted includes:
and periodically calculating second color values respectively corresponding to all background points to be adjusted in the background image corresponding to the first picture to be displayed of each frame according to the first color value of the reference point and the frame rate of the picture displayed in the rotation process of the screen.
Exemplarily, color adjustment of a background image is performed for each frame of a picture to be displayed in the screen rotation process; the time for adjusting the color can correspond to the time for refreshing a frame of picture by the screen; for example, the refresh rate corresponding to the screen is 60 frames/second, and in the process of refreshing the to-be-displayed picture with the adjusted color value of the first frame in 1/60 seconds, the calculation and adjustment of the second color value corresponding to each sampling point of the background image of the to-be-displayed picture of the second frame are completed; the first frame of picture to be displayed and the second frame of picture to be displayed are two adjacent frames of pictures to be displayed.
By the mode, the color of the background image of each frame of the picture to be displayed can be dynamically adjusted in the screen rotation process, the color difference between the foreground image and the target background image in each frame of the picture to be displayed is weakened, and the overall visual effect of the picture displayed in the screen rotation process is improved.
In a possible implementation manner of the first aspect, calculating, according to a first color value of a reference point in a foreground image or a background image of a first to-be-displayed picture, a second color value corresponding to a background point to be adjusted includes:
calculating a Gaussian blur value or an average value of the first color value according to the first color value of the reference point; and taking the Gaussian fuzzy value or the average value as a second color value corresponding to the background point to be adjusted.
In a possible implementation manner of the first aspect, after obtaining the adjusted target background image, the method further includes:
synthesizing the foreground image and the adjusted target background image into a second to-be-displayed picture of the screen; and in the screen rotation process, displaying each frame of the second picture to be displayed on the screen.
For example, the picture to be displayed may include a background image and a foreground image, the background image may correspond to one or more background image layers, the foreground image may correspond to one or more foreground image layers, and the background image layer and the foreground image layer may respectively correspond to different display areas of the background image and the foreground image on the screen. And after the color of the background layer corresponding to the background image is adjusted and rendered, synthesizing the foreground layer and the background layer with the adjusted color value to obtain screen display data of a second picture to be displayed, and displaying the screen display data on a screen.
In a possible implementation manner of the first aspect, the method further includes:
calculating the average value of the first color values of all the reference points in the foreground image, and adjusting the color values of all the background points to be adjusted in the background image to be the average value of the first color values to obtain an adjusted target background image.
In a possible implementation manner of the first aspect, the method further includes:
calculating a second color value corresponding to a background point to be adjusted according to a first color value of a reference point of a preset edge region in the foreground image; and adjusting the color value of the background point to be adjusted to be the second color value to obtain the target background image.
In a possible implementation manner of the first aspect, the first color value of the background image includes an initial color value and a final color value; the method further comprises the following steps:
adjusting the color value of a background point to be adjusted according to the initial color value and the final color value of a reference point in a foreground image or a background image of a first picture to be displayed to obtain an adjusted target background image; the initial color value is the color value of a first frame of picture to be displayed before color value adjustment when screen rotation starts, and the final color value is the color value of a last frame of picture to be displayed before color value adjustment when screen rotation ends.
A second aspect of the present application provides a screen display picture adjusting apparatus, including:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for responding to a first operation of rotating a screen by a user and acquiring background points to be adjusted in a background image of a first picture to be displayed on the screen; the background point to be adjusted is at least one pixel point in the background image;
the processing unit is used for adjusting the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first picture to be displayed to obtain an adjusted target background image; the difference value between the adjusted color value of the background point to be adjusted and the first color value is within a color threshold range; the reference point is at least one pixel point in the foreground image, the distance between the reference point and the background point to be adjusted is within a preset neighborhood range, or at least one pixel point in the background image, the distance between the reference point and the background point to be adjusted is within the preset neighborhood range, and the color value of the pixel point is adjusted;
and the display unit is used for displaying a picture consisting of the foreground image and the adjusted target background image on the screen.
A third aspect of the application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the electronic device implementing the steps of the method as described above when the processor executes the computer program.
A fourth aspect of the application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes an electronic device to carry out the steps of the method as described above.
A fifth aspect of the present application provides a computer program product for causing an electronic device to carry out the steps of the method as described above, when the computer program product is run on a terminal device.
Compared with the prior art, the application has the beneficial effects that:
in the screen display picture adjusting method, a background point to be adjusted of a background image is obtained by responding to a first operation of rotating a screen by an electronic device, the color value of the background point to be adjusted is adjusted according to a first color value of a reference point in a foreground image or a background image in the picture to be displayed of the screen to obtain an adjusted target background image, the foreground image and the adjusted target background image are displayed in the rotating process, and a picture consisting of the foreground image and the adjusted target background image is displayed on the screen; the color value of the background to be adjusted in the background image is adjusted one by one based on the color value of the foreground image reference point and the color value of the background point to be adjusted, so that the adjusted target background image is obtained, the color difference between the foreground image and the target background image is weakened, the visual effect of a display picture in the screen turning process is improved, and the visual impact of a user is reduced; the color distribution of the background image in the display picture is enriched, and the visual effect in the screen turning process is enhanced; has strong usability and practicability.
Drawings
Fig. 1 is a schematic hardware structure diagram of an electronic device provided in an embodiment of the present application;
FIG. 2 is a schematic interface diagram of a screen rotation function provided in an embodiment of the present application;
fig. 3 is a schematic view of an application scenario of a landscape screen and a portrait screen of an electronic device provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of an application scenario of screen rotation provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of dynamic sampling of a screen rotation process provided by an embodiment of the present application;
fig. 6 is a schematic diagram of a preset neighborhood range of dynamic sampling provided in the embodiment of the present application;
FIG. 7 is a flowchart illustrating a method for adjusting a screen display according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a screen display interface in a screen rotation process according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of a software architecture of an electronic device according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of software module interaction of an electronic device provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of a screen display image adjustment apparatus according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Fig. 1 shows a schematic structural diagram of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
For example, when the current display interface of the electronic device 100 supports screen rotation and the screen rotation switch of the electronic device 100 is in the on state, the electronic device 100 may determine whether to perform screen rotation display on the current display interface according to the state of the gyro sensor 180B or the acceleration sensor 180E.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processor (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
The GPU may be configured to perform rendering processing on an image of a screen display interface during screen rotation performed by the electronic device 100, and calculate image data for screen display; for example, for each frame of display picture displayed in the screen rotation process, based on the image data of the foreground image to be displayed corresponding to the foreground region in the foreground layer, the image data of the background image corresponding to the background region in the background layer is adjusted, and then the adjusted image data corresponding to the background image and the data of the foreground image are rendered and synthesized, so as to obtain the screen display data of the whole screen.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system. For example, when the screen display data of two adjacent frames of pictures is not changed locally in the screen rotation process, the screen display data which is not changed locally in the picture to be displayed of the next frame can be directly called according to the data which is acquired from the previous frame.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, 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 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as 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 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information. For example, when the display mode of the horizontal screen or the vertical screen is switched during the screen rotation, the rendering process of the corresponding display graphics, the calculation of the image data on the display interface, and the like are performed.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
For example, when the display screen 194 displays a certain interface, if the interface supports screen rotation and the screen rotation function of the electronic device 100 is turned on, the display screen 194 may further support a landscape display mode and a portrait display mode of the current interface.
The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. Illustratively, the gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
Acceleration sensor 180E may detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes, x, y, and z). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
For example, the acceleration sensor 180E may also detect whether the electronic device 100 rotates in the gravity direction, and the change in the gravity direction may be reflected in three directions, i.e., the x direction, the y direction, and the z direction; when the electronic device 100 rotates in the gravity direction, the angles with respect to the x, y, and z directions change, so that whether the electronic device 100 rotates in the gravity direction can be determined according to the angle change.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The embodiment of the present application provides a method for adjusting a screen display, which is applied to the electronic device 100, where the electronic device 100 may be a device having a display screen and a screen rotation function, and includes but is not limited to a terminal device such as a smart phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an Artificial Intelligence (AI) terminal, and the like. The embodiment of the present application does not set any limit to the specific type of the electronic device 100.
In a conventional screen rotation process, a color value displayed in a background area of a display interface is set by static sampling or dynamic sampling, a color displayed in the background area of the display interface is set to be a fixed color value (for example, an average value of color values displayed in black, white or foreground areas), or color values displayed in the background area of the display interface before and after rotation are respectively set to be an initial value and an end value, and the color value displayed in the background area is dynamically adjusted according to the initial value and the end value in a screen rotation process. However, in some application scenarios, the color adjustment manner displayed in the background area of the display interface still causes a color difference between the background image and the foreground image, thereby causing visual discomfort to the user.
The method for adjusting the screen display picture provided by the embodiment of the application has the advantages that in the execution process of the rotating picture of the electronic equipment, compared with the traditional static sampling or dynamic sampling mode, the embodiment of the application adopts the adjacent sampling method, in the process of executing the screen-turning animation by the electronic equipment, dynamically executing a proximity sampling algorithm according to the continuous change of a foreground image displayed in a foreground area, dynamically adjusting the color value of a background image displayed in a background area according to the color value of the foreground image displayed in the foreground area, by improving the sampling and color adjustment mode for the background image, the color difference between the background image and the foreground image is smaller, the color characteristics of similarity, consistency or gradual change of the color of the background image and the color of the foreground image are kept, therefore, the visual effect of a display picture in the screen rotation process is improved, and the visual experience of a user in the screen rotation process is improved.
Referring to fig. 2, an interface diagram for starting a screen rotation function according to an embodiment of the present disclosure is shown; in the electronic device of the android system, a system of the electronic device is provided with a switch for controlling screen rotation display, as shown in (a) of fig. 2, a control for controlling screen rotation, such as an automatic rotation control 201-1, may be included in a drop-down menu interface 201 of a main screen interface, and by receiving an instruction input by a user clicking the automatic rotation control 201-1, when the automatic rotation control 201-1 is in a selected state, a function of screen rotation is turned on; as shown in fig. 2 (b), the setting interface of the electronic device may also include a control for controlling screen rotation and a corresponding switch control, for example, a switch control 202-1 corresponding to an automatic rotation control on the setting interface 202, and when an instruction input by a user clicking the switch control 202-1 is received, the switch control 202-1 is in an on state, and then the function of screen rotation is turned on. When the screen rotation function is started, different interface layouts can be displayed on a display interface supporting a rotary screen respectively according to the current state of the screen when the electronic equipment is placed in a vertical screen mode and when the electronic equipment is placed in a horizontal screen mode.
Referring to fig. 3, an application scene schematic diagram of a horizontal screen and a vertical screen of an electronic device according to an embodiment of the present application is provided; taking an electronic device as a mobile phone, for example, the handheld vertical screen mode shown in fig. 2 (a) can facilitate the single-handed operation of the user; when the application program is adapted to the display mode of the landscape screen, the mobile phone is switched from the portrait screen mode to the landscape screen mode by rotating the mobile phone by the user, and the mobile phone can be operated by both hands in the landscape screen mode, as shown in (b) of fig. 2, for example, for interfaces of the application program supporting screen rotation such as games, videos or document reading, the mobile phone is more convenient for the user to operate horizontally or more conforms to visual habits, and the like. Correspondingly, the display mode can be switched from the horizontal screen to the vertical screen based on the requirement of the application scene. The position state of the mobile phone is obtained through an acceleration sensor in the mobile phone, whether the current interface entered by a user supports screen rotation or not is judged through a module responsible for managing the interface, and under the condition that the screen rotation function is detected to be started, the corresponding display interface in a horizontal screen mode or a vertical screen mode is controlled according to the position state of the mobile phone.
Next, a screen display screen adjustment method provided by the present embodiment will be described. The method can comprise the following steps:
s301, responding to a first operation of rotating a screen by a user, the electronic equipment acquires background points to be adjusted in a background image of a first picture to be displayed on the screen.
In some embodiments, the electronic device may be a handheld terminal device with a screen auto-rotation function, including a mobile phone, a tablet computer, and the like. A user can start the automatic screen rotation function through a corresponding setting item, and when the automatic screen rotation function is started, and a sensor built in the electronic equipment recognizes the change of the electronic equipment in the horizontal and vertical directions, the automatic screen rotation is executed, so that a screen display picture is matched with the current state of the electronic equipment; for example, the vertical screen display picture is rotated to the horizontal screen display picture, or the horizontal screen display picture is rotated to the vertical screen display picture.
The first picture to be displayed is a picture to be adjusted in the screen rotation process. The first operation of rotating the screen may be a rotating operation from the landscape state to the portrait state or a rotating operation from the portrait state to the landscape state.
For example, as shown in fig. 4, during the screen rotation process, the rotation direction of the screen display may be consistent with or opposite to the rotation direction of the screen. When the electronic device rotates from the portrait screen state shown in fig. 4 (a) to the landscape screen state shown in fig. 4 (d), the rotation angle of the display screen and the rotation angle of the screen may not completely coincide, so that during the rotation process, the display interface shown in fig. 4 (b) and (c) appears on the screen, that is, a foreground region 401 and a background region 402 appear on the screen display interface, the foreground region displays the foreground image during the rotation process, and the background image displayed by the background region may display white, black or other fixed colors before the adjustment.
As shown in fig. 4 (b), during the screen rotation process, the screen display interface includes a foreground area 401 and a background area 402, where the foreground area 401 correspondingly displays a foreground image and the background area 402 correspondingly displays a background image. A sensor (such as an acceleration sensor or a gravity sensor) built in the electronic device can identify the rotation angle of the screen; the method includes that corresponding to a rotation angle of a screen, a picture frame of a foreground image corresponding to a current rotation angle is displayed in a target display area on a display interface of the screen, and the range setting of the target display area can correspond to the rotation angle and a display frame rate of the screen.
For example, as shown in (b) of fig. 4, when the rotation angle of the screen does not exceed the angle threshold (for example, the angle threshold may be 45 °), the first frame picture displayed in the first target display area may be a partial picture in the portrait screen state; as shown in (c) of fig. 4, when the rotation angle of the screen exceeds the angle threshold and the landscape state has not been reached, the second frame picture displayed in the second target display area may be a partial picture in the landscape state. Or, in the screen rotation process, in order to ensure the display effect, the electronic device performs scaling processing (for example, scaling processing on the length and width of the foreground image) on the picture of the foreground image that needs to be displayed in the rotation process, so that in the screen rotation process, a complete picture corresponding to the vertical screen state or the horizontal screen state is displayed in the target display area of the display interface.
In a possible implementation manner, based on a screen rotation angle detected by an acceleration sensor or a gravity sensor, in combination with a screen display frame rate, a target display area (foreground area) and a background area except the target display area of a to-be-displayed picture in a current display interface of a screen may be determined, further, position coordinates of pixels corresponding to the foreground area and the background area may be determined, and a color value of each pixel or a color value of each pixel set corresponding to the foreground area and the background area may be obtained based on the position coordinates.
For example, after determining a background region of a screen display interface, sequentially determining each background point to be adjusted on a target position coordinate according to a traversal direction according to a position coordinate of each pixel point or a pixel point set in the background region in a screen coordinate system, where the background point to be adjusted may be one pixel point or one pixel point set in a background image, and the traversal direction may be from top left to bottom or from left to right of the background image of a picture to be displayed; the traversing direction is not specifically limited, and color values of each pixel point or each pixel point set are sequentially acquired from pixel points or pixel sets, which are close to the boundary of the foreground image, in the background image in the direction away from the boundary of the foreground image.
It should be noted that, the acquiring, by the electronic device, the background point to be adjusted in the background image of the to-be-displayed screen includes acquiring a position coordinate of the background point to be adjusted and a color value of a pixel point or a pixel point set corresponding to the position coordinate. The frame rate of the display pictures in the screen rotation process can be the same as the frame rate of the display pictures when the screen plays the video, or is less than the frame rate of the display pictures when the screen plays the video; when the screen is in a plurality of different rotation angles, the screen has a frame of picture to be displayed corresponding to the rotation angle, and the corresponding display area of the frame of picture to be displayed in the screen changes along with the rotation of the screen and gradually rotates from a vertical screen state (or a horizontal screen state) to a horizontal screen state (or a vertical screen state). The picture displayed on the screen during the screen rotation process can be a still picture (for example, a pause picture of a certain frame in video playing), or a continuous picture played along with the video.
For example, the position coordinates of the background point to be adjusted may be represented based on a screen coordinate system of the electronic device, for example, the position coordinates of the background point to be adjusted may be represented as (i, j), where i represents an abscissa in the screen coordinate system and j represents an ordinate in the screen coordinate system. The color value of the background point to be adjusted can be represented by variable values of a plurality of channels, for example, by an RGB channel value or an aRGB channel value, and when represented based on RGB, can be represented as a 24-bit color value, each 8 bits represents a channel value, and when represented based on aRGB, can be represented as a 32-bit color value, the former 8 bits represent transparency, and the latter three 8 bits represent channel values corresponding to RGB, respectively; the color value may also be represented by other channel values, such as a Hue channel value, a Saturation channel value, and a brightness channel value, or a channel value recorded in a YUV color space representation.
In some embodiments, the electronic device obtains background points to be adjusted in a background image of a first picture to be displayed on a screen, and the method includes:
according to the frame rate of the display picture of the screen in the rotation process, the electronic equipment periodically acquires background points to be adjusted in the background image.
Illustratively, in the screen rotation process, for different rotation angles, the screen displays a foreground image corresponding to the rotation angle of the screen in the target display area; the frame rate of the image displayed by the screen in the rotation process can be the display frame rate (namely refresh rate) of the screen when playing video, and can also be the display frame rate of the image corresponding to the set rotation angle in the rotation process; for example, a first frame picture is displayed at a first rotation angle of the screen, and a second frame picture is displayed at a second rotation angle of the screen; the first frame picture and the second frame picture may be two frames of pictures of the same still picture displayed in different display regions, or two consecutive frames of different pictures displayed in different display regions, in front of and behind each other. Correspondingly, in the screen rotation process, for different rotation angles, according to the display area of the foreground image corresponding to the screen rotation angle in the screen, the range of the foreground area of the screen display interface, the range of the background area corresponding to the background image, and the position coordinates of the background point to be adjusted in the background image in the background area can be determined.
Illustratively, according to the frame rate of a display picture of a screen in a rotation process, a background image corresponding to each frame of a picture to be displayed in the rotation process and a background area of the background image on a screen display interface are periodically determined, a background point to be adjusted in the background image is obtained, and a color value of the background image corresponding to a display picture of a current frame is adjusted through subsequent steps. For example, in the screen rotation process, a first background image corresponding to a first frame of picture to be displayed currently is determined according to a first rotation angle of a screen, and color values of all background points to be adjusted in the first background image are obtained and adjusted to obtain an adjusted first target background image; then, a second background image corresponding to a second frame of picture to be displayed at the next second rotation angle is obtained, and color values of all background points to be adjusted in the second background image are obtained and adjusted to obtain an adjusted first target background image; and continuously acquiring a third background image corresponding to a third frame of picture to be displayed at the next third rotation angle according to the frame rate until the screen is rotated from the vertical screen state (or the horizontal screen state) to the horizontal screen state (or the vertical screen state).
S302, the electronic device adjusts the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first picture to be displayed, and the adjusted target background image is obtained.
The difference value between the color value of the adjusted background point to be adjusted and the first color value is within the range of the color threshold value; the reference point is at least one pixel point of the foreground image, the distance between which and the background point to be adjusted is within a preset neighborhood range, or is at least one pixel point of the background image, the distance between which and the background point to be adjusted is within the preset neighborhood range, and the color value of which is adjusted; the background point to be adjusted is at least one pixel point in the background image.
For example, when the color of the background image of the picture to be displayed is adjusted, the color of the background point to be adjusted is adjusted based on the color of the foreground image of the picture to be displayed or the color of the background point in the background image whose color value has been adjusted.
In some embodiments, after the electronic device acquires a background point to be adjusted in a background image of a first to-be-displayed screen of a screen, the method further includes:
and determining a reference point with the distance from the position coordinate of the background point to be adjusted within a preset neighborhood range according to the position coordinate of the background point to be adjusted.
The reference point comprises a foreground point in a foreground image of a picture to be displayed on the screen or a background point with an adjusted color value in a background image. The position coordinates of the reference point may be expressed based on a screen coordinate system of the electronic device, for example, the position coordinates of the reference point may be expressed as (i, j), where i denotes an abscissa in the screen coordinate system and j denotes an ordinate in the screen coordinate system.
For example, the color value of the reference point may be represented by variable values of a plurality of channels, for example, by RGB channel values or aRGB channel values, and when represented based on RGB, may be represented as a color value of 24 bits, where each 8 bits represents a channel value, and when represented based on aRGB, may be represented as a color value of 32 bits, where the former 8 bits represent transparency, and the last three 8 bits represent channel values corresponding to RGB; the color value may also be represented by other channel values, such as a Hue channel value, a Saturation channel value, and a brightness channel value, or a channel value recorded in a YUV color space representation.
For example, the reference point may be a pixel point or a pixel point set in a foreground image of a frame to be displayed; for example, when a pixel is a pixel, the color channel value of the pixel in the foreground image may be used for representing, for example, the RGB channel value is (0, 125, 255); when the reference point is a pixel point set, one reference point may correspond to a pixel point array composed of a plurality of pixel points, for example, a 2 × 2 pixel point array, and the color value of the reference point may be represented by an average value of color channel values corresponding to each pixel point in the 2 × 2 pixel point array, for example, RGB channel values corresponding to each pixel point in the 2 × 2 pixel point array are (1, 23, 100), (7, 35, 110), (10, 20, 90), respectively, and then the color value corresponding to the reference point may be represented as (6, 26, 100); the principle of the other color representation is the same as that of the above representation.
It should be noted that the order of the pixel point array formed by the reference point and the multiple pixel points may be set according to the resolution of the screen or the size of the picture to be displayed, which is only described as an example and is not specifically displayed. Correspondingly, when the color value of the background image of the picture to be displayed is adjusted, the color representation mode of each background point to be adjusted is consistent with the color representation mode of each reference point, and the number of the pixel points corresponding to each background point to be adjusted is consistent with that of the pixel points corresponding to each reference point.
As shown in fig. 5, different rotation angles of the screen may correspond to different images to be displayed, foreground images of different images to be displayed are different in foreground regions corresponding to the screen display interface, background images are different in background regions corresponding to the screen display interface, positions of sampling points (background points to be adjusted) of the background images in the corresponding background regions and positions of foreground points or background points with adjusted color values within a preset neighborhood range corresponding to the sampling points are also different, and the positions are changed along with changes in the rotation angles of the screen.
As shown in fig. 5 (a), when the screen is rotated from the portrait screen state to the landscape screen state, and the rotation angle of the screen is smaller than the angle threshold, a partial picture (for example, a picture displayed in window a) of the portrait screen picture is displayed in the target display area (foreground area). The electronic equipment acquires background points to be adjusted in a background image of a picture to be displayed, and determines reference points (including foreground points in a foreground image or background points with adjusted color values in the background image) in a neighboring area based on a preset neighborhood range. At this time, the reference point in the neighborhood range corresponding to the background point to be adjusted in the background image may include a foreground point in a foreground image corresponding to the window a in the picture to be displayed, or a background point with an adjusted color value in a background image corresponding to the background region.
As shown in fig. 5 (B), when the screen is rotated from the portrait screen state to the landscape screen state, and the rotation angle of the screen is greater than the angle threshold and is not rotated to the landscape screen state, a partial screen (for example, a screen displayed in the window B) of the landscape screen is displayed in the target display area (foreground area). The electronic equipment acquires background points to be adjusted in a background image of a picture to be displayed, and determines foreground points in an adjacent area or background points with adjusted color values based on a preset neighborhood range. At this time, the reference point in the neighborhood range corresponding to the background point to be adjusted in the background image may include a foreground point in the foreground image corresponding to the window B in the picture to be displayed, or a background point with an adjusted color value in the background image corresponding to the background region.
As shown in fig. 5 (C), when the screen is rotated from the portrait screen state to the landscape screen state, the screen displays a partial picture of the landscape screen and a partial picture of the portrait screen (for example, pictures at different angles displayed in window a and window B, respectively) in the target display area (foreground area) during the rotation process, and the union area range of the pictures displayed in window a and window B may also be referred to as window C. The electronic equipment acquires background points to be adjusted in a background image in a picture to be displayed, and determines foreground points in an adjacent area or background points with adjusted color values based on a preset neighborhood range. At this time, the reference points in the neighborhood range corresponding to the background points to be adjusted in the background image may include foreground points in the foreground image corresponding to the window a, foreground points in the foreground image corresponding to the window B, foreground points of the foreground image corresponding to an overlapping region of the window a and the window B in the picture to be displayed, or background points with adjusted color values in the background image corresponding to the background region.
As shown in fig. 5 (d), when the screen is rotated from the vertical screen state to the horizontal screen state, during the rotation of the screen, a partial picture of the horizontal screen picture and a partial picture of the vertical screen picture are displayed in the target display area (foreground area) (for example, a picture displayed in the same display area, that is, a picture displayed in the foreground area of the window a + the window B, is obtained by zooming the original window a and the original window B, respectively). The electronic equipment acquires background points to be adjusted in a background image in a picture to be displayed, and determines foreground points in an adjacent area or background points with adjusted color values based on a preset neighborhood range. At this time, the reference points in the neighborhood range corresponding to the background points to be adjusted in the background image may include foreground points in the foreground image corresponding to the foreground region of the window a + the window B in the picture to be displayed, or background points with adjusted color values in the background image corresponding to the background region, for example, reference points in the neighborhood region corresponding to the sampling point 1.
Illustratively, the neighborhood of the sampling point may further include invalid points, such as the neighborhood of the sampling point shown in (b) of fig. 5, and the points in the screen frame region belong to the invalid points, although they also belong to the neighborhood of the sampling point. The reference points in the neighborhood of the sampling point may also include only background points of the adjusted color value, such as the neighborhood of sampling point 2 shown in (d) of fig. 5.
It should be noted that fig. 5 only illustrates the position relationship between the sampling point and the reference point and the schematic description of the preset field range by way of example, and actually, in the data processing process, based on the position coordinate and the color value of the reference point in the picture to be displayed, which corresponds to the screen display interface, the color of the background point to be adjusted of the background image in the picture to be displayed is adjusted.
For example, when a plurality of background sub-regions exist in a display interface of a screen, corresponding background points to be adjusted may be sampled simultaneously for background images corresponding to the background sub-regions at different positions, so as to obtain foreground points or background points with adjusted color values within a corresponding preset neighborhood range; therefore, the traversing efficiency of the background points to be adjusted in the background image corresponding to the background sub-regions at different positions is improved, and the rendering efficiency of each frame of the image to be displayed is improved.
It should be noted that the adjusted background point is a background point whose color is adjusted according to the color value of the foreground point, or a background point whose color is adjusted according to the color value of the foreground point or other adjusted background points. The rotating display interface shown in fig. 5 is only exemplary, and does not limit the area division manner of the display interface in the screen rotation process, and no matter which area division manner corresponds to, in the screen rotation process, according to a foreground image corresponding to a foreground area of the display interface corresponding to a picture to be displayed, color values of background points to be adjusted in a background image corresponding to the background area of the display interface are traversed and adjusted; the size of the preset neighborhood range can be set according to the size and the resolution of a screen or the size of a foreground area and a background area corresponding to a screen display interface.
In some embodiments, the adjusting, by the electronic device, the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first to-be-displayed picture to obtain the adjusted target background image includes:
according to the first color value of the reference point in the foreground image or the background image of the first picture to be displayed, the electronic equipment calculates a second color value corresponding to the background point to be adjusted; and adjusting the color value of the background point to be adjusted to be the second color value to obtain the target background image with gradually changed color value.
Wherein a difference between the first color value and the second color value is within a color threshold range.
In some embodiments, the adjustment method of the display interface in the screen rotation process in the application is based on adjustment realized by a domain algorithm of sampling points of a background image of a picture to be displayed, that is, for each sampling point to be adjusted in the background image, according to a color value of a reference point within a preset neighborhood range from the sampling point, a color value of the sampling point is calculated, so that the color value of the sampling point is similar to, consistent with or gradually changed from the color value of the reference point within the neighborhood range; and calculating the color value corresponding to each background point in the background image step by step based on the color value of the reference point in the preset neighborhood range.
For example, as shown in fig. 5, in the screen rotation process, for different region division modes in the display interface, the reference points of the preset neighborhood range of the background point to be adjusted in the background image are also different, and the first color values corresponding to the different reference points are also different.
For example, the color threshold range may be set according to the size of the background region in the display interface and the first color value of the reference point at the adjacent boundary of the foreground image in the frame to be displayed. The second color value may be an average value of first color values of reference points in a preset adjacent range corresponding to the background point to be adjusted, or a color value calculated by a gaussian fuzzy algorithm on the first color value of the reference point in the preset adjacent range; the color value may also be obtained through other calculation methods, for example, a color value calculated by an algorithm such as color conversion.
For example, the color values of the sampling point (background point to be adjusted) and the reference point may be recorded based on the same type of representation, such as an RGB channel-based representation, an aRGB channel-based representation, a YUV channel-based representation, and an HSL-based representation. According to each channel value corresponding to the reference point in the above description mode, each channel value corresponding to a sampling point (background point to be adjusted) is calculated, and the adjusted color value of the sampling point is represented based on each channel value obtained through calculation.
The calculation method includes, but is not limited to, obtaining an average value of each channel value corresponding to all reference points in a preset neighborhood range of the sampling point, or calculating a gaussian fuzzy value corresponding to each channel value by using a gaussian algorithm, and the like, for example, color conversion calculation may be performed according to each channel value corresponding to all reference points in the preset neighborhood range to obtain a color channel value corresponding to the sampling point, and the like.
In some embodiments, adjusting the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image or in the background image of the first picture to be displayed includes:
aiming at a background image corresponding to each frame of first to-be-displayed picture in the rotation process of a screen, calculating second color values respectively corresponding to all to-be-adjusted background points in the background image according to the first color values of the reference points and the traversing direction of the to-be-adjusted background points; and adjusting the color values of all background points to be adjusted in the background image into second color values to obtain an adjusted target background image.
For example, the traversing direction of the background point to be adjusted may be determined according to the position where the background region corresponding to the background image is located on the screen display interface, and the traversing directions of the background point to be adjusted in the background images located in the background regions at different positions are also different; for example, for the display interface shown in the diagram (d) in fig. 5, the background region includes regions corresponding to four corners of the screen, respectively, and therefore, the traversal direction of the background point to be adjusted in the background image of the background region corresponding to the upper right corner of the screen may be from left to right and from top to bottom; the traversal direction of the background points to be adjusted in the background image of the background area corresponding to the lower left corner of the screen can be from right to left and from top to bottom; the corresponding traversal directions of the background points to be adjusted in the background image corresponding to the background area at the upper left corner of the screen can be from left to right and from bottom to top. In the data processing process, traversal and color adjustment can be performed according to the position coordinates of the background point to be adjusted in the background image in the screen coordinate system.
Exemplarily, when a plurality of background sub-regions exist in the screen display interface, the background points to be adjusted of the background images corresponding to the background sub-regions at different positions can be traversed simultaneously according to the respective corresponding traversing directions; and sequentially calculating the color values of all background points to be adjusted in the background image corresponding to each background sub-region according to the color values of the reference points in the preset neighborhood range of the background points to be adjusted.
Illustratively, for a background image corresponding to each frame of to-be-displayed picture in the screen rotation process, according to a color value of a foreground image in the dynamically-changed to-be-displayed picture, and according to a frame rate of the display picture, a color value of the background image of each frame of to-be-displayed picture is calculated, and the color value of the background image is dynamically adjusted.
Illustratively, fig. 6 is a schematic diagram of a preset neighborhood range of dynamic sampling provided in the embodiment of the present application. In the screen rotation process, for any one sampling point (i, j) to be adjusted in the background image, the corresponding preset neighborhood range can be represented as Delta (i, j). Here, the preset neighborhood range Delta (i, j) may be a neighborhood range of 3 × 3 order or 5 × 5 order centered on the sampling point, as shown in (a) and (c) of fig. 6.
For example, as shown in fig. 6 (a) and fig. 6 (b), the preset neighborhood range is a neighborhood range of 3 × 3, and when the color value of the sampling point is calculated according to the reference point in the preset neighborhood range, the color value of the sampling point located at the center position may be calculated by using a gaussian fuzzy algorithm.
As shown in fig. 6 (a), when the color value corresponding to the sampling point itself is 4, and the reference points in the preset neighborhood range all have corresponding color values, the color value of the sampling point is 1.92 according to the color value of the reference point based on the gaussian fuzzy algorithm, as shown in fig. 6 (b); correspondingly, when traversing the background points to be adjusted in the background image, the 3 × 3 convolution block may also be moved to all the background points to be adjusted in the background image of the picture to be displayed based on the sequential movement of the convolution block to the right, the downward, the left, or the upward direction.
For example, as shown in fig. 6 (b), the preset neighborhood range is a neighborhood range of 5 × 5, and when the color value of the sampling point is calculated according to the reference point in the preset neighborhood range, the average value may be obtained to calculate the color value of the sampling point located at the center position.
As shown in fig. 6 (c), the color value corresponding to the sampling point itself is 0, the color value of the reference point in the preset neighborhood range may include an uncomputed background point or an invalid point corresponding to an invalid area, which are not involved in the calculation, and the color value corresponding to the reference point is represented by 0 in the figure; calculating the color value of the sampling point to be 0.92 according to the color values of other effective reference points, as shown in (d) of fig. 6; correspondingly, when the background points to be adjusted in the background image are traversed, the 5 × 5 convolution block may also be moved to the right, downward, left, or upward direction in sequence, so as to traverse all the background points to be adjusted in the background image of the picture to be displayed.
It should be noted that the above color value representation is only exemplary, and in the actual calculation process, each color channel value corresponding to a sampling point may be calculated according to each color channel value of each reference point, so as to obtain a color value corresponding to each sampling point.
In some embodiments, according to a first color value of a reference point in a foreground image or a background image of the first to-be-displayed picture, the electronic device calculates a second color value corresponding to a background point to be adjusted, including:
and periodically calculating second color values respectively corresponding to all background points to be adjusted in the background image corresponding to the first picture to be displayed of each frame according to the first color value of the reference point and the frame rate of the picture displayed in the rotation process of the screen.
Illustratively, in the screen rotation process, according to a foreground image of a dynamically changing foreground region, color values of all background points to be adjusted of a background image corresponding to each frame of a picture to be displayed are dynamically calculated, so that the color values of the background image of the picture to be displayed are dynamically adjusted along with the rotation process, the color difference between the background image and the foreground image in a screen display interface in the screen rotation process is improved, and the display effect and the visual experience of a user are improved.
And S303, the electronic equipment displays a picture consisting of the foreground image and the adjusted target background image on the screen.
In some embodiments, for each frame of to-be-displayed picture in the screen rotation process, a second color value corresponding to a to-be-adjusted background point of a background image is calculated, and the to-be-adjusted background point of the background image is adjusted to the second color value, so that the screen can correspondingly display the picture after the color value of each frame of background image is adjusted in the rotation process, the display effect of the display interface at each angle in the rotation process is more in line with the habit of human vision, and the possibility of discomfort of eyes of a user caused by the color difference between a foreground image and the background image in the screen rotation process is reduced; the display effect of the whole display interface is improved.
In some embodiments, after obtaining the adjusted target background image, the method further comprises:
synthesizing the foreground image and the adjusted target background image into a second to-be-displayed picture of the screen; and in the screen rotation process, displaying each frame of second picture to be displayed on the screen.
Exemplarily, in the screen rotation process, the electronic device determines a foreground area and a background area of a screen display interface according to pictures to be displayed by the screen at different rotation angles; when rendering a picture to be displayed, images corresponding to a background region and a foreground region respectively can be processed by different layers, for example, a background image corresponding to the background region is adjusted in the background layer, and a foreground image corresponding to the foreground region is processed in the foreground layer; acquiring corresponding color values according to the position coordinates of the reference points in the preset neighborhood range in the foreground region, calculating the color values of sampling points at the position coordinates corresponding to the reference points in the background region, and adjusting the color values of the background image in the background layer according to the calculated color values; finally, synthesizing the adjusted background image in the background image layer and the foreground image in the foreground image layer to obtain an adjusted to-be-displayed picture of the whole screen; and displaying the adjusted picture to be displayed at the current rotation angle of the screen.
Referring to fig. 7, a flow chart of a method for adjusting a screen display image according to an embodiment of the present application is shown; based on the same implementation principle as the above embodiment, the method may include the following steps:
s701, responding to a first operation of rotating a screen by a user, and determining a background area corresponding to a background image of a picture to be displayed;
s702, acquiring background points to be adjusted in a background area according to a preset traversal direction;
s703, adopting a nearest neighbor algorithm according to the foreground image of the first to-be-displayed picture;
s704, calculating the color value of the background point to be adjusted by adopting a nearest neighbor algorithm according to the color value of the foreground point of the foreground image of the first picture to be displayed or the background point with the adjusted color value;
s705, judging whether color value adjustment of all background points to be adjusted in the background area of the current frame image to be displayed is finished; if yes, go to S706; if not, continuing to execute S702 and the subsequent steps;
s706, judging whether color value adjustment of background points to be adjusted in all frames of pictures to be displayed is finished; if yes, executing S707; if not, continuing to execute the step S701 and the subsequent steps;
and S707, displaying the picture to be displayed after adjusting the color value of each frame in the screen rotation process.
It should be noted that, when the screen rotates, the electronic device may adjust the color of the background image for each frame of picture to be displayed in the screen rotation process, may adjust one frame to display one frame correspondingly, adjust the picture to be displayed for the next frame in the time of displaying the current frame, may also adjust all frames of pictures to be displayed before displaying the picture, and then sequentially display the adjusted pictures to be displayed.
As shown in fig. 8, a schematic view of a screen display before and after adjustment according to an embodiment of the present application is provided. As shown in fig. 8 (a), in order to adjust the visual effect of the previous display interface, since the color value of the background area may be fixed white, black, or a fixed halftone, the color of the background area and the color of the foreground area in the screen display interface have a relatively obvious difference, which affects the visual effect of the user. As shown in fig. 8 (b), by using a neighborhood sampling calculation method, the sampling points in the background image are traversed, the color values of the sampling points in the background image corresponding to each frame of the picture to be displayed are calculated according to the color values of the reference points in the preset neighborhood range, all the sampling points of the background image are adjusted to the calculated color values, and each frame of the picture to be displayed after adjustment in the rotation process of the screen is obtained, so that the image color difference between the background area and the foreground area in the display interface is reduced, and the overall visual effect of the screen display interface is improved.
In one possible implementation, the method further includes: calculating the average value of the first color values of all reference points in the foreground image, and adjusting the color values of all background points to be adjusted in the background image to be the average value of the first color values to obtain an adjusted target background image; or calculating a second color value corresponding to the background point to be adjusted according to the first color value of the reference point of the preset edge region in the foreground image, and adjusting the color value of the background point to be adjusted to the second color value to obtain a target background image; or adjusting the color value of the background point to be adjusted according to the initial color value and the final color value of the reference point in the foreground image or the background image of the first picture to be displayed to obtain an adjusted target background image; the first color value of the background image comprises an initial color value and a final color value, the initial color value is a color value of a picture to be displayed of a first frame before color value adjustment when the screen rotates to start, and the final color value is a color value of a picture to be displayed of a last frame before color value adjustment when the screen rotates to end.
It should be noted that fig. 8 only schematically illustrates a visual effect when there is a color difference or a color difference is obvious between a foreground region and a background region of a screen display interface before display adjustment, and a schematic diagram that reduces an image color difference between the background region and the foreground region after an image to be displayed is adjusted, enriches color distribution of the background region and improves the visual effect in a screen turning process, and does not limit display characteristics of the background region and the foreground region of the display interface in an actual rotation process.
In some embodiments, the background point and the reference point to be adjusted respectively correspond to a pixel point set on the screen, and the pixel point set may include a plurality of pixel points.
For example, as shown in fig. 6 (a), the sampling point or the reference point may include a plurality of pixel point sets, for example, a 2 × 2 pixel point matrix or a 4 × 4 pixel point matrix, and the number of pixel points in a specific pixel point set may be determined according to a resolution of a screen, a size of a background region in a display interface, and a frame rate of a display image in a rotation process of the screen, so as to ensure that a time for traversing background points to be adjusted in the background region is within a refresh time of the display image in the rotation process. When the sampling point or the reference point is a plurality of pixel point sets, the corresponding preset neighborhood range may be expanded by using the plurality of pixel point sets as a unit to obtain a corresponding neighborhood range, for example, a neighborhood range of a matrix size of 3 × 3 or 5 × 5 formed by using the plurality of pixel point sets as a unit. When a sampling point includes a plurality of pixel points, a color value corresponding to the sampling point may be an average value or a gaussian fuzzy value of color values of the plurality of pixel points, that is, a position coordinate (pixel point coordinate) of the included pixel point is determined according to a position coordinate (corresponding to a coordinate under a screen coordinate system) of the sampling point, a corresponding pixel value (or a gray value) is obtained according to the position coordinate of the pixel point, and a color value corresponding to the sampling point is calculated according to the pixel value of each pixel point.
According to the method and the device, the electronic equipment determines the background point to be adjusted of the background image of the picture to be displayed in the screen rotation process, dynamically calculates the second color value corresponding to the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the picture to be displayed based on the nearest sampling algorithm, adjusts the color value of the background point to be adjusted to the second color value close to the first color value, obtains the target background image with gradually changed color, and displays the foreground image and the adjusted target background image on the screen; the color difference between the foreground area and the background area is weakened, so that the visual effect in the screen turning process is improved, and the visual impact of a user is reduced; because the color value of each sampling point of the background image of the picture to be displayed is dynamically calculated, the visual effect in the screen turning process is enhanced while the color distribution of the background image is enriched; the color difference of the foreground image and the background image in the screen rotation process and the visual discomfort caused by the color difference are reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Based on the above embodiment in which the electronic device 100 adjusts the screen display during the screen rotation process, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a hierarchical architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
Referring to fig. 9, fig. 9 is a block diagram of a software structure of the electronic device 100, and a system architecture of the android operating system may include an Application (APP) layer, a Framework (Framework) layer, a Native (Native) layer, a Kernel (Kernel) layer, and a Hardware (Hardware) layer.
The Application layer may include at least one Application (Application) 901, where the Application 901 may be a system Application or an Application of a third party; for example, the application programs may be a camera, a gallery, a calendar, a call, a map, a navigation, a WLAN, bluetooth, music, a video, a short message, and the like.
A Window Management Service (WMS) module 902, an Activity Management Service (AMS) module 903, a Window adaptation Service (DMS) module 904, a Rotation-Display Policy Service (Rotation-Display Policy Service) module 905, and an Input management (Input Manager) module 906 are provided in the Framework layer.
The WMS module 902 is responsible for assigning windows (surfaces) to applications and managing the attributes of the surfaces (e.g., the size, display position, display area, and hidden area of the surface).
The AMS module 903 is responsible for managing the lifecycle of the application and processing issues.
The DMS module 904 is responsible for managing the screen display state of the current display screen of the system. When the screen rotation function is opened, the DMS module 704 adapts the display window of the current display screen to the state of the electronic device; for example, when the electronic equipment is in a vertical screen state, the display window is adapted to the display state of the vertical screen; and when the electronic equipment is in the landscape screen state, the display window is adapted to the landscape screen display state.
The Rotation-Display Policy Service module 905 is responsible for deciding whether to start the screen Rotation mode according to a preset Rotation trigger condition.
The Input Manager module 906 is responsible for passing data.
A graphics compositor (surface maker) 907, layer renderers (Layers Renderer) 908, Hardware graphics composers (HWC) 909, and a Display channel (Display) 910 are provided in the Native layer.
The graphic synthesizer 907 is responsible for synthesizing window data of respective applications into screen display data.
The layer renderer 908 is responsible for rendering a foreground layer and a background layer in the screen display data corresponding to the to-be-displayed picture, for example, adjusting a color value of the background layer according to a color value of the foreground layer.
The hardware graphics maker 909 is responsible for displaying screen display data on the screen; the Hardware graphics maker 909 may also be a Hardware Abstraction Layer (HAL) module for performing window synthesis and display in the android system, provide Hardware support for the graphics synthesizer 907, and perform Layer synthesis through Hardware devices to relieve the synthesis pressure of the GPU.
The Display910 is responsible for transferring color adjusted screen Display data.
A Sensor Driver module 911 is provided on the Kernel layer.
The Sensor Driver module 911 is responsible for receiving and transmitting Sensor data collected by a Sensor, such as a gravity signal collected by a gravity Sensor during rotation of the electronic device, and the gravity signal is used for identifying the placement state of the electronic device.
A display Screen (Screen) 912 and a gravity sensor 913 are provided on the Hardware layer.
Screen912 is responsible for displaying the adjusted to-be-displayed picture.
The gravity sensor 913 is responsible for collecting gravity sensing data of the electronic device during the rotation of the screen, such as the tilt angle of the electronic device.
The trigger condition for turning on the screen rotation mode of the electronic device 100 may be set to a screen rotation event when the screen rotation function is turned on and the currently entered interface supports the screen rotation function. At this time, the electronic device 100 acquires data collected by the gravity sensor 913 and monitors the screen rotation event.
When the screen rotation function of the electronic device 100 is turned on and the currently entered interface supports the screen rotation function, a user triggers a first operation of rotating the screen, the gravity Sensor 913 of the electronic device 100 acquires corresponding Sensor data (gravity sensing data), the gravity Sensor 913 transmits the acquired Sensor data to the Sensor Driver module 911, and the Sensor Driver module 911 transmits the Sensor data to the rotation display decision support service module 905 through the Input Manager module 906.
The rotating display decision support service module 905 detects that a screen rotation event occurs in the electronic device 100 according to the sensor data, and starts a screen rotating display mode of the electronic device 100. The electronic device 100 can dynamically display the picture during the screen rotation based on the screen rotation display mode.
After the electronic device 100 starts the screen rotation function and starts the screen rotation display mode, the DMS module 904 performs a display region adaptation operation to determine a display window adapted to the screen rotation angle.
In a graphics pipeline rendering framework of an android operating system, a graphics rendering component with a graphics rendering function, such as a GPU, is responsible for rendering graphics data of each frame of a to-be-displayed picture (or application program). In the rendering process, the graphics rendering component obtains a window area, which is adapted to the screen rotation angle, of the display screen of the electronic device 100, and renders the graphics data of each frame of the to-be-displayed picture (or the application program) according to the window area, where the rendering process includes adjusting the color value of the background layer according to the color value of the foreground layer of each frame of the to-be-displayed picture.
After the rendering of the graphic data of each frame of the picture to be displayed (or the application program) is completed, the window data of each frame of the picture to be displayed (or the application program) is obtained, and the graphic rendering component transmits the rendered window data of each frame of the picture to be displayed (or the application program) into a buffer queue.
The image synthesizer 907 extracts rendered window data of each frame of the screen to be displayed (or application) from the data buffer queue.
Wherein, the buffer queue adopts a producer-consumer mode, and can adjust the fixed period of the buffer (buffer) from the production queue to the consumption queue, and the working principle is shown in fig. 10.
When the producer needs to cache data, the producer can create a buffer queue cache queue through a dequeue (dequeue) instruction, or the producer can wake up the buffer queue in a dequeue (dequeue) state.
Before the creation or awakening of the buffer queue is successful, the buffer in the buffer queue is in an idle (Free) state; when the buffer queue is successfully created or awakened, the buffer queue transfers the buffer to the producer, and the state of the buffer is changed into the queue state.
And the producer stores the window data after each frame of picture to be displayed is rendered into the buffer, the buffer is transmitted to the buffer queue through an enqueue (queue) instruction, and the state of the buffer is changed into an enqueue (queue) state.
When the consumer needs to process the data cached in the buffer, the consumer can send a get (acquire) instruction to the buffer queue.
After receiving the acquire instruction, the buffer queue transfers the buffer to the consumer, and the state of the buffer is changed to the acquired (acquired) state.
And after the consumer finishes processing the data in the buffer, clearing the data cached in the buffer, releasing (releasing) the buffer back to the buffer queue, wherein the state of the buffer is changed into a Free state, and the buffer queue completes the caching and calling of the data.
As can be seen from the above, in the producer-consumer model adopted by the buffer queue of the electronic device 100, the producer is a component having a graphics rendering function, such as a GPU, and the like, and after the producer renders the graphics data of each frame of the to-be-displayed picture (or application program), the window data of each frame of the to-be-displayed picture (or application program) is obtained, and the rendered window data of each frame of the to-be-displayed picture (or application program) is transmitted to the buffer of the buffer queue to wait for the call of the consumer. When a producer transfers window data of each frame of to-be-displayed picture (or application) rendered into a buffer, the image synthesizer 907 calls the buffer of each buffer queue to obtain the window data of each frame of to-be-displayed picture (or application), and the consumer performs a synthesizing operation on the window data of each frame of to-be-displayed picture (or application).
In the image synthesizer 907, window data of each frame of a picture (or application) to be displayed exists in the form of a layer (layer), for example, for a foreground layer displayed in a foreground region of a screen and a background layer displayed in a background region; the image synthesis module 907 integrates the multiple layers of window data into one layer of screen display data according to the surface attribute corresponding to each layer of window data.
The Display910 transmits the merged screen Display data to the hardware graphics maker 909, and the hardware graphics maker 909 adapts the window area of the screen Display data and displays the screen Display data after being configured in the window area on the Display 713 of the electronic device 100.
According to the color value of the background layer dynamically adjusted by the foreground layer, the color difference between the foreground layer and the background layer is avoided, and the visual effect in the screen turning process can be improved. The color value of each point on the background image layer is calculated and adjusted, so that the color distribution of the background image is enriched, and the visual effect in the screen turning process is enhanced.
Referring to fig. 11, a block diagram of a screen display adjusting apparatus according to an embodiment of the present application shows only a portion related to the embodiment of the present application for convenience of description. As shown in fig. 11, the screen display picture adjusting apparatus includes:
an obtaining unit 111, configured to obtain a background point to be adjusted in a background image of a first to-be-displayed picture of a screen in response to a first operation of a user to rotate the screen; the background point to be adjusted is at least one pixel point in the background image;
a processing unit 112, configured to adjust a color value of the background point to be adjusted according to a first color value of a reference point in a foreground image or in the background image of the first to-be-displayed picture, so as to obtain an adjusted target background image; the difference value between the color value of the adjusted background point to be adjusted and the first color value is within a color threshold range; the reference point is at least one pixel point in the foreground image, the distance between the reference point and the background point to be adjusted is within a preset neighborhood range, or is at least one pixel point in the background image, the distance between the reference point and the background point to be adjusted is within the preset neighborhood range, and the color value of the pixel point is adjusted;
a display unit 113 configured to display a picture composed of the foreground image and the adjusted target background image on the screen.
In some embodiments, the processing unit 112 is further configured to calculate, according to a first color value of a reference point in a foreground image or in the background image of the first to-be-displayed picture, a second color value corresponding to the to-be-adjusted background point; adjusting the color value of the background point to be adjusted to the second color value to obtain the target background image; wherein a difference of the first color value and the second color value is within the color threshold range.
In some embodiments, the obtaining unit 111 is further configured to periodically obtain the background point to be adjusted in the background image according to a frame rate of a display picture of the screen during rotation.
In some embodiments, the apparatus further comprises:
and the region positioning module is used for determining the reference point, the distance between which and the position coordinate of the background point to be adjusted is within the preset neighborhood range, according to the position coordinate of the background point to be adjusted.
In some embodiments, the processing module 112 is further configured to calculate, for a background image corresponding to each frame of the first to-be-displayed image in the rotation process of the screen, second color values respectively corresponding to all to-be-adjusted background points in the background image according to the first color value of the reference point and in the traversal direction of the to-be-adjusted background points; and adjusting the color values of all background points to be adjusted in the background image into second color values to obtain an adjusted target background image.
In some embodiments, the processing module 112 is further configured to periodically calculate, according to the first color value of the reference point and according to the frame rate of the display image during the rotation of the screen, second color values respectively corresponding to all background points to be adjusted in the background image corresponding to each frame of the first image to be displayed.
In some embodiments, the processing module 112 is further configured to calculate a gaussian blur or average of the first color value based on the first color value of the reference point; and taking the Gaussian fuzzy value or the average value as a second color value corresponding to the background point to be adjusted.
In some embodiments, the device further comprises a graphics synthesis module, configured to synthesize the foreground image and the adjusted target background image into a second to-be-displayed picture of the screen; the device also comprises a display sending module which is used for transmitting the second picture to be displayed to the display driver in the screen rotation process and driving to display each frame of the second picture to be displayed on the screen.
In some embodiments, the processing module 112 is further configured to calculate an average value of the first color values of all the reference points in the foreground image, and adjust the color values of all the background points to be adjusted in the background image to the average value of the first color values, so as to obtain an adjusted target background image.
In some embodiments, the processing module 112 is further configured to calculate, according to the first color value of the reference point of the preset edge region in the foreground image, a second color value corresponding to the background point to be adjusted; and adjusting the color value of the background point to be adjusted to be a second color value to obtain a target background image.
In some embodiments, the processing module 112 is further configured to adjust a color value of a background point to be adjusted according to an initial color value and a final color value of a reference point in a foreground image or a background image of the first to-be-displayed picture, so as to obtain an adjusted target background image; the initial color value is a color value of a picture to be displayed in a first frame before color value adjustment when screen rotation starts, the final color value is a color value of a picture to be displayed in a last frame before color value adjustment when screen rotation ends, and the first color value of the background image comprises the initial color value and the final color value.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the foregoing method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical function division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (14)

1. A method for adjusting a screen display picture is characterized by comprising the following steps:
responding to a first operation of rotating a screen by a user, and sequentially acquiring background points to be adjusted in a background image of a first picture to be displayed on the screen according to a traversal direction; the background point to be adjusted is at least one pixel point in the background image; the traversing direction is the direction from a point close to the edge of the foreground image to a point far away from the edge of the foreground image in sequence;
adjusting the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image of the first picture to be displayed or the background image within the preset field range of the background point to be adjusted by a field sampling algorithm to obtain an adjusted target background image; the difference value between the adjusted color value of the background point to be adjusted and the first color value is within a color threshold range; the reference point is at least one pixel point in the foreground image, the distance between the reference point and the background point to be adjusted is within a preset neighborhood range, or is at least one pixel point in the background image, the distance between the reference point and the background point to be adjusted is within the preset neighborhood range, and the color value of the pixel point is adjusted;
carrying out color adjustment on the background image of each frame of picture to be displayed in the screen rotation process; in the refreshing process of the first frame of picture to be displayed with the adjusted color value, finishing the calculation and adjustment of the second color value corresponding to each background point to be adjusted in the background image of the second frame of picture to be displayed to obtain the adjusted target background image; the first frame of picture to be displayed and the second frame of picture to be displayed are two adjacent frames of pictures to be displayed in front and back;
and displaying a picture consisting of the foreground image and the adjusted target background image on the screen.
2. The method of claim 1, wherein the adjusting the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first to-be-displayed picture to obtain the adjusted target background image comprises:
calculating a second color value corresponding to the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first picture to be displayed;
adjusting the color value of the background point to be adjusted to the second color value to obtain the target background image;
wherein a difference of the first color value and the second color value is within the color threshold range.
3. The method of claim 1, wherein said obtaining background points to be adjusted in a background image of a first to be displayed picture of a screen comprises:
and periodically acquiring the background points to be adjusted in the background image according to the frame rate of the display image of the screen in the rotating process.
4. The method of claim 1, wherein after said obtaining background points to be adjusted in a background image of a first to be displayed picture of a screen, the method further comprises:
and determining the reference point with the distance from the position coordinate of the background point to be adjusted to the position coordinate of the background point to be adjusted within the preset neighborhood range according to the position coordinate of the background point to be adjusted.
5. The method as claimed in claim 2, wherein the calculating a second color value corresponding to the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first to-be-displayed picture comprises:
calculating second color values respectively corresponding to all background points to be adjusted in the background image according to the first color values of the reference points and the traversing direction of the background points to be adjusted aiming at the background image corresponding to each frame of the first image to be displayed in the rotating process of the screen;
and adjusting the color values of all the background points to be adjusted in the background image to be the second color values to obtain the adjusted target background image.
6. The method as claimed in claim 2, wherein the calculating a second color value corresponding to the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first to-be-displayed picture comprises:
and according to the first color value of the reference point and the frame rate of a display image of the screen in the rotation process, periodically calculating the second color values respectively corresponding to all the background points to be adjusted in the background image corresponding to each frame of the first image to be displayed.
7. The method as claimed in claim 2, wherein said calculating a second color value corresponding to the background point to be adjusted according to the first color value of the reference point in the foreground image or the background image of the first picture to be displayed comprises:
calculating a gaussian blur value or an average value of the first color value according to the first color value of the reference point;
and taking the Gaussian blur value or the average value as the second color value corresponding to the background point to be adjusted.
8. The method of any one of claims 1 to 7, wherein after the obtaining of the adjusted target background image, the method further comprises:
synthesizing the foreground image and the adjusted target background image into a second to-be-displayed picture of the screen;
and in the screen rotation process, displaying the second picture to be displayed of each frame on the screen.
9. The method of any one of claims 1 to 7, further comprising:
calculating the average value of the first color values of all the reference points in the foreground image, and adjusting the color values of all the background points to be adjusted in the background image to be the average value of the first color values to obtain an adjusted target background image.
10. The method of any one of claims 1 to 7, further comprising:
calculating a second color value corresponding to the background point to be adjusted according to a first color value of a reference point of a preset edge region in the foreground image;
and adjusting the color value of the background point to be adjusted to the second color value to obtain the target background image.
11. The method of any one of claims 1 to 7, wherein the first color value of the background image comprises an initial color value and a final color value; the method further comprises the following steps:
adjusting the color value of the background point to be adjusted according to the initial color value and the final color value of the reference point in the foreground image or the background image of the first picture to be displayed to obtain an adjusted target background image;
the initial color value is a color value of a first frame of a picture to be displayed before color value adjustment when screen rotation starts, and the final color value is a color value of a last frame of the picture to be displayed before color value adjustment when screen rotation ends.
12. An apparatus for adjusting a screen display, comprising:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for responding to a first operation of rotating a screen by a user and sequentially acquiring background points to be adjusted in a background image of a first picture to be displayed on the screen according to a traversal direction; the background point to be adjusted is at least one pixel point in the background image; the traversal direction is a direction from a point close to the edge of the foreground image to a point far away from the edge of the foreground image in sequence;
the processing unit is used for adjusting the color value of the background point to be adjusted according to the first color value of the reference point in the foreground image of the first picture to be displayed or the background image within the preset field range of the background point to be adjusted through a field sampling algorithm to obtain an adjusted target background image; the difference value between the color value of the adjusted background point to be adjusted and the first color value is within a color threshold range; the reference point is at least one pixel point in the foreground image, the distance between the reference point and the background point to be adjusted is within a preset neighborhood range, or at least one pixel point in the background image, the distance between the reference point and the background point to be adjusted is within the preset neighborhood range, and the color value of the pixel point is adjusted;
the processing unit is further used for performing color adjustment on the background image of each frame of picture to be displayed in the screen rotation process; in the refreshing process of the first frame of picture to be displayed with the adjusted color value, finishing the calculation and adjustment of the second color value corresponding to each background point to be adjusted in the background image of the second frame of picture to be displayed to obtain the adjusted target background image; the first frame of picture to be displayed and the second frame of picture to be displayed are two adjacent frames of pictures to be displayed in front and back;
and the display unit is used for displaying a picture consisting of the foreground image and the adjusted target background image on the screen.
13. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the electronic device realizes the steps of the method according to any one of claims 1 to 11 when the computer program is executed by the processor.
14. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes an electronic device to carry out the steps of the method according to any one of claims 1 to 11.
CN202210355977.XA 2022-04-06 2022-04-06 Screen display picture adjusting method and device and electronic equipment Active CN114442894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210355977.XA CN114442894B (en) 2022-04-06 2022-04-06 Screen display picture adjusting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210355977.XA CN114442894B (en) 2022-04-06 2022-04-06 Screen display picture adjusting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114442894A CN114442894A (en) 2022-05-06
CN114442894B true CN114442894B (en) 2022-09-02

Family

ID=81359043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210355977.XA Active CN114442894B (en) 2022-04-06 2022-04-06 Screen display picture adjusting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114442894B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816169B (en) * 2022-06-29 2022-11-04 荣耀终端有限公司 Desktop icon display method and device and storage medium
CN116051704A (en) * 2022-08-29 2023-05-02 荣耀终端有限公司 Rendering method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017069924A (en) * 2015-10-02 2017-04-06 2.5次元ファクトリー株式会社 Image display device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8098261B2 (en) * 2006-09-05 2012-01-17 Apple Inc. Pillarboxing correction
CN104202646A (en) * 2014-08-07 2014-12-10 天津三星电子有限公司 Television picture display method and device, and television
KR102218901B1 (en) * 2014-10-15 2021-02-23 삼성전자 주식회사 Method and apparatus for correcting color
CN112445448B (en) * 2019-08-30 2022-07-22 华为技术有限公司 Flexible screen display method and electronic equipment
CN111026297A (en) * 2019-11-19 2020-04-17 深圳鑫想科技有限责任公司 Screen image rotation method, control device, storage medium and computer equipment
CN112083805A (en) * 2020-09-03 2020-12-15 深圳市雷鸟网络传媒有限公司 Screen picture self-adaptive adjusting method, device, equipment and storage medium
CN114217720B (en) * 2022-02-22 2023-04-07 荣耀终端有限公司 Screen rotating method and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017069924A (en) * 2015-10-02 2017-04-06 2.5次元ファクトリー株式会社 Image display device

Also Published As

Publication number Publication date
CN114442894A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
US11205282B2 (en) Relocalization method and apparatus in camera pose tracking process and storage medium
CN109917956B (en) Method for controlling screen display and electronic equipment
WO2020187157A1 (en) Control method and electronic device
CN109712224B (en) Virtual scene rendering method and device and intelligent device
WO2020119444A1 (en) Game image rendering method and device, terminal, and storage medium
CN114442894B (en) Screen display picture adjusting method and device and electronic equipment
CN110661917A (en) Display method and electronic equipment
CN109829864B (en) Image processing method, device, equipment and storage medium
CN110368689B (en) Game interface display method, system, electronic equipment and storage medium
CN110599593B (en) Data synthesis method, device, equipment and storage medium
CN110557626B (en) Image display method and electronic equipment
CN112328130A (en) Display processing method and electronic equipment
CN115686407B (en) Display method and electronic equipment
CN111258467A (en) Interface display method and device, computer equipment and storage medium
WO2023273465A1 (en) Map display method and apparatus, and terminal device
CN112001851B (en) Image processing method, device, computer equipment and storage medium
WO2023142915A1 (en) Image processing method, apparatus and device, and storage medium
CN111105474B (en) Font drawing method, font drawing device, computer device and computer readable storage medium
CN111882642A (en) Texture filling method and device for three-dimensional model
CN113986162B (en) Layer composition method, device and computer readable storage medium
CN109636715B (en) Image data transmission method, device and storage medium
CN111275607B (en) Interface display method and device, computer equipment and storage medium
CN116152122B (en) Image processing method and electronic device
CN112905280B (en) Page display method, device, equipment and storage medium
CN109685881B (en) Volume rendering method and device and intelligent 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