WO2024040613A1 - 图像处理方法及装置 - Google Patents
图像处理方法及装置 Download PDFInfo
- Publication number
- WO2024040613A1 WO2024040613A1 PCT/CN2022/115288 CN2022115288W WO2024040613A1 WO 2024040613 A1 WO2024040613 A1 WO 2024040613A1 CN 2022115288 W CN2022115288 W CN 2022115288W WO 2024040613 A1 WO2024040613 A1 WO 2024040613A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- preset
- resolution
- frame rate
- electronic device
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 74
- 238000009877 rendering Methods 0.000 claims abstract description 70
- 238000012545 processing Methods 0.000 claims description 138
- 210000003128 head Anatomy 0.000 claims description 118
- 238000004590 computer program Methods 0.000 claims description 36
- 210000001747 pupil Anatomy 0.000 claims description 26
- 238000004891 communication Methods 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 description 17
- 238000001514 detection method Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 12
- 238000012544 monitoring process Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 230000008878 coupling Effects 0.000 description 5
- 238000010168 coupling process Methods 0.000 description 5
- 238000005859 coupling reaction Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 230000008447 perception Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008014 freezing Effects 0.000 description 3
- 238000007710 freezing Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000001427 coherent effect Effects 0.000 description 1
- 238000005094 computer simulation Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000004438 eyesight Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
Definitions
- the present disclosure relates to the technical field of image processing, and in particular, to an image processing method and device.
- an image processing method is provided, which is applied to an electronic device with a display screen.
- the method includes: acquiring multiple frame rates of consecutive multi-frame images within at least a first time period, and electronically
- the device has a first preset frame rate; and a second preset frame rate of the electronic device in a second time period following the first time period is determined based on a plurality of frame rates in at least one first time period.
- the electronic device has multiple preset frame rates, and the above “determines the second preset frame rate of the electronic device in the next second time period of the first time period based on the multiple frame rates in at least one first time period.”
- the method of "setting the frame rate" specifically includes: determining the second preset frame rate of the electronic device in the second time period based on the average of multiple frame rates in at least one first time period.
- the plurality of preset frame rates include a first preset frame rate and a second preset frame rate.
- the first The second preset frame rate is a preset frame rate greater than the first preset frame rate among the plurality of preset frame rates.
- the second preset frame rate is the plurality of preset frames.
- the preset frame rate in the frame rate is less than or equal to the average of multiple frame rates in the first time period.
- the method further includes: in response to a power-on operation, setting an initial preset frame rate of the electronic device to a maximum preset frame rate among the plurality of preset frame rates.
- the method further includes: obtaining the head rotation speed of a user who uses the electronic device in at least a first time period; and determining, based on the user's head rotation speed, the corresponding third time period of the electronic device in the second time period.
- a preset resolution and adjustment of a second preset frame rate The first preset resolution is inversely proportional to the user's head rotation speed.
- the above-mentioned method of "rendering the image in the second time period according to the second preset frame rate" specifically includes: according to the adjusted second preset frame rate and the first preset resolution, in the second time period Render the image.
- the electronic device is provided with multiple preset resolutions.
- the method of "determining the corresponding preset resolution of the electronic device in the second time period based on the rotation speed of the user's head" specifically includes: when the rotation speed of the user's head is greater than the preset speed, determining the resolution of the electronic device in the second time period.
- the corresponding preset resolution within the time period is the first preset resolution among the plurality of preset resolutions.
- the preset resolution of the electronic device in the second time period is determined to be the second preset resolution among the plurality of preset resolutions.
- the second preset resolution is greater than the first preset resolution.
- the second preset frame rate when the user's head rotation speed is greater than the preset speed, the second preset frame rate is adjusted to a third preset frame rate, and the third preset frame rate is greater than one of the plurality of preset frame rates.
- the preset frame rate of the second preset frame rate; when the user's head rotation speed is less than or equal to the preset speed, the second preset frame rate is adjusted to the fourth preset frame rate, and the fourth preset frame The rate is a preset frame rate that is less than the second preset frame rate among the plurality of preset frame rates; wherein the ratio of the second preset resolution to the first preset resolution is less than or equal to the third preset frame rate and the third preset frame rate. Ratio of four preset frame rates.
- an image processing method is provided. Applied to an electronic device with a display screen, the method includes: determining a gaze area corresponding to a user gazing at the display screen at the current time. Obtain the image to be processed and determine the data information of the image in the image to be processed and the gaze area. According to the data information of the image of the gaze area, the image processing complexity of the image of the gaze area is determined. Obtain the image rendering capability of the GPU of the electronic device, and determine the first resolution and first refresh rate corresponding to the image in the gaze area based on the image processing complexity of the gaze area and the image rendering capability of the GPU. According to the first resolution and the first refresh rate, the image of the gaze area is rendered to obtain a rendered image to be processed, and the rendered image to be processed is displayed on the display screen.
- the method further includes determining the image processing complexity of the image to be processed, and determining the target resolution and target refresh rate of the image to be processed based on the image processing complexity of the image to be processed and the image rendering capability of the GPU.
- the method of "determining the first resolution and the first refresh rate corresponding to the image in the gaze area based on the image processing complexity of the image in the gaze area and the image rendering capability of the GPU" specifically includes: based on the target resolution and the image in the gaze area The image processing complexity is determined, and the first resolution is determined, and the target refresh rate is used as the first refresh rate.
- the method of "determining the gaze area corresponding to the user looking at the display screen" specifically includes: obtaining the user's pupil coordinates at the current time, and determining the gaze area corresponding to the user at the current time based on the user's pupil coordinates.
- the electronic device is provided with a sensor for detecting the user's head rotation speed
- the method further includes: obtaining the user's head rotation speed at the current time through the sensor; the above-mentioned "according to the image processing complexity of the image to be processed"
- the method of determining the first resolution and the first refresh rate corresponding to the image in the gaze area specifically includes: based on the image processing complexity of the image in the gaze area and the image rendering capability of the GPU, the user's head The rotational speed determines the first resolution and second refresh rate.
- the method of "determining the image processing complexity of the image in the gaze area based on the data information of the image in the gaze area” specifically includes: determining the image processing complexity of the image in the gaze region based on the data information of the image in the gaze region and the preset complexity database.
- the preset complexity database includes the corresponding relationship between the image data information and the image processing complexity.
- the data information of the image in the gaze area includes one or more of the number of sub-images and the number of layers of the image in the gaze region.
- the product of the target resolution and the target refresh rate is a preset parameter value
- the preset parameter value is related to the configuration information of the electronic device.
- the method further includes: determining a second resolution and a second refresh rate corresponding to the image of the non-gaze area.
- the non-attention area is the area in the display area of the display screen other than the attention area.
- the second resolution is smaller than the first resolution, and the second refresh rate is equal to the first refresh rate. Render the image of the non-gaze area using the second resolution and the second refresh rate to obtain a rendered image of the non-gaze area.
- the second resolution is the difference between the target resolution and the first resolution.
- the method further includes: splicing the rendered image of the gaze area and the rendered image of the non-gaze region to obtain a rendered image to be processed.
- the electronic device is provided with the first API and the second API.
- the first API connects with the sensor.
- the second API is connected to the GPU.
- the method also includes: obtaining the user's head rotation speed through the first API, and obtaining the complexity level of the image to be processed through the second API.
- an image processing device is provided. Applied to electronic equipment with display screens.
- the processing device includes: an acquisition unit, a determination unit and a processing unit.
- the acquisition unit is configured to acquire a plurality of frame rates within at least a first time period, and the electronic device is a first preset refresh rate within the first time period.
- the determining unit is configured to determine a second preset frame rate of the electronic device in a second time period next to the first time period based on a plurality of frame rates in at least one first time period.
- the processing unit is configured to render the image within a second time period according to the second preset frame rate, and display the rendered image through the display screen.
- the frame rate used by the electronic device when rendering the image during the second time period is less than or equal to the second preset frame rate.
- the electronic device has multiple preset frame rates
- the determining unit is specifically configured to: determine the first frame rate of the electronic device in the second time period based on the average of the multiple frame rates in at least one first time period.
- Two preset frame rates The plurality of preset frame rates include a first preset frame rate and a second preset frame rate.
- the second preset frame rate is Set a preset frame rate greater than the first preset frame rate among the frame rates.
- the acquisition unit is further configured to: when the difference between the average of multiple frame rates in the first time period and the first preset frame rate is greater than or equal to the preset value, the second preset frame The rate is a preset frame rate among the plurality of preset frame rates that is less than or equal to an average of the plurality of frame rates within at least one first time period.
- the processing unit is further configured to: in response to the power-on operation, set the initial preset frame rate of the electronic device to the maximum preset frame rate among the multiple preset frame rates.
- the acquisition unit is further configured to: acquire the head rotation speed of the user who uses the electronic device in at least a first time period.
- the determining unit is further configured to: determine the corresponding first resolution of the electronic device within the second time period and adjust the second preset frame rate according to the user's head rotation speed.
- the first resolution is inversely proportional to the user's head rotation speed.
- the processing unit is specifically configured to: render the image within the second time period according to the adjusted second preset frame rate and the first resolution.
- the electronic device is provided with multiple preset resolutions.
- the determining unit is specifically configured to: when the user's head rotation speed is greater than or equal to the preset speed, determine the first resolution to be the first preset resolution among the plurality of preset resolutions. When the user's head rotation speed is less than the preset speed, the first resolution is determined to be the second preset resolution among the plurality of preset resolutions. The second preset resolution is greater than the first preset resolution.
- the determining unit is specifically configured to: when the user's head rotation speed is greater than a preset speed, adjust the second preset frame rate to a third preset frame rate, and the third preset frame rate is greater than The second preset frame rate; when the user's head rotation speed is less than or equal to the preset speed, the second preset frame rate is adjusted to a fourth preset frame rate, and the fourth preset frame rate is less than the second preset frame rate.
- a frame rate wherein the ratio of the second preset resolution to the first preset resolution is less than or equal to the ratio of the third preset frame rate to the fourth preset frame rate.
- an image processing device is provided. Applied to electronic equipment with display screens.
- the processing device includes: a determination unit, an acquisition unit and a processing unit.
- the determining unit is configured to: determine the gaze area corresponding to the user gazing at the display screen at the current time.
- the acquisition unit is configured to: acquire the image to be processed and the image rendering capability of the GPU of the electronic device.
- the determining unit is further configured to: determine the data information of the image of the attention area in the image to be processed, and determine the image processing complexity of the image of the attention area based on the data information of the image of the attention area.
- the determining unit is further configured to: determine the first resolution and the first refresh rate corresponding to the image in the gaze area based on the image processing complexity of the image in the gaze region and the image rendering capability of the GPU.
- the processing unit is configured to: render the image of the gaze area according to the first resolution and the first refresh rate, obtain a rendered image to be processed, and display the rendered image to be processed through the display screen.
- the determining unit is further configured to: determine the image processing complexity of the image to be processed.
- the determining unit is further configured to: determine the target resolution and target refresh rate of the image to be processed based on the image processing complexity of the image to be processed and the image rendering capability of the GPU.
- the determination unit is specifically configured to: determine the first resolution according to the target resolution and the image processing complexity of the image of the gaze area, and use the target refresh rate as the first refresh rate.
- the determining unit is specifically configured to: obtain the pupil coordinates of the user at the current time, and determine the gaze area corresponding to the user at the current time based on the pupil coordinates.
- the electronic device is provided with a sensor for detecting the user's head rotation speed.
- the acquisition unit is further configured to: acquire the user's head rotation speed at the current time through the sensor.
- the determination unit is specifically configured to: determine the first resolution and the first refresh rate based on the image processing complexity of the image in the gaze area, the image rendering capability of the GPU, and the user's head rotation speed.
- the determination unit is specifically configured to: determine the image processing complexity of the image of the gaze area based on the data information of the image of the gaze area and the preset complexity database.
- the preset complexity database includes correspondence between image data information and image processing complexity.
- the data information of the image of the gaze area includes one or more of the number of sub-images and the number of layers of the image of the gaze area.
- the product of the target resolution and the target refresh rate is a preset parameter value.
- the preset parameter value is related to the configuration information of the electronic device.
- the determining unit is further configured to: determine the second resolution and the second refresh rate corresponding to the image of the non-gazing area.
- the non-attention area is the area in the display area of the display screen other than the attention area.
- the second resolution is smaller than the first resolution, and the second refresh rate is equal to the first refresh rate.
- the processing unit is further configured to: render the image of the non-gaze area using the second resolution and the second refresh rate to obtain a rendered image of the non-gaze area.
- the second resolution is the difference between the target resolution and the first resolution.
- the processing unit is further configured to splice the rendered image of the gaze area and the rendered image of the non-glance region to obtain a rendered image to be processed.
- the electronic device is provided with the first API and the second API.
- the first API connects with the sensor.
- the second API is connected to the GPU.
- the acquisition unit is further configured to: acquire the user's head rotation rate through the first API, and acquire the complexity level of the image to be processed through the second API.
- an image processing device including a processor and a communication interface. Communication interface and processor coupling.
- the processor is configured to run computer programs or instructions to implement the image processing method of the first aspect or any embodiment of the first aspect.
- an image processing device including a processor and a communication interface. Communication interface and processor coupling.
- the processor is used to run computer programs or instructions to implement the image processing method of the second aspect or any embodiment of the second aspect.
- a computer-readable storage medium stores computer program instructions.
- the computer program instructions When the computer program instructions are run on a computer (for example, an electronic device), the computer executes the above-mentioned first aspect or any embodiment of the first aspect. image processing methods.
- a computer-readable storage medium stores computer program instructions.
- the computer program instructions When the computer program instructions are run on a computer (for example, an electronic device), the computer executes the above-mentioned second aspect or any embodiment of the second aspect. image processing methods.
- a computer program product includes computer program instructions.
- the computer program instructions When the computer program instructions are executed on a computer (for example, an electronic device), the computer program instructions cause the computer to perform the above-mentioned first aspect or any embodiment of the first aspect. image processing methods.
- a computer program product includes computer program instructions.
- the computer program instructions When the computer program instructions are executed on a computer (for example, an electronic device), the computer program instructions cause the computer to perform the above-mentioned second aspect or any embodiment of the second aspect. image processing methods.
- a computer program is provided.
- the computer program When the computer program is executed on a computer (for example, an electronic device), the computer program causes the computer to execute the image processing method as described in the above first aspect or any embodiment of the first aspect.
- a computer program is provided.
- the computer program When the computer program is executed on a computer (for example, an electronic device), the computer program causes the computer to perform the image processing method as described in the above second aspect or any embodiment of the second aspect.
- Figure 1 is a structural diagram of an electronic device according to some embodiments.
- Figure 2 is a structural diagram of an electronic device according to some embodiments.
- Figure 3 is a structural diagram of an electronic device according to some embodiments.
- Figure 4 is a structural diagram of an electronic device according to some embodiments.
- FIG. 5 is a flowchart of an image processing method according to some embodiments.
- Figure 6 is a flowchart of an image processing method according to some embodiments.
- Figure 7 is a flowchart of an image processing method according to some embodiments.
- Figure 8 is a flowchart of an image processing method according to some embodiments.
- Figure 9 is a flowchart of an image processing method according to some embodiments.
- Figure 10 is a flowchart of an image processing method according to some embodiments.
- Figure 11 is a flowchart of an image processing method according to some embodiments.
- Figure 12 is a flowchart of an image processing method according to some embodiments.
- Figure 13 is a structural diagram of an electronic device according to some embodiments.
- Figure 14 is a structural diagram of an electronic device according to some embodiments.
- Figure 15 is a structural diagram of an electronic device according to some embodiments.
- first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
- At least one of A, B and C has the same meaning as “at least one of A, B or C” and includes the following combinations of A, B and C: A only, B only, C only, A and B The combination of A and C, the combination of B and C, and the combination of A, B and C.
- a and/or B includes the following three combinations: A only, B only, and a combination of A and B.
- the term “if” is optionally interpreted to mean “when” or “in response to” or “in response to determining” or “in response to detecting,” depending on the context.
- the phrase “if it is determined" or “if [stated condition or event] is detected” is optionally interpreted to mean “when it is determined" or “in response to the determination" or “on detection of [stated condition or event]” or “in response to detection of [stated condition or event]”.
- VR Virtual reality
- VR It is a computer simulation system that can create and experience a virtual world. VR can use computers to generate a simulated environment. VR is a system simulation of multi-source information fusion, interactive three-dimensional dynamic vision and entity behavior. Based on VR, users can be immersed in the simulated environment.
- VR technology is an important direction of simulation technology. It is a collection of simulation technology, computer graphics human-computer interface technology, multimedia technology, sensing technology, network technology and other technologies. VR technology mainly includes simulated environment, perception, natural skills and sensing equipment. The simulated environment is a computer-generated, real-time dynamic three-dimensional realistic image. Perception means that under ideal conditions VR should have the perception that all people have. In addition to the visual perception generated by computer graphics technology, it can also include hearing, touch, force, movement and other perceptions, as well as smell and taste, etc., which is also called multi-sensory.
- Refresh rate can be called frame rate.
- the refresh rate refers to how many times per second the image displayed by the display device is redrawn, that is, the number of times the electronic device is refreshed per second, measured in Hertz (Hz).
- Hz Hertz
- a refresh rate of 80Hz or above can be achieved, image flicker and jitter can be completely eliminated, and the user's eyes will not be tired easily.
- Bandwidth is a comprehensive indicator of the monitor and an important indicator of the quality of the monitor.
- Bandwidth refers to the number of images scanned per second, that is, the total number of frequency points displayed on each scanning line per unit time. The unit of bandwidth is Hertz (Hz). When the refresh rate of a monitor is higher, the bandwidth of the monitor is higher.
- Frame number It can be called the frame rate, which refers to the speed at which the display's picture changes. For example, if the number of frames of an electronic device is 60 frames per second (fps), it means that the graphics card generates 60 pictures per second (theoretically, each frame is a different picture). The number of frames is determined by the graphics card. The higher the performance of the graphics card, the higher the frame rate. The higher the frame rate, the smoother the picture of the electronic device. For example, the number of frames is 1/2 of the refresh rate, which means that the graphics card uses one picture every two times it outputs to the monitor.
- the number of frames is 2 times the refresh rate, then for every two changes in the picture, only one of them is sent by the graphics card and displayed on the monitor.
- the graphics card is responsible for rendering images, and the faster the rendering speed, the higher the frame rate and the more images are transferred to the screen.
- the screen is responsible for quickly displaying the image received from the graphics card. The faster it is displayed, the higher the refresh rate. Only when the refresh rate and frame number match can you get a smooth VR experience.
- the graphics card when the frame rate of the electronic device is higher than the refresh rate, the graphics card renders 100 images per second (frames per second 100), but the monitor can only display 60 images per second (refresh rate 60Hz), then The monitor can only display 60 pictures, and the remaining 40 pictures cannot be displayed, which is equivalent to the graphics card doing useless work, which is commonly known as frame loss.
- the graphics card when the graphics card outputs frames faster than the refresh rate of the monitor, the monitor will not be able to process the output frames in time, causing the monitor to display images of different frames, which is commonly known as tearing.
- the monitor when the frame rate is lower than the refresh rate, the monitor will display the picture that the graphics card has rendered multiple times, which is commonly known as jitter.
- the refresh rate directly affects the smoothness of VR applications. Therefore, the VR application itself needs to maintain a high system frame rate to provide the best rendering quality.
- Resolution It can be called resolution and resolution. Resolution refers to the number of dots displayed by the display screen in the horizontal and vertical directions. For example: 1024 ⁇ 768, 1280 ⁇ 1024, etc.
- the "1024" in 1024 ⁇ 768 refers to the number of dots in the horizontal direction of the screen, and "768" refers to the number of dots in the vertical direction of the screen. Resolution determines how detailed the image is. The higher the resolution of an image, the more pixels it contains and the clearer the image.
- electronic devices such as mobile terminals, VR headsets, TVs, etc.
- electronic devices can use high refresh rates and high resolutions to render images to obtain high-definition images and display them HD images are displayed on the screen.
- electronic devices such as mobile terminals, VR headsets, TVs, etc.
- the electronic device can use high refresh rates and high resolutions to render images to obtain high-definition images and display them HD images are displayed on the screen.
- the electronic device as a VR head-mounted device as an example, in the initial stage of using the VR head-mounted device, the resolution and refresh rate of the display of the VR head-mounted device are low, which may cause discomfort to the user. feel. Therefore, in order to improve the user experience, VR headsets can render images using high resolution and high refresh rate.
- the hardware parameter values of electronic devices are fixed.
- the hardware parameter value can have the following relationship with the refresh rate and resolution of the electronic device: v_total*h_total*fps ⁇ dot_clk. v_total*h_total represents the resolution of the electronic device. fps means refresh rate. It can be seen from this relationship that electronic devices cannot infinitely increase the refresh rate or resolution.
- embodiments of the present application provide an image processing method applied to electronic devices.
- the electronic device may be set with multiple preset frame rates.
- the electronic device may select a preset frame rate for the next time period from a plurality of preset frame rates based on multiple frame rates within at least one time period. In this way, based on multiple frame rates of at least one historical time period, the electronic device can dynamically adjust the preset frame rate of the next time period.
- the display solutions of electronic devices generally use a fixed refresh rate and high resolution method to click the screen.
- the complexity of the scene of the image may refer to the number of objects, the number of layers, etc. included in the image.
- the higher the complexity of the image scene the more resources it takes to render the image and the longer it takes to render.
- the power consumption of electronic devices for rendering images will also increase.
- high resolution is not only an important function of electronic device display, but is also limited by the processor performance of the electronic device. Electronic devices cannot display images with high refresh rate and high resolution at the same time.
- embodiments of the present application provide a solution for adaptive refresh rate switching, which can be applied to electronic devices.
- the electronic device can divide the display area of the display screen into a high-definition area and a low-definition area according to the user's gaze point, and use different resolutions to render the images in the high-definition area and the low-definition area, achieving Adaptive switching of resolution.
- the electronic device can also determine the image processing complexity of the current scene based on the current performance of the electronic device's processor and the user's head rotation speed, so that the refresh rate can be flexibly adjusted, thereby improving the smoothness of the picture. , and also reduce the power consumption of electronic equipment.
- Embodiment 2 discusses the technical solution of Embodiment 2 below.
- the electronic device may be a television, a computer, a VR device, or other device with a display screen.
- the VR device can be a head-mounted device.
- the display screen of the electronic device can support refresh in different areas, and the refresh rate of each area can be different.
- the display area of the display screen of the electronic device can be divided into multiple sub-areas, and each sub-area can be displayed at a different refresh rate.
- the electronic device may have multiple control components, and each control component corresponds to a sub-region. There is a driving line between each control component and each display pixel of the corresponding sub-area in the display area. In this way, each control component can control the output of the corresponding sub-area. That is, each control component can control the refresh rate and resolution of the corresponding sub-area.
- Figure 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the electronic device may have a display 110, a processor 120, and a graphics processing unit (GPU) 130.
- the display 110, the processor 120 and the GPU 130 can be communicatively connected.
- the display 110 and the processor 120 may be connected through the system bus 130 .
- the processor 120 may be communicatively connected with the GPU.
- the display 110 may include a display screen/screen, etc.
- Display 110 may be used to display images.
- the display can be a liquid crystal display (LCD), an organic light-emitting diode (organic light-emitting diode, OLED) display, etc.
- LCD liquid crystal display
- OLED organic light-emitting diode
- the processor 120 may include one or more central processing units (Central Processing Units, CPUs).
- the CPU may be used to parse images and perform operations on the electronic device in embodiments of the present application. For example, stitching images, determining the user's gaze area, etc.
- the GPU 130 may be used to determine data information of an image to be rendered and to render the image.
- the electronic device can also be provided with a monitoring module, a software layer and a display module.
- the monitoring module can be used to monitor the performance of the hardware system of the electronic device and the data of external devices of the electronic device.
- External devices of the electronic device may include sensors and image data monitoring modules.
- the image data detection module can be used to detect the data information of the image (such as the number of objects included in the image, the number of layers of the image, etc.).
- the data information of the image can be used to determine the complexity of the image.
- the monitoring module may include a GPU performance monitoring module and a sensor and eye tracking module.
- the GPU performance monitoring module can be used to detect the rendering capabilities of the GPU.
- the rendering capabilities of a GPU can be used to characterize the amount of image data that the GPU can render.
- the sensor is used to obtain the user's head rotation speed.
- the human eye tracking module can be used to detect the user's pupil coordinates.
- the image data detection module can be used to detect image data information.
- the software layer can be used to calculate the complexity of the image based on the performance of the processor, the user's head rotation speed, and the user's pupil coordinates, and calculate the image correspondence of the area based on the data information of the image in the area corresponding to the pupil coordinates. resolution and refresh rate. This enables electronic devices to dynamically adjust resolution and refresh rates.
- the software layer may include an image data detection module. The image data detection module can perform the functions of the software layer.
- the software layer can install an operating system, which can be used to run program code.
- the program code can implement the method provided by the embodiment of this application.
- the operating system can be Android system. It can also be used for other systems without restrictions.
- This operating system can realize unified scheduling interface rendering images based on the Choreographer mechanism and vertical sync (V sync) mechanism.
- the Choreographer mechanism and V sync mechanism can refer to the existing technology and will not be described in detail.
- the electronic device can output the determined frame rate, resolution and refresh rate to the operating system through the application programming interface (application programming interface, API) .
- the application programming interface application programming interface, API
- the operating system can modify the corresponding parameters in the program code according to the received frame rate, resolution and refresh rate.
- the display module may be a display or a display module, and may be used to display the rendered image.
- the GPU monitoring module can be configured with an API for communication.
- This API interface can be used to output the real-time rendering capabilities of the GPU.
- the processor monitoring module can monitor the current rendering capability of the GPU and transmit the real-time rendering capability of the GPU to the processor through the API interface.
- the processor can calculate the resolution and refresh rate corresponding to the image to be processed based on the real-time rendering capability of the GPU and the complexity of the image to be processed. For details, please refer to the subsequent description.
- the processor calculates the resolution and refresh rate of the image to be processed, it can transmit the resolution and refresh rate of the image to be processed to the GPU through this API interface.
- the GPU can render the image to be processed according to the resolution and refresh rate, and obtain the rendered image to be processed.
- the image data detection module can also be provided with an API interface.
- the image data detection module can detect the data amount of the image to be processed after acquiring the data information of the image to be processed, and determine the complexity of the image to be processed based on the data amount of the image to be processed. Furthermore, the image data detection module can output the complexity of the image to be processed through the API interface.
- the method for determining the complexity of the image to be processed may refer to the description of the following embodiments.
- the electronic device can also be equipped with an infrared camera. Infrared cameras can be used to capture images of the user's eyes.
- the electronic device can determine the gaze point of the human eye based on the image of the human eye, and determine the user's gaze area based on the gaze point of the human eye.
- the gaze area may also be called the HD area.
- the electronic device can also be equipped with an infrared fill light.
- infrared fill light electronic devices can use infrared cameras to clearly and accurately capture images of the human eye.
- the electronic device can recognize the human eye image, obtain the human eye's gaze point, and determine the coordinate information of the gaze point based on the human eye gaze point.
- the electronic device can recognize the human eye image according to the preset human eye positioning algorithm and obtain the coordinate information of the human eye's gaze point.
- the human eye positioning algorithm can refer to the existing technology and will not be described in detail.
- the human eye tracking module can transmit the coordinate information of the user's gaze point to the software layer.
- the software layer can use the coordinate information of the gaze point as the center to determine the area corresponding to the display screen (that is, the gaze area).
- the size of the gaze area is a preset shape (such as a rectangle) and the area is a preset value.
- the electronic device may use the area in the display area of the display screen other than the gaze area as the non-glance area.
- the electronic device can also be connected to the server for communication.
- the server can be used to provide image data/video data.
- Embodiment 1 and Embodiment 2
- FIG. 1 The following describes the image processing method provided by the embodiment of the present application (including Embodiment 1 and Embodiment 2) with reference to the electronic device shown in FIG. 1 .
- an image processing method is provided in an embodiment of the present application. This method can be applied to the electronic device shown in FIG. 1 .
- the method may include S501 to S503.
- the electronic device is at the first preset frame rate during the first time period.
- the frame rate, actual frame rate or application frame rate of the electronic device is less than or equal to the first preset refresh rate.
- the plurality of frame rates for at least one time period may include multiple frame rates within one time period or multiple frame rates within each of a plurality of consecutive first time periods. For example, 3 consecutive time periods.
- the length of the first time period can be set as needed, for example, it can be 3 seconds (s), 5s, 6s, etc., without limitation.
- the electronic device may be set with multiple preset frame rates.
- preset frame rates also called frame rate gears
- 120fps 120fps
- 115fps 110fps
- 105fps 100fps
- 95fps 90fps
- 85fps 85fps
- 80fps 75fps
- electronic devices can also be set with more preset refresh rate levels. For example, you can also set 75Hz, 70Hz, 65Hz, etc. without restrictions.
- the frame rate of the image rendered by the electronic device within the period of time is less than or equal to the default frame rate. For example, if the preset frame rate set by the electronic device in time period 1 is 115fps, then in time period 1, the frame rate of the image rendered by the electronic device is less than or equal to 115fps.
- the refresh rate and resolution of the image rendered by the electronic device during this time period may be based on the image rendering capability of the GPU of the electronic device and the image processing complexity of the image. For details, reference may be made to the following Embodiment 2.
- the second time period is a time period next to at least one first time period.
- the plurality of preset frame rates may include a first preset frame rate and a second preset frame rate.
- the electronic device may determine the second preset frame rate of the electronic device in the second time period based on an average of multiple frame rates in at least one first time period.
- the second preset frame rate is greater than one of the multiple preset frame rates.
- the default frame rate for the first preset frame rate is less than a preset value
- the first preset frame rate is 75fpd
- the length of the first time period is 5s
- the preset value is 5.
- the average values of multiple frame rates within three consecutive 5s are 74fps, 73fps, and 73fps respectively.
- the differences between these three averages and 75 are all less than 5, which means that the electronic equipment is relatively stable and can increase Default frame rate for large electronic devices.
- the second preset frame rate can be 80fps, or other preset frame rates greater than 75fps.
- the second preset frame rate is the smaller of the multiple preset frame rates.
- the default frame rate is the average of multiple frame rates in the first time period.
- the first preset frame rate is 120fps.
- the average of multiple frame rates within a certain 5 seconds is 78fps, it means that the frame rate of the electronic device is unstable and the frame rate needs to be adjusted.
- the electronic device can set the preset frame rate for the next 5s after that 5s to 75fps.
- the electronic device may set the initial preset frame rate to the largest preset frame rate among multiple preset frame rates. For example, combined with multiple preset frame rates in S501, when the electronic device is initially powered on, the electronic device can set the preset frame rate to 120fps. In this way, it can be ensured that the electronic device can maximize the utilization of the graphics card when rendering the initial image. Avoid the problem of low utilization of the graphics card due to the default frame rate setting of the electronic device being too low. For example, during the boot stage, the default frame rate of the electronic device is 80fps, but at this time the actual frame rate of the graphics card can reach 110fps. Since the frame rate of the graphics card cannot exceed 80fps, the utilization of the graphics card is low.
- the preset frame rate of the electronic device is 120fps.
- the electronic device can obtain the average of multiple frame rates within 5 seconds of the boot stage. When the difference between the average of multiple frame rates within 5 seconds and 120fps is less than 5, it means that the current frame rate is relatively stable. The electronic device can simply obtain multiple frame rates within the next 5 seconds. When the difference between the average of multiple frame rates within three consecutive 5s and 120fps is less than 5, the electronic device can maintain the current default frame rate. When the difference between the average of multiple frame rates within a certain 5 seconds and 120fps is greater than or equal to 5, it means that the electronic device should adjust the default frame rate. For example, if the average of the multiple frame rates of the 5s is 78fps, the electronic device can adjust the preset frame rate to 75fps within the next 5s of the 5s.
- the electronic device may be provided with one or more buttons.
- the one or more keys can be physical keys or touch keys.
- the one or more buttons may be used to determine a preset refresh rate of the electronic device.
- the electronic device may, in response to the pressing operation of the one or more keys, set the initial refresh rate to a preset refresh rate corresponding to the pressing operation.
- the frame rate used by the electronic device when rendering the image in the second time period is less than or equal to the second preset frame rate.
- the electronic device can call the API of the operating system based on the reflection mechanism of the operating system, find the specific class of the operating system, and call it through the invoke method. And pass the parameter index (index). index indicates the frame rate gear that needs to be switched.
- the operating system of the electronic device can determine the frame rate of rendering the image in the second time period based on the index, and render the image in the second time period based on the frame rate.
- the Invoke method can refer to the existing technology and will not be described in detail.
- the electronic device can determine the preset frame rate for the next time period of the first time period based on at least one first time period and multiple frame rates. That is, the electronic device can dynamically adjust the preset frame rate for the next time period based on multiple frame rates of the previous time period. In this way, the electronic device can adaptively adjust the preset frame rate according to the actual image rendering capability.
- the method may also include S601 to S603.
- the multiple frame rates may refer to frame rates actually used by the electronic device when rendering images in the second time period.
- the fifth preset frame rate is a preset frame rate that is greater than the second preset frame rate among the plurality of preset frame rates.
- the fifth preset frame rate is greater than the second preset frame rate among the multiple preset frame rates.
- the default frame rate for the default frame rate is the default frame rate for the default frame rate.
- the preset value is 2.
- the preset frame rate of the electronic device is 110fps during the second time period.
- the electronic device can increase the preset frame rate.
- the preset frame rate can be adjusted to 115fps during the third time period. Subsequently, in the third time period, if the difference between the average of multiple frame rates and 115fps is less than the preset value, the electronic device can continue to increase the preset frame rate.
- the electronic device adjusts the default frame rate to 120fps.
- the electronic device increases the preset frame rate by the maximum preset frame rate among multiple preset frame rates, if the difference between the multiple frame rates in the subsequent time period and the maximum preset frame rate is less than the preset value , the electronic device can maintain the maximum preset frame rate.
- the upper limit of the preset frame rate of the electronic device can be increased to improve the utilization of the graphics card.
- the electronic device may also determine the preset frame rate of the electronic device in the third time period based on the average of multiple frame rates in at least one first time period and multiple frame rates in the second time period. .
- the fourth preset refresh rate is smaller than the second preset frame rate among the plurality of preset frame rates.
- the electronic device when the difference between the average of multiple frame rates and the second preset refresh rate is greater than the preset value, it means that the image rendering capability of the graphics card of the electronic device during the second time period cannot reach the second preset value. refresh rate. Therefore, the electronic device can continue to reduce the preset frame rate of the electronic device, and render the image in the third time period according to the reduced preset frame rate.
- the electronic device when the difference between the average of multiple frame rates and the second preset refresh rate is greater than the first threshold and less than or equal to the second threshold, the electronic device can continue to use the second preset frame rate. Render the image during the third time period.
- the second threshold is greater than the first threshold.
- the difference between the two is greater than the first threshold and less than or equal to the second threshold, it means that the image rendering capability of the electronic device cannot reach the second preset frame rate, but is close to the second preset frame rate.
- the electronic device can render the image in the third time period according to using the second preset frame rate to ensure maximum utilization of the GPU.
- the electronic device may render the image in the third time period according to the fourth preset frame rate.
- the electronic device when the refresh rate of the image is relatively stable in multiple consecutive time periods, the electronic device can increase the preset frame rate. In this way, a higher frame rate can be used to render the image in subsequent time periods, with a maximum
- the graphics card is utilized to a certain extent.
- the method provided by the embodiment of the present application may also include S701 to S702.
- the electronic device may be provided with one or more sensors.
- the one or more sensors may be used to detect the speed of the user's head rotation. In this way, the electronic device can obtain the head rotation speed of the user who uses the electronic device in the second time period through the one or more sensors.
- the electronic device when the electronic device is a head-mounted device, the electronic device may be provided with a gyroscope.
- a gyroscope can be used to obtain the user's head rotation speed. In this way, the electronic device can use the gyroscope to obtain the head rotation speed of the user who uses the electronic device in the second time period.
- the electronic device can obtain the linear acceleration of the gyroscope in multiple directions, and calculate the corresponding velocity component (that is, the user's head rotation speed) based on the linear acceleration in each direction.
- the electronic device can obtain multiple sets of speed data from the gyroscope.
- a set of velocity data includes velocity components corresponding to each direction. Abnormal data in multiple sets of speed data (such as a set of speed data that suddenly increases/decreases) can be deleted. In this way, jumping phenomenon can be prevented.
- the electronic device when the electronic device is a television or a mobile device, the electronic device can capture multiple frames of head images of the user in the second time period through the camera, and identify the multiple frames of head images to determine the user. head rotation angle. Furthermore, the electronic device can determine the user's head rotation speed based on the ratio of the user's head rotation angle to the second time period.
- the user's head rotation speed is inversely proportional to the preset resolution. That is, the faster the user's head turns, the less attention the user pays to the display screen, and the electronic device can use a lower resolution to render the image to reduce the power consumption of the electronic device. The slower the user's head rotation speed is, the more attention the user pays to the display screen.
- the electronic device can use a higher resolution to render the image to improve the high definition of the image and enhance the user experience.
- the electronic device adjusting the second preset frame rate according to the user's head rotation speed includes: when the user's head rotation speed is greater than the preset speed, adjusting the preset frame rate in the second time period to a plurality of preset frames. Set the frame rate to a preset frame rate that is greater than the second preset frame rate; when the user's head rotation speed is less than or equal to the preset speed, adjust the preset frame rate in the second time period to multiple preset frames The preset frame rate in the frame rate is less than the second preset frame rate.
- the electronic device can be set with multiple preset resolutions (for example, including a first preset resolution and a second preset resolution, the first preset resolution being smaller than the second preset resolution) .
- the electronic device can set the preset resolution to the first preset resolution; when the user's head rotation speed in the first time period is less than When presetting the speed, the electronic device can set the preset resolution to the second preset resolution.
- the electronic device when the electronic device determines that the user is in motion, the electronic device can reduce the resolution. In this way, the power consumption of the electronic device can be reduced.
- the electronic device can increase the resolution when the electronic device determines that the user is stationary. In this way, user experience can be improved.
- the electronic device can also be set with more preset resolutions and a head rotation speed range corresponding to each preset resolution. In this way, the electronic device can determine a head rotation speed range that matches the head rotation speed of the user, and determine a corresponding preset resolution based on the head rotation speed range.
- the resolution of the image rendered by the electronic device within the time period is less than or equal to the preset resolution.
- the electronic device can determine whether the user is in a stationary state or in motion based on the velocity components of the gyroscope in various directions. For example, if the speed components of the gyroscope in all directions are less than the corresponding preset speed, the electronic device can determine that the user is in a stationary state. If there is a speed component greater than or equal to the preset speed among the speed components of the gyroscope in each direction, the electronic device can determine that the user is in a state of motion.
- the electronic device can determine that the user is in motion.
- the electronic device when the user is in a motion state, can adjust the second preset frame rate to a third preset frame rate, and the third preset frame rate is greater than the third preset frame rate among multiple preset frame rates. 2. Default frame rate.
- the electronic device may adjust the second preset frame rate to a fourth preset frame rate, and the fourth preset frame rate is smaller than the second preset frame rate among the plurality of preset frame rates. frame rate.
- the ratio of the second preset resolution to the first preset resolution is less than or equal to the ratio of the third preset frame rate to the fourth preset frame rate.
- the third preset frame rate is 120fps
- the fourth preset frame rate is 30fps.
- the ratio of the second preset resolution to the first preset resolution may be less than or equal to 4.
- the first preset resolution may be 676X720
- the second preset resolution may be 1352X1440.
- the electronic device can flexibly adjust the resolution of the electronic device according to the user's head rotation speed.
- a lower resolution can be used to render the image to reduce the power consumption of the electronic device.
- the image can be rendered at a higher resolution to improve the user experience.
- the method of rendering the image in the second time period according to the second preset refresh rate in S503 and displaying the rendered image on the display screen can be implemented specifically through S703.
- the electronic device can render the image according to the preset resolution and frame rate. Since the resolution is related to the user's head rotation speed, and the frame rate is related to multiple frame rates in the previous time period, the electronic device can render the image based on the resolution and refresh rate, which is flexible and convenient.
- the preset frame rate of the electronic device may be the maximum value among multiple preset frame rates.
- the electronic device may also determine the refresh rate in the second time period based on the refresh rate of multiple consecutive frames of images in at least one first time period.
- the preset frame rate in Embodiment 1 can be replaced with a preset refresh rate.
- Embodiment 1 when the electronic device determines the actual resolution used when rendering an image in each time period, it may also combine the user's gaze area and the image complexity of the image in the gaze area. That is, after the electronic device determines the preset resolution for a certain time period, the electronic device can adjust the resolution according to the user's gaze area and the image complexity of the image in the gaze area within the time period.
- Implementation 2 For details, reference may be made to the description of Implementation 2 below.
- an image processing method is provided in an embodiment of the present application. This method can be applied to the electronic device shown in FIG. 1 .
- the method may include S801 to S804.
- the shape of the gaze area is a preset shape. For example, it can be a rectangle, etc.
- the size of the gaze area is the preset area.
- the center point of the gaze area is the user's gaze point.
- the user's gaze point may be the user's pupil coordinates.
- the electronic device can determine the user's corresponding gaze area based on the user's pupil coordinates at the current time.
- the electronic device can capture the user's human eye image through an infrared camera, identify the user's human eye image, and obtain the user's human eye gaze point (that is, the gaze direction of the pupil). Then, the electronic device can input the user's human eye gaze point into the preset pupil coordinate determination model to obtain the user's pupil coordinates.
- the preset pupil coordinate determination model can be used to determine the pupil coordinates of the user.
- the electronic device may be preset with a preset coordinate system.
- the origin of the preset coordinate system may be a point in the display area (such as the lower left corner of the display area).
- the two axes of the preset coordinate system are respectively parallel to the boundary lines of the display area.
- the electronic device After determining the user's pupil coordinates, the electronic device can expand the pupil coordinates as the center until it extends to a preset area to obtain the user's gaze area.
- the electronic device can use the upper and lower boundaries of the display area as the boundaries of the gaze area, and use the pupil coordinates as the starting point to extend a preset length to the left and right sides of the display area to obtain the gaze area.
- the product of the preset length and the distance between the upper and lower boundaries of the display area ie, the width of the display area is the preset area.
- the image to be processed may refer to an image that the electronic device needs to display at the current moment.
- the data information of the image to be processed may refer to the number of objects, the number of layers, etc. included in the image to be processed.
- Objects may refer to people, objects, etc. included in the image to be processed.
- Image processing complexity can also be called image complexity, complexity, picture complexity, complexity level, scene complexity, etc.
- Image processing complexity can be used to characterize the processing resources required to render an image. The higher the image processing complexity of an image, the more processing resources are required to render the image.
- the electronic device can obtain multiple consecutive frames of video data in response to the user's playback operation. In this way, the electronic device can acquire each frame of image in sequence and process each frame of image. If the image displayed by the electronic device at the current moment is image 1, the next frame of image 1 is used as the image to be processed.
- the electronic device may determine the size of the image of the gaze area based on the product of the image to be processed and the first numerical value.
- the first value may be a ratio between the area of the gaze area and the area of the display area of the display screen.
- the position information of the image of the gaze area in the image to be processed can be determined based on the coordinate information of the gaze point.
- the center point of the image of the gaze area in the image to be processed is the coordinate information of the gaze point. Then, the electronic device can analyze and identify the image of the gaze area, and obtain the data information of the image of the gaze area.
- the electronic device can identify the image of the gaze area and determine the number of objects in the image of the gaze area. For example, the electronic device can perform clustering based on the pixels of the image in the gaze area to obtain the number of clusters in the image in the gaze area. One cluster corresponds to one object. For another example, the electronic device can analyze the image of the gaze area and obtain the number of layers of the image of the gaze area.
- the electronic device can process the image of the gaze area according to a preset recognition algorithm to obtain data information of the image of the gaze area.
- the electronic device can input the image of the gaze area into a preset detection model to obtain data information of the image of the gaze area.
- the preset detection model is used to determine the data information of the image.
- the electronic device can determine the complexity of the image of the gaze area based on the data information of the image of the gaze area.
- the electronic device can determine the image processing complexity of the image of the gaze area based on the data information of the image of the gaze area and the preset complexity database.
- the preset complexity database can be pre-configured for the electronic device.
- the preset complexity database includes correspondence between image data information and image processing complexity. For example, taking the data information including the number of objects in an image as an example, the preset complexity database may include a correspondence between the number of objects and the complexity of image processing. The larger the number of objects, the greater the corresponding image processing complexity. In this way, the electronic device can quickly and accurately determine the image processing complexity of the image of the gaze area based on the preset complexity database.
- the image rendering capability of the GPU may refer to the amount of image data that the GPU can render at the current time.
- the electronic device can obtain the image rendering capability of the GPU through the GPU monitoring module.
- the electronic device can determine the target resolution and target refresh rate of the image to be processed based on the image rendering capability of the GPU, the image processing complexity of the image to be processed, and the first preset correspondence relationship (it can also be called optimal resolution and optimal refresh rate).
- the method for determining the image processing complexity to be processed beforehand may refer to the image processing complexity of the image of the attention area mentioned above. No further details will be given.
- the first preset correspondence may be the image rendering capability of the GPU and the correspondence between resolution and refresh rate.
- the product of the target resolution and the target refresh rate is the preset parameter value.
- the preset parameter value is related to the configuration information of the electronic device.
- the configuration information of the electronic device may include the type and capability of the processor of the electronic device, the type and capability of the GPU, the operating system, etc.
- the preset parameter value may be the dot_clk value of the electronic device.
- the target resolution and target refresh rate are related to the complexity of the image to be processed.
- the complexity of the image to be processed is high, a lower resolution can be used to avoid image lag. In this way, electronic devices can also reduce power consumption.
- the complexity of the image to be processed is low, a higher resolution can be used to improve the user experience.
- the electronic device determines multiple resolutions based on the image rendering capability and image processing complexity of the GPU, as well as the first preset correspondence. For example, the resolution determined by the electronic device includes resolution 1 and resolution 2, and resolution 1 is greater than resolution 2.
- the target resolution may be resolution 2; when the image processing complexity is less than the preset level, the target resolution may be resolution 1.
- the electronic device can reduce the resolution 3 and use the reduced resolution 3 as the target. resolution.
- the electronic device can increase the refresh rate and use the increased refresh rate as the target refresh rate.
- the electronic device may also determine the refresh rate without adjustment.
- the electronic device can determine the image of the gaze area and the image processing complexity of the image of the gaze area, and determine the image processing complexity and target of the image of the gaze area.
- Resolution determines the first resolution.
- the first refresh rate is the target refresh rate.
- the gaze area can determine the image of the gaze area in the image to be processed based on the position of the gaze area in the display area.
- the method for determining the image processing complexity of the image of the attention area can refer to the above-mentioned method for determining the image processing complexity of the image to be processed, which will not be described again.
- the electronic device may calculate the first resolution based on the product of the first numerical value and the target resolution.
- the first value is greater than 0 and less than 1.
- the first value may be related to the image processing complexity of the image of the gaze area.
- the first numerical value may be the sum of the ratio of the image processing complexity of the image in the gaze area to the image processing complexity of the image to be processed and the preset adjustment coefficient.
- the default adjustment coefficient is greater than 0.
- the preset adjustment coefficient can be set as needed.
- S805 Render the image of the gaze area according to the first resolution and the first refresh rate, obtain the rendered image to be processed, and display the rendered image to be processed on the display screen.
- the technical solution provided by the embodiment of the present application can flexibly adjust the resolution of the image according to the image processing complexity of the image to be processed.
- the electronic device can determine the user's gaze area based on the user's pupil coordinates. Then, the electronic device determines the resolution and refresh rate corresponding to the image in the gaze area based on the image processing complexity of the image to be processed and the image rendering capability of the GPU, and renders the image in the gaze area.
- the electronic device can adaptively and flexibly adjust the resolution according to the user's gaze point and the complexity of the image. . Therefore, compared with using a fixed resolution to render images, the technical solution of the embodiment of the present application can flexibly adjust the resolution according to the image processing complexity of the image, thereby improving the smoothness of the display of the image.
- the method may also include S901.
- the sensor may be a head sensor. This sensor can be used to obtain the user's head rotation speed.
- the sensor can detect the user's head rotation speed in real time.
- the sensor can capture head images of the user at multiple moments through the camera of the electronic device, and determine the rotation speed of the head based on the multiple head images of the user. For example, in the head image at the first moment, the user's head is at position 1. In the head image at the second moment, the user's head is at position 2. The first moment is the moment immediately preceding the second moment. Then the user's head rotation speed is (position 2 - position 1)/(second time - first time).
- the sensor can start to detect the user's head rotation speed in response to the user's operation to trigger video playback, and send the detected user's head rotation speed to the processor of the electronic device.
- S902. Determine the first resolution and the first refresh rate corresponding to the image in the gaze area based on the image processing complexity of the image in the gaze area, the image rendering capability of the GPU, and the user's head rotation speed.
- the user's head rotation speed is inversely proportional to the image resolution.
- the user's head rotation speed can be used to reflect the user's attention to the image. The faster the user's head turns, the less attention the user pays to the image. The slower the user's head rotation speed is, the higher the user's attention to the image is.
- the electronic device after the electronic device determines the resolution and refresh rate of the image in the gaze area based on the data information of the image in the gaze area and the image rendering capability of the GPU, it can resolve the image in the gaze region based on the rotation speed of the user's head. rate and use the adjusted resolution as the first resolution.
- the electronic device may reduce the resolution of the image of the gaze area.
- the electronic device can increase the resolution of the image of the gaze area.
- the electronic device can adjust the resolution of the image with preset coefficients.
- the electronic device can be adjusted or left unchanged. For example, in order to reduce the calculation amount of the electronic device, the electronic device may not adjust the refresh rate of the gaze area. For another example, in order to reduce the power consumption of the electronic device when rendering images, the electronic device can reduce the refresh rate of the image in the gaze area.
- the electronic device may determine the first resolution and the first refresh rate based on the data information of the image of the gaze area, the image rendering capability of the GPU, the user's head rotation speed, and the second preset correspondence.
- the second preset correspondence is the correspondence between the image data information, the image rendering capability of the GPU, the head rotation speed, the resolution, and the refresh rate.
- the second preset correspondence relationship may be preconfigured for the electronic device.
- the electronic device can flexibly adjust the resolution of the gaze area according to the user's head rotation speed.
- the method may also include S1001 and S1002.
- the non-attention area refers to other areas in the display area of the display except the attention area.
- the second resolution is less than or equal to the first resolution. For example, after determining the target resolution, the electronic device may determine the second resolution based on the difference between the target resolution and the first resolution. Alternatively, the electronic device may also reduce the first resolution and use the reduced first resolution as the second resolution. The sum of the first resolution and the second resolution is less than or equal to the target resolution.
- the electronic device may use the first refresh rate as the refresh rate of the image in the non-gazing area, that is, the first refresh rate is equal to the second refresh rate.
- the electronic device may reduce the first refresh rate and use the reduced first refresh rate as the second refresh rate.
- the electronic device can use a lower resolution and refresh rate to render the image, reducing the power consumption of image rendering.
- the method may also include S1101.
- the images of the two regions can be spliced (also called patch processing) to obtain the rendered image to be processed, ensuring that the image to be processed is Process image integrity.
- the GPU can transmit the rendered image of the gaze area and the rendered image to the software layer of the electronic device through the API interface.
- the software layer of the electronic device can splice the rendered image of the gaze area and the rendered image of the non-gaze area to obtain a rendered image to be processed. Then, the software layer of the electronic device can transmit the rendered image to be processed to the display module/display, so that the display can display the rendered image to be processed.
- the electronic device can splice the rendered image of the gaze area and the rendered image of the non-gaze region, and display the spliced image on the display. Since the image of the gaze area in the spliced image is a high-definition image, the user's demand for high-definition images is met.
- this embodiment of the present application provides an image processing method, which may include S1201 to S1211.
- the infrared camera captures the user's human eye image, determines the user's gaze point based on the user's human eye image, and transmits the user's gaze point to the processor.
- the processor determines the position information of the gaze area according to the user's gaze point, and transmits the position information of the gaze area to the complexity calculation module.
- S1201 and S1202 may refer to the description of S802 above, and will not be described again.
- the image data detection module determines the data information of the image to be processed, and sends the data information of the image to be processed to the complexity calculation module.
- the GPU monitoring module monitors the image rendering capability of the GPU and transmits the image rendering capability of the GPU to the complexity calculation module.
- the complexity calculation module calculates the image processing complexity of the image in the gaze area and the image processing complexity of the image to be processed, and transmits the image processing complexity of the image in the gaze region and the image processing complexity of the image to be processed to the processor.
- S1203 to S1205 may refer to the description of S801 above, and will not be described again.
- the display calculation module calculates the target resolution and target refresh rate of the image to be processed.
- the processor calculates the first resolution and the first refresh rate corresponding to the image of the gaze area based on the image processing complexity of the gaze area, the target resolution, and the target refresh rate.
- the processor calculates the second resolution and the second refresh rate of the non-gazing area, and transmits the first resolution, the first refresh rate, the second resolution and the second refresh rate to the GPU.
- S1206 to S1208 may refer to the description of S803 above, and will not be described again.
- the GPU renders the image of the gaze area according to the first resolution and the first refresh rate, renders the image of the non-gaze area according to the second resolution and the second refresh rate, and transmits the rendered gaze area to the processor.
- the image and the rendered image of the non-gaze area are the same.
- the processor splices the rendered image of the gaze area and the rendered image of the non-glance area to obtain a rendered image to be processed, and sends the rendered image to be processed to the display.
- the display displays the rendered image to be processed.
- the technical solution provided by the embodiment of the present application can flexibly adjust the resolution of the image according to the image processing complexity of the image to be processed.
- the electronic device can determine the user's gaze area based on the user's pupil coordinates. Then, the electronic device determines the resolution and refresh rate corresponding to the image in the gaze area based on the image processing complexity of the image to be processed and the image rendering capability of the GPU, and renders the image in the gaze area.
- the electronic device can adaptively and flexibly adjust the resolution according to the user's gaze point and the complexity of the image. . Therefore, compared with a fixed resolution, the smoothness of the screen display can be improved.
- the method provided by the embodiments of the present application may further include: obtaining the power consumption of the electronic device, and adjusting at least one of the resolution, refresh rate, or frame rate of the electronic device according to the power consumption of the electronic device.
- the power consumption of the electronic device may include the power of the electronic device for rendering images.
- the electronic device can obtain the current and voltage of the electronic device, and calculate the power consumption of the electronic device based on the current and voltage.
- the electronic device may reduce at least one of the resolution, refresh rate, or frame rate of the electronic device.
- the electronic device renders the image using a first preset resolution, a first refresh rate, and a first preset frame rate within a first period of time.
- the electronic device can use the second preset resolution, and/or the second refresh rate, and/or the first preset time period in the second time period.
- the second preset resolution is smaller than the first preset resolution.
- the second refresh rate is less than the second refresh rate.
- the second preset frame rate is less than the first preset frame rate.
- the electronic device can also adjust at least one of the resolution, refresh rate or frame rate in the first time period according to the current remaining power of the electronic device, and use the adjusted resolution, refresh rate or frame rate in the second time period. Render the image in two time periods.
- the resolution after adjustment is smaller than the resolution before adjustment.
- the refresh rate after adjustment is smaller than the resolution before adjustment.
- the frame rate after adjustment is less than the frame rate before adjustment.
- Embodiments of the present application can divide the image processing device into functional modules or functional units according to the above method examples.
- each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one in the processing module.
- the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules or functional units.
- the division of modules or units in the embodiments of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
- FIG. 13 it is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
- the image processing device is applied to an electronic device with a display screen.
- the device includes: an acquisition unit 1301, a determination unit 1302 and a processing unit 1303. .
- the acquisition unit 1301 is configured to acquire a plurality of frame rates within at least a first time period, in which the electronic device is at a first preset frame rate.
- the determining unit 1302 is configured to determine a second preset frame rate of the electronic device in a second time period next to the first time period based on a plurality of frame rates in at least one first time period.
- the processing unit 1303 is configured to render the image within the second time period according to the second preset frame rate, and display the rendered image through the display screen.
- the refresh rate used by the electronic device when rendering the image during the second time period is less than or equal to the second preset frame rate.
- the electronic device has multiple preset frame rates
- the determining unit 1302 is specifically configured to: determine, based on the average of the multiple frame rates in at least one first time period, the electronic device's frame rate in the second time period. second preset frame rate.
- the plurality of preset frame rates include a first preset frame rate and a second preset frame rate.
- the second preset frame rate is Set the default frame rate to the first default frame rate greater than the frame rate.
- the acquisition unit 1301 is further configured to: when the difference between the average of multiple frame rates in the first time period and the first preset frame rate is greater than or equal to the preset value, the second preset The frame rate is a preset frame rate among the plurality of preset frame rates that is less than or equal to an average of the plurality of frame rates within at least one first time period.
- the processing unit 1303 is further configured to: in response to the power-on operation, set the initial preset frame rate of the electronic device to the maximum preset frame rate among the multiple preset frame rates.
- the obtaining unit 1301 is further configured to: obtain the head rotation speed of the user who uses the electronic device in at least a first time period.
- the determination unit 1302 is further configured to: determine the corresponding first resolution of the electronic device within the second time period and adjust the second preset frame rate according to the user's head rotation speed.
- the first resolution is inversely proportional to the user's head rotation speed.
- the processing unit 1303 is specifically configured to render the image within the second time period according to the adjusted second preset frame rate and the first resolution.
- the electronic device is provided with multiple preset resolutions.
- the determination unit 1302 is specifically configured to: when the user's head rotation speed is greater than or equal to the preset speed, determine that the first resolution corresponding to the electronic device in the second time period is the first of the plurality of preset resolutions. Default resolution. When the user's head rotation speed is less than the preset speed, the resolution of the electronic device in the second time period is determined to be the second preset resolution among the plurality of preset resolutions. The second preset resolution is greater than the first preset resolution.
- the determining unit 1302 is specifically configured to: when the user's head rotation speed is greater than the preset speed, adjust the second preset frame rate to the third preset frame rate, and the third preset frame rate is greater than the second preset frame rate; when the user's head rotation speed is less than or equal to the preset speed, the second preset frame rate is adjusted to the fourth preset frame rate, and the fourth preset frame rate is less than the second preset frame rate.
- a preset frame rate wherein the ratio of the second preset resolution to the first preset resolution is less than or equal to the ratio of the third preset frame rate to the fourth preset frame rate.
- FIG 14 it is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
- the image processing device is applied to electronic equipment with a display screen.
- the device includes: a determination unit 1401, an acquisition unit 1402 and a processing unit 1403. .
- the determining unit 1401 is configured to determine the gaze area corresponding to the user who gazes at the display screen at the current time.
- the acquisition unit 1402 is configured to: acquire the image to be processed and the image rendering capability of the GPU of the electronic device.
- the determination unit 1401 is further configured to: determine the data information of the image of the attention area in the image to be processed, and determine the image processing complexity of the image of the attention area based on the data information of the image of the attention area.
- the determination unit 1401 is further configured to determine the first resolution and the first refresh rate corresponding to the image of the gaze area based on the image processing complexity of the image of the gaze region and the image rendering capability of the GPU.
- the processing unit 1403 is configured to: render the image of the gaze area according to the first resolution and the first refresh rate, obtain a rendered image to be processed, and display the rendered image to be processed through the display screen.
- the determining unit 1401 is further configured to determine the image processing complexity of the image to be processed.
- the determination unit 1401 is also configured to determine the target resolution and target refresh rate of the image to be processed based on the image processing complexity of the image to be processed and the image rendering capability of the GPU.
- the determination unit 1401 is specifically configured to: determine the first resolution according to the target resolution and the image processing complexity of the image of the gaze area, and use the target refresh rate as the first refresh rate.
- the determining unit 1401 is specifically configured to: obtain the pupil coordinates of the user at the current time, and determine the gaze area corresponding to the user at the current time based on the pupil coordinates.
- the electronic device is provided with a sensor for detecting the user's head rotation speed.
- the acquisition unit 1402 is also configured to acquire the user's head rotation speed at the current time through the sensor.
- the determination unit 1401 is specifically configured to determine the first resolution and the first refresh rate based on the image processing complexity of the image in the gaze area, the image rendering capability of the GPU, and the user's head rotation speed.
- the determining unit 1401 is specifically configured to: determine the image processing complexity of the image of the gaze area based on the data information of the image of the gaze area and the preset complexity database.
- the preset complexity database includes correspondence between image data information and image processing complexity.
- the data information of the image of the gaze area includes one or more of the number of sub-images and the number of layers of the image of the gaze area.
- the product of the target resolution and the target refresh rate is a preset parameter value.
- the preset parameter value is related to the configuration information of the electronic device.
- the determining unit 1401 is further configured to determine the second resolution and the second refresh rate corresponding to the image of the non-gazing area.
- the non-attention area is the area in the display area of the display screen other than the attention area.
- the second resolution is smaller than the first resolution, and the second refresh rate is equal to the first refresh rate.
- the processing unit 1403 is further configured to render the image of the non-attention area using the second resolution and the second refresh rate to obtain a rendered image of the non-attention area.
- the second resolution is the difference between the target resolution and the first resolution.
- the processing unit 1403 is further configured to splice the rendered image of the gaze area and the rendered image of the non-glance region to obtain a rendered image to be processed.
- the electronic device is provided with the first API and the second API.
- the first API connects with the sensor.
- the second API is connected to the GPU.
- the obtaining unit 1402 is also configured to: obtain the user's head rotation rate through the first API, and obtain the complexity level of the image to be processed through the second API.
- the acquisition unit 1402 in the embodiment of the present application can be integrated on the communication interface, and the determination unit 1401 and the processing unit 1403 can be integrated on the processor.
- the specific implementation is shown in Figure 15.
- FIG. 15 shows a schematic structural diagram of another possible communication device of the image processing device involved in the above embodiment.
- the communication device includes: a processor 1502 and a communication interface 1503.
- the processor 1502 is used to control and manage the actions of the device, for example, to perform the steps performed by the above-mentioned determining unit 1401 and the processing unit 1403, and/or to perform other processes of the technology described herein.
- the communication interface 1503 is used to support communication between the device and other network entities, for example, performing the steps performed by the above-mentioned acquisition unit 1402.
- the device may also include a memory 1501 for storing program code and data for the device, and a bus 1504.
- the memory 1501 may be a memory in the device, etc.
- the memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or Solid state drive; the memory may also include a combination of the above types of memory.
- the above-mentioned processor 1502 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of this application.
- the processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
- the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
- the bus 1504 may be an Extended Industry Standard Architecture (EISA) bus or the like.
- EISA Extended Industry Standard Architecture
- the bus 1504 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only one thick line is used in Figure 15, but it does not mean that there is only one bus or one type of bus.
- the device in Figure 15 can also be a chip.
- the chip includes one or more (including two) processors 1502 and communication interfaces 1503.
- the chip also includes a memory 1501.
- the memory 1501 may include a read-only memory and a random access memory, and provides operating instructions and data to the processor 1502.
- Part of the memory 1501 may also include non-volatile random access memory (NVRAM).
- NVRAM non-volatile random access memory
- memory 1501 stores elements, execution modules, or data structures, or subsets thereof, or extended sets thereof.
- the corresponding operation is performed by calling the operation instructions stored in the memory 1501 (the operation instructions can be stored in the operating system).
- Some embodiments of the present disclosure provide a computer-readable storage medium (eg, a non-transitory computer-readable storage medium) having computer program instructions stored therein, and the computer program instructions are stored in a computer (eg, electronic When running on the device), the computer is caused to execute the image processing method as described in any of the above embodiments.
- a computer-readable storage medium eg, a non-transitory computer-readable storage medium
- the computer program instructions are stored in a computer (eg, electronic When running on the device), the computer is caused to execute the image processing method as described in any of the above embodiments.
- the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (such as hard disks, floppy disks or tapes, etc.), optical disks (such as CD (Compact Disk, compressed disk), DVD (Digital Versatile Disk, etc.) Digital versatile disk), etc.), smart cards and flash memory devices (e.g., EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), cards, sticks or key drives, etc.).
- the various computer-readable storage media described in this disclosure may represent one or more devices and/or other machine-readable storage media for storing information.
- the term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
- Some embodiments of the present disclosure also provide a computer program product, for example, the computer program product is stored on a non-transitory computer-readable storage medium.
- the computer program product includes computer program instructions.
- the computer program instructions When the computer program instructions are executed on a computer (eg, electronic device), the computer program instructions cause the computer to perform the image processing method as described in the above embodiments.
- Some embodiments of the present disclosure also provide a computer program.
- the computer program When the computer program is executed on a computer (for example, an electronic device), the computer program causes the computer to perform the image processing method as described in the above embodiments.
- the disclosed systems, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
一种图像处理方法,应用于具有显示屏的电子设备。该方法包括:获取至少一个第一时间段多个帧率,其中,在第一时间段内电子设备为第一预设帧率;根据至少一个第一时间段的多个帧率,确定第一时间段之后的第二时间段的第二预设帧率;根据第二预设刷新率,在第二时间段内对图像进行渲染,并通过显示屏显示渲染后的图像。
Description
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法及装置。
随着图像处理技术的发展,用户对电子设备的显示器的显示效果要求越来越高,厂商为了满足用户所需,开始追求更高要求的显示效果,例如,纷纷采用支持高刷新率和高分辨率的屏幕,以实现更连贯流畅的动态显示。
随着刷新率和分辨率的不断增加,对电子设备的处理器的性能要求也越来越高。但是,电子设备的处理器的性能是有上限的,在满足用户对高分辨率图像的需求的同时,若使用高刷新率对图像进行刷新,则可能会出现画面丢帧、画面卡顿等问题。
发明内容
一方面,提供了一种图像处理方法,应用于具有显示屏的电子设备,该方法包括:获取至少一个第一时间段内连续的多帧图像的多个帧率,在第一时间段内电子设备为第一预设帧率;根据至少一个第一时间段内多个帧率,确定第一时间段的下一个第二时间段内电子设备的第二预设帧率。根据第二预设帧率,在第二时间段内对图像进行渲染,并通过显示屏显示渲染后的图像;在第二时间段内电子设备渲染图像时使用的刷新率小于或等于第二预设帧率。
在一些实施例中,电子设备具有多个预设帧率,上述“根据至少一个第一时间段内多个帧率,确定第一时间段的下一个第二时间段内电子设备的第二预设帧率”的方法具体包括:根据至少一个第一时间段内多个帧率的均值,确定在第二时间段内电子设备的第二预设帧率。多个预设帧率包括第一预设帧率和第二预设帧率。
在一些实施例中,当在至少一个第一时间段中每个第一时间段内的多个帧率的均值与第一预设帧率的之间的差值均小于预设值时,第二预设帧率为多个预设帧率中大于第一预设帧率的预设帧率。
在一些实施例中,当第一时间段内的多个帧率的均值与第一预设帧率之间的差值大于或等于预设值,第二预设帧率为多个预设帧率中小于或等于第一时间段内多个帧率的均值的预设帧率。
在一些实施例中,该方法还包括:响应于开机操作,将电子设备的初始预设帧率设置为多个预设帧率中最大预设帧率。
在一些实施例中,该方法还包括:获取在至少一个第一时间段使用电子设备的用户的头部转动速度;根据用户的头部转动速度,确定电子设备在第二时间段内对应的第一预设分辨率以及对第二预设帧率进行调整。该第一预设分辨率与用户的头部转动速度成反比。上述“根据第二预设帧率,在第二时间段内对图像进行渲染”的方法具体包括:根据调整后的第二预设帧率和第一预设分辨率,在第二时间段内对图像进行渲染。
在一些实施例中,电子设备设置有多个预设分辨率。上述“根据用户的头部转动速度,确定电子设备在第二时间段内对应的预设分辨率”的方法具体包括:当用户的头部转动速度大于预设速度时,确定电子设备在第二时间段内对应的预设分辨率为多个预设分辨率中的第一预设分辨率。当用户的头部转动速度小于或等于预设速度时,确定电子设备在第二时间段内的预设分辨率为多个预设分辨率中的第二预设分辨率。第二预设分辨率大于第一预设分辨率。
在一些实施例中,当用户的头部转动速度大于预设速度时,将第二预设帧率调整为第三预设帧率,第三预设帧率为多个预设帧率中大于所述第二预设帧率的预设帧率;当用户的头部转动速度小于或等于预设速度时,将第二预设帧率调整为第四预设帧率,第四预设帧率为多个预设帧率中小于第二预设帧率的预设帧率;其中,第二预设分辨率与第一预设分辨率的比值小于或等于第三预设帧率与第四预设帧率的比值。
另一方面,提供一种图像处理方法。应用于具有显示屏的电子设备,该方法包括:确定当前时间注视显示屏的用户对应的注视区域。获取待处理图像,并确定待处理图像中与注视区域的图像的数据信息。根据注视区域的图像的数据信息,确定注视区域的图像的图像处理复杂度。获取电子设备的GPU的图像渲染能力,并根据注视区域的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一刷新率。根据第一分辨率和第一刷新率,对注视区域的图像进行渲染,得到渲染后的待处理图像,并通过显示屏显示渲染后的待处理图像。
在一些实施例中,该方法还包括确定待处理图像的图像处理复杂度,并根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定待处理图像的目标分辨率和目标刷新率。上述“根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一 刷新率”的方法具体包括:根据目标分辨率和注视区域的图像的图像处理复杂度,确定第一分辨率,并将目标刷新率作为第一刷新率。
在一些实施例中,上述“确定注视显示屏的用户对应的注视区域”的方法具体包括:获取用户在当前时间的瞳孔坐标,并根据用户的瞳孔坐标确定当前时间用户对应的注视区域。
在一些实施例中,电子设备设置有用于检测用户的头部转动速度的传感器,该方法还包括:通过传感器获取在当前时间用户的头部转动速度;上述“根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一刷新率”的方法具体包括:根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力、用户的头部转动速度,确定所述第一分辨率和第二刷新率。
在一些实施例中,上述“根据注视区域的图像的数据信息,确定注视区域的图像的图像处理复杂度”的方法具体包括:根据注视区域的图像的数据信息以及预设复杂度数据库,确定注视区域的图像的图像处理复杂度。预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系,注视区域的图像的数据信息包括注视区域的图像的子图像的数量、图层数量中的一个或多个。
在一些实施例中,目标分辨率与目标刷新率的乘积为预设参数值,该预设参数值与电子设备的配置信息相关。
在一些实施例中,该方法还包括:确定非注视区域的图像对应的第二分辨率和第二刷新率。非注视区域为显示屏的显示区域中除注视区域之外的区域。第二分辨率小于第一分辨率,第二刷新率等于第一刷新率。使用第二分辨率和第二刷新率对非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
在一些实施例中,第二分辨率为目标分辨率与第一分辨率的差值。
在一些实施例中,该方法还包括:将渲染后的注视区域的图像与渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像。
在一些实施例中,电子设备设置有第一API和第二API。第一API与传感器连接。第二API与GPU连接。该方法还包括:通过第一API获取用户的头部转动速度,并通过第二API获取待处理图像的复杂度等级。
另一方面,提供一种图像处理装置。应用于具有显示屏的电子设备。该处理装置包括:获取单元、确定单元和处理单元。获取单元,被配置为获取至少一个第一时间段内的多个帧率,在第一时间段内电子设备为第一预 设刷新率。确定单元,被配置为根据至少一个第一时间段内多个帧率,确定第一时间段的下一个第二时间段内电子设备的第二预设帧率。处理单元,被配置为根据第二预设帧率,在第二时间段内对图像进行渲染,并通过显示屏显示渲染后的图像。在第二时间段内电子设备渲染图像时使用的帧率小于或等于第二预设帧率。
在一些实施例中,电子设备具有多个预设帧率,确定单元,具体被配置为:根据至少一个第一时间段内多个帧率的均值,确定在第二时间段内电子设备的第二预设帧率。多个预设帧率包括第一预设帧率和第二预设帧率。
在一些实施例中,当在至少一个第一时间段内多个帧率的均值与第一预设帧率之间的差值均小于预设值时,第二预设帧率为多个预设帧率中大于第一预设帧率的预设帧率。
在一些实施例中,获取单元,还被配置为:当第一时间段内多个帧率的均值与第一预设帧率之间的差值大于或等于预设值,第二预设帧率为多个预设帧率中小于或等于至少一个第一时间段内多个帧率的均值的预设帧率。
在一些实施例中,处理单元,还被配置为:响应于开机操作,将电子设备的初始预设帧率设置为多个预设帧率中最大预设帧率。
在一些实施例中,获取单元,还被配置为:获取在至少一个第一时间段使用电子设备的用户的头部转动速度。确定单元,还被配置为:根据用户的头部转动速度,确定电子设备在第二时间段内对应的第一分辨率以及对第二预设帧率进行调整。该第一分辨率与用户的头部转动速度成反比。处理单元,具体被配置为:根据调整后的第二预设帧率和第一分辨率,在第二时间段内对图像进行渲染。
在一些实施例中,电子设备设置有多个预设分辨率。确定单元,具体被配置为:当用户的头部转动速度大于或等于预设速度时,确定第一分辨率为多个预设分辨率中的第一预设分辨率。当用户的头部转动速度小于预设速度时,确定第一分辨率为多个预设分辨率中的第二预设分辨率。第二预设分辨率大于第一预设分辨率。
在一些实施例中,确定单元,具体被配置为:当用户的头部转动速度大于预设速度时,将第二预设帧率调整为第三预设帧率,第三预设帧率大于所述第二预设帧率;当用户的头部转动速度小于或等于预设速度时,将第二预设帧率调整为第四预设帧率,第四预设帧率小于第二预设帧率;其中,第 二预设分辨率与第一预设分辨率的比值小于或等于第三预设帧率与第四预设帧率的比值。
另一方面,提供一种图像处理装置。应用于具有显示屏的电子设备。该处理装置包括:确定单元、获取单元和处理单元。
确定单元,被配置为:确定当前时间注视显示屏的用户对应的注视区域。获取单元,被配置为:获取待处理图像以及电子设备的GPU的图像渲染能力。确定单元,还被配置为:确定待处理图像中与注视区域的图像的数据信息,并根据注视区域的图像的数据信息,确定注视区域的图像的图像处理复杂度。确定单元,还被配置为:根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一刷新率。处理单元,被配置为:根据第一分辨率和所述第一刷新率,对注视区域的图像进行渲染,得到渲染后的待处理图像,并通过显示屏显示渲染后的待处理图像。
在一些实施例中,确定单元,还被配置为:确定待处理图像的图像处理复杂度。确定单元,还被配置为:根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定待处理图像的目标分辨率和目标刷新率。确定单元,具体被配置为:根据目标分辨率和注视区域的图像的图像处理复杂度,确定第一分辨率,并将目标刷新率作为第一刷新率。
在一些实施例中,确定单元,具体被配置为:获取用户在当前时间的瞳孔坐标,并根据瞳孔坐标确定在当前时间用户对应的注视区域。
在一些实施例中,电子设备设置有用于检测用户的头部转动速度的传感器。获取单元,还被配置为:通过传感器获取在当前时间用户的头部转动速度。确定单元,具体被配置为:根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力、用户的头部转动速度,确定第一分辨率和第一刷新率。
在一些实施例中,确定单元,具体被配置为:根据注视区域的图像的数据信息以及预设复杂度数据库,确定注视区域的图像的图像处理复杂度。该预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系。注视区域的图像的数据信息包括注视区域的图像的子图像的数量、图层数量中的一个或多个。
在一些实施例中,目标分辨率与目标刷新率的乘积为预设参数值。该预设参数值与所述电子设备的配置信息相关。
在一些实施例中,确定单元,还被配置为:确定非注视区域的图像对应的第二分辨率和第二刷新率。非注视区域为显示屏的显示区域中除注视区域之外的区域。第二分辨率小于所述第一分辨率,第二刷新率等于第一刷新率。 处理单元,还被配置为:使用第二分辨率和第二刷新率对非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
在一些实施例中,第二分辨率为目标分辨率与第一分辨率的差值。
在一些实施例中,处理单元,还被配置为:将渲染后的注视区域的图像与渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像。
在一些实施例中,电子设备设置有第一API和第二API。第一API与传感器连接。第二API与GPU连接。获取单元,还被配置为:通过第一API获取用户的头部转动速率,并通过第二API获取待处理图像的复杂度等级。
又一方面,提供一种图像处理装置,包括处理器和通信接口。通信接口和处理器耦合。处理器用于运行计算机程序或指令,以实现第一方面或第一方面任一实施例的图像处理方法。
又一方面,提供一种图像处理装置,包括处理器和通信接口。通信接口和处理器耦合。处理器用于运行计算机程序或指令,以实现第二方面或第二方面任一实施例的图像处理方法。
再一方面,提供一种计算机可读存储介质。所述计算机可读存储介质存储有计算机程序指令,所述计算机程序指令在计算机(例如,电子设备)上运行时,使得所述计算机执行如上述第一方面或第一方面任一实施例所述的图像处理方法。
再一方面,提供一种计算机可读存储介质。所述计算机可读存储介质存储有计算机程序指令,所述计算机程序指令在计算机(例如,电子设备)上运行时,使得所述计算机执行如上述第二方面或第二方面任一实施例所述的图像处理方法。
又一方面,提供一种计算机程序产品。所述计算机程序产品包括计算机程序指令,在计算机(例如,电子设备)上执行所述计算机程序指令时,所述计算机程序指令使计算机执行如上述第一方面或第一方面任一实施例所述的图像处理方法。
又一方面,提供一种计算机程序产品。所述计算机程序产品包括计算机程序指令,在计算机(例如,电子设备)上执行所述计算机程序指令时,所述计算机程序指令使计算机执行如上述第二方面或第二方面任一实施例所述的图像处理方法。
又一方面,提供一种计算机程序。当所述计算机程序在计算机(例如,电子设备)上执行时,所述计算机程序使计算机执行如上述第一方面或第一方面任一实施例所述的图像处理方法。
又一方面,提供一种计算机程序。当所述计算机程序在计算机(例如,电子设备)上执行时,所述计算机程序使计算机执行如上述第二方面或第二方面任一实施例所述的图像处理方法。
为了更清楚地说明本公开中的技术方案,下面将对本公开一些实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例的附图,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。此外,以下描述中的附图可以视作示意图,并非对本公开实施例所涉及的产品的实际尺寸、方法的实际流程、信号的实际时序等的限制。
图1为根据一些实施例的电子设备的结构图;
图2为根据一些实施例的电子设备的结构图;
图3为根据一些实施例的电子设备的结构图;
图4为根据一些实施例的电子设备的结构图;
图5为根据一些实施例的图像处理方法的流程图;
图6为根据一些实施例的图像处理方法的流程图;
图7为根据一些实施例的图像处理方法的流程图;
图8为根据一些实施例的图像处理方法的流程图;
图9为根据一些实施例的图像处理方法的流程图;
图10为根据一些实施例的图像处理方法的流程图;
图11为根据一些实施例的图像处理方法的流程图;
图12为根据一些实施例的图像处理方法的流程图;
图13为根据一些实施例的电子设备的结构图;
图14为根据一些实施例的电子设备的结构图;
图15为根据一些实施例的电子设备的结构图。
下面将结合附图,对本公开一些实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开所提供的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本公开保护的范围。
除非上下文另有要求,否则,在整个说明书和权利要求书中,术语“包括(comprise)”及其其他形式例如第三人称单数形式“包括(comprises)”和现在分词形式“包括(comprising)”被解释为开放、包含的意思,即为“包 含,但不限于”。在说明书的描述中,术语“一个实施例(one embodiment)”、“一些实施例(some embodiments)”、“示例性实施例(exemplary embodiments)”、“示例(example)”、“特定示例(specific example)”或“一些示例(some examples)”等旨在表明与该实施例或示例相关的特定特征、结构、材料或特性包括在本公开的至少一个实施例或示例中。上述术语的示意性表示不一定是指同一实施例或示例。此外,所述的特定特征、结构、材料或特点可以以任何适当方式包括在任何一个或多个实施例或示例中。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本公开实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在描述一些实施例时,可能使用了“耦接”和“连接”及其衍伸的表达。例如,描述一些实施例时可能使用了术语“连接”以表明两个或两个以上部件彼此间有直接物理接触或电接触。又如,描述一些实施例时可能使用了术语“耦接”以表明两个或两个以上部件有直接物理接触或电接触。然而,术语“耦接”或“通信耦合(communicatively coupled)”也可能指两个或两个以上部件彼此间并无直接接触,但仍彼此协作或相互作用。这里所公开的实施例并不必然限制于本文内容。
“A、B和C中的至少一个”与“A、B或C中的至少一个”具有相同含义,均包括以下A、B和C的组合:仅A,仅B,仅C,A和B的组合,A和C的组合,B和C的组合,及A、B和C的组合。
“A和/或B”,包括以下三种组合:仅A,仅B,及A和B的组合。
如本文中所使用,根据上下文,术语“如果”任选地被解释为意思是“当……时”或“在……时”或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“如果确定……”或“如果检测到[所陈述的条件或事件]”任选地被解释为是指“在确定……时”或“响应于确定……”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。
本文中“适用于”或“被配置为”的使用意味着开放和包容性的语言,其不排除适用于或被配置为执行额外任务或步骤的设备。
另外,“基于”的使用意味着开放和包容性,因为“基于”一个或多个所述条件或值的过程、步骤、计算或其他动作在实践中可以基于额外条件或超出所述的值。
以下,对本申请实施例涉及的名词进行解释,以方便读者理解。
虚拟现实(virtual reality,VR):是一种可以创建和体验虚拟世界的计算机仿真系统。VR可以利用计算机生成一种模拟环境。VR是一种多源信息融合的、交互式的三维动态视景和实体行为的系统仿真。基于VR,可以使得用户沉浸到该模拟环境中。VR技术是仿真技术的一个重要方向,是仿真技术与计算机图形学人机接口技术、多媒体技术、传感技术、网络技术等多种技术的集合。VR技术主要包括模拟环境、感知、自然技能和传感设各等方面。模拟环境是由计算机生成的、实时动态的三维立体逼真图像。感知是指在理想条件下VR应该具有一切人所具有的感知。除计算机图形技术所生成的视觉感知外,还可以包括听觉、触觉、力觉、运动等感知,还可以包括嗅觉和味觉等,也称为多感知。
刷新率:可以称为帧率。刷新率指的是显示设备显示的图像每秒钟重绘多少次,也就是每秒钟电子设备被刷新的次数,以赫兹(Hz)为单位。刷新率越高,图像就越稳定,图像显示就越自然清晰,对用户眼睛的影响也越小。刷新率越低,图像闪烁和抖动的就越厉害,用户眼睛疲劳得就越快。一般来说,如能达到80Hz以上的刷新率就可完全消除图像闪烁和抖动感,用户眼睛也不会太容易疲劳。
从硬件方面来说,影响电子设备的刷新率最主要的因素就是显示器的带宽。带宽是显示器的一个综合指标,也是衡量显示器好坏的重要指标。带宽是指每秒钟所扫描的图像个数,也就是说,在单位时间内,每条扫描线上显示的频点数的总和。带宽的单位是赫兹(Hz)。当显示器的刷新率越高,显示器的带宽就越高。
从软件方面来说:影响刷新率最大的是显示器的分辨率。显示器的分辨率越高,在带宽不变的情况下,刷新率就越低。因此,要保持显示器的高刷新率,只有采用高的带宽。
帧数:可以称为帧率,是指显示器的画面改变的速度。例如,电子设备的帧数为60帧每秒(frames per second,fps)就是每秒钟显卡生成60张画面图片(理论上,每一帧都是不同的画面)。帧数是由显卡所决定的。显卡性能越高,帧数就越高。帧数越高,电子设备的画面就越流畅。例如,帧数是刷新率的1/2,那就是意味着显卡每两次向显示器输出的画面是用一幅画面。相反,如果帧数是刷新率的2倍,那么画面每改变两次,其中只有1次是被显卡发送并在显示器上显示的。这就意味着,高于刷新率的帧数都是无效帧数,对画面效果没有任何提升,反而可能导致画面异常。显卡负责渲染图像,渲染速度越快,帧数就越高,传输给屏幕的画面就越多。屏幕负责快速显示从显 卡接收到的的图像,显示得越快刷新率就越高。只有刷新率和帧数匹配时,才可以获得流畅的VR体验。
一种示例中,当电子设备的帧数高于刷新率时,显卡每秒渲染了100张图(每秒帧数100),而显示器每秒只能显示60张(刷新率为60Hz),那只能显示器只能显示60张画面,剩下的40张都未能被显示,相当于显卡做了无用功即通常所说的丢帧现象。此外,当显卡输出帧的速度高于显示器的刷新速度时,会导致显示器不能及时处理输出的帧,从而使得显示器显示非同一帧的画面也就是通常所说的撕裂现象。
又一种示例中,当帧数低于刷新率时,显示器将显示显卡已渲染完成的画面多次,也就是通常所说的抖动现象。对于VR技术而言,刷新率的高低直接影响VR应用的流畅度,因此需要VR应用本身最好是维持较高的系统帧率,以提供最好的渲染质量。
分辨率:可以称为解析度、解像度。分辨率是指显示屏在水平方向和垂直方向所显示的点数。比如:1024×768、1280×1024等。1024×768中的“1024”指屏幕水平方向的点数,“768”指屏幕垂直方向的点数。分辨率决定了图像的精细程度。图像的分辨率越高,图像所包含的像素就越多,图像就越清晰。
通常情况下,为了满足用户对高清内容的需求,电子设备(如移动终端、VR头戴式设备、电视等)可以使用高刷新率和高分辨率对图像进行渲染,得到高清图像,并在显示屏上显示高清图像。例如,以电子设备为VR头戴式设备为例,在用户使用VR头戴式设备的初始阶段,由于VR头戴式设备的显示屏的分辨率和刷新率较低,可能会引入用户的不适感。因此,为了提高用户的体验,VR头戴式设备可以使用高分辨率和高刷新率对图像进行渲染。
但是电子设备的硬件参数值(如dot_clk值)是固定的。该硬件参数值与电子设备的刷新率和分辨率可以存在以下关系:v_total*h_total*fps≤dot_clk。v_total*h_total表示电子设备的分辨率。fps表示刷新率。由该关系可知,电子设备无法无限的调高刷新率或分辨率。
鉴于此,本申请实施例提供了一种图像处理方法,应用于电子设备。本申请实施例中,电子设备可以设置有多个预设帧率。电子设备可以根据至少一个时间段内的多个帧率,从多个预设帧率中选择下一个时间段的预设帧率。如此,基于至少一个历史时间段的多个帧率,电子设备可以动态的调整下一个时间段的预设帧率。具体的,可以参照下述实施例一的技术方案。进一步的,为了保证显示的图像为高清图像,电子设备的显示方案普遍以固定的刷新率和高分辨率的方式点屏。个别的电子设备可以通过设置有固定 的几个档位(一般是三档位),实现刷新率的可变。但是,设置有固定的档位的电子设备在具有单一场景的图像的刷新率是不可变的。一旦图像的场景的复杂度变高,电子设备的刷新率无法灵活调制,可能会导致画面卡顿、不流畅的问题。同时,针对场景复杂度低的图像,一味追求高刷新率,也会带来功耗增加的问题。
需要说明的是,本申请实施例中,图像的场景的复杂度可以是指图像包括的对象的数量、图层数量等。图像的场景的复杂度越高,则渲染图像所占用的资源就越多、渲染时长就越大。同时,电子设备的渲染图像的功耗也会增加。
一种示例中,在个人计算机(personal computer,PC)+虚拟现实技术(virtual reality,VR)设备的应用场景下,实现可变刷新率方案有两种:一、手动切换VR设备的显示器的刷新率;二、为VR设备配置特殊显卡和显示器,用以实现显示器的无缝帧频切换。
但是,当手动切换VR设备的显示器的刷新率时,由于PC需与显示器握手,可能会出现闪屏现象。当为VR设备配置特殊显卡和显示器时,提高了成本。
另外,高分辨率不仅是电子设备显示的重要功能,同时受到电子设备的处理器性能的限制,电子设备无法在使用高刷新率显示图像的同时使用高分辨率显示图像。
鉴于此,本申请实施例提供了一种自适应刷新率切换的方案,应用于电子设备。本申请实施例中,电子设备可以根据用户的注视点,将显示屏的显示区域划分为高清区域和低清区域,并使用不同的分辨率对高清区域和低清区域的图像进行渲染,实现了分辨率的自适应切换。同时,本申请实施例中,电子设备还可以根据电子设备的处理器当前的性能、用户的头部旋转速度确定当前场景的图像处理复杂度,从而可以灵活的调整刷新率,从而提升画面流畅度,也降低电子设备的功耗。具体的,可以参照下述实施例二的技术方案。
需要说明的是,本申请实施例中,电子设备可以为电视、电脑、VR设备等具有显示屏的设备。VR设备可以为头戴式设备。电子设备的显示屏可以支持分区域进行刷新,且每个区域的刷新率可以不同。例如,电子设备的显示屏的显示区域可以划分为多个子区域,每个子区域可以以不同的刷新率显示。
一种可能的设计中,电子设备可以具有多个控制组件,每个控制组件分别对应一个子区域。每个控制组件分别与显示区域中的对应子区域的每个显 示像素点之间具有驱动线路。如此,每个控制组件可以控制对应子区域的输出。也即,每个控制组件可以控制对应子区域的刷新率和分辨率。
下面将结合说明书附图,对本申请实施例的实施方式进行详细描述。
如图1所示,图1为本申请实施例提供的一种电子设备的结构示意图。该电子设备可以具有显示器110及处理器120、图形处理器(graphics processing unit,GPU)130。显示器110与处理器120、GPU130可以通信连接。例如,显示器110与处理器120可以通过系统总线130连接。处理器120可以与GPU通信连接。
其中,显示器110可以包括显示屏/屏幕等。显示器110可以用于显示图像。例如,显示器可以为液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)显示器等。
其中,处理器120,可以包括一个或多个中央处理器(Central Processing Unit,CPU)。CPU可以用于对图像进行解析以及执行本申请实施例中电子设备的操作。例如,对图像进行拼接、确定用户的注视区域等。GPU130可以用于确定待渲染图像的数据信息以及对图像进行渲染。
一种可能的实现方式中,如图2所示,电子设备还可以设置有监测模块、软件层以及显示模组。
其中,监测模块可以用于监测电子设备的硬件系统的性能以及电子设备的外部设备的数据。电子设备的外部设备可以包括传感器以及图像数据监测模块。图像数据检测模块可以用于检测图像的数据信息(如图像包括的对象数量、图像的图层数量等)。图像的数据信息可以用于确定图像的复杂度。
例如,监测模块可以包括GPU性能监测模块以及传感器、人眼追踪模块。GPU性能监测模块可以用于检测GPU的渲染能力。GPU的渲染能力可以用于表征GPU可渲染的图像的数据量。传感器用于获取用户的头部转动速度。人眼追踪模块可以用于检测用户的瞳孔坐标。图像数据检测模块可以用于检测图像的数据信息。
其中,软件层可以用于根据处理器的性能、用户的头部转动速度、用户的瞳孔坐标,计算图像的复杂度,并根据瞳孔坐标对应的区域的图像的数据信息,计算该区域的图像对应的分辨率和刷新率。从而可以实现电子设备动态调整分辨率和刷新率的功能。例如,软件层可以包括图像数据检测模块。图像数据检测模块可以执行软件层的功能。
一种示例中,软件层可以安装操作系统,该操作系统可以用于运行程序代码。该程序代码可以实现本申请实施例提供的方法。比如,该操作系统可 以为安卓系统。也可以为其他系统,不予限制。该操作系统可以基于编导(Choreographer)机制和垂直同步(vertical sync,V sync)机制,实现统一调度界面渲染图像。Choreographer机制和V sync机制可以参照现有技术,不予赘述。
进一步的,当电子设备确定渲染图像使用的帧率、分辨率以及刷新率之后,电子设备可以通过应用程序编程接口(application programming interface,API)向操作系统输出确定的帧率、分辨率以及刷新率。如此操作系统可以根据接收到的帧率、分辨率以及刷新率修改程序代码中对应的参数。进而,实现本申请实施例提供的方法。
其中,显示模组可以为显示器或显示器的模组,可以用于显示渲染后的图像。
一种示例中,如图3所示,GPU监测模块可以设置有API进行通信。该API接口可以用于输出GPU的实时渲染能力。例如,处理器监测模块可以监测GPU当前的渲染能力,并通过该API接口向处理器传输GPU的实时渲染能力。处理器可以根据GPU的实时渲染能力和待处理图像的复杂度,计算待处理图像对应的分辨率和刷新率。具体的,可以参照后续的描述。
处理器在计算得到待处理图像的分辨率和刷新率之后,可以通过该API接口向GPU传输待处理图像的分辨率和刷新率。如此,GPU可以根据该分辨率和刷新率对待处理图像进行渲染,得到渲染后的待处理图像。
基于通过该API接口,电子设备以及开发人员可以方便调用处理器的处理数据,从而可以根据该处理数据检测GPU的性能。
又一种示例中,如图4所示,图像数据检测模块也可以设置有API接口。图像数据检测模块可以在获取到待处理图像的数据信息之后,检测待处理图像的数据量,并根据待处理图像的数据量确定待处理图像的复杂度。进而,图像数据检测模块可以通过API接口输出待处理图像的复杂度。待处理图像的复杂度的确定方法可以参照下述实施例的描述。
又一种可能的实现方式中,电子设备还可以配置有红外相机。红外相机可以用于拍摄用户的人眼图像。电子设备可以根据人眼图像确定人眼的注视点,并根据人眼的注视点,确定用户的注视区域。注视区域也可以称为高清区域。
进一步的,为了更加准确的确定人眼的注视点,电子设备还可以设置有红外补光灯。如此,在红外补光灯的辅助下,电子设备可以使用红外相机可以清楚、准确的拍摄到人眼图像。电子设备可以对人眼图像进行识别,得到 人眼的注视点,并根据人眼的注视点,确定注视点的坐标信息。例如,电子设备可以根据预设人眼定位算法对人眼图像进行识别,得到人眼的注视点的坐标信息。人眼定位算法可以参照现有技术,不予赘述。
例如,结合图2,人眼追踪模块在确定用户的注视点的注视坐标之后,可以向软件层传输用户的注视点的坐标信息。软件层在接收到用户的注视点的坐标信息之后,可以将该注视点的坐标信息为中心,确定显示屏对应的区域(也即,注视区域)。注视区域的尺寸为预设形状(如为矩形)且面积为预设值。
需要说明的是,电子设备在确定用户的注视区域之后,可以将显示屏的显示区域中除注视区域之外的区域作为非注视区域。
又一种可能的实现方式中,本申请实施例中,电子设备还可以与服务器通信连接。服务器可以用于提供图像数据/视频数据。
下面结合图1所示的电子设备,对本申请实施例提供的图像处理方法进行说明(包括实施例一和实施例二)。
实施例一:
如图5所示,为本申请实施例提供的一种图像处理方法,该方法可以应用于图1所示的电子设备。该方法可以包括S501~S503。
S501、获取至少一个第一时间段内的多个帧率。
其中,在第一时间段内电子设备为第一预设帧率。该在第一时间段内,电子设备的帧率或实际帧率或应用帧率小于或等于第一预设刷新率。至少一个时间段的多个帧率可以包括一个时间段内的多个帧率或连续多个第一时间段中每个第一时间段内的多个帧率。例如,连续3个时间段。第一时间段的长度可以根据需要设置,比如,可以为3秒(s)、5s、6s等,不予限制。
一种示例中,电子设备可以设置有多个预设帧率。例如,可以设置有120fps、115fps、110fps、105fps、100fps、95fps、90fps、85fps、80fps、75fps等多个预设帧率(也可以称为帧率档位)。当然,电子设备还可以设置有更多的预设刷新率档位。比如,还可以设置有75Hz、70Hz、65Hz等,不予限制。
需要说明的是,当在某一时间段内电子设备设置的预设帧率为该多个预设帧率的一个预设帧率时,则在该时间段内电子设备渲染图像的帧率小于或等于该预设帧率。例如,在时间段1内电子设备设置的预设帧率为115fps,则在该时间段1,电子设备渲染图像的帧率小于或等于115fps。在该时间段内电子设备渲染图像的刷新率和分辨率可以根据电子设备的GPU的图像渲染能 力、图像的图像处理复杂度情况。具体的,可以参照后续的实施例二。
S502、根据至少一个第一时间段内多个帧率,确定在第二时间段内电子设备的第二预设帧率。
其中,第二时间段为至少一个第一时间段的下一个时间段。多个预设帧率可以包括第一预设帧率和第二预设帧率。
一种可能的实现方式中,电子设备可以根据至少一个第一时间段内的多个帧率的均值,确定在第二时间段内电子设备的第二预设帧率。
一种示例中,当至少一个第一时间内的多个帧率的均值与第一预设帧率的差值均小于预设值,第二预设帧率为多个预设帧率中大于第一预设帧率的预设帧率。
例如,结合S501的多个预设帧率,第一预设帧率为75fpd,第一时间段的时间长度为5s,预设值为5。在连续3个5s(也即15s)内多个帧率的均值分别为74fps、73fps、73fps,该三个均值与75之间的差值均小于5,则说明电子设备的较为稳定,可以增大电子设备的预设帧率。第二预设帧率可以为80fps,或者其他大于75fps的预设帧率。
又一种示例中,当第一时间段内的多个帧率的均值与第一预设帧率的差值大于或等于预设值,第二预设帧率为多个预设帧率中小于第一时间段的多个帧率的均值的预设帧率。
例如,结合S501的多个预设帧率,第一预设帧率为120fps。当某一个5s内的多个帧率的均值为78fps,则说明电子设备的帧率不稳定,需要调整帧率。电子设备可以将该5s的下一个5s的预设帧率设置为75fps。
又一种示例中,响应于初始开机的操作,电子设备可以将初始预设帧率设置为多个预设帧率中最大的预设帧率。例如,结合S501中的多个预设帧率,当电子设备初始开机时,电子设备可以将预设帧率设置为120fps。如此,可以保证电子设备在对初始对图像进行渲染时,可以尽可能的提高显卡的利用率。避免出现由于电子设备的预设帧率设置过低,导致显卡的利用率较低的问题。例如,在开机阶段,电子设备的预设帧率为80fps,而此时显卡实际上的帧率可以到达110fps。由于显卡的帧率不能超过80fps,因此,使得显卡的利用率较低。
一种示例中,当电子设备初始开机时,电子设备的预设帧率为120fps。电子设备可以获取开机阶段的5s内的多个帧率的均值。当该5s内的多个帧率的均值与120fps的差值小于5,则说明当前帧率较为稳定。电子设备可以就行获取下一个5s内的多个帧率。当连续3个5s内的多个帧率的均值与120fps 的差值均小于5,则电子设备可以保持当前的预设帧率。当某一个5s内的多个帧率的均值与120fps的差值大于或等于5,则说明电子设备应该调整预设帧率。例如,该5s的多个帧率的平均值为78fps,可以该5s的下一个5s内,电子设备可以将预设帧率调整为75fps。
例如,电子设备可以设置有一个或多个按键。该一个或多个按键可以物理按键或触摸按键。该一个或多个按键可以用于确定电子设备的预设刷新率。比如,电子设备可以响应于该一个或多个按键的按压操作,将初始刷新率设置为与该按压操作对应的预设刷新率。
S503、根据第二预设帧率,在第二时间段对图像进行渲染,并通过显示屏显示渲染后的图像。
其中,在第二时间段电子设备渲染图像时使用的帧率小于或等于第二预设帧率。
一种示例中,电子设备在确定第二时间段对应的预设帧率之后,可以基于操作系统的反射机制,调用操作系统的API,查找操作系统的具体类,通过引用(invoke)方法进行调用并传递参数索引(index)。index表示需要切换的帧率档位。如此,电子设备的操作系统可以根据该index,确定在第二时间段内渲染图像的帧率,并根据该帧率在第二时间段内对图像进行渲染。Invoke方法可以参照现有技术,不予赘述。
基于图5所示的技术方案,电子设备可以根据至少一个第一时间段多各帧率,确定第一时间段的下一个时间段的预设帧率。也即,电子设备可以根据上一个时间段的多个帧率,动态的调整下一个时间段的预设帧率。如此,可以使得电子设备可以根据实际图像渲染能力,自适应的调整预设帧率。
一些实施例中,如图6所示,该方法还可以包括S601~S603。
S601、获取第二时间段内的多个帧率。
其中,多个帧率可以是指电子设备在第二时间段内渲染图像时实际使用的帧率。
S602、当多个帧率的均值与第二预设帧率之间的差值小于预设值时,确定在第三时间段内电子设备的预设帧率为第五预设帧率。
其中,第五预设帧率为多个预设帧率中大于第二预设帧率的预设帧率。
一种可能的实现方式中,当多个帧率的均值与第二预设帧率之间的差值小于预设值时,第五预设帧率为多个预设帧率中大于第二预设帧率的预设帧率。
一种示例中,结合S501的多个预设刷新率,预设值为2。当在第二时间 段内电子设备的预设帧率为110fps。在第二时间段内的多个帧率的均值为109fps。由于110-109=1<5,则说明电子设备在第二时间段内的帧率比较稳定。如此,电子设备可以增加预设帧率。例如,可以在第三时间段内将预设帧率调整为115fps。后续,在第三时间段,若多个帧率的均值与115fps之间的差值小于预设值,则电子设备可以继续增加预设帧率。也即,电子设备将预设帧率调整为120fps。当电子设备将预设帧率增大值多个预设帧率中的最大预设帧率时,若后续时间段的多个帧率与最大预设帧率之间的差值小于预设值时,电子设备可以保持最大预设帧率。
如此,当电子设备的帧率比较稳定时,可以增加电子设备的预设帧率的上限,用以提高显卡的利用率。
又一种示例中,电子设备也可以根据至少一个第一时间段内多个帧率和第二时间段内的多个帧率的均值,确定在第三时间段内电子设备的预设帧率。
S603、当多个帧率的均值与第二预设帧率之间的差值大于或等于预设值时,确定在第三时间段内电子设备的预设帧率为第四预设帧率。
其中,第四预设刷新率为多个预设帧率中小于第二预设帧率。
一种示例中,当多个帧率的均值与第二预设刷新率之间的差值大于预设值,说明电子设备在第二时间段内显卡的图像渲染能力达不到第二预设刷新率。因此,电子设备可以继续降低电子设备的预设帧率,并根据降低后的预设帧率,在第三时间段内对图像进行渲染。
又一种示例中,当多个帧率的均值与第二预设刷新率之间的差值大于第一阈值,且小于或等于第二阈值时,电子设备可以继续使用第二预设帧率在第三时间段内渲染图像。第二阈值大于第一阈值。当两者之间的差值大于第一阈值,且小于或等于第二阈值,则说明电子设备的图像渲染能力达不到第二预设帧率,但接近第二预设帧率。电子设备可以根据使用第二预设帧率,在第三时间段内对图像进行渲染,用以最大程度保证GPU的利用率。
又例如,当多个帧率的均值与第二预设帧率之间的差值大于第二阈值时,电子设备可以根据第四预设帧率在第三时间段对图像进行渲染。
基于图6的技术方案,电子设备在连续多个时间段内图像的刷新率较为稳定时,可以增加预设帧率,如此,后续时间段内可以使用较高的帧率对图进行渲染,最大程度上利用了显卡。
一些实施例中,如图7所示,本申请实施例提供的方法还可以包括S701~S702。
S701、获取在至少一个第一时间段使用电子设备的用户的头部转动速度。
其中,用户的头部转动速度可以是指单位时间内用户的头部旋转角速率。例如,在某一时间段(如0.5秒(s))内用户的头部转动角度为50°,则该时间段内用户的头部转动速度为50/0.5=100°/s。
一种可能的实现方式中,电子设备可以设置有一个或多个传感器。该一个或多个传感器可以用于检测用户的头部转动速度。如此,电子设备可以通过该一个或多个传感器获取在第二时间段使用电子设备的用户的头部转动速度。
又一种可能的实现方式中,当电子设备为头戴式设备时,电子设备可以设置有陀螺仪。陀螺仪可以用于获取用户的头部转动速度。如此,电子设备可以用陀螺仪获取在第二时间段使用电子设备的用户的头部转动速度。
一种示例中,电子设备可以获取陀螺仪在多个方向上的线性加速度,并根据各个方向的线性加速度,计算对应的速度分量(也即用户的头部转动速度)。
进一步的,为了更加精准的判断用户的运动状态,电子设备可以获取陀螺仪的多组速度数据。一组速度数据包括各个方向对应的速度分量。对于多组速度数据中的异常数据(如突然增大/减小的一组速度数据),可以删除。如此,可以防止出现跳动现象。
又一种可能的实现方式中,当电子设备为电视或移动设备时,电子设备可以通过相机拍摄第二时间段用户的多帧头部图像,并对该多帧头部图像进行识别,确定用户的头部转动角度。进而,电子设备可以用户的头部转动角度与第二时间段的比值,确定用户的头部转动速度。
S702、根据用户的头部转动速度,确定电子设备在第二时间段内对应的预设分辨率以及对第二预设帧率进行调整。
其中,用户的头部转动速度与预设分辨率成反比。也即,用户的头部转动速度越快,则说明用户对显示屏的关注度越低,电子设备可以使用较低的分辨率对图像进行渲染,以降低电子设备的功耗。用户的头部转动速度越慢,则说明用户对显示屏的关注度越高,电子设备可以使用较高的分辨率对图像进行渲染,以提高图像的高清度,增强用户的体验。
其中,电子设备根据用户的头部转动速度对第二预设帧率进行调整包括:当用户的头部转动速度大于预设速度,将第二时间段内的预设帧率调整为多个预设帧率中大于第二预设帧率的预设帧率;当用户的头部转动速度小于或等于预设速度,则将第二时间段内的预设帧率调整为多个预设帧率中小于第二预设帧率的预设帧率。
一种可能的实现方式中,电子设备可以设置有多个预设分辨率(如包括第一预设分辨率和第二预设分辨率,第一预设分辨率小于第二预设分辨率)。当在第一时间段用户的头部转动速度大于或等于预设速度时,电子设备可以将预设分辨率设置为第一预设分辨率;当在第一时间段用户的头部转动速度小于预设速度时,电子设备可以将预设分辨率设置为第二预设分辨率。
如此,当电子设备确定用户处于运动状态时,电子设备可以降低分辨率。如此,可以降低电子设备的功耗。当电子设备确定用户处于静止状态时,电子设备可以提高分辨率。如此,可以提高用户体验。
进一步的,电子设备还可以设置有更多预设分辨率以及每个预设分辨率对应的头部转动速度范围。如此,电子设备可以根据用户的头部转动速度,确定与该头部转动速度匹配的头部转动速度范围,并根据该头部转动速度范围确定对应的预设分辨率。
需要说明的是,电子设备在设置某一个时间段内的预设分辨率之后,在该时间段内电子设备渲染图像的分辨率小于或等于该预设分辨率。
又一种可能的实现方式中,电子设备可以根据陀螺仪在各个方向的速度分量,确定用户处于静止状态还是运动状态。比如,陀螺仪在各个方向的速度分量均小于对应的预设速度,则电子设备可以确定用户处于静止状态。陀螺仪在各个方向的速度分量中存在大于或等于预设速度的速度分量,则电子设备可以确定用户处于运动状态。
对于多组速度数据,若该多组速度数据中速度分量均大于对应的预设速度,或者,多组速度数据超过预设数量的速度数据(如10组速度数据中6组速度数据)中的速度分量大于对应的预设速度,电子设备可以确定用户处于运动状态。
一种可能的实现方式中,当用户处于运动状态时,电子设备可以将第二预设帧率调整为第三预设帧率,第三预设帧率为多个预设帧率中大于第二预设帧率的预设帧率。当用户处于静止状态时,电子设备可以将第二预设帧率调整为第四预设帧率,第四预设帧率为多个预设帧率中小于第二预设帧率的预设帧率。
一种示例中,第二预设分辨率与第一预设分辨率的比值小于或等于第三预设帧率与第四预设帧率的比值。比如,第三预设帧率为120fps,第四预设帧率为30fps。则第二预设分辨率与第一预设分辨率的比值可以小于或等于4。比如,第一预设分辨率可以为676X720,第二预设分辨率可以为1352X1440。
基于图7所示的技术方案,电子设备可以根据用户的头部转动速度,灵 活的调整电子设备的分辨率。当用户的头部转动速度较高时,可以使用较低的分辨率对图像进行渲染,用以减低电子设备的功耗。当用户的头部转动速度较低时,可以使用较高的分辨率对图像进行渲染,用以提高用户的体验。
一些实施例中,如图7所示,上述S503中根据第二预设刷新率,在第二时间段对图像进行渲染,并通过显示屏显示渲染后的图像的方法具体可以通过S703实现。
S703、根据调整后的第二预设刷新率和第一分辨率,在第二时间段对图像进行渲染,并通过显示屏显示渲染后的图像。
基于该实施例,电子设备可以根据预先设置的分辨率和帧率对图像进行渲染。由于该分辨率跟用户的头部转动速度相关,且该帧率与上一个时间段内的多个帧率相关,因此,电子设备可以根据该分辨率和刷新率对图像进行渲染,灵活方便。
一种示例中,在电子设备的开机初始阶段,电子设备的预设帧率可以为多个预设帧率中的最大值。
进一步的,本申请实施例中,电子设备也可以根据至少一个第一时间段内的连续多帧图像的刷新率,确定第二时间段内的刷新率。具体的,可以将实施例一中的预设帧率替换为预设刷新率。
需要说明的是,实施例一中,电子设备在每个时间段确定渲染图像时实际使用的分辨率时,还可以结合用户的注视区域、注视区域的图像的图像复杂度。也即,电子设备在确定某个时间段的预设分辨率之后,在该时间段内可以根据用户的注视区域以及注视区域的图像的图像复杂度对分辨率进行调整。具体的,可以参照下述实施二的描述。
实施例二:
如图8所示,为本申请实施例提供的一种图像处理方法,该方法可以应用于图1所示的电子设备。该方法可以包括S801~S804。
S801、确定当前时间注视显示屏的用户对应的注视区域。
其中,注视区域的形状为预设形状。例如,可以为矩形等。注视区域的尺寸为预设面积。注视区域的中心点为用户的注视点。用户的注视点可以为用户的瞳孔坐标。
一种可能的实现方式中,电子设备可以根据当前时间用户的瞳孔坐标,确定用户对应的注视区域。
一种示例中,电子设备可以通过红外相机拍摄用户的人眼图像,并对用户的人眼图像进行识别,得到用户的人眼注视点(也即瞳孔的注视方向)。 然后,电子设备可以将用户的人眼注视点输入预设瞳孔坐标确定模型中,得到用户的瞳孔坐标。该预设瞳孔坐标确定模型可以用于确定用户的瞳孔坐标。
又一种示例中,电子设备可以预先设置有预设坐标系。该预设坐标系的原点可以为显示区域(如显示区域的左下角)的一个点。预设坐标系的两个轴坐标轴分别与显示区域的边界线平行。电子设备在确定用户的人眼注视点之后,可以将用户的人眼注视点映射至该预设坐标系,得到用户的瞳孔坐标。
电子设备在确定用户的瞳孔坐标之后,可以将该瞳孔坐标为中心进行扩展,直至扩展至预设面积,得到用户的注视区域。
例如,电子设备可以将显示区域的上下边界作为注视区域的边界,并以瞳孔坐标为起点,向显示区域的左右两侧扩展预设长度,得到注视区域。预设长度与显示区域的上下边界之间的距离(也即显示区域的宽度)之间的乘积为预设面积。
S802、获取待处理图像,并确定待处理图像中注视区域的图像的数据信息,确定待处理图像的图像处理复杂度。
其中,待处理图像可以是指电子设备当前时刻需要显示的图像。待处理图像的数据信息可以是指待处理图像包括的对象数量、图层数量等。对象可以是指待处理图像包括的人、物体等。图像处理复杂度也可以称为图像复杂度、复杂度、画面复杂度、复杂度等级、场景复杂度等。图像处理复杂度可以用于表征渲染图像所需的处理资源。图像的图像处理复杂度越高,渲染图像所需的处理资源越多。
一种可能的实现方式中,电子设备可以响应于用户的播放操作,获取视频数据的多帧连续的图像。如此,电子设备可以依次获取每帧图像,并对每帧图像进行处理。若电子设备在当前时刻显示的图像为图像1,则该图像1的下一帧图像作为待处理图像。
电子设备在确定注视区域之后,可以根据待处理图像与第一数值之间的乘积,确定注视区域的图像的大小。第一数值可以为注视区域的面积与显示屏的显示区域的面积之间的比值。进一步的,在确定注视区域的图像的大小之后,可以根据注视点的坐标信息,确定待处理图像中注视区域的图像的位置信息。待处理图像中注视区域的图像的中心点为注视点的坐标信息。进而电子设备可以对注视区域的图像进行解析和识别,得到注视区域的图像的数据信息。
例如,电子设备可以对该注视区域的图像进行识别,确定注视区域的图像的对象数量。比如,电子设备可以根据注视区域的图像的像素点进行聚类, 得到注视区域的图像的聚类数量。一个聚类对应一个对象。又例如,电子设备可以对注视区域的图像进行解析,得到注视区域的图像的图层数量。
又例如,电子设备可以根据预设识别算法,对注视区域的图像进行处理,得到注视区域的图像的数据信息。或者,电子设备可以将注视区域的图像输入预设检测模型,得到注视区域的图像的数据信息。其中,该预设检测模型用于确定图像的数据信息。
又一种可能的实现方式中,在确定注视区域的图像的数据信息之后,电子设备可以根据该注视区域的图像的数据信息,确定注视区域的图像的复杂度。
一种示例中,电子设备可以根据注视区域的图像的数据信息以及预设复杂度数据库,确定注视区域的图像的图像处理复杂度。
其中,预设复杂度数据库可以为电子设备预先配置的。预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系。例如,以数据信息包括图像的对象数量为例,预设复杂度数据库可以包括对象数量与图像处理复杂度之间的对应关系。对象数量越大,对应的图像处理复杂度越大。如此,电子设备可以根据预设复杂度数据库,快速准确的确定注视区域的图像的图像处理复杂度。
S803、获取电子设备的GPU的图像渲染能力。
其中,GPU的图像渲染能力可以是指当前时间GPU能够渲染的图像的数据量。例如,电子设备可以通过GPU监测模块获取GPU的图像渲染能力。
S804、根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一刷新率。
一种可能的实现方式中,电子设备可以根据GPU的图像渲染能力、待处理图像的图像处理复杂度,以及第一预设对应关系,确定待处理图像的目标分辨率和目标刷新率(也可以称为最佳分辨率和最佳刷新率)。
其中,待处理预先的图像处理复杂度的确定方法可以参照上述注视区域的的图像的图像处理复杂度。不予赘述。
其中,第一预设对应关系可以为GPU的图像渲染能力以及分辨率和刷新率之间的对应关系。以目标分辨率和目标刷新率的乘积为预设参数值。该预设参数值与电子设备的配置信息相关。电子设备的配置信息可以包括电子设备的处理器的类型及能力、GPU的类型及能力、操作系统等。例如,预设参数值可以为电子设备的dot_clk值。
需要说明的是,本申请实施例中,目标分辨率和目标刷新率与待处理图 像的复杂度相关。当待处理图像的复杂度较高时,为了避免出现图像卡顿现象,可以使用较低的分辨率。如此,电子设备还可以降低功耗。当待处理图像的复杂度较低时,为了提高用户的体验,可以使用较高的分辨率。
例如,电子设备根据GPU的图像渲染能力以及图像处理复杂度,以及第一预设对应关系,确定的分辨率为多个。比如,电子设备确定的分辨率包括分辨率1和分辨率2,分辨率1大于分辨率2。当图像处理复杂度大于或等于预设等级时,目标分辨率可以为分辨率2;当图像处理复杂度小于预设等级时,目标分辨率可以为分辨率1。
又例如,当确定的分辨率为1个(如分辨率3)时,当图像处理复杂度大于预设等级时,电子设备可以减小分辨率3,并将减小后的分辨率3作为目标分辨率。对于确定的刷新率,电子设备可以增加刷新率,并将增加后的刷新率作为目标刷新率。电子设备也可以不调整确定刷新率。
进一步的,在确定待处理图像的目标分辨率和目标刷新率之后,电子设备可以确定注视区域的图像以及注视区域的图像的图像处理复杂度,并根据注视区域的图像的图像处理复杂度和目标分辨率确定第一分辨率。第一刷新率为目标刷新率。
其中,注视区域可以根据注视区域在显示区域的位置,确定待处理图像中注视区域的图像。注视区域的图像的图像处理复杂度的确定方法可以参照上述待处理图像的图像处理复杂度的确定方法,不予赘述。
一种示例中,电子设备可以根据第一数值与目标分辨率的乘积,计算第一分辨率。第一数值大于0且小于1。第一数值可以与注视区域的图像的图像处理复杂度相关。例如,第一数值可以为注视区域的图像的图像处理复杂度与待处理图像的图像处理复杂度的比值与预设调整系数的和。预设调整系数大于0。预设调整系数可以根据需要设置。
S805、根据第一分辨率和第一刷新率,对注视区域的图像进行渲染,得到渲染后的待处理图像并通过显示屏显示渲染后的待处理图像。
基于图8的技术方案,电子设备可以解决图像卡顿的问题。相较于固定的分辨率,本申请实施例提供的技术方案可以根据待处理图像的图像处理复杂度,灵活的调整图像的分辨率。具体的,电子设备可以根据用户的瞳孔坐标,确定用户的注视区域。然后,电子设备根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的分辨率和刷新率,并对注视区域的图像进行渲染。由于注视区域的图像对应的分辨率和刷新率与用户的注视点相关,因此,本申请实施例中,电子设备可以根据用户的注 视点以及图像的复杂度,自适应对分辨率进行灵活的调整。从而,相较于使用固定的分辨率对图像进行渲染,本申请实施例的技术方案可以根据图像的图像处理复杂度,灵活对分辨率进行调整,提升可画面的显示的流畅度。
一些实施例中,如图9所示,当电子设备设置有传感器时,该方法还可以包括S901。
S901、通过该传感器获取当前时间用户的头部转动速度。
其中,传感器可以为头部传感器。该传感器可以用于获取用户的头部转动速度。例如,当电子设备为头戴式设备(如VR设备)时,该传感器可以实时检测用户的头部转动速度。又例如,当电子设备为移动终端时,该传感器可以通过电子设备的相机拍摄用户的多个时刻的头部图像,并根据用户的多个头部图像,确定头部的转动速度。比如,在第一时刻的头部图像中,用户的头部处于位置1。在第二时刻的头部图像中,用户的头部处于位置2。第一时刻为第二时刻的上一个时刻。则用户的头部转动速度为(位置2-位置1)/(第二时刻-第一时刻)。
一种可能的实现方式中,传感器可以响应于用户的触发播放视频的操作,开始检测用户的头部转动速率,并向电子设备的处理器发送检测到的用户的头部转动速度。
进一步,上述S804具体可以通过S902实现。
S902、根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力、用户的头部转动速度,确定注视区域的图像对应的第一分辨率和第一刷新率。
其中,用户的头部转动速度与图像的分辨率成反比。用户的头部转动速度可以用于反映用户对图像的关注度。用户的头部转动速度越快,则说明用户对图像的关注度较低。用户的头部转动速度越慢,则说明用户对图像的关注度较高。
一种示例中,电子设备根据注视区域的图像的数据信息以及GPU的图像渲染能力,确定注视区域的图像的分辨率和刷新率之后,可以根据用户的头部转动速度对注视区域的图像的分辨率进行调整,并将调整后的分辨率作为第一分辨率。
例如,当用户的头部转动速度大于或等于预设速度时,电子设备可以减小注视区域的图像的分辨率。当用户的头部转动速度小于预设速度时,电子设备可以增大注视区域的图像的分辨率。比如,电子设备可以预设系数对图像的分辨率的大小进行调整。
需要说明的是,对于刷新率,电子设备可以调整,也可以保持不变。比 如,为了减少电子设备的计算量,电子设备可以不调整注视区域的刷新率。又比如,为了降低电子设备的渲染图像时的功耗,电子设备可以降低注视区域的图像的刷新率。
又一种示例中,电子设备可以根据注视区域的图像的数据信息、GPU的图像渲染能力、用户的头部转动速度以及第二预设对应关系,确定第一分辨率和第一刷新率。
其中,第二预设对应关系为图像的数据信息、GPU的图像渲染能力、头部转动速度与分辨率、刷新率之间的对应关系。第二预设对应关系可以为电子设备预先配置的。
基于图9的技术方案,电子设备可以根据用户的头部转动速度,对注视区域的分辨率进行灵活的调整。
一些实施例中,如图10所示,该方法还可以包括S1001和S1002。
S1001、确定非注视区域的图像对应的第二分辨率和第二刷新率。
其中,非注视区域是指显示器的显示区域中除注视区域之外的其他区域。第二分辨率小于或等于第一分辨率。例如,电子设备在确定目标分辨率之后,可以根据目标分辨率与第一分辨率之间的差值,确定第二分辨率。或者,电子设备也可以减小第一分辨率,并将减小后的第一分辨率作为第二分辨率。第一分辨率与第二分辨率的和小于或等于目标分辨率。
例如,为了减少电子设备的计算量,电子设备可以将第一刷新率作为非注视区域的图像的刷新率,也即第一刷新率等于第二刷新率。又例如,为了降低电子设备的功耗,电子设备可以减小第一刷新率,并将减小后的第一刷新率作为第二刷新率。
S1002、使用第二分辨率和第二刷新率对非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
基于图10的技术方案,对于非注视区域的图像,电子设备可以使用较低的分辨率和刷新率对图像进行渲染,减低了图像渲染的功耗。
一些实施例中,结合图10,如图11所示,该方法还可以包括S1101。
S1101、将渲染后的注视区域的图像与渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像,并通过显示器显示该渲染后的待处理图像。
其中,电子设备在对注视区域的图像和非注视区域的图像进行渲染之后,可以两个区域的图像进行拼接处理(也可以称为贴片处理),得到渲染后的待处理图像,保证了待处理图像的完整性。
一种示例中,GPU在使用注视区域的图像和非注视图像进行渲染之后, 可以通过API接口向电子设备的软件层传输渲染后注视区域的图像和渲染后的图像。电子设备的软件层可以将渲染后的注视区域的图像和渲染后的非注视区域的图像进行拼接处理,得到渲染后的待处理图像。然后,电子设备的软件层可以向显示模组/显示器传输该渲染后的待处理图像,以使得显示器可以显示该渲染后的待处理图像。
基于图11的技术方案,电子设备可以将渲染后的注视区域的图像和渲染后的非注视区域的图像进行拼接,并将拼接后的图像在显示器上显示。由于拼接后的图像中注视区域的图像为高清图像,从而满足了用户对高清图像的需求。
一些实施例中,如图12所示,本申请实施例提供了一种图像处理方法,该方法可以包括S1201~S1211。
S1201、红外相机拍摄用户的人眼图像,并根据用户的人眼图像确定用户的注视点,并向处理器传输用户的注视点。
S1202、处理器根据用户的注视点,确定注视区域的位置信息,并向复杂度计算模块传输注视区域的位置信息。
其中,S1201和S1202可以参照上述S802的描述,不予赘述。
S1203、图像数据检测模块确定待处理图像的数据信息,并向复杂度计算模块发送待处理图像的数据信息。
S1204、GPU监测模块监测GPU的图像渲染能力,并向复杂度计算模块传输GPU的图像渲染能力。
S1205、复杂度计算模块计算注视区域的图像的图像处理复杂度和待处理图像的图像处理复杂度,并向处理器传输注视区域的图像的图像处理复杂度和待处理图像的图像处理复杂度。
其中,S1203~S1205可以参照上述S801的描述,不予赘述。
S1206、显示计算模块计算待处理图像的目标分辨率和目标刷新率。
S1207、处理器根据注视区域的图像处理复杂度和目标分辨率、目标刷新率计算注视区域的图像对应的第一分辨率和第一刷新率。
S1208、处理器计算非注视区域的第二分辨率和第二刷新率,并向GPU传输第一分辨率和第一刷新率、第二分辨率和第二刷新率。
其中,S1206~S1208可以参照上述S803的描述,不予赘述。
S1209、GPU根据第一分辨率和第一刷新率对注视区域的图像进行渲染,并根据第二分辨率和第二刷新率对非注视区域的图像进行渲染,并向处理器传输渲染后注视区域的图像和渲染后的非注视区域的图像。
S1210、处理器将渲染后的注视区域的图像与渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像,并向显示器发送渲染后的待处理图像。
S1211、显示器显示渲染后的待处理图像。
基于图12的技术方案,电子设备可以解决图像卡顿的问题。相较于固定的分辨率,本申请实施例提供的技术方案可以根据待处理图像的图像处理复杂度,灵活的调整图像的分辨率。具体的,电子设备可以根据用户的瞳孔坐标,确定用户的注视区域。然后,电子设备根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的分辨率和刷新率,并对注视区域的图像进行渲染。由于注视区域的图像对应的分辨率和刷新率与用户的注视点相关,因此,本申请实施例中,电子设备可以根据用户的注视点以及图像的复杂度,自适应对分辨率进行灵活的调整。从而,相较于固定的分辨率,可以提升画面的显示的流畅度。
一些实施例中,本申请实施例提供的方法还可以包括:获取电子设备的功耗情况,并根据电子设备的功耗情况,调整电子设备的分辨率、刷新率或者帧率中的至少一个。
其中,电子设备的功耗情况可以包括电子设备渲染图像的功率。例如,电子设备可以获取电子设备的电流和电压,并根据电流和电压,计算得到电子设备的功耗。
一种示例中,当电子设备在第一时间段内的功耗大于预设功耗,电子设备可以降低电子设备的分辨率、刷新率或者帧率中的至少一个。
例如,电子设备在第一时间段内使用第一预设分辨率、第一刷新率和第一预设帧率渲染图像。当电子设备在第一时间段内的功耗大于预设功耗时,电子设备可以在第二时间段内使用第二预设分辨率、和/或第二刷新率、和/或第一预设帧率渲染图像。第二预设分辨率小于第一预设分辨率。第二刷新率小于第二刷新率。第二预设帧率小于第一预设帧率。
进一步的,电子设备还可以根据电子设备当前的剩余电量,调整第一时间段内的分辨率、刷新率或者帧率中的至少一个,并使用调整后的分辨率、刷新率或者帧率在第二时间段内渲染图像。
其中,调整后的分辨率小于调整前的分辨率。调整后的刷新率小于调整前的分辨率。调整后的帧率小于调整前的帧率。
需要说明的是,本申请实施例中,上述根据预设阈值作为判断条件的描述中,比如,高于可以替换为高于或等于,低于或等于可以替换为低于;大于或等于可以替换为大于,小于可以替换为小于或等于;高于或等于可以替 换为高于,小于可以替换为小于或等于;大于可以替换为大于或等于,小于或等于可以替换为小于。
需要指出的是,本申请各实施例之间可以相互借鉴或参考,例如,相同或相似的步骤,方法实施例、系统实施例和装置实施例之间,均可以相互参考,不予限制。
本申请实施例可以根据上述方法示例对图像处理装置进行功能模块或者功能单元的划分,例如,可以对应各个功能划分各个功能模块或者功能单元,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块或者功能单元的形式实现。其中,本申请实施例中对模块或者单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
如图13所示,为本申请实施例提供的一种图像处理装置的结构示意图,该图像处理装置应用于具有显示屏的电子设备,该装置包括:获取单元1301、确定单元1302和处理单元1303。
获取单元1301,被配置为获取至少一个第一时间段内的多个帧率,在第一时间段内电子设备为第一预设帧率。
确定单元1302,被配置为根据至少一个第一时间段内的多个帧率,确定第一时间段的下一个第二时间段内电子设备的第二预设帧率。
处理单元1303,被配置为根据第二预设帧率,在第二时间段内对图像进行渲染,并通过显示屏显示渲染后的图像。在第二时间段内电子设备渲染图像时使用的刷新率小于或等于第二预设帧率。
在一些实施例中,电子设备具有多个预设帧率,确定单元1302,具体被配置为:根据至少一个第一时间段内的多个帧率的均值,确定在第二时间段内电子设备的第二预设帧率。多个预设帧率包括第一预设帧率和第二预设帧率。
在一些实施例中,当在至少一个第一时间段内的多个帧率的均值与第一预设帧率之间的差值小于预设值时,第二预设帧率为多个预设帧率中大第一预设帧率的预设帧率。
在一些实施例中,获取单元1301,还被配置为:当第一时间段内多个帧率的均值与第一预设帧率之间的差值大于或等于预设值,第二预设帧率为多个预设帧率中小于或等于至少一个第一时间段内多个帧率的均值的预设帧率。
在一些实施例中,处理单元1303,还被配置为:响应于开机操作,将 电子设备的初始预设帧率设置为多个预设帧率中最大预设帧率。
在一些实施例中,获取单元1301,还被配置为:获取在至少一个第一时间段使用电子设备的用户的头部转动速度。确定单元1302,还被配置为:根据用户的头部转动速度,确定电子设备在第二时间段内对应的第一分辨率以及对第二预设帧率进行调整。该第一分辨率与用户的头部转动速度成反比。处理单元1303,具体被配置为:根据调整后第二预设帧率和第一分辨率,在第二时间段内对图像进行渲染。
在一些实施例中,电子设备设置有多个预设分辨率。确定单元1302,具体被配置为:当用户的头部转动速度大于或等于预设速度时,确定电子设备在第二时间段内对应的第一分辨率为多个预设分辨率中的第一预设分辨率。当用户的头部转动速度小于预设速度时,确定电子设备在第二时间段内的分辨率为多个预设分辨率中的第二预设分辨率。第二预设分辨率大于第一预设分辨率。
在一些实施例中,确定单元1302,具体被配置为:当用户的头部转动速度大于预设速度时,将第二预设帧率调整为第三预设帧率,第三预设帧率大于所述第二预设帧率;当用户的头部转动速度小于或等于预设速度时,将第二预设帧率调整为第四预设帧率,第四预设帧率小于第二预设帧率;其中,第二预设分辨率与第一预设分辨率的比值小于或等于第三预设帧率与第四预设帧率的比值。
如图14所示,为本申请实施例提供的一种图像处理装置的结构示意图,该图像处理装置应用于具有显示屏的电子设备,该装置包括:确定单元1401、获取单元1402及处理单元1403。
确定单元1401,被配置为:确定当前时间注视显示屏的用户对应的注视区域。
获取单元1402,被配置为:获取待处理图像以及电子设备的GPU的图像渲染能力。
确定单元1401,还被配置为:确定待处理图像中与注视区域的图像的数据信息,并根据注视区域的图像的数据信息,确定注视区域的图像的图像处理复杂度。确定单元1401,还被配置为:根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力,确定注视区域的图像对应的第一分辨率和第一刷新率。
处理单元1403,被配置为:根据第一分辨率和所述第一刷新率,对注视区域的图像进行渲染,得到渲染后的待处理图像,并通过显示屏显示渲染后 的待处理图像。
在一些实施例中,确定单元1401,还被配置为:确定待处理图像的图像处理复杂度。确定单元1401,还被配置为:根据待处理图像的图像处理复杂度以及GPU的图像渲染能力,确定待处理图像的目标分辨率和目标刷新率。确定单元1401,具体被配置为:根据目标分辨率和注视区域的图像的图像处理复杂度,确定第一分辨率,并将目标刷新率作为第一刷新率。
在一些实施例中,确定单元1401,具体被配置为:获取用户在当前时间的瞳孔坐标,并根据瞳孔坐标确定在当前时间用户对应的注视区域。
在一些实施例中,电子设备设置有用于检测用户的头部转动速度的传感器。获取单元1402,还被配置为:通过传感器获取在当前时间用户的头部转动速度。确定单元1401,具体被配置为:根据注视区域的图像的图像处理复杂度以及GPU的图像渲染能力、用户的头部转动速度,确定第一分辨率和第一刷新率。
在一些实施例中,确定单元1401,具体被配置为:根据注视区域的图像的数据信息以及预设复杂度数据库,确定注视区域的图像的图像处理复杂度。该预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系。注视区域的图像的数据信息包括注视区域的图像的子图像的数量、图层数量中的一个或多个。
在一些实施例中,目标分辨率与目标刷新率的乘积为预设参数值。该预设参数值与所述电子设备的配置信息相关。
在一些实施例中,确定单元1401,还被配置为:确定非注视区域的图像对应的第二分辨率和第二刷新率。非注视区域为显示屏的显示区域中除注视区域之外的区域。第二分辨率小于所述第一分辨率,第二刷新率等于第一刷新率。处理单元1403,还被配置为:使用第二分辨率和第二刷新率对非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
在一些实施例中,第二分辨率为目标分辨率与第一分辨率的差值。
在一些实施例中,处理单元1403,还被配置为:将渲染后的注视区域的图像与渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像。
在一些实施例中,电子设备设置有第一API和第二API。第一API与传感器连接。第二API与GPU连接。获取单元1402,还被配置为:通过第一API获取用户的头部转动速率,并通过第二API获取待处理图像的复杂度等级。
在通过硬件实现时,本申请实施例中的获取单元1402可以集成在通信接 口上,确定单元1401和处理单元1403可以集成在处理器上。具体实现方式如图15所示。
图15示出了上述实施例中所涉及的图像处理装置的又一种可能的通信装置的结构示意图。该通信装置包括:处理器1502和通信接口1503。处理器1502用于对装置的动作进行控制管理,例如,执行上述确定单元1401和处理单元1403执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信接口1503用于支持装置与其他网络实体的通信,例如,执行上述获取单元1402执行的步骤。该装置还可以包括存储器1501和总线1504,存储器1501用于存储装置的程序代码和数据。
其中,存储器1501可以是该装置中的存储器等,该存储器可以包括易失性存储器,例如随机存取存储器;该存储器也可以包括非易失性存储器,例如只读存储器,快闪存储器,硬盘或固态硬盘;该存储器还可以包括上述种类的存储器的组合。
上述处理器1502可以是实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器可以是中央处理器,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。
总线1504可以是扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线1504可以分为地址总线、数据总线、控制总线等。为便于表示,图15中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
图15中的装置还可以为芯片。该芯片包括一个或两个以上(包括两个)处理器1502和通信接口1503。
可选的,该芯片还包括存储器1501,存储器1501可以包括只读存储器和随机存取存储器,并向处理器1502提供操作指令和数据。存储器1501的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。
在一些实施方式中,存储器1501存储了如下的元素,执行模块或者数据结构,或者他们的子集,或者他们的扩展集。
在本申请实施例中,通过调用存储器1501存储的操作指令(该操作指令 可存储在操作系统中),执行相应的操作。
本公开的一些实施例提供了一种计算机可读存储介质(例如,非暂态计算机可读存储介质),该计算机可读存储介质中存储有计算机程序指令,计算机程序指令在计算机(例如,电子设备)上运行时,使得计算机执行如上述实施例中任一实施例所述的图像处理方法。
示例性的,上述计算机可读存储介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,CD(Compact Disk,压缩盘)、DVD(Digital Versatile Disk,数字通用盘)等),智能卡和闪存器件(例如,EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、卡、棒或钥匙驱动器等)。本公开描述的各种计算机可读存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读存储介质。术语“机器可读存储介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
本公开的一些实施例还提供了一种计算机程序产品,例如,该计算机程序产品存储在非瞬时性的计算机可读存储介质上。该计算机程序产品包括计算机程序指令,在计算机(例如,电子设备)上执行该计算机程序指令时,该计算机程序指令使计算机执行如上述实施例所述的图像处理方法。
本公开的一些实施例还提供了一种计算机程序。当该计算机程序在计算机(例如,电子设备)上执行时,该计算机程序使计算机执行如上述实施例所述的图像处理方法。
上述计算机可读存储介质、计算机程序产品及计算机程序的有益效果和上述一些实施例所述的图像处理方法的有益效果相同,此处不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。
Claims (38)
- 一种图像处理方法,应用于具有显示屏的电子设备,所述方法包括:获取至少一个第一时间段内的多个帧率,在所述第一时间段内所述电子设备为第一预设帧率;根据所述至少一个第一时间段内的多个帧率,确定在第二时间段内所述电子设备的第二预设帧率,所述第二时间段为所述至少一个第一时间段的下一个时间段;根据所述第二预设帧率,在所述第二时间段内对图像进行渲染,并通过所述显示屏显示渲染后的图像,在所述第二时间段内所述电子设备渲染图像时使用的帧率小于或等于所述第二预设帧率。
- 根据权利要求1所述的方法,其中,所述电子设备具有多个预设帧率,所述根据所述至少一个第一时间段内的多个帧率,确定在第二时间段内所述电子设备的第二预设帧率,包括:根据所述至少一个第一时间段中每个第一时间段内的多个帧率的均值,确定在所述第二时间段内所述电子设备的所述第二预设帧率,所述多个预设帧率包括所述第一预设帧率和所述第二预设帧率。
- 根据权利要求2所述的方法,其中,当所述至少一个第一时间段中每个第一时间段内的多个帧率的均值与所述第一预设帧率之间的差值均小于预设值时,所述第二预设帧率为所述多个预设帧率中大于所述第一预设帧率的预设帧率。
- 根据权利要求2所述的方法,其中,当所述第一时间段内的多个帧率的均值与所述第一预设帧率之间的差值大于或等于预设值,所述第二预设帧率为所述多个预设帧率中小于或等于所述第一时间段内的多个帧率的均值的预设帧率。
- 根据权利要求2-4任一项所述的方法,其中,所述方法还包括:响应于开机操作,将所述电子设备的初始预设帧率设置为所述多个预设帧率中最大预设帧率。
- 根据权利要求1-5任一项所述的方法,其中,所述方法还包括:获取在所述至少一个第一时间段内使用所述电子设备的用户的头部转动速度;根据所述用户的头部转动速度,确定所述电子设备在所述第二时间段内对应的第一分辨率以及对所述第二预设帧率进行调整,所述第一分辨率与所述用户的头部转动速度成反比;所述根据所述第二预设帧率,在所述第二时间段内对图像进行渲染,包括:根据调整后的所述第二预设帧率和所述第一分辨率,在所述第二时间段内对图像进行渲染。
- 根据权利要求6所述的方法,其中,所述电子设备设置有多个预设分辨率,所述根据所述用户的头部转动速度,确定所述电子设备在所述第二时间段内对应的第一分辨率,包括:当所述用户的头部转动速度大于预设速度时,确定所述第一分辨率为所述多个预设分辨率中的第一预设分辨率;当所述用户的头部转动速度小于或等于所述预设速度时,确定所述第一分辨率为所述多个预设分辨率中的第二预设分辨率,所述第二预设分辨率大于所述第一预设分辨率,所述多个预设分辨率包括所述第一预设分辨率、所述第二预设分辨率。
- 根据权利要求7所述的方法,其中,所述根据所述用户的头部转动速度对所述第二预设帧率进行调整,包括:当所述用户的头部转动速度大于预设速度时,将所述第二预设帧率调整为第三预设帧率,所述第三预设帧率为所述多个预设帧率中大于所述第二预设帧率的预设帧率;当所述用户的头部转动速度小于或等于预设速度时,将所述第二预设帧率调整为第四预设帧率,所述第四预设帧率为所述多个预设帧率中小于所述第二预设帧率的预设帧率;其中,所述第二预设分辨率与所述第一预设分辨率的比值小于或等于所述第三预设帧率与所述第四预设帧率的比值。
- 一种图像处理方法,应用于具有显示屏的电子设备,所述方法包括:确定当前时间注视所述显示屏的用户对应的注视区域;获取待处理图像,并确定所述待处理图像中所述注视区域的图像的数据信息;根据所述注视区域的图像的数据信息,确定所述注视区域的图像的图像处理复杂度;获取所述电子设备的图形处理器GPU的图像渲染能力,并根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述注视区域的图像对应的第一分辨率和第一刷新率;根据所述第一分辨率和所述第一刷新率,对所述注视区域的图像进行渲染,得到渲染后的待处理图像,并通过所述显示屏显示所述渲染后的待处理图像。
- 根据权利要求9所述的方法,其中,所述方法还包括:确定所述待处理图像的图像处理复杂度;根据所述待处理图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述待处理图像的目标分辨率和目标刷新率;所述根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述注视区域的图像对应的第一分辨率和第一刷新率,包括:根据所述目标分辨率和所述注视区域的图像的图像处理复杂度,确定所述第一分辨率,并将所述目标刷新率作为所述第一刷新率。
- 根据权利要求9或10所述的方法,其中,所述确定当前时间注视所述显示屏的用户对应的注视区域,包括:获取所述用户在当前时间的瞳孔坐标,并根据所述瞳孔坐标确定在所述当前时间所述用户对应的注视区域。
- 根据权利要求9-11任一项所述的方法,其中,所述电子设备设置有传感器,所述传感器用于检测所述用户的头部转动速度,所述方法还包括:通过所述传感器获取在所述当前时间所述用户的头部转动速度;所述根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述注视区域的图像对应的第一分辨率和第一刷新率,包括:根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力、所述用户的头部转动速度,确定所述第一分辨率和所述第一刷新率。
- 根据权利要求9-12任一项所述的方法,其中,所述根据所述注视区域的图像的数据信息,确定所述注视区域的图像的图像处理复杂度,包括:根据所述注视区域的图像的数据信息以及预设复杂度数据库,确定所述注视区域的图像的图像处理复杂度,所述预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系,所述注视区域的图像的数据信息包括所述注视区域的图像的子图像的数量、图层数量中的一个或多个。
- 根据权利要求10所述的方法,其中,所述目标分辨率与所述目标刷新率的乘积为预设参数值,所述预设参数值与所述电子设备的配置信息相关。
- 根据权利要求14所述的方法,其中,所述方法还包括:确定非注视区域的图像对应的第二分辨率和第二刷新率,所述非注视区域为所述显示屏的显示区域中除所述注视区域之外的区域,所述第二分辨率小于所述第一分辨率,所述第二刷新率等于所述第一刷新率;使用所述第二分辨率和所述第二刷新率对所述非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
- 根据权利要求15所述的方法,其中,所述第二分辨率为所述目标分辨率与所述第一分辨率的差值。
- 根据权利要求15或16所述的方法,其中,所述包括:将所述渲染后的注视区域的图像与所述渲染后的非注视区域的图像进行拼接,得到所述渲染后的待处理图像。
- 根据权利要求12所述的方法,其中,所述电子设备设置有第一应用程序编程接口API和第二API,所述第一API与所述传感器连接,所述第二API与所述GPU连接;所述方法还包括:通过所述第一API获取所述用户的头部转动速率,并通过所述第二API获取所述待处理图像的复杂度等级。
- 一种图像处理装置,其中,应用于具有显示屏的电子设备,所述装置包括获取单元、确定单元和处理单元;所述获取单元,被配置为:获取至少一个第一时间段内的多个帧率,在所述第一时间段内所述电子设备为第一预设帧率;所述确定单元,被配置为:根据所述至少一个第一时间段内的多个帧率,确定在第二时间段内所述电子设备的第二预设帧率,所述第二时间段为所述至少一个第一时间段的下一个时间段;所述处理单元,被配置为:根据所述第二预设帧率,在所述第二时间段内对图像进行渲染,并通过所述显示屏显示渲染后的图像,在所述第二时间段内所述电子设备渲染图像时使用的帧率小于或等于所述第二预设帧率。
- 根据权利要求19所述的装置,其中,所述电子设备具有多个预设帧率,所述确定单元,具体被配置为:根据所述至少一个第一时间段内的多个帧率的均值,确定在所述第二时间段内所述电子设备的所述第二预设帧率,所述多个预设帧率包括所述第一预设帧率和所述第二预设帧率。
- 根据权利要求20所述的装置,其中,当所述至少一个第一时间中每个第一时间段的多个帧率的均值与所述第一预设刷新率之间的差值均小于预设值时,所述第二预设刷新率为所述多个预设帧率中大于或等于所述第一预设帧率的预设帧率。
- 根据权利要求20所述的装置,其中,当所述第一时间段内的多个帧率的均值与所述第一预设刷新率之间的差值大于或等于预设值,所述第二预设帧率为所述多个预设帧率中小于或等于所述第一时间段内的多个帧率的均值的预设帧率。
- 根据权利要求20-22任一项所述的装置,其中,所述处理单元,还被配置为:响应于开机操作,将所述电子设备的初始预设帧率设置为所述多个预设帧率中最大预设帧率。
- 根据权利要求19-23任一项所述的装置,其中,所述获取单元,还被配置为:获取在所述至少一个第一时间段使用所述电子设备的用户的头部转动速度;所述确定单元,还被配置为:根据所述用户的头部转动速度,确定所述电子设备在所述第二时间段内对应的第一分辨率以及对所述第二预设帧率建进行调整,所述第一分辨率与所述用户的头部转动速度成反比;所述处理单元,具体被配置为:根据调整后的所述第二预设帧率和所述第一分辨率,在所述第二时间段内对图像进行渲染。
- 根据权利要求24所述的装置,其中,所述电子设备设置有多个预设分辨率,所述确定单元,具体被配置为:当所述用户的头部转动速度大于预设速度时,确定所述第一分辨率为所述多个预设分辨率中的第一预设分辨率;当所述用户的头部转动速度小于或等于所述预设速度时,确定所述第一分辨率为所述多个预设分辨率中的第二预设分辨率,所述第二预设分辨率大于所述第一预设分辨,所述多个预设分辨率包括所述第一预设分辨率、所述第二预设分辨率。
- 根据权利要求25所述的装置,其中,所述确定单元,具体被配置为:当所述用户的头部转动速度大于预设速度时,将所述第二预设帧率调整为第三预设帧率,所述第三预设帧率为所述多个预设帧率中大于所述第二预 设帧率的预设帧率;当所述用户的头部转动速度小于或等于预设速度时,将所述第二预设帧率调整为第四预设帧率,所述第四预设帧率为所述多个预设帧率中小于所述第二预设帧率的预设帧率;其中,所述第二预设分辨率与所述第一预设分辨率的比值小于或等于所述第三预设帧率与所述第四预设帧率的比值。
- 一种图像处理装置,应用于具有显示屏的电子设备,所述装置包括确定单元、获取单元和处理单元;所述确定单元,被配置为:确定当前时间注视所述显示屏的用户对应的注视区域;所述获取单元,被配置为:获取待处理图像以及所述电子设备的GPU的图像渲染能力;所述确定单元,还被配置为:确定所述待处理图像中所述注视区域的图像的数据信息,并根据所述注视区域的图像的数据信息,确定所述注视区域的图像的图像处理复杂度;所述确定单元,还被配置为:根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述注视区域的图像对应的第一分辨率和第一刷新率;所述处理单元,被配置为:根据所述第一分辨率和所述第一刷新率,对所述注视区域的图像进行渲染,得到渲染后的待处理图像,并通过所述显示屏显示所述渲染后的待处理图像。
- 根据权利要求27所述的装置,其中,所述确定单元,还被配置为:确定所述待处理图像的图像处理复杂度;所述确定单元,还被配置为:根据所述待处理图像的图像处理复杂度以及所述GPU的图像渲染能力,确定所述待处理图像的目标分辨率和目标刷新率;所述确定单元,具体被配置为:根据所述目标分辨率和所述注视区域的图像的图像处理复杂度,确定所述第一分辨率,并将所述目标刷新率作为所述第一刷新率。
- 根据权利要求27或28所述的装置,其中,所述确定单元,具体被配置为:获取所述用户在当前时间的瞳孔坐标,并根据所述瞳孔坐标确定在所述当前时间所述用户对应的注视区域。
- 根据权利要求27-29任一项所述的装置,其中,所述电子设备设置有传感器,所述传感器用于检测所述用户的头部转动速度,所述获取单元,还被配置为:通过所述传感器获取在所述当前时间所述用户的头部转动速度;所述确定单元,具体被配置为:根据所述注视区域的图像的图像处理复杂度以及所述GPU的图像渲染能力、所述用户的头部转动速度,确定所述第一分辨率和所述第一刷新率。
- 根据权利要求27-30任一项所述的装置,其中,所述确定单元,具体被配置为:根据所述注视区域的图像的数据信息以及预设复杂度数据库,确定所述注视区域的图像的图像处理复杂度,所述预设复杂度数据库包括图像的数据信息以及图像处理复杂度之间的对应关系,所述注视区域的图像的数据信息包括所述注视区域的图像的子图像的数量、图层数量中的一个或多个。
- 根据权利要求28所述的装置,其中,所述目标分辨率与所述目标刷新率的乘积为预设参数值,所述预设参数值与所述电子设备的配置信息相关。
- 根据权利要求32所述的装置,其中,所述确定单元,还被配置为:确定非注视区域的图像对应的第二分辨率和第二刷新率,所述非注视区域为所述显示屏的显示区域中除所述注视区域之外的区域,所述第二分辨率小于所述第一分辨率,所述第二刷新率等于所述第一刷新率;所述处理单元,还被配置为:使用所述第二分辨率和所述第二刷新率对所述非注视区域的图像进行渲染,得到渲染后的非注视区域的图像。
- 根据权利要求33所述的装置,其中,所述第二分辨率为所述目标分辨率与所述第一分辨率的差值。
- 根据权利要求33或34所述的装置,所述处理单元,还被配置为:将所述渲染后的注视区域的图像与所述渲染后的非注视区域的图像进行拼接,得到渲染后的待处理图像。
- 根据权利要求30所述的装置,其中,所述电子设备设置有第一API和第二API,所述第一API与所述传感器连接,所述第二API与所述GPU连接;所述获取单元,还被配置为:通过所述第一API获取所述用户的头部转动速率,并通过所述第二API获取所述待处理图像的复杂度等级。
- 一种图像处理装置,包括:处理器和通信接口;所述通信接口和所述处理器耦合,所述处理器用于运行计算机程序或指令,以实现如权利要求 1-8任一项或权利要求9-18任一项所述的图像处理方法。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有指令,当计算机执行所述指令时,所述计算机执行上述权利要求1-8任一项或权利要求9-18任一项所述的图像处理方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202280002907.4A CN117940989A (zh) | 2022-08-26 | 2022-08-26 | 图像处理方法及装置 |
PCT/CN2022/115288 WO2024040613A1 (zh) | 2022-08-26 | 2022-08-26 | 图像处理方法及装置 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/115288 WO2024040613A1 (zh) | 2022-08-26 | 2022-08-26 | 图像处理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024040613A1 true WO2024040613A1 (zh) | 2024-02-29 |
Family
ID=90012221
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/115288 WO2024040613A1 (zh) | 2022-08-26 | 2022-08-26 | 图像处理方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117940989A (zh) |
WO (1) | WO2024040613A1 (zh) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140002730A1 (en) * | 2012-06-28 | 2014-01-02 | Qualcomm Incorporated | Adaptive frame rate control |
CN105094272A (zh) * | 2014-05-14 | 2015-11-25 | 中兴通讯股份有限公司 | 一种终端的硬件刷新率的调节方法及装置 |
CN106157925A (zh) * | 2016-08-30 | 2016-11-23 | 南京巨鲨显示科技有限公司 | 一种刷新率分辨率选择优先模式的显示装置及方法 |
CN106919401A (zh) * | 2017-03-10 | 2017-07-04 | 广东欧珀移动通信有限公司 | 一种动态调节分辨率的方法、装置及移动终端 |
CN108811055A (zh) * | 2018-03-27 | 2018-11-13 | 广东欧珀移动通信有限公司 | 帧率调整方法、装置、终端设备及存储介质 |
CN109157839A (zh) * | 2018-10-16 | 2019-01-08 | Oppo广东移动通信有限公司 | 帧率调控方法、装置、存储介质及终端 |
CN110366035A (zh) * | 2019-07-19 | 2019-10-22 | 广州酷狗计算机科技有限公司 | 帧率控制方法、装置、计算机设备和计算机可读存储介质 |
CN114115773A (zh) * | 2021-10-20 | 2022-03-01 | 杭州逗酷软件科技有限公司 | 帧率调节方法、装置、存储介质及终端设备 |
-
2022
- 2022-08-26 WO PCT/CN2022/115288 patent/WO2024040613A1/zh active Application Filing
- 2022-08-26 CN CN202280002907.4A patent/CN117940989A/zh active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140002730A1 (en) * | 2012-06-28 | 2014-01-02 | Qualcomm Incorporated | Adaptive frame rate control |
CN105094272A (zh) * | 2014-05-14 | 2015-11-25 | 中兴通讯股份有限公司 | 一种终端的硬件刷新率的调节方法及装置 |
CN106157925A (zh) * | 2016-08-30 | 2016-11-23 | 南京巨鲨显示科技有限公司 | 一种刷新率分辨率选择优先模式的显示装置及方法 |
CN106919401A (zh) * | 2017-03-10 | 2017-07-04 | 广东欧珀移动通信有限公司 | 一种动态调节分辨率的方法、装置及移动终端 |
CN108811055A (zh) * | 2018-03-27 | 2018-11-13 | 广东欧珀移动通信有限公司 | 帧率调整方法、装置、终端设备及存储介质 |
CN109157839A (zh) * | 2018-10-16 | 2019-01-08 | Oppo广东移动通信有限公司 | 帧率调控方法、装置、存储介质及终端 |
CN110366035A (zh) * | 2019-07-19 | 2019-10-22 | 广州酷狗计算机科技有限公司 | 帧率控制方法、装置、计算机设备和计算机可读存储介质 |
CN114115773A (zh) * | 2021-10-20 | 2022-03-01 | 杭州逗酷软件科技有限公司 | 帧率调节方法、装置、存储介质及终端设备 |
Also Published As
Publication number | Publication date |
---|---|
CN117940989A (zh) | 2024-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110166758B (zh) | 图像处理方法、装置、终端设备及存储介质 | |
US11442540B2 (en) | Eye tracking using low resolution images | |
US10684685B2 (en) | Use of eye tracking to adjust region-of-interest (ROI) for compressing images for transmission | |
EP3824371B1 (en) | Distributed foveated rendering based on user gaze | |
US20190355331A1 (en) | Managing Transitions of Adaptive Display Rates for Different Video Playback Scenarios | |
US9424767B2 (en) | Local rendering of text in image | |
JP4181039B2 (ja) | 携帯用仮想現実システム | |
US10712817B1 (en) | Image re-projection for foveated rendering | |
US9165381B2 (en) | Augmented books in a mixed reality environment | |
US20190026864A1 (en) | Super-resolution based foveated rendering | |
EP4093016A1 (en) | Frame interpolation processing method and related product | |
CN104932659B (zh) | 图像显示方法及显示系统 | |
CN102033696B (zh) | 图片控制装置和图片控制方法 | |
JP2019531038A (ja) | ディスプレイ装置及びその制御方法 | |
CN111198610A (zh) | 一种全景视频的视场控制方法、装置、设备及存储介质 | |
CN112445339A (zh) | 基于注视和扫视的图形操纵 | |
WO2023202216A9 (zh) | 图像处理方法、装置及存储介质 | |
TW201913622A (zh) | 顯示裝置及顯示方法 | |
WO2024040613A1 (zh) | 图像处理方法及装置 | |
CN115914603A (zh) | 图像渲染方法、头戴显示设备和可读存储介质 | |
US20240354894A1 (en) | Spatio-Temporal Separable Filters | |
US20230325967A1 (en) | Accommodations for xr devices | |
WO2022133991A1 (zh) | 图像处理、显示方法、装置、设备以及计算机存储介质 | |
US20240112303A1 (en) | Context-Based Selection of Perspective Correction Operations | |
CN118151877A (zh) | 刷新率调整方法及装置、存储介质及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 202280002907.4 Country of ref document: CN |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18689562 Country of ref document: US |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22956158 Country of ref document: EP Kind code of ref document: A1 |