WO2022007862A1 - Image processing method, system, electronic device and computer readable storage medium - Google Patents

Image processing method, system, electronic device and computer readable storage medium Download PDF

Info

Publication number
WO2022007862A1
WO2022007862A1 PCT/CN2021/105060 CN2021105060W WO2022007862A1 WO 2022007862 A1 WO2022007862 A1 WO 2022007862A1 CN 2021105060 W CN2021105060 W CN 2021105060W WO 2022007862 A1 WO2022007862 A1 WO 2022007862A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
resolution
electronic device
super
model
Prior art date
Application number
PCT/CN2021/105060
Other languages
French (fr)
Chinese (zh)
Inventor
张梦然
陈泰雨
薛蓬
张运超
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022007862A1 publication Critical patent/WO2022007862A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/28Indexing scheme for image data processing or generation, in general involving image processing hardware

Definitions

  • the present application belongs to the field of artificial intelligence, and in particular, relates to an image processing method, system, electronic device, and computer-readable storage medium.
  • the present application provides an image processing method, a system, an electronic device and a computer-readable storage medium, which solves the problem that in the existing image solution, when the hardware resources of the electronic device are insufficient, the electronic device can only run at a low image quality and high Problems with image quality products.
  • an image processing method is provided, applied to a first electronic device, including:
  • the first electronic device acquires native image data, where the native image data is unrendered image data generated by an application;
  • the first electronic device renders the native image data through the first graphics rendering hardware to obtain a first image
  • the first electronic device performs super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
  • the application generates native image data during the running process.
  • the first electronic device may render the native image data through the first graphics rendering component, so that the native image data is converted into visible pixels to obtain the first image.
  • the first electronic device may perform super-resolution reconstruction on the first image through the second graphics rendering component to obtain a high-quality target image.
  • the image processing method of the present application obtains the target image by combining preliminary rendering and super-resolution reconstruction, which can reduce the time required for electronic devices to render high-quality images. Rendering power and computation.
  • first graphics rendering component and the second graphics rendering component may be a central processing unit (CPU), a graphics processing unit (graphics processing unit, GPU), and a neural-network processing unit (neural-network processing units). , NPU) one or more of.
  • CPU central processing unit
  • GPU graphics processing unit
  • NPU neural-network processing units
  • first graphics rendering component and the second graphics rendering component are different graphics rendering components, so as to make full use of the heterogeneous graphics rendering components inside the electronic device, and avoid the electronic device with a lower hardware resource due to insufficient hardware resources of a single graphics rendering hardware.
  • Image quality runs high-quality products.
  • the first electronic device performs super-resolution reconstruction on the first image through first graphics rendering hardware to obtain a target image, including:
  • the first electronic device obtains the identifier of the application
  • the first electronic device searches for a target super-score model associated with the identifier
  • the first electronic device performs super-resolution reconstruction on the first image through the first graphics rendering hardware and the found target super-resolution model to obtain a target image.
  • the first electronic device may perform super-resolution reconstruction on the first image by using the super-resolution model.
  • the super-score model may include a specific over-score model and a general over-score model.
  • the specific super-resolution model is only suitable for some applications, and its applicability is poor, but it has a high image quality optimization ability.
  • the general super-score model has high applicability, but the ability to optimize image quality is limited.
  • the electronic device may pre-establish an association relationship between the specific super-resolution model and its applicable application program.
  • the first electronic device may acquire the identifier of the application, and search for a target super-score model associated with the identifier.
  • the first electronic device can find the target super-score model associated with the above identifier, it means that there is a specific super-score model (ie, the target super-score model) suitable for the above application in the first electronic device.
  • the first electronic device may perform super-resolution reconstruction on the first image by using the above-mentioned first graphics rendering hardware and the above-mentioned target super-resolution model.
  • the electronic device uses the target super-resolution model to perform super-resolution reconstruction on the first image, which can better improve the image quality of the target image.
  • the identifier of the application program may be the package name of the application program, or the identifier of the application program may also be a user-defined identifier.
  • the method further includes:
  • the first electronic device performs super-resolution reconstruction on the first image by using the first graphics rendering hardware and a preset general super-resolution model, Get the target image.
  • the first electronic device cannot find the target super-scoring model associated with the above identifier, it means that there is no specific super-scoring model associated with the application.
  • the first electronic device may perform super-resolution reconstruction on the first image by using the first graphics rendering hardware and the preset general super-resolution model to obtain the target image.
  • the method further includes:
  • the first electronic device establishes an association relationship between the identifier and the general super-resolution model.
  • the first electronic device uses the general super-resolution model to perform super-resolution reconstruction on the first image
  • the first electronic device may be set with multiple general super-resolution models, in order to make the application program next time
  • the first electronic device may invoke the same general super-resolution model to perform super-resolution reconstruction on the first image, and the first electronic device may establish an association relationship between the above-mentioned identifier and the general super-resolution model.
  • the first electronic device can find the general super-score model according to the association relationship between the above-mentioned identifier and the general super-score model, determine the general-purpose super-score model as the target
  • the super-resolution model performs super-resolution reconstruction on the first image, so that the first electronic device can maintain the same level of image quality optimization when processing the image of the application.
  • the first electronic device renders the native image data by using first graphics rendering hardware to obtain a first image, including:
  • the first electronic device renders the native image data by using the first graphics rendering hardware and a preset first image resolution to obtain a first image.
  • the first electronic device may render native image data according to the first image resolution.
  • the first image resolution is preset by the first electronic device.
  • the first electronic device performs super-resolution reconstruction on the first image by using second graphics rendering hardware to obtain a target image, including:
  • the first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware and the single-enhanced super-resolution model to obtain a target image, wherein the first image resolution and the The image resolutions of the target images are the same, and the single-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same.
  • the first electronic device may select the single-enhanced super-resolution model when selecting the super-resolution model to perform super-resolution reconstruction on the first image.
  • the image resolution of the input image of the model is the same as the image resolution of the output image of the model.
  • the first electronic device performs super-resolution reconstruction on the first image by using second graphics rendering hardware to obtain a target image, including:
  • the first electronic device performs super-resolution reconstruction on the first image by using the second graphics rendering hardware and the multiple-enhanced super-resolution model to obtain a target image, wherein the resolution of the first image is smaller than the resolution of the first image.
  • the image resolution of the target image is a super-resolution model in which the image resolution of the input image is smaller than the image resolution of the output image.
  • the electronic device may select a multiple-enhanced super-resolution model to perform super-resolution reconstruction on the first image.
  • the image resolution of the input image of the model is smaller than the image resolution of the output image of the model. That is, the multi-fold enhanced super-resolution model can increase the image resolution of the input image.
  • the first electronic device renders the native image data by using first graphics rendering hardware to obtain a first image, including:
  • the first electronic device renders the native image data through a graphics processor to obtain a first image
  • the first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware to obtain a target image, including:
  • the first electronic device performs super-resolution reconstruction on the first image through a neural network processor to obtain a target image.
  • the first electronic device processes the native image data through heterogeneous graphics rendering hardware to obtain the target image. Specifically, the first electronic device may render the original image data through a graphics processor to obtain a first image, and perform super-resolution reconstruction on the first image through a neural network processor.
  • the first electronic device selects appropriate graphics rendering hardware to perform corresponding operations, which can improve the image processing efficiency of the first electronic device.
  • an image processing method is provided, applied to a second electronic device, including:
  • the second electronic device receives a first image sent by the first electronic device, where the first image is an image obtained by the first electronic device rendering the native image data generated by the application;
  • the second electronic device performs super-resolution reconstruction on the first image to obtain a target image.
  • the first electronic device can locally render the native image data of the application program to obtain the first image.
  • the first electronic device sends the first image to the second electronic device.
  • the second electronic device receives the first image, and performs super-resolution reconstruction on the first image to obtain a high-quality target image.
  • the first electronic device and the second electronic device jointly perform image processing, which can make full use of the hardware resources of the graphics rendering hardware of different electronic devices, thereby reducing the need for the first electronic device when rendering high-quality images.
  • the load of the local hardware resources reduces the rendering consumption of the first electronic device for rendering high-quality images, and makes full use of the hardware resources of different electronic devices to better improve the image quality, thereby improving the user experience.
  • the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
  • the second electronic device searches for a target super-score model associated with the identifier
  • the second electronic device performs super-resolution reconstruction on the first image by using the found target super-resolution model to obtain a target image.
  • the second electronic device may perform super-resolution reconstruction on the second image by using the super-resolution model.
  • the super-score model may include a specific over-score model and a general over-score model.
  • the specific super-resolution model is only suitable for some applications, and its applicability is poor, but it has a high image quality optimization ability.
  • the general super-score model has high applicability, but the ability to optimize image quality is limited.
  • the electronic device may pre-establish an association relationship between the specific super-resolution model and its applicable application program.
  • the second electronic device may acquire the identifier of the application, and search for the target super-score model associated with the identifier.
  • the second electronic device can find the target super-score model associated with the above identifier, it means that there is a specific super-score model (ie, the target super-score model) suitable for the above application in the second electronic device, and the second electronic device can use the graph
  • the rendering hardware and the target super-resolution model described above perform super-resolution reconstruction of the second image.
  • the electronic device uses the target super-resolution model to perform super-resolution reconstruction on the second image, which can better improve the image quality of the target image.
  • the identifier of the application program may be the package name of the application program, or the identifier of the application program may also be a user-defined identifier.
  • the method further includes:
  • the second electronic device performs super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain a target image.
  • the second electronic device cannot find the target super-score model associated with the above identifier, it means that there is no specific super-score model associated with the application.
  • the second electronic device may perform super-resolution reconstruction on the second image by using the graphics rendering hardware and the preset general super-resolution model to obtain the target image.
  • the method further includes:
  • the second electronic device establishes an association relationship between the identifier and the general super-resolution model.
  • the second electronic device uses the general super-resolution model to perform super-resolution reconstruction on the second image
  • the second electronic device may be set with multiple general super-resolution models, in order to make the application program next time
  • the second electronic device may invoke the same general super-resolution model to perform super-resolution reconstruction on the second image, and the second electronic device may establish an association relationship between the above-mentioned identifier and the general super-resolution model.
  • the second electronic device can find the general super-score model according to the association relationship between the above-mentioned identifier and the general super-score model, determine the general super-score model as the target
  • the super-resolution model performs super-resolution reconstruction on the second image, so that the second electronic device can maintain the same level of image quality optimization when processing the image of the application.
  • the first image resolution of the first image is consistent with the image resolution of the target image
  • the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
  • the second electronic device performs super-resolution reconstruction on the first image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
  • the second electronic device may select the single-enhanced super-resolution model when selecting the super-resolution model to perform super-resolution reconstruction on the first image.
  • the image resolution of the input image of the haplo-enhanced super-resolution model is the same as the image resolution of the output image.
  • the first image resolution of the first image is lower than the image resolution of the target image
  • the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
  • the second electronic device performs up-sampling processing on the first image to obtain a second image, and the image resolution of the second image is consistent with the image resolution of the target image;
  • the second electronic device performs super-resolution reconstruction on the second image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
  • the second electronic device may perform up-sampling processing on the first image to obtain a second image, so that the image resolution of the second image is the same as that of the target image.
  • the image resolution is the same.
  • the second electronic device uses the single-enhanced super-resolution model to process the second image to obtain the target image.
  • the algorithm applied for up-sampling can be any one of interpolation algorithms such as the nearest neighbor method, bilinear interpolation method, and cubic interpolation method.
  • the first image resolution of the first image is lower than the resolution of the target image
  • the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
  • the second electronic device performs super-resolution reconstruction on the first image through a multiple-enhanced super-resolution model to obtain the target image, wherein the multiple-enhanced super-resolution model is the image resolution of the input image A superresolution model with an image resolution smaller than the output image.
  • the second electronic device may use a multiple-enhanced super-resolution model in addition to up-sampling the first image. Perform super-resolution reconstruction on the first image.
  • the image resolution of the input image of the multiple-enhanced super-resolution model is smaller than the image resolution of the output image. That is, the multi-fold enhanced super-resolution model can increase the image resolution of the input image.
  • an electronic device including:
  • a native data module used to obtain native image data, where the native image data is image data generated by an application and not rendered;
  • a preliminary rendering module configured to render the native image data through the first graphics rendering hardware to obtain a first image
  • the first super-resolution module is configured to perform super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
  • the first super-segmentation module includes:
  • a first identification submodule used to obtain the identification of the application
  • a first model submodule used to find the target super-score model associated with the identifier
  • the first reconstruction sub-module is configured to perform super-resolution reconstruction on the first image by using the first graphics rendering hardware and the found target super-resolution model to obtain a target image.
  • the first super-segmentation module further includes:
  • the first general sub-module is used to perform super-resolution on the first image through the first graphics rendering hardware and the preset general super-resolution model if the target super-resolution model associated with the identifier is not found. Reconstruct to get the target image.
  • the first super-segmentation module further includes:
  • the first association submodule is used to establish an association relationship between the identifier and the general super-resolution model.
  • the preliminary rendering module is specifically configured to render the native image data by using the first graphics rendering hardware and a preset first image resolution to obtain the first an image.
  • the first super-resolution module is specifically configured to perform super-resolution on the first image by using the second graphics rendering hardware and the single-enhanced super-resolution model Reconstruction to obtain a target image, wherein the first image resolution is consistent with the image resolution of the target image, and the single-enhanced super-resolution model is that the image resolution of the input image and the image resolution of the output image are the same super-score model.
  • the first super-resolution module is specifically configured to perform super-resolution on the first image by using the second graphics rendering hardware and the multiple-enhanced super-resolution model rate reconstruction to obtain a target image, wherein the resolution of the first image is smaller than the image resolution of the target image, and the multiple-enhanced super-resolution model is the image resolution of the input image is smaller than the image resolution of the output image Overscore model.
  • the preliminary rendering module is specifically configured to render the native image data through a graphics processor to obtain the first image
  • the first super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a neural network processor to obtain a target image.
  • an electronic device comprising:
  • an image receiving module configured to receive a first image sent by a first electronic device, where the first image is an image obtained by the first electronic device rendering native image data generated by an application;
  • the second super-resolution module is configured to perform super-resolution reconstruction on the first image to obtain a target image.
  • the second super-segmentation module includes:
  • the second identification submodule is used to obtain the identification of the application
  • the second model submodule is used to find the target super-score model associated with the identifier
  • the second reconstruction sub-module is configured to perform super-resolution reconstruction on the first image by using the found target super-resolution model to obtain a target image.
  • the second super-segmentation module further includes:
  • the second general sub-module is configured to perform super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain a target image if the target super-resolution model associated with the identifier is not found.
  • the second super-segmentation module further includes:
  • the second association module is configured to establish an association relationship between the identifier and the general super-resolution model.
  • the first image resolution of the first image is consistent with the image resolution of the target image
  • the second super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a single-enhanced super-score model to obtain the target image, wherein the single-enhanced super-score model is an input A superresolution model where the image resolution of the image is the same as the image resolution of the output image.
  • the first image resolution of the first image is lower than the image resolution of the target image
  • the second super-divided module includes:
  • an upsampling submodule configured to perform an upsampling process on the first image to obtain a second image, the image resolution of the second image is consistent with the image resolution of the target image;
  • An enhancement sub-module used for the second electronic device to perform super-resolution reconstruction on the second image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is: A superresolution model where the image resolution of the input image is the same as the image resolution of the output image.
  • the first image resolution of the first image is lower than the resolution of the target image
  • the second super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a multiple-enhanced super-resolution model to obtain the target image, wherein the multiple-enhanced super-resolution model is an input A superresolution model where the image resolution of the image is smaller than that of the output image.
  • an image processing system in a fifth aspect, includes a first electronic device and a second electronic device;
  • the first electronic device is configured to render the native image data generated by the application to obtain a first image, and send the first image to the second electronic device;
  • the second electronic device is configured to execute the image processing method mentioned in the second aspect above.
  • an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program, the electronic device realizes the steps of the above method.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, enables an electronic device to implement the steps of the above method.
  • a chip system may be a single chip or a chip module composed of multiple chips, the chip system includes a memory and a processor, and the processor executes the storage in the memory.
  • the electronic device first renders the original image data to obtain the first image, and then performs super-resolution reconstruction on the first image to obtain the target image displayed on the screen.
  • generating the target image by means of preliminary rendering and super-resolution reconstruction can reduce rendering power consumption, reduce the amount of calculation, and improve rendering. efficient.
  • the electronic device performs the preliminary rendering operation through the first graphics rendering hardware, and performs the super-resolution reconstruction operation through the second graphics rendering hardware, which can make full use of the heterogeneous hardware resources in the electronic device and avoid the lack of hardware resources of a single graphics rendering hardware.
  • the electronic device performs the preliminary rendering operation through the first graphics rendering hardware, and performs the super-resolution reconstruction operation through the second graphics rendering hardware, which can make full use of the heterogeneous hardware resources in the electronic device and avoid the lack of hardware resources of a single graphics rendering hardware.
  • the image processing method of the present application can reduce the rendering power consumption and calculation amount of rendering high-quality images, and can make full use of heterogeneous hardware resources in electronic devices, so as to solve the problem that in the existing image solutions, when the electronic device's When the hardware resources are insufficient, the electronic device can only run high-quality products with lower picture quality, which has strong ease of use and practicability.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a software structural block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an example image provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another example image provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another example image provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another electronic device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • 16 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • 17 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 19 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • FIG. 20 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • 21 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 22 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 23 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 24 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 25 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 26 is a schematic diagram of another electronic device provided by an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • Picture quality refers to the picture quality. There are many image quality indicators for evaluating image quality. The more common image quality indicator is image resolution. When other image quality indicators are the same, the higher the image resolution, the higher the image quality and the lower the image resolution. , the lower the image quality.
  • image quality indicators can also include one of sharpness, sharpness, lens distortion, dispersion, resolution, color gamut range, color purity (color brilliance), and color balance parameters. or more.
  • Image resolution refers to the amount of information stored in the image, which can be understood as the number of pixels contained in the image.
  • the image resolution can be expressed as "the number of horizontal pixels ⁇ the number of vertical pixels".
  • the resolution of the image is 2048 ⁇ 1080, which means that each row of pixels in the image includes 2048 pixels, and each column of pixels includes 1080 pixels.
  • Rendering in computer terms refers to the process of generating an image from an image model.
  • An image model is a description of a three-dimensional scene using a strictly defined language or data structure, including geometry, viewpoint, texture, lighting information, and rendering parameters.
  • the rendering parameters may include the above-mentioned image quality indicators.
  • the frame rate of the electronic device can remain around 90 frames per second .
  • the frame rate of the electronic device can usually only be maintained at 40 frames per second or so. If the user turns down the image resolution, the frame rate of the electronic device is usually only kept at 60 frames per second.
  • GPU-turbo graphics acceleration
  • GPU-turbo technology reconstructs the traditional GPU architecture at the bottom layer of the electronic device system, realizes the coordination of software and hardware, and greatly improves the overall computing efficiency of the GPU.
  • GPU-turbo technology can detect the similarities and differences of image quality of adjacent frame images through artificial intelligence (AI) technology, render the difference parts of adjacent frames, and retain the same content of adjacent frames. In this way, GPU-turbo can save 80% of the calculation, greatly improving the rendering speed of the GPU.
  • AI artificial intelligence
  • the image rendering method of GPU-turbo technology is consistent with the traditional GPU rendering method.
  • the GPU directly renders the initial image file into the final image displayed on the screen. Therefore, when using the GPU-turbo technology to run high-quality products, it will still generate a large load on the GPU of the electronic device, and the rendering power consumption will be high.
  • embodiments of the present application provide an image processing method, apparatus, electronic device, and computer-readable storage medium, so as to solve the problem of high rendering power consumption and high computational cost when rendering high-quality products in the existing image rendering method. volume problem.
  • the electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a handheld computer, a personal digital assistant (PDA), an augmented reality (AR) ⁇ virtual reality (VR) device, a media
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • media such as players and wearable devices
  • the embodiments of the present application do not impose any restrictions on the specific forms/types of the electronic devices.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellites System
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate for according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
  • FIG. 2 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or video.
  • the method includes:
  • the first electronic device renders the native image data through the first graphics rendering hardware to obtain a first image
  • the application program transmits the native image data to the first graphics rendering hardware of the first electronic device for rendering.
  • Native image data refers to unrendered image files generated by the application.
  • Rendering refers to a process of converting the image data stored in the first electronic device into visible pixels through techniques such as rasterization.
  • the first electronic device may obtain the target image of the target image quality index by means of image super-resolution reconstruction.
  • the first electronic device cannot directly perform super-resolution reconstruction on the native image data.
  • the first electronic device needs to perform preliminary rendering on the original image data to obtain a first image that can be reconstructed with super-resolution.
  • the first electronic device may call the first graphics rendering hardware to render the native image data with the first image quality index to obtain the first image.
  • the native image data may be rendered at the first image resolution, and the first image resolution is lower than the preset image resolution; or, The first graphics rendering hardware may also adjust other image quality indicators so that the first image quality indicator is lower than the preset image quality indicator, and then render the native image data.
  • the above-mentioned first image quality index may be a specific type of image quality index, or the above-mentioned first image quality index may be a collection of multiple image quality indexes.
  • the first image quality index is a set of multiple image quality indexes, it may be understood that the first image quality index is lower than the preset image quality index, and it can be understood that some or all of the image quality indexes in the first image quality index are low at the default image quality index.
  • the above-mentioned first graphics rendering hardware can be selected according to the actual situation.
  • the first graphics rendering hardware may be one of a central processing unit (CPU), a graphics processing unit (GPU), and a neural-network processing unit (NPU). one or more.
  • CPU central processing unit
  • GPU graphics processing unit
  • NPU neural-network processing unit
  • the above-mentioned first graphics rendering hardware may be a combination of a CPU and a GPU.
  • the first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware to obtain a target image.
  • the first electronic device performs preliminary rendering on the native image data of the application through the first graphics rendering hardware to obtain a first image.
  • the image quality of the first image is low, and it is difficult to meet the user's requirements for product image quality.
  • Super-resolution reconstruction refers to the application of AI technology to map low-resolution images to high-resolution, with the expectation of enhancing image quality.
  • the first electronic device may perform super-resolution reconstruction on the first image by using the second graphics rendering hardware.
  • the first image can be input into a trained super-resolution model, and the image quality of the first image is enhanced by the super-resolution model to obtain the target image.
  • the above-mentioned super-score model can be selected according to the actual situation.
  • the above-mentioned super-resolution model can be a super-resolution convolutional neural network model (super-resolution convolutional neural network, SRCNN model), a fast super-resolution convolutional neural network model (fast super-resolution convolutional neural network, SRCNN model), Sub-pixel convolutional neural network model (efficient sub-pixel convolutional neural network, ESPCN model), deep recursive model (deeply-recursive convolutional network, DRCN model) and deep super-resolution network model (very deep network for super-resolution, VSDR model) ) and other models.
  • the application program cannot maintain a certain frame rate, which causes the screen of the first electronic device to freeze. Therefore, developers should limit the size of the super-resolution model when choosing the super-resolution model, so that the single-frame running time of the super-resolution model meets the requirements of the application's single-frame time for the display frame rate. For example, if an application sends a frame rate of 90 frames per second, the single frame time for an application to send a frame rate is 1/90 of a second.
  • the scale of the super-scoring model should be limited, so that the single-frame running time of the super-scoring model should be less than 1/90 of a second, so as to ensure that the sending frame rate of the application is kept at 90 frames per second as much as possible, and the occurrence of screen freezes can be reduced. .
  • the first electronic device may acquire at least one set of image sample pairs, and train the super-score model by using the image sample pairs.
  • Image sample pairs refer to pairs of sample images.
  • Each set of image sample pairs includes a first sample image and a second sample image. The contents of the first sample image and the second sample image are consistent, but the image quality of the first sample image is lower than that of the second sample image.
  • the first electronic device may input the first sample image in the image sample pair into the super-score model to obtain a first output image.
  • the first electronic device calculates the loss value according to the first output image, the second sample image and the preset loss function, and updates the super-score model according to the loss value and the preset network update algorithm.
  • the super-score model After the super-score model is updated, go back to the previous step, and use the image samples to train the over-score model in a loop until the number of cycles reaches the preset number of times threshold or the loss value is less than the preset loss threshold.
  • the acquisition method of the above-mentioned image sample pair can be selected according to the actual situation.
  • the above-mentioned image sample pair may be an image dataset from which a pair was originally generated, or the above-mentioned image sample pair may also be a pair of image sample pairs obtained by degrading a high-quality image into a low-quality image.
  • the source of image sample pairs will have a certain impact on the performance of the super-resolution model. If the developer wants to train a general super-score model, the developer can collect samples in an untargeted manner when sampling image sample pairs to obtain general image sample pairs.
  • the first electronic device can obtain the general super-score model by using the general image sample pair to train the super-score model.
  • the general super-score model has high applicability and can be applied to many application scenarios.
  • the image quality optimization capability of the general super-resolution model is limited, and it is difficult to optimize the image quality of each application scenario to a high degree.
  • the developer should only collect the same product or type of product when sampling the image sample pair.
  • Related image sample pairs get a specific image sample pair.
  • the first electronic device uses a specific pair of image samples to train a super-scoring model, and can obtain a specific super-scoring model for a certain product or a certain type of product.
  • the applicability of specific super-score models is poor and can only be applied to specific products.
  • the image quality optimization capability of a specific super-scoring model is high, and a higher degree of image quality optimization can be performed on the image of a specific product.
  • the first electronic device uses the above-mentioned generic game image sample pair to train a super-score model, so that the trained super-score model can be applied to various game applications.
  • Arena of Valor When training a superscore model for Arena of Valor, developers should only use the game images in Arena of Valor as a specific game image sample pair.
  • the above game images can be character images, terrain images, skill images, etc. in "Arena of Valor".
  • the first electronic device trains the super-scoring model according to the above-mentioned specific game image sample pair, so that the trained super-scoring model can specifically enhance the image quality of the game "Arena of Valor".
  • the first electronic device can detect the identifier of the application when the user starts the application, and select the corresponding super-score model according to the identifier of the application to perform the above steps Operation of S302.
  • the first electronic device may call the general super-score model to perform the steps of the above-mentioned step S302.
  • the first electronic device can also use the general super-resolution model to perform super-resolution reconstruction on the first image, and establish the general super-resolution model and the above application.
  • the association relationship between the program identifiers so that when the first electronic device processes the first image of the application program next time, it can find the same general super-score model to process the first image according to the foregoing association relationship.
  • the identifier of the application program may be the package name (packname) of the application program.
  • the first electronic device may associate the super-scoring model with the package name of "Arena of Valor”.
  • the first electronic device obtains the package name of "Arena of Valor”
  • searches for the corresponding super-score model according to the package name and uses the corresponding super-score model to compare the image of "Arena of Valor” to be processed.
  • the identifier of the application program may also be user-defined.
  • the user defines the ID of "Arena of Valor” as 0010.
  • the first electronic device associates "0010" with "Arena of Valor” and a super-resolution model for "Arena of Valor”.
  • the first electronic device searches for the logo corresponding to "Arena of Valor", and obtains the logo "0010” of "Arena of Valor”.
  • the first electronic device searches for a corresponding super-resolution model according to the identifier "0010”, and uses the corresponding super-resolution model to process the image of "Arena of Valor".
  • the above-mentioned super-score model may be a single-enhanced super-score model, or, the above-mentioned super-score model may also be a multiple-enhancement type of over-score model.
  • the haplointensive super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same.
  • the multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than that of the output image.
  • the image resolution of the first image is consistent with the image resolution of the target image, and the single-enhancement super-score model improves other image quality indicators of the first image by means of The image quality of the first image is enhanced to obtain the target image.
  • the image resolution of the first image is smaller than that of the target image.
  • the first graphics rendering hardware of the first electronic device may render at a smaller image resolution, thereby reducing the hardware resources occupied by the first graphics rendering hardware in the rendering process , as well as reducing rendering power consumption.
  • the first electronic device After the first graphics rendering hardware renders a first image with a smaller image resolution, the first electronic device enhances the image quality of the first image through the multiple-enhanced super-resolution model according to the target resolution configured by the user, and converts the The image resolution of the first image is adapted to the target image resolution to obtain the target image.
  • the second graphics rendering hardware that runs the above-mentioned super-resolution model may be set according to the actual situation.
  • the first electronic device may run the above-mentioned super-score model on a CPU, and use the CPU to perform image quality enhancement on the above-mentioned first image; in other embodiments, the first electronic device may run the above-mentioned super-resolution model on a GPU
  • the sub-model is used to enhance the image quality of the first image through the GPU; or, the first electronic device may run the super-resolution model on the NPU to enhance the image quality of the first image through the NPU.
  • the present application does not limit the hardware for performing the above-mentioned super-resolution reconstruction operation in the first electronic device.
  • FIG. 7 is a schematic diagram of a first electronic device suitable for scenario 1, scenario 2, scenario 3, and scenario 4 according to this embodiment.
  • a GPU 701 and an NPU 702 may be provided in the first electronic device.
  • NPU 702 a general game-type super-score model and a super-score model for game A are preset, and the over-score model for game A is associated with the application identifier of game A.
  • a plurality of icons can be set on the main page of the first electronic device, including “clock”, “calendar”, “game B”, “memo”, “camera”, “address book”, “phone” , Information and other icons.
  • An icon represents an application.
  • the application program of the game B sends the native image data to the GPU 701 frame by frame.
  • the GPU 701 performs frame-by-frame rendering on the above-mentioned native image data, obtains a first image corresponding to each frame of native image data, and sends the first image to the NPU 702 frame by frame.
  • NPU 702 After receiving the first image, NPU 702 obtains the application identifier of game B, and does not find the super-score model corresponding to game B according to the application identifier of game B, then selects the super-score model of the general game class as the target over-score model.
  • the NPU 702 inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains target images corresponding to the first images of each frame, and sends the target images to the first image frame by frame.
  • a display screen of an electronic device is a display screen of an electronic device.
  • the target image is displayed on the screen, so that the screen of the game B is displayed on the display screen.
  • the first electronic device still uses the same super-score model of the same general game class to process the image of Game B .
  • the first electronic device can randomly select a super-score model from the multiple general game-type super-score models to match the game
  • the image of B is processed.
  • the first electronic device may also establish the application identifier of the game B after using the super-score model of the general game class to process the image of the game B for the first time.
  • the association with the superscore model for this generic game class When the user triggers the game B again, the first electronic device can obtain the application identifier of the game B, find the super-score model of the same general game class according to the application identifier of the game B, and process the image of the game B.
  • a plurality of icons can be set on the main page of the first electronic device, including “clock”, “calendar”, “game A”, “memo”, “camera”, “contact book”, “phone” ”, “Information” and other icons.
  • An icon represents an application.
  • the user clicks the icon of the game A on the first electronic device, and the first electronic device starts the game A in response to the user's click operation.
  • the application program of the game A sends the native image data to the GPU 701 frame by frame.
  • the GPU 701 performs frame-by-frame rendering on the above-mentioned native image data, obtains a first image corresponding to each frame of native image data, and sends the first image to the NPU 702 frame by frame.
  • NPU 702 After receiving the first image, NPU 702 obtains the application identifier of game A, finds the super-score model for game A according to the application identifier of game A, and selects the super-score model for game A as the target over-score model.
  • the NPU 702 inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains target images corresponding to the first images of each frame, and sends the target images to the first image frame by frame.
  • a display screen of an electronic device is a display screen of an electronic device.
  • the target image is displayed on the screen, so that the screen of the game A is displayed on the display screen.
  • the user clicks the icon of the game A on the first electronic device, and the first electronic device starts the game A in response to the user's click operation.
  • the application of the game A sends the native image data 1301 to the GPU 701 frame by frame.
  • the image resolution of the native image data 1301 is 480 ⁇ 360.
  • the GPU 701 performs frame-by-frame rendering on the above-mentioned native image data 1301 to obtain a first image 1302 corresponding to each frame of the native image data 1301, and the image resolution of the first image 1302 is 1920 ⁇ 1080.
  • the GPU 701 sends the initially rendered first image 1302 to the NPU 702 frame by frame.
  • the NPU 702 After receiving the first image 1302, the NPU 702 obtains the application identification of game A, finds the super-score model for game A according to the application identification of game A, and selects the super-score model for game A as the target over-score model.
  • the target super-resolution model is a haplo-enhanced super-resolution model, and the target resolution of the output image of the target super-resolution model is 1920 ⁇ 1080.
  • the NPU 702 inputs the first image 1302 into the target super-resolution model frame by frame, and enhances the image quality of the first image 1302 through the target super-resolution model to obtain a target image 1303 with an image resolution of 1920 ⁇ 1080.
  • the image resolution of the target image 1303 is the same as that of the first image 1302 , but the definition of the target image 1303 is higher than that of the first image 1302 , and the image quality of the target image 1303 is higher than that of the first image 1302 picture quality.
  • the NPU 702 After acquiring the target image 1303, the NPU 702 sends the target image 1303 to the display screen of the first electronic device frame by frame.
  • the application program of the game A sends the native image data 1501 to the GPU 701 frame by frame.
  • the image resolution of the native image data 1501 is 480 ⁇ 360.
  • the GPU 701 performs frame-by-frame rendering on the above-mentioned native image data 1501 to obtain a first image 1502 corresponding to each frame of native image data, and the image resolution of the first image 1502 is 480 ⁇ 360.
  • the GPU 701 sends the initially rendered first image 1502 to the NPU 702 frame by frame.
  • the NPU 702 After receiving the first image 1502, the NPU 702 obtains the application identifier of game A, finds the super-score model for game A according to the application identifier of game A, and selects the super-score model for game A as the target over-score model.
  • the target super-resolution model is a multiple-enhanced super-resolution model, and the target resolution of the output image of the target super-resolution model is 1920 ⁇ 1080.
  • the NPU 702 inputs the first image 1502 into the target super-resolution model frame by frame, enhances the image quality of the first image 1502 through the target super-resolution model, and performs resolution adaptation on the first image 1502 to obtain an image resolution of 1920 Target image 1503 of ⁇ 1080.
  • the definition of the target image 1503 is the same as that of the first image 1502, but the image resolution of the target image 1503 is higher than that of the first image 1502, and the image quality of the target image 1503 is higher than that of the first image 1502.
  • the NPU 702 After acquiring the target image 1503, the NPU 702 sends the target image 1503 frame by frame to the display screen of the first electronic device for display on the upper screen.
  • the first electronic device firstly renders the native image data of the application program to obtain the first image. Then, the first electronic device performs super-resolution reconstruction on the first image through the super-resolution model, so as to improve the image quality of the first image, and obtain a target image for display on the upper screen.
  • the image processing method provided in this embodiment can reduce the requirements on the hardware resources of the first electronic device, and reduce the rendering power consumption, thereby solving the problem.
  • the existing image processing methods have problems of high rendering power consumption and large amount of computation when rendering high-quality products.
  • the above-mentioned steps of preliminary rendering and super-resolution reconstruction may be performed by the same graphics rendering hardware in the first electronic device.
  • the above-mentioned steps of preliminary rendering and super-resolution reconstruction may both be performed by a GPU in the first electronic device; in other embodiments, the above-mentioned steps of preliminary rendering and super-resolution reconstruction may be performed by a GPU.
  • the steps may all be performed by an NPU within the first electronic device.
  • the above-mentioned steps of preliminary rendering and super-resolution reconstruction may also be performed by different graphics rendering hardware in the first electronic device, that is, the above-mentioned first graphics rendering hardware and second graphics rendering hardware are different graphics rendering hardware.
  • the foregoing preliminary rendering step may be performed by a GPU of the first electronic device, and the foregoing super-resolution reconstruction step may be performed by an NPU of the first electronic device; in other embodiments, the foregoing preliminary rendering The steps of the super-resolution reconstruction may be performed by the CPU of the first electronic device, and the above-mentioned steps of super-resolution reconstruction may be performed by the NPU of the first electronic device.
  • the super-resolution model selected by the first electronic device may be a single-enhanced super-resolution model, or the super-resolution model selected by the first electronic device may also be a multiple-enhanced super-resolution model.
  • the super-resolution model selected by the first electronic device is the multiple-enhanced super-resolution model, the hardware resources occupied by the graphics rendering hardware in the preliminary rendering process and the rendering power consumption of the preliminary rendering can be reduced.
  • the above-mentioned super-scoring model may be a general super-scoring model, or, the above-mentioned super-scoring model may also be a specific super-scoring model for a certain application or a certain type of application.
  • the applicable range of the specific super-resolution model is smaller than that of the general super-resolution model, but usually the image quality enhancement effect of the specific super-resolution model is better than that of the general super-resolution model.
  • the method includes:
  • the first electronic device renders the native image data to obtain a first image
  • the first electronic device When the first electronic device interacts with other electronic devices on multiple screens, the first electronic device may need to project the display screen of the device to the other electronic devices.
  • the user may feel that the screen of the mobile phone is too small and the visual effect is not good.
  • the user can control the mobile phone to interact with the smart TV on multiple screens, establish a communication connection between the mobile phone and the smart TV, and project the game screen on the mobile phone to the smart TV for display, so that the user can Watch the game screen through the smart TV to get a better visual experience.
  • the first electronic device of the projection side needs to independently complete the image rendering work, and then transmits the rendered image to the first electronic device of the projection side. Afterwards, the first electronic device of the screen-projected party performs resolution adaptation on the rendered image, and displays the image after resolution adaptation on the screen.
  • the screen projection technology is usually used to project the display screen of the small-screen device to the screen of the large-screen device. At this time, it is difficult for the image with low image resolution to adapt to the display device with high image resolution, resulting in poor user experience. good.
  • the first electronic device when the user starts the application program on the first electronic device and enables the multi-screen interaction function, the first electronic device can perform preliminary processing on the native image data generated by the application program Render to get the first image.
  • step S301 For the preliminary rendering process, reference may be made to the description of step S301 in the previous embodiment, and details are not repeated here.
  • the first electronic device sends the first image to the designated device to instruct the designated device to perform super-resolution reconstruction on the first image to obtain the target image.
  • the designated device ie, the aforementioned second electronic device
  • the designated device is another electronic device selected by the user and located in the same local area network as the aforementioned first electronic device.
  • the user when the user wishes to project the game screen of the mobile phone to the smart TV, the user can enable the "wireless screen projection" function of the mobile phone.
  • the mobile phone After the user turns on the "wireless screen projection" function of the mobile phone, the mobile phone starts to search for available electronic devices in the same local area network.
  • the mobile phone searches for electronic device 1, electronic device 2, and electronic device 3.
  • the mobile phone detects the user's click operation on the electronic device 1, it means that the electronic device 1 is selected by the user, and the mobile phone determines the electronic device 1 as the designated device.
  • the first electronic device After obtaining the first image, the first electronic device sends the first image to the designated device.
  • the above designated device is the electronic device to be projected.
  • the number of specified devices can be one, or the number of specified devices can be multiple.
  • the electronic device 1 is a smart TV and the electronic device 2 is a computer.
  • the mobile phone is the first electronic device of the screen-casting party
  • the smart TV is the electronic device of the screen-casting party (ie the designated device).
  • Users can turn on the "wireless screen projection" function of the mobile phone.
  • the mobile phone starts to search for available electronic devices in the same local area network.
  • the mobile phone searches for electronic device 1, electronic device 2 and electronic device 3.
  • the user clicks on the electronic device 1 and the mobile phone sets the electronic device 1 as a designated device in response to the user's operation, and the number of designated devices is one.
  • the mobile phone When the user operates the mobile phone, if the user wants to project the game screen of the mobile phone to the smart TV and the computer at the same time, the mobile phone is the first electronic device of the screen-casting party, and the smart TV and the computer are the electronic devices of the screen-casting party (that is, the specified device), the user can turn on the "wireless screen projection" function of the mobile phone.
  • the mobile phone After the user enables the "wireless screen projection" function of the mobile phone, the mobile phone starts to search for the first electronic device available in the same local area network. The mobile phone searches for electronic device 1, electronic device 2, and electronic device 3. Then the user clicks on electronic device 1 and electronic device 2, and the mobile phone sets electronic device 1 and electronic device 2 as designated devices in response to the user's operation, and the number of designated devices is 2.
  • the designated device After receiving the first image, the designated device inputs the first image into the trained super-resolution model, performs super-resolution reconstruction on the first image, and obtains and displays the target image.
  • the first electronic device can not only use the local hardware resources to render the image, but also can use the hardware resources of the designated device to optimize the image quality of the image, and make full use of the same hardware resources.
  • hardware resources of multiple electronic devices in the local area network thereby reducing the load of the first electronic device on local hardware resources when rendering high-quality images, and reducing the rendering power consumption of the first electronic device for rendering high-quality images.
  • the superscore model on a specified device can be a haplo-enhanced super-score model, or the super-score model on a specified device can also be a multiple-enhanced over-score model.
  • the haplointensive super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same.
  • the multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than that of the output image.
  • the first electronic device may acquire the target image resolution configured on the specified device.
  • the target image resolution is the image resolution of the screen display image set on the specified device.
  • the first electronic device renders the native image data generated by the application according to the target image resolution to obtain a first image.
  • the image resolution of the first image is the target image resolution.
  • the first electronic device transmits the first image to the designated device.
  • the designated device inputs the first image into the single-enhanced super-resolution model, improves the image quality of the first image through the single-enhanced super-score model, and obtains the target image and displays it on the screen.
  • the image resolution of the target image is the target image resolution.
  • the first electronic device can also directly perform the processing on the native image data generated by the application program according to the first image resolution configured by the user. Render to get the first image. At this time, the image resolution of the first image is the first image resolution.
  • the first electronic device transmits the first image to the designated device. Since the super-resolution model on the specified device is a haplo-enhanced super-resolution model, the resolution of the first image cannot be adapted to the target image resolution.
  • the target image resolution is the upper-screen display image resolution set by the specified device. Therefore, after acquiring the first image, the designated device can perform up-sampling processing on the first image, and adapt the resolution of the first image to the target image resolution configured on the designated device to obtain the second image.
  • the image resolution of the second image is the target image resolution.
  • the algorithm applied for up-sampling can be any one of interpolation algorithms such as the nearest neighbor method, bilinear interpolation method, and cubic interpolation method.
  • the designated device performs up-sampling processing on the first image through a preset up-sampling algorithm to obtain the second image.
  • the designated device inputs the second image into the single-enhanced super-score network, and enhances the image quality of the second image through the single-enhancement super-score network to obtain the target image.
  • the image resolution of the target image is the target image resolution.
  • the first electronic device may render the native image data generated by the application according to the first image resolution configured by the user, Get the first image. At this time, the image resolution of the first image is the first image resolution.
  • the first electronic device transmits the first image to the designated device.
  • the designated device inputs the first image into the multiple-enhanced super-division network, enhances the image quality of the first image through the multiple-enhanced super-division network, and adapts the resolution of the first image to the target configured on the designated device Image resolution to get the target image.
  • the image resolution of the target image is the target image resolution.
  • the super-scoring model on the specified device may be a general super-scoring model, or the above-mentioned super-scoring model may also be a specific super-scoring model trained for a certain product or a certain type of product.
  • the general super-resolution model and the specific super-resolution model reference may be made to the description of the previous embodiment, and details are not repeated here.
  • the designated device may, after receiving the first image, obtain the identifier of the application corresponding to the first image, and select the corresponding super-score model according to the identifier of the application. Perform super-resolution reconstruction processing on the first image.
  • the specified device can call the general super-resolution model to perform super-resolution reconstruction processing.
  • the designated device can also establish a relationship between the general super-resolution model and the identifier of the above-mentioned application after performing super-resolution reconstruction on the first image using the general super-resolution model. association relationship, so that when the specified device processes the first image of the application program next time, the same general super-score model can be found to process the first image according to the foregoing association relationship.
  • the first electronic device may select appropriate graphics rendering hardware to perform preliminary rendering on the native image data according to the actual situation to obtain the first image.
  • the above-mentioned graphics rendering hardware may be one or more of a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU), and a neural-network processing unit (neural-network processing units, NPU).
  • CPU central processing unit
  • GPU graphics processing unit
  • NPU neural-network processing units
  • the above-mentioned graphics rendering hardware may be a combination of a CPU and a GPU.
  • the specified device can choose suitable hardware to run the above super-score model according to the actual situation.
  • the designated device may run the above-mentioned super-score model on the CPU, and enhance the image quality of the above-mentioned first image through the CPU; in other embodiments, the designated device may run the above-mentioned super-score model on the GPU, through The GPU enhances the image quality of the first image; or, the designated device may run the super-score model on the NPU, and enhance the image quality of the first image through the NPU.
  • the present application does not limit the hardware for performing the above-mentioned super-division reconstruction operation in the specified device.
  • the first electronic device (that is, the electronic device of the screen-casting party) may be a mobile phone, and a GPU may be provided in the mobile phone.
  • the designated device ie, the electronic device of the screen-casting party
  • NPU a general game-type super-score model and a super-score model for game A are preset, and the over-score model for game A is associated with the application identifier of game A.
  • the user operates the mobile phone and projects the display screen of the mobile phone to the smart TV.
  • Game B After Game B is started, the application of Game B sends native image data to the GPU of the mobile phone frame by frame.
  • the GPU of the mobile phone renders the above-mentioned native image data frame by frame, obtains the first image corresponding to each frame of native image data, and sends the first image frame by frame to the smart TV through the wireless communication module of the mobile phone.
  • the smart TV After receiving the first image, the smart TV obtains the application identifier corresponding to the first image, and if no super-score model corresponding to game B is found according to the application identifier of game B, a general game-type super-score model is selected as the target over-score model.
  • the NPU of the smart TV inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains the target image corresponding to each frame of the first image, and sends the target image frame by frame. to the upper screen of the Smart TV's display.
  • the user operates the mobile phone and projects the display screen of the mobile phone to the smart TV.
  • Game A After Game A starts, the application of Game A sends native image data frame by frame to the GPU of the mobile phone.
  • the GPU of the mobile phone renders the above-mentioned native image data frame by frame, obtains a first image corresponding to each frame of native image data, and sends the first image to the smart TV through the wireless communication module of the mobile phone.
  • the smart TV After receiving the first image, the smart TV obtains the application identifier corresponding to the first image, finds a superscore model for game A according to the application identifier of game A, and selects the superscore model for game A as the target overscore model.
  • the NPU of the smart TV inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains the target image corresponding to each frame of the first image, and sends the target image frame by frame. to the upper screen of the Smart TV's display.
  • the user operates the mobile phone 2001 to project the display screen of the mobile phone 2001 to the smart TV 2002 and the computer 2003 .
  • the application of the game A sends the native image data 20011 to the GPU of the mobile phone 2001 frame by frame.
  • the image resolution of native image data 20011 is 480 ⁇ 360.
  • the mobile phone 2001 performs data interaction with the smart TV 2002 and the computer 2003 through the wireless communication module, and obtains the image resolution 1920 ⁇ 1080 configured on the smart TV 2002 and the image resolution 2560 ⁇ 1440 configured on the computer 2003 .
  • the mobile phone 2001 renders the above-mentioned native image data 20011 frame by frame according to the image resolution 1920 ⁇ 1080 configured on the smart TV 2002, and obtains the image 20012.
  • the resolution of the image 20012 is 1920 ⁇ 1080.
  • the mobile phone 2001 renders the above-mentioned native image data 20011 frame by frame according to the image resolution 2560 ⁇ 1440 configured on the computer 2003 to obtain the image 20013, and the resolution of the image 20013 is 2560 ⁇ 1440.
  • the mobile phone 2001 sends the image 20012 to the smart TV 2002 through the wireless communication module, and sends the image 20013 to the computer 2003 through the wireless communication module.
  • the smart TV 2002 After receiving the image 20012, the smart TV 2002 obtains the application identifier corresponding to the image 20012, and finds the single-enhanced super-score model for the game A according to the application identifier of the game A, and selects the single-enhanced super-score model for the game A. as the target superscore model.
  • the NPU of the smart TV 2002 inputs the image 20012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 20012 through the target super-resolution model to obtain the image 20021.
  • Image 20021 has an image resolution of 1920 ⁇ 1080.
  • the image resolution of image 20012 and the image resolution of image 20021 are both 1920 ⁇ 1080, but the resolution of image 20021 is higher than that of image 20012, and the image quality of image 20021 is higher than that of image 20012 quality.
  • the image 20012 is transmitted frame by frame to the display screen of the smart TV 2002 for on-screen display.
  • the computer 2003 After receiving the image 20013, the computer 2003 obtains the application identifier corresponding to the image 20013, and finds the haplo-enhanced super-score model for game A according to the application identifier of game A, and selects the haplo-enhanced super-score model for game A as the Goal overscore model.
  • the NPU of the computer 2003 inputs the image 20013 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 20013 through the target super-resolution model to obtain the image 20031.
  • Image 20031 has an image resolution of 2560 ⁇ 1440.
  • the image resolution of image 20013 and the image resolution of image 20031 are both 2560 ⁇ 1440, but the resolution of image 20031 is higher than that of image 20013, and the image quality of image 20031 is higher than that of image 20013 quality.
  • the computer 2003 After the computer 2003 obtains the image 20031, it transmits the image 20031 frame by frame to the display screen of the computer 2003 for display on the upper screen.
  • the user operates the mobile phone 2201 to project the display screen of the mobile phone 2201 to the smart TV 2202 and the computer 2203 .
  • the application program of the game A sends the native image data 22011 to the GPU of the mobile phone 2201 frame by frame.
  • the image resolution of native image data 22011 is 480 ⁇ 360.
  • the mobile phone 2201 renders the above-mentioned native image data 22011 frame by frame according to the pre-configured image resolution to obtain an image 22012, and the resolution of the image 22012 is 480 ⁇ 360.
  • the mobile phone 2201 sends the image 22012 to the smart TV 2202 through the wireless communication module, and sends the image 22012 to the computer 2203 through the wireless communication module.
  • the smart TV 2202 After receiving the image 22012, the smart TV 2202 obtains the application identifier corresponding to the image 22012, and finds the single-enhanced super-score model for the game A according to the application identifier of the game A, and selects the single-enhanced super-score model for the game A. as the target superscore model.
  • the NPU of the smart TV 2202 upsamples the image 22012 frame by frame to obtain the image 22021, and the image resolution of the image 22021 is 1920 ⁇ 1080. Then, the NUP of the smart TV 2202 inputs the image 22021 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 22021 through the target super-resolution model to obtain the image 22022.
  • the image resolution of image 22021 and the image resolution of image 22022 are both 1920 ⁇ 1080, but the resolution of image 22022 is higher than that of image 22021, and the image quality of image 22022 is higher than that of image 22021 quality.
  • the image 22022 is transmitted frame by frame to the display screen of the smart TV 2202 for on-screen display.
  • the computer 2203 After receiving the image 22012, the computer 2203 obtains the application identifier corresponding to the image 22012, and finds the haplo-enhanced super-score model for game A according to the application identifier of game A, and selects the haplo-enhanced super-score model for game A as the Goal overscore model.
  • the NPU of the computer 2203 upsamples the image 22012 frame by frame to obtain the image 22031, and the image resolution of the image 22031 is 2560 ⁇ 1440. Then, the NUP of the computer 2203 inputs the image 22031 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 22031 through the target super-resolution model to obtain the image 22032.
  • the image resolution of image 22031 and the image resolution of image 22032 are both 1920 ⁇ 1080, but the resolution of image 22032 is higher than that of image 22031, and the image quality of image 22032 is higher than that of image 22031 quality.
  • the computer 2203 After the computer 2203 obtains the image 22032, it transmits the image 22032 frame by frame to the display screen of the computer 2203 for display on the upper screen.
  • the user operates the mobile phone 2401 to project the display screen of the mobile phone 2401 to the smart TV 2402 and the computer 2403 .
  • the application of the game A sends the native image data 24011 to the GPU of the mobile phone 2401 frame by frame.
  • the mobile phone 2401 performs frame-by-frame rendering on the above-mentioned native image data 24011 according to the pre-configured image resolution to obtain an image 24012, and the resolution of the image 24012 is 480 ⁇ 360.
  • the mobile phone 2401 sends the image 24012 to the smart TV 2402 through the wireless communication module, and sends the image 24012 to the computer 2403 through the wireless communication module.
  • the smart TV 2402 After receiving the image 24012, the smart TV 2402 obtains the application identifier corresponding to the image 24012, and finds a multiple-enhanced super-score model for the game A according to the application identifier of the game A, and selects the multiple-enhanced super-score model for the game A. as the target superscore model.
  • the NPU of the smart TV 2402 inputs the image 24012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 24012 through the target super-resolution model to obtain the image 24021.
  • Image 24021 has an image resolution of 1920 ⁇ 1080.
  • the image resolution of image 24021 is greater than that of image 24012 , and the resolution of image 24021 is greater than that of image 24012 , so the image quality of image 24021 is higher than that of image 24012 .
  • the smart TV 2402 After the smart TV 2402 obtains the image 24021, it transmits the image 24021 frame by frame to the display screen of the smart TV 2402 for on-screen display.
  • the computer 2403 After receiving the image 24012, the computer 2403 obtains the application identifier corresponding to the image 24012, and finds the multiple-enhanced super-score model for the game A according to the application identifier of the game A, and selects the multiple-enhanced super-score model for the game A as the Goal overscore model.
  • the NPU of the computer 2403 inputs the image 24012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 24012 through the target super-resolution model to obtain the image 24031.
  • Image 24031 has an image resolution of 2560 ⁇ 1440.
  • the image resolution of image 24031 is greater than that of image 24012, and the resolution of image 24031 is greater than that of image 24012, so the image quality of image 24031 is higher than that of image 24012.
  • the image 24031 is transmitted frame by frame to the display screen of the computer 2403 for display on the upper screen.
  • the first electronic device firstly renders the native image data of the application program to obtain the first image. Then, the first electronic device transmits the first image to the designated device that needs to be projected, and the designated device performs super-resolution reconstruction on the first image, improves the quality of the first image, and obtains the target image for display on the upper screen . That is to say, in the image processing method improved in this embodiment, the image rendering process is divided into two steps: preliminary rendering and super-resolution reconstruction. The preliminary rendering step is performed by the first electronic device on the screen projection side, and super-resolution reconstruction is performed.
  • the steps are executed by the designated device of the screen-casting party, thereby reducing the load on the hardware resources of the first electronic device of the screen-casting party, reducing the rendering efficiency, and making full use of the hardware resources of the screen-casting party's first electronic device and the casting party's first electronic device.
  • the display resolution of the target image after image quality enhancement can be adapted to the display resolution of the specified device, thereby improving the user experience.
  • the super-resolution model selected by the designated device may be a single-enhanced super-resolution model, or may also be a multiple-enhanced super-resolution model.
  • the super-resolution model selected by the specified device is the multiple-enhanced super-resolution model, the hardware resources occupied by the preliminary rendering and the rendering power consumption of the preliminary rendering can be reduced.
  • the above-mentioned super-scoring model may be a general super-scoring model, or may also be a specific super-scoring model for a certain application or a certain type of application.
  • the applicable range of the specific super-resolution model is smaller than that of the general super-resolution model, but usually the image quality enhancement effect of the specific super-resolution model is better than that of the general super-resolution model.
  • an embodiment of the present application further provides an electronic device.
  • the electronic device 26 of this embodiment includes a processor 260 , a memory 261 , and a computer program 262 stored in the memory 261 and executable on the processor 260 .
  • the processor 260 executes the computer program 262
  • the steps in the above embodiments of the screen expansion method are implemented, for example, steps S301 to S302 shown in FIG. 1 .
  • the processor 260 executes the computer program 262
  • the functions of the modules/units in the foregoing device embodiments are implemented, for example, the functions of the modules 2601 to 2602 shown in FIG. 26 .
  • the computer program 262 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 261 and executed by the processor 260 to complete the this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 262 in the electronic device 26 .
  • the computer program 262 can be divided into a native data module, a preliminary rendering module and a first super-divided module, and the specific functions of each module are as follows:
  • a native data module used to obtain native image data, where the native image data is image data generated by an application and not rendered;
  • a preliminary rendering module configured to render the native image data through the first graphics rendering hardware to obtain a first image
  • the first super-resolution module is configured to perform super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
  • the electronic device 26 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the electronic device may include, but is not limited to, the processor 260 and the memory 261 .
  • FIG. 26 is only an example of the electronic device 26, and does not constitute a limitation on the electronic device 26, and may include more or less components than the one shown, or combine some components, or different components
  • the electronic device may further include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 260 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware hardware, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 261 may be an internal storage unit of the electronic device 26 , such as a hard disk or a memory of the electronic device 26 .
  • the memory 261 may also be an external storage device of the electronic device 26, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device 26 card, Flash Card, etc.
  • the memory 261 may also include both an internal storage unit of the electronic device 26 and an external storage device.
  • the memory 261 is used to store the computer program and other programs and data required by the electronic device.
  • the memory 261 may also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus/electronic device and method may be implemented in other manners.
  • the above-described embodiments of the apparatus/electronic device are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Either the hardware may be incorporated or integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Image Processing (AREA)

Abstract

An image processing method, a system, an electronic device and a computer readable storage medium. The present invention is applicable to the field of artificial intelligence technology. In the image processing method, a first electronic device renders native image data by means of first graphics rendering hardware, to obtain a first image (S301); and the first electronic device performs super-resolution reconstruction on the first image by means of second graphics rendering hardware to obtain a target image (S302), the first graphics rendering hardware and the second graphics rendering hardware being different graphics rendering hardware. Compared with the manner of directly rendering native image data into a target image by using single graphics rendering hardware, said method reduces the rendering power consumption for rendering a high-quality image, reduces the amount of calculation, improves the rendering efficiency, and fully uses hardware resources of heterogeneous graphics rendering hardware in an electronic device, solving the problem in an existing image solution that when the hardware resources of the electronic device are insufficient, the electronic device can only run a high-quality product with a relatively low image quality.

Description

图像处理方法、系统、电子设备及计算机可读存储介质Image processing method, system, electronic device, and computer-readable storage medium
本申请要求于2020年07月08日提交国家知识产权局、申请号为202010653106.7、申请名称为“图像处理方法、系统、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on July 8, 2020, the application number is 202010653106.7, and the application name is "image processing method, system, electronic device and computer-readable storage medium", all of which are The contents are incorporated herein by reference.
技术领域technical field
本申请属于人工智能领域,尤其涉及一种图像处理方法、系统、电子设备及计算机可读存储介质。The present application belongs to the field of artificial intelligence, and in particular, relates to an image processing method, system, electronic device, and computer-readable storage medium.
背景技术Background technique
当前市面上出现了越来越多画面精细的产品,例如,高画质的游戏和视频。There are more and more products with fine pictures on the market today, such as high-definition games and videos.
当电子设备在渲染这些产品的画面时,由于渲染功耗高,计算量大,对电子设备的硬件资源要求较高。然而,当电子设备的硬件资源不足时,电子设备只能以较低的画质运行这些产品,严重影响了产品的画面效果。When an electronic device renders images of these products, due to high rendering power consumption and a large amount of calculation, the hardware resource requirements of the electronic device are relatively high. However, when the hardware resources of the electronic device are insufficient, the electronic device can only run these products with a lower picture quality, which seriously affects the picture effect of the product.
发明内容SUMMARY OF THE INVENTION
本申请提供一种图像处理方法、系统、电子设备及计算机可读存储介质,解决了现有的图像方案中,当电子设备的硬件资源不足时,电子设备只能以较低的画质运行高画质产品的问题。The present application provides an image processing method, a system, an electronic device and a computer-readable storage medium, which solves the problem that in the existing image solution, when the hardware resources of the electronic device are insufficient, the electronic device can only run at a low image quality and high Problems with image quality products.
为达到上述目的,本申请采用如下技术方案:To achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种图像处理方法,应用于第一电子设备,包括:In a first aspect, an image processing method is provided, applied to a first electronic device, including:
所述第一电子设备获取原生图像数据,所述原生图像数据为应用程序生成的、且未经过渲染的图像数据;The first electronic device acquires native image data, where the native image data is unrendered image data generated by an application;
所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像;The first electronic device renders the native image data through the first graphics rendering hardware to obtain a first image;
所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,所述第一图形渲染硬件和第二图形渲染硬件为不同的图形渲染硬件。The first electronic device performs super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
需要说明的是,应用程序在运行的过程中生成原生图像数据。It should be noted that the application generates native image data during the running process.
第一电子设备在获取到原生图像数据之后,可以通过第一图形渲染组件对原生图像数据进行渲染,使得原生图像数据转化为可见像素,得到第一图像。After acquiring the native image data, the first electronic device may render the native image data through the first graphics rendering component, so that the native image data is converted into visible pixels to obtain the first image.
之后,第一电子设备可以通过第二图形渲染组件对第一图像进行超分辨率重建,得到高画质的目标图像。Afterwards, the first electronic device may perform super-resolution reconstruction on the first image through the second graphics rendering component to obtain a high-quality target image.
与直接将原生图像数据渲染成高画质的目标图像的方式相比,本申请的图像处理方法通过结合初步渲染与超分辨率重建的方式得到目标图像,可以降低电子设备渲染高画质图像的渲染功耗和计算量。Compared with the method of directly rendering native image data into a high-quality target image, the image processing method of the present application obtains the target image by combining preliminary rendering and super-resolution reconstruction, which can reduce the time required for electronic devices to render high-quality images. Rendering power and computation.
此外,第一图形渲染组件和第二图形渲染组件的具体类型可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)以及 神经网络处理器(neural-network processing units,NPU)中的一种或多种。In addition, the specific types of the first graphics rendering component and the second graphics rendering component may be a central processing unit (CPU), a graphics processing unit (graphics processing unit, GPU), and a neural-network processing unit (neural-network processing units). , NPU) one or more of.
并且,第一图形渲染组件和第二图形渲染组件为不同的图形渲染组件,从而充分利用电子设备内部异构的图形渲染组件,避免因单一图形渲染硬件的硬件资源不足导致电子设备以较低的画质运行高画质产品。In addition, the first graphics rendering component and the second graphics rendering component are different graphics rendering components, so as to make full use of the heterogeneous graphics rendering components inside the electronic device, and avoid the electronic device with a lower hardware resource due to insufficient hardware resources of a single graphics rendering hardware. Image quality runs high-quality products.
在第一方面的一种可能的实现方式中,所述第一电子设备通过第一图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:In a possible implementation manner of the first aspect, the first electronic device performs super-resolution reconstruction on the first image through first graphics rendering hardware to obtain a target image, including:
所述第一电子设备获取所述应用程序的标识;The first electronic device obtains the identifier of the application;
所述第一电子设备查找与所述标识关联的目标超分模型;the first electronic device searches for a target super-score model associated with the identifier;
所述第一电子设备通过所述第一图形渲染硬件以及查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The first electronic device performs super-resolution reconstruction on the first image through the first graphics rendering hardware and the found target super-resolution model to obtain a target image.
需要说明的是,第一电子设备可以通过超分模型对第一图像进行超分辨率重建。It should be noted that, the first electronic device may perform super-resolution reconstruction on the first image by using the super-resolution model.
其中,超分模型可以包括特定超分模型和通用超分模型。特定超分模型仅仅适用于部分应用程序,其适用性较差,但是拥有较高的画质优化能力。通用超分模型的适用性较高,但是画质优化能力有限。The super-score model may include a specific over-score model and a general over-score model. The specific super-resolution model is only suitable for some applications, and its applicability is poor, but it has a high image quality optimization ability. The general super-score model has high applicability, but the ability to optimize image quality is limited.
由于特定超分模型的应用范围有限,因此,电子设备可以预先建立特定超分模型与其适用的应用程序的关联关系。Since the application scope of a specific super-resolution model is limited, the electronic device may pre-establish an association relationship between the specific super-resolution model and its applicable application program.
第一电子设备在获取到第一图像之后,可以获取应用程序的标识,并查找与该标识存在关联的目标超分模型。After acquiring the first image, the first electronic device may acquire the identifier of the application, and search for a target super-score model associated with the identifier.
如果第一电子设备可以找到与上述标识关联的目标超分模型,则表示第一电子设备中存在适用于上述应用程序的特定超分模型(即目标超分模型)。第一电子设备可以通过上述第一图形渲染硬件以及上述目标超分模型对第一图像进行超分辨率重建。If the first electronic device can find the target super-score model associated with the above identifier, it means that there is a specific super-score model (ie, the target super-score model) suitable for the above application in the first electronic device. The first electronic device may perform super-resolution reconstruction on the first image by using the above-mentioned first graphics rendering hardware and the above-mentioned target super-resolution model.
电子设备使用目标超分模型对第一图像进行超分辨率重建,可以更好地提高目标图像的画质。The electronic device uses the target super-resolution model to perform super-resolution reconstruction on the first image, which can better improve the image quality of the target image.
此外,上述应用程序的标识可以为应用程序的包名,或者,上述应用程序的标识也可以是用户自定义的标识。In addition, the identifier of the application program may be the package name of the application program, or the identifier of the application program may also be a user-defined identifier.
在第一方面的一种可能的实现方式中,在所述第一电子设备查找与所述标识关联的目标超分模型之后,还包括:In a possible implementation manner of the first aspect, after the first electronic device searches for a target super-score model associated with the identifier, the method further includes:
若未查找到与所述标识关联的目标超分模型,则所述第一电子设备通过所述第一图形渲染硬件以及预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。If the target super-resolution model associated with the identifier is not found, the first electronic device performs super-resolution reconstruction on the first image by using the first graphics rendering hardware and a preset general super-resolution model, Get the target image.
需要说明的是,如果第一电子设备无法查找到与上述标识关联的目标超分模型,则表示该应用程序不存在相关联的特定超分模型。It should be noted that, if the first electronic device cannot find the target super-scoring model associated with the above identifier, it means that there is no specific super-scoring model associated with the application.
此时,第一电子设备可以通过第一图形渲染硬件以及预设的通用超分模型对第一图像进行超分辨率重建,得到目标图像。At this time, the first electronic device may perform super-resolution reconstruction on the first image by using the first graphics rendering hardware and the preset general super-resolution model to obtain the target image.
在第一方面的一种可能的实现方式中,在所述第一电子设备通过预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像之后,还包括:In a possible implementation manner of the first aspect, after the first electronic device performs super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain the target image, the method further includes:
所述第一电子设备建立所述标识与所述通用超分模型的关联关系。The first electronic device establishes an association relationship between the identifier and the general super-resolution model.
需要说明的是,当第一电子设备使用通用超分模型对第一图像进行超分辨率重建时,由于第一电子设备可能设置有多个通用超分模型,因此,为了使该应用程序下一 次被启动时,第一电子设备可以调用同一通用超分模型对第一图像进行超分辨率重建,第一电子设备可以建立上述标识与该通用超分模型的关联关系。It should be noted that when the first electronic device uses the general super-resolution model to perform super-resolution reconstruction on the first image, since the first electronic device may be set with multiple general super-resolution models, in order to make the application program next time When activated, the first electronic device may invoke the same general super-resolution model to perform super-resolution reconstruction on the first image, and the first electronic device may establish an association relationship between the above-mentioned identifier and the general super-resolution model.
当该应用程序下一次启动时,第一电子设备可以根据上述标识与该通用超分模型的关联关系,查找到该通用超分模型,将该通用超分模型确定为目标超分模型,使用目标超分模型对第一图像进行超分辨率重建,从而使第一电子设备在处理该应用程序的图像时,可以保持相同的画质优化水平。When the application program is started next time, the first electronic device can find the general super-score model according to the association relationship between the above-mentioned identifier and the general super-score model, determine the general-purpose super-score model as the target The super-resolution model performs super-resolution reconstruction on the first image, so that the first electronic device can maintain the same level of image quality optimization when processing the image of the application.
在第一方面的一种可能的实现方式中,所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像,包括:In a possible implementation manner of the first aspect, the first electronic device renders the native image data by using first graphics rendering hardware to obtain a first image, including:
所述第一电子设备通过所述第一图形渲染硬件以及预设的第一图像分辨率对所述原生图像数据进行渲染,得到第一图像。The first electronic device renders the native image data by using the first graphics rendering hardware and a preset first image resolution to obtain a first image.
需要说明的是,第一电子设备在进行初步渲染时,可以根据第一图像分辨率对原生图像数据进行渲染。第一图像分辨率为第一电子设备预先设置的。It should be noted that, when performing preliminary rendering, the first electronic device may render native image data according to the first image resolution. The first image resolution is preset by the first electronic device.
在第一方面的一种可能的实现方式中,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:In a possible implementation manner of the first aspect, the first electronic device performs super-resolution reconstruction on the first image by using second graphics rendering hardware to obtain a target image, including:
所述第一电子设备通过所述第二图形渲染硬件以及单倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率和所述目标图像的图像分辨率一致,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware and the single-enhanced super-resolution model to obtain a target image, wherein the first image resolution and the The image resolutions of the target images are the same, and the single-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same.
需要说明的是,如果第一图像分辨率和目标图像的图像分辨率一致,则第一电子设备在选用超分模型对第一图像进行超分辨率重建时,可以选用单倍增强型超分模型。It should be noted that, if the resolution of the first image is consistent with the image resolution of the target image, the first electronic device may select the single-enhanced super-resolution model when selecting the super-resolution model to perform super-resolution reconstruction on the first image. .
对于单倍增强型超分模型而言,该模型的输入图像的图像分辨率和该模型的输出图像的图像分辨率一致。For the haplo-enhanced super-resolution model, the image resolution of the input image of the model is the same as the image resolution of the output image of the model.
在第一方面的一种可能的实现方式中,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:In a possible implementation manner of the first aspect, the first electronic device performs super-resolution reconstruction on the first image by using second graphics rendering hardware to obtain a target image, including:
所述第一电子设备通过所述第二图形渲染硬件以及多倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率小于所述目标图像的图像分辨率,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The first electronic device performs super-resolution reconstruction on the first image by using the second graphics rendering hardware and the multiple-enhanced super-resolution model to obtain a target image, wherein the resolution of the first image is smaller than the resolution of the first image. The image resolution of the target image. The multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than the image resolution of the output image.
需要说明的是,如果第一图像分辨率小于目标图像的图像分辨率,则电子设备可以选用多倍增强型超分模型对第一图像进行超分辨率重建。It should be noted that, if the resolution of the first image is smaller than that of the target image, the electronic device may select a multiple-enhanced super-resolution model to perform super-resolution reconstruction on the first image.
对于多倍增强型超分模型而言,该模型的输入图像的图像分辨率小于该模型的输出图像的图像分辨率。也即是说,多倍增强型超分模型可以增大输入图像的图像分辨率。For a multiple-enhanced super-resolution model, the image resolution of the input image of the model is smaller than the image resolution of the output image of the model. That is, the multi-fold enhanced super-resolution model can increase the image resolution of the input image.
在第一方面的一种可能的实现方式中,所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像,包括:In a possible implementation manner of the first aspect, the first electronic device renders the native image data by using first graphics rendering hardware to obtain a first image, including:
所述第一电子设备通过图形处理器对所述原生图像数据进行渲染,得到第一图像;The first electronic device renders the native image data through a graphics processor to obtain a first image;
相应的,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:Correspondingly, the first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware to obtain a target image, including:
所述第一电子设备通过神经网络处理器对所述第一图像进行超分辨率重建,得到 目标图像。The first electronic device performs super-resolution reconstruction on the first image through a neural network processor to obtain a target image.
需要说明的是,第一电子设备通过异构的图形渲染硬件对原生图像数据进行处理,得到目标图像。具体地,第一电子设备可以通过图形处理器对原生图像数据进行渲染,得到第一图像,并通过神经网络处理器对第一图像进行超分辨率重建。It should be noted that the first electronic device processes the native image data through heterogeneous graphics rendering hardware to obtain the target image. Specifically, the first electronic device may render the original image data through a graphics processor to obtain a first image, and perform super-resolution reconstruction on the first image through a neural network processor.
第一电子设备选用合适的图形渲染硬件执行相应的操作,可以提高第一电子设备的图像处理效率。The first electronic device selects appropriate graphics rendering hardware to perform corresponding operations, which can improve the image processing efficiency of the first electronic device.
第二方面,提供一种图像处理方法,应用于第二电子设备,包括:In a second aspect, an image processing method is provided, applied to a second electronic device, including:
所述第二电子设备接收第一电子设备发送的第一图像,所述第一图像为所述第一电子设备对应用程序生成的原生图像数据渲染后得到的图像;The second electronic device receives a first image sent by the first electronic device, where the first image is an image obtained by the first electronic device rendering the native image data generated by the application;
所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像。The second electronic device performs super-resolution reconstruction on the first image to obtain a target image.
需要说明的是,当用户希望将第一电子设备的屏幕显示画面投屏至第二电子设备时,第一电子设备可以在本地对应用程序的原生图像数据进行初步渲染,得到第一图像。It should be noted that when the user wishes to project the screen display of the first electronic device to the second electronic device, the first electronic device can locally render the native image data of the application program to obtain the first image.
然后,第一电子设备将第一图像发送至第二电子设备。Then, the first electronic device sends the first image to the second electronic device.
第二电子设备接收第一图像,并对第一图像进行超分辨率重建,得到高画质的目标图像。The second electronic device receives the first image, and performs super-resolution reconstruction on the first image to obtain a high-quality target image.
在得到目标图像的过程中,第一电子设备和第二电子设备联合进行图像处理,可以充分利用不同电子设备的图形渲染硬件的硬件资源,从而减少第一电子设备在渲染高画质图像时对本地硬件资源的负荷,降低第一电子设备渲染高画质图像的渲染消耗,并且,充分利用不同电子设备的硬件资源,可以更好地提高图像的画质,从而提高用户的使用体验。In the process of obtaining the target image, the first electronic device and the second electronic device jointly perform image processing, which can make full use of the hardware resources of the graphics rendering hardware of different electronic devices, thereby reducing the need for the first electronic device when rendering high-quality images. The load of the local hardware resources reduces the rendering consumption of the first electronic device for rendering high-quality images, and makes full use of the hardware resources of different electronic devices to better improve the image quality, thereby improving the user experience.
在第二方面的一种可能的实现方式中,所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:In a possible implementation manner of the second aspect, the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
所述第二电子设备获取所述应用程序的标识;acquiring, by the second electronic device, the identifier of the application;
所述第二电子设备查找与所述标识关联的目标超分模型;the second electronic device searches for a target super-score model associated with the identifier;
所述第二电子设备通过查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The second electronic device performs super-resolution reconstruction on the first image by using the found target super-resolution model to obtain a target image.
需要说明的是,第二电子设备可以通过超分模型对第二图像进行超分辨率重建。It should be noted that, the second electronic device may perform super-resolution reconstruction on the second image by using the super-resolution model.
其中,超分模型可以包括特定超分模型和通用超分模型。特定超分模型仅仅适用于部分应用程序,其适用性较差,但是拥有较高的画质优化能力。通用超分模型的适用性较高,但是画质优化能力有限。The super-score model may include a specific over-score model and a general over-score model. The specific super-resolution model is only suitable for some applications, and its applicability is poor, but it has a high image quality optimization ability. The general super-score model has high applicability, but the ability to optimize image quality is limited.
由于特定超分模型的应用范围有限,因此,电子设备可以预先建立特定超分模型与其适用的应用程序的关联关系。Since the application scope of a specific super-resolution model is limited, the electronic device may pre-establish an association relationship between the specific super-resolution model and its applicable application program.
第二电子设备在获取到第二图像之后,可以获取应用程序的标识,并查找与该标识存在关联的目标超分模型。After acquiring the second image, the second electronic device may acquire the identifier of the application, and search for the target super-score model associated with the identifier.
如果第二电子设备可以找到与上述标识关联的目标超分模型,则表示第二电子设备中存在适用于上述应用程序的特定超分模型(即目标超分模型),第二电子设备可以通过图形渲染硬件以及上述目标超分模型对第二图像进行超分辨率重建。If the second electronic device can find the target super-score model associated with the above identifier, it means that there is a specific super-score model (ie, the target super-score model) suitable for the above application in the second electronic device, and the second electronic device can use the graph The rendering hardware and the target super-resolution model described above perform super-resolution reconstruction of the second image.
电子设备使用目标超分模型对第二图像进行超分辨率重建,可以更好地提高目标 图像的画质。The electronic device uses the target super-resolution model to perform super-resolution reconstruction on the second image, which can better improve the image quality of the target image.
此外,上述应用程序的标识可以为应用程序的包名,或者,上述应用程序的标识也可以是用户自定义的标识。In addition, the identifier of the application program may be the package name of the application program, or the identifier of the application program may also be a user-defined identifier.
在第二方面的一种可能的实现方式中,在所述第二电子设备查找与所述标识关联的目标超分模型之后,还包括:In a possible implementation manner of the second aspect, after the second electronic device searches for the target super-score model associated with the identifier, the method further includes:
若未查找到与所述标识关联的目标超分模型,则所述第二电子设备通过预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。If the target super-resolution model associated with the identifier is not found, the second electronic device performs super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain a target image.
需要说明的是,如果第二电子设备无法查找到与上述标识关联的目标超分模型,则表示该应用程序不存在相关联的特定超分模型。It should be noted that, if the second electronic device cannot find the target super-score model associated with the above identifier, it means that there is no specific super-score model associated with the application.
此时,第二电子设备可以通过图形渲染硬件以及预设的通用超分模型对第二图像进行超分辨率重建,得到目标图像。At this time, the second electronic device may perform super-resolution reconstruction on the second image by using the graphics rendering hardware and the preset general super-resolution model to obtain the target image.
在第二方面的一种可能的实现方式中,在所述第二电子设备通过预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像之后,还包括:In a possible implementation manner of the second aspect, after the second electronic device performs super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain the target image, the method further includes:
所述第二电子设备建立所述标识与所述通用超分模型的关联关系。The second electronic device establishes an association relationship between the identifier and the general super-resolution model.
需要说明的是,当第二电子设备使用通用超分模型对第二图像进行超分辨率重建时,由于第二电子设备可能设置有多个通用超分模型,因此,为了使该应用程序下一次被启动时,第二电子设备可以调用同一通用超分模型对第二图像进行超分辨率重建,第二电子设备可以建立上述标识与该通用超分模型的关联关系。It should be noted that when the second electronic device uses the general super-resolution model to perform super-resolution reconstruction on the second image, since the second electronic device may be set with multiple general super-resolution models, in order to make the application program next time When activated, the second electronic device may invoke the same general super-resolution model to perform super-resolution reconstruction on the second image, and the second electronic device may establish an association relationship between the above-mentioned identifier and the general super-resolution model.
当该应用程序下一次启动时,第二电子设备可以根据上述标识与该通用超分模型的关联关系,查找到该通用超分模型,将该通用超分模型确定为目标超分模型,使用目标超分模型对第二图像进行超分辨率重建,从而使第二电子设备在处理该应用程序的图像时,可以保持相同的画质优化水平。When the application program is started next time, the second electronic device can find the general super-score model according to the association relationship between the above-mentioned identifier and the general super-score model, determine the general super-score model as the target The super-resolution model performs super-resolution reconstruction on the second image, so that the second electronic device can maintain the same level of image quality optimization when processing the image of the application.
在第二方面的一种可能的实现方式中,所述第一图像的第一图像分辨率和所述目标图像的图像分辨率一致;In a possible implementation manner of the second aspect, the first image resolution of the first image is consistent with the image resolution of the target image;
所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
所述第二电子设备通过单倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The second electronic device performs super-resolution reconstruction on the first image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
需要说明的是,如果第一图像分辨率和目标图像的图像分辨率一致,则第二电子设备在选用超分模型对第一图像进行超分辨率重建时,可以选用单倍增强型超分模型。It should be noted that, if the resolution of the first image is the same as the image resolution of the target image, the second electronic device may select the single-enhanced super-resolution model when selecting the super-resolution model to perform super-resolution reconstruction on the first image. .
单倍增强型超分模型的输入图像的图像分辨率和输出图像的图像分辨率一致。The image resolution of the input image of the haplo-enhanced super-resolution model is the same as the image resolution of the output image.
在第二方面的一种可能的实现方式中,所述第一图像的第一图像分辨率低于所述目标图像的图像分辨率;In a possible implementation manner of the second aspect, the first image resolution of the first image is lower than the image resolution of the target image;
所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
所述第二电子设备对所述第一图像进行上采样处理,得到第二图像,所述第二图像的图像分辨率与所述目标图像的图像分辨率一致;The second electronic device performs up-sampling processing on the first image to obtain a second image, and the image resolution of the second image is consistent with the image resolution of the target image;
所述第二电子设备通过单倍增强型超分模型对所述第二图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The second electronic device performs super-resolution reconstruction on the second image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
需要说明的是,如果第一图像分辨率小于目标图像的图像分辨率,则第二电子设备可以对第一图像进行上采样处理,得到第二图像,使得第二图像的图像分辨率与目标图像的图像分辨率一致。It should be noted that, if the resolution of the first image is smaller than that of the target image, the second electronic device may perform up-sampling processing on the first image to obtain a second image, so that the image resolution of the second image is the same as that of the target image. The image resolution is the same.
然后,第二电子设备再使用单倍增强型超分模型对第二图像进行处理,得到目标图像。Then, the second electronic device uses the single-enhanced super-resolution model to process the second image to obtain the target image.
上采样所应用的算法可以是最邻近元法、双线性内插法、三次内插法等插值算法中的任意一种。The algorithm applied for up-sampling can be any one of interpolation algorithms such as the nearest neighbor method, bilinear interpolation method, and cubic interpolation method.
在第二方面的一种可能的实现方式中,所述第一图像的第一图像分辨率低于所述目标图像的分辨率;In a possible implementation manner of the second aspect, the first image resolution of the first image is lower than the resolution of the target image;
所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
所述第二电子设备通过多倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The second electronic device performs super-resolution reconstruction on the first image through a multiple-enhanced super-resolution model to obtain the target image, wherein the multiple-enhanced super-resolution model is the image resolution of the input image A superresolution model with an image resolution smaller than the output image.
需要说明的是,如果第一图像分辨率小于目标图像的图像分辨率,则第二电子设备除了可以对第一图像进行上采样之外,第二电子设备还可以选用多倍增强型超分模型对第一图像进行超分辨率重建。It should be noted that, if the resolution of the first image is smaller than the image resolution of the target image, the second electronic device may use a multiple-enhanced super-resolution model in addition to up-sampling the first image. Perform super-resolution reconstruction on the first image.
多倍增强型超分模型的输入图像的图像分辨率小于输出图像的图像分辨率。也即是说,多倍增强型超分模型可以增大输入图像的图像分辨率。The image resolution of the input image of the multiple-enhanced super-resolution model is smaller than the image resolution of the output image. That is, the multi-fold enhanced super-resolution model can increase the image resolution of the input image.
第三方面,提供一种电子设备,包括:In a third aspect, an electronic device is provided, including:
原生数据模块,用于获取原生图像数据,所述原生图像数据为应用程序生成的、且未经过渲染的图像数据;A native data module, used to obtain native image data, where the native image data is image data generated by an application and not rendered;
初步渲染模块,用于通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像;a preliminary rendering module, configured to render the native image data through the first graphics rendering hardware to obtain a first image;
第一超分模块,用于通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,所述第一图形渲染硬件和第二图形渲染硬件为不同的图形渲染硬件。The first super-resolution module is configured to perform super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
在第三方面的一种可能的实现方式中,所述第一超分模块,包括:In a possible implementation manner of the third aspect, the first super-segmentation module includes:
第一标识子模块,用于获取所述应用程序的标识;a first identification submodule, used to obtain the identification of the application;
第一模型子模块,用于查找与所述标识关联的目标超分模型;a first model submodule, used to find the target super-score model associated with the identifier;
第一重建子模块,用于通过所述第一图形渲染硬件以及查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The first reconstruction sub-module is configured to perform super-resolution reconstruction on the first image by using the first graphics rendering hardware and the found target super-resolution model to obtain a target image.
在第三方面的一种可能的实现方式中,所述第一超分模块,还包括:In a possible implementation manner of the third aspect, the first super-segmentation module further includes:
第一通用子模块,用于若未查找到与所述标识关联的目标超分模型,则通过所述第一图形渲染硬件以及预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。The first general sub-module is used to perform super-resolution on the first image through the first graphics rendering hardware and the preset general super-resolution model if the target super-resolution model associated with the identifier is not found. Reconstruct to get the target image.
在第三方面的一种可能的实现方式中,所述第一超分模块,还包括:In a possible implementation manner of the third aspect, the first super-segmentation module further includes:
第一关联子模块,用于建立所述标识与所述通用超分模型的关联关系。The first association submodule is used to establish an association relationship between the identifier and the general super-resolution model.
在第三方面的一种可能的实现方式中,所述初步渲染模块,具体用于通过所述第一图形渲染硬件以及预设的第一图像分辨率对所述原生图像数据进行渲染,得到第一图像。In a possible implementation manner of the third aspect, the preliminary rendering module is specifically configured to render the native image data by using the first graphics rendering hardware and a preset first image resolution to obtain the first an image.
在第三方面的一种可能的实现方式中,所述第一超分模块,具体用于通过所述第二图形渲染硬件以及单倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率和所述目标图像的图像分辨率一致,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。In a possible implementation manner of the third aspect, the first super-resolution module is specifically configured to perform super-resolution on the first image by using the second graphics rendering hardware and the single-enhanced super-resolution model Reconstruction to obtain a target image, wherein the first image resolution is consistent with the image resolution of the target image, and the single-enhanced super-resolution model is that the image resolution of the input image and the image resolution of the output image are the same super-score model.
在第三方面的另一种可能的实现方式中,所述第一超分模块,具体用于通过所述第二图形渲染硬件以及多倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率小于所述目标图像的图像分辨率,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。In another possible implementation manner of the third aspect, the first super-resolution module is specifically configured to perform super-resolution on the first image by using the second graphics rendering hardware and the multiple-enhanced super-resolution model rate reconstruction to obtain a target image, wherein the resolution of the first image is smaller than the image resolution of the target image, and the multiple-enhanced super-resolution model is the image resolution of the input image is smaller than the image resolution of the output image Overscore model.
在第三方面的一种可能的实现方式中,所述初步渲染模块,具体用于通过图形处理器对所述原生图像数据进行渲染,得到第一图像;In a possible implementation manner of the third aspect, the preliminary rendering module is specifically configured to render the native image data through a graphics processor to obtain the first image;
相应的,所述第一超分模块,具体用于通过神经网络处理器对所述第一图像进行超分辨率重建,得到目标图像。Correspondingly, the first super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a neural network processor to obtain a target image.
第四方面,提供一种电子设备,包括:In a fourth aspect, an electronic device is provided, comprising:
图像接收模块,用于接收第一电子设备发送的第一图像,所述第一图像为所述第一电子设备对应用程序生成的原生图像数据渲染后得到的图像;an image receiving module, configured to receive a first image sent by a first electronic device, where the first image is an image obtained by the first electronic device rendering native image data generated by an application;
第二超分模块,用于对所述第一图像进行超分辨率重建,得到目标图像。The second super-resolution module is configured to perform super-resolution reconstruction on the first image to obtain a target image.
在第四方面的一种可能的实现方式中,所述第二超分模块,包括:In a possible implementation manner of the fourth aspect, the second super-segmentation module includes:
第二标识子模块,用于获取所述应用程序的标识;The second identification submodule is used to obtain the identification of the application;
第二模型子模块,用于查找与所述标识关联的目标超分模型;The second model submodule is used to find the target super-score model associated with the identifier;
第二重建子模块,用于通过查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The second reconstruction sub-module is configured to perform super-resolution reconstruction on the first image by using the found target super-resolution model to obtain a target image.
在第四方面的一种可能的实现方式中,所述第二超分模块,还包括:In a possible implementation manner of the fourth aspect, the second super-segmentation module further includes:
第二通用子模块,用于若未查找到与所述标识关联的目标超分模型,则通过预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。The second general sub-module is configured to perform super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain a target image if the target super-resolution model associated with the identifier is not found.
在第四方面的一种可能的实现方式中,所述第二超分模块,还包括:In a possible implementation manner of the fourth aspect, the second super-segmentation module further includes:
第二关联模块,用于建立所述标识与所述通用超分模型的关联关系。The second association module is configured to establish an association relationship between the identifier and the general super-resolution model.
在第四方面的一种可能的实现方式中,所述第一图像的第一图像分辨率和所述目标图像的图像分辨率一致;In a possible implementation manner of the fourth aspect, the first image resolution of the first image is consistent with the image resolution of the target image;
所述第二超分模块,具体用于通过单倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The second super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a single-enhanced super-score model to obtain the target image, wherein the single-enhanced super-score model is an input A superresolution model where the image resolution of the image is the same as the image resolution of the output image.
在第四方面的另一种可能的实现方式中,所述第一图像的第一图像分辨率低于所述目标图像的图像分辨率;In another possible implementation manner of the fourth aspect, the first image resolution of the first image is lower than the image resolution of the target image;
所述第二超分模块,包括:The second super-divided module includes:
上采样子模块,用于对所述第一图像进行上采样处理,得到第二图像,所述第二图像的图像分辨率与所述目标图像的图像分辨率一致;an upsampling submodule, configured to perform an upsampling process on the first image to obtain a second image, the image resolution of the second image is consistent with the image resolution of the target image;
增强子模块,用于所述第二电子设备通过单倍增强型超分模型对所述第二图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。An enhancement sub-module, used for the second electronic device to perform super-resolution reconstruction on the second image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is: A superresolution model where the image resolution of the input image is the same as the image resolution of the output image.
在第四方面的另一种可能的实现方式中,所述第一图像的第一图像分辨率低于所述目标图像的分辨率;In another possible implementation manner of the fourth aspect, the first image resolution of the first image is lower than the resolution of the target image;
所述第二超分模块,具体用于通过多倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The second super-resolution module is specifically configured to perform super-resolution reconstruction on the first image through a multiple-enhanced super-resolution model to obtain the target image, wherein the multiple-enhanced super-resolution model is an input A superresolution model where the image resolution of the image is smaller than that of the output image.
第五方面,提供一种图像处理系统,所述系统包括第一电子设备和第二电子设备;In a fifth aspect, an image processing system is provided, the system includes a first electronic device and a second electronic device;
所述第一电子设备用于对应用程序生成的原生图像数据进行渲染,得到第一图像,并将所述第一图像发送至所述第二电子设备;The first electronic device is configured to render the native image data generated by the application to obtain a first image, and send the first image to the second electronic device;
所述第二电子设备用于执行上述第二方面提及的图像处理方法。The second electronic device is configured to execute the image processing method mentioned in the second aspect above.
第六方面,提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,电子设备实现如上述方法的步骤。In a sixth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program, the electronic device realizes the steps of the above method.
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时,使得电子设备实现如上述方法的步骤。In a seventh aspect, a computer-readable storage medium is provided, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, enables an electronic device to implement the steps of the above method.
第八方面,提供了一种芯片系统,所述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组,所述芯片系统包括存储器和处理器,所述处理器执行所述存储器中存储的计算机程序,以实现如上述方法的步骤。In an eighth aspect, a chip system is provided, the chip system may be a single chip or a chip module composed of multiple chips, the chip system includes a memory and a processor, and the processor executes the storage in the memory. A computer program to implement the steps of the above method.
本申请实施例与现有技术相比存在的有益效果是:The beneficial effects that the embodiments of the present application have compared with the prior art are:
在本申请的图像处理方法中,电子设备先对原生图像数据进行渲染,得到第一图像,再对第一图像进行超分辨率重建,得到在屏幕上显示的目标图像。与直接将应用程序生成的原生图像数据渲染成最终在屏幕上显示的目标图像的方式相比,以初步渲染加超分辨率重建的方式生成目标图像可以降低渲染功耗,减少计算量,提高渲染效率。In the image processing method of the present application, the electronic device first renders the original image data to obtain the first image, and then performs super-resolution reconstruction on the first image to obtain the target image displayed on the screen. Compared with the method of directly rendering the native image data generated by the application into the target image finally displayed on the screen, generating the target image by means of preliminary rendering and super-resolution reconstruction can reduce rendering power consumption, reduce the amount of calculation, and improve rendering. efficient.
并且,电子设备通过第一图形渲染硬件执行初步渲染操作,通过第二图形渲染硬件执行超分辨率重建操作,可以充分利用电子设备内异构的硬件资源,避免因单一图形渲染硬件的硬件资源不足导致电子设备以较低的画质运行高画质产品。In addition, the electronic device performs the preliminary rendering operation through the first graphics rendering hardware, and performs the super-resolution reconstruction operation through the second graphics rendering hardware, which can make full use of the heterogeneous hardware resources in the electronic device and avoid the lack of hardware resources of a single graphics rendering hardware. Causes electronic devices to run high-quality products at lower image quality.
综上,本申请的图像处理方法可以减少渲染高画质图像的渲染功耗和计算量,并且可以充分利用电子设备内异构的硬件资源,解决了现有的图像方案中,当电子设备的硬件资源不足时,电子设备只能以较低的画质运行高画质产品的问题,具有较强的易用性和实用性。To sum up, the image processing method of the present application can reduce the rendering power consumption and calculation amount of rendering high-quality images, and can make full use of heterogeneous hardware resources in electronic devices, so as to solve the problem that in the existing image solutions, when the electronic device's When the hardware resources are insufficient, the electronic device can only run high-quality products with lower picture quality, which has strong ease of use and practicability.
附图说明Description of drawings
图1是本申请实施例提供的一种电子设备的结构示意图;1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图2是本申请实施例提供的一种电子设备的软件结构框图;2 is a software structural block diagram of an electronic device provided by an embodiment of the present application;
图3是本申请实施例提供的一种图像处理方法的流程示意图;3 is a schematic flowchart of an image processing method provided by an embodiment of the present application;
图4是本申请实施例提供的一种示例图像的示意图;FIG. 4 is a schematic diagram of an example image provided by an embodiment of the present application;
图5是本申请实施例提供的另一种示例图像的示意图;FIG. 5 is a schematic diagram of another example image provided by an embodiment of the present application;
图6是本申请实施例提供的另一种示例图像的示意图;FIG. 6 is a schematic diagram of another example image provided by an embodiment of the present application;
图7是本申请实施例提供的另一种电子设备的示意图;7 is a schematic diagram of another electronic device provided by an embodiment of the present application;
图8是本申请实施例提供的一种应用场景的示意图;FIG. 8 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图9是本申请实施例提供的另一种图像处理方法的流程示意图;9 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图10是本申请实施例提供的另一种应用场景的示意图;FIG. 10 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图11是本申请实施例提供的另一种图像处理方法的流程示意图;11 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图12是本申请实施例提供的另一种应用场景的示意图;12 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图13是本申请实施例提供的另一种应用场景的示意图;13 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图14是本申请实施例提供的另一种应用场景的示意图;14 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图15是本申请实施例提供的另一种应用场景的示意图;FIG. 15 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图16是本申请实施例提供的另一种应用场景的示意图;16 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图17是本申请实施例提供的另一种图像处理方法的流程示意图;17 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图18是本申请实施例提供的另一种应用场景的示意图;FIG. 18 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图19是本申请实施例提供的另一种图像处理方法的流程示意图;19 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图20是本申请实施例提供的另一种应用场景的示意图;FIG. 20 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图21是本申请实施例提供的另一种应用场景的示意图;21 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图22是本申请实施例提供的另一种应用场景的示意图;FIG. 22 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图23是本申请实施例提供的另一种应用场景的示意图;23 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图24是本申请实施例提供的另一种应用场景的示意图;FIG. 24 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图25是本申请实施例提供的另一种应用场景的示意图;FIG. 25 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图26是本申请实施例提供的另一种电子设备的示意图。FIG. 26 is a schematic diagram of another electronic device provided by an embodiment of the present application.
具体实施方式detailed description
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或硬件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、硬件和/或其集合的存在或添加。It is to be understood that the term "comprising" when used in this specification and the appended claims indicates the presence of the described features, integers, steps, operations, elements and/or hardware, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, hardware, and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个 或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
在介绍本申请实施例之前,首先对本申请实施例涉及的部分术语进行解释说明:Before introducing the embodiments of the present application, some terms involved in the embodiments of the present application will be explained first:
画质指的是画面质量。评估图像画质的画质指标有许多,较为常见的画质指标是图像分辨率,在其他画质指标相同的情况下,图像分辨率越高,图像的画质越高,图像分辨率越低,图像画质越低。Picture quality refers to the picture quality. There are many image quality indicators for evaluating image quality. The more common image quality indicator is image resolution. When other image quality indicators are the same, the higher the image resolution, the higher the image quality and the lower the image resolution. , the lower the image quality.
除了图像分辨率之外,画质指标还可以包括清晰度、锐度、镜头畸变度、色散度、解析度、色域范围、色彩纯度(色彩艳度)、色彩平衡参数等指标中的一种或多种。In addition to image resolution, image quality indicators can also include one of sharpness, sharpness, lens distortion, dispersion, resolution, color gamut range, color purity (color brilliance), and color balance parameters. or more.
图像分辨率指图像中存储的信息量,可以理解为图像中包含的像素数量。图像分辨率的表达方式可以为“水平像素数×垂直像素数”。例如,图像的分辨率为2048×1080,表示该图像中每一行像素包括2048个像素,每一列像素包括1080个像素。Image resolution refers to the amount of information stored in the image, which can be understood as the number of pixels contained in the image. The image resolution can be expressed as "the number of horizontal pixels × the number of vertical pixels". For example, the resolution of the image is 2048×1080, which means that each row of pixels in the image includes 2048 pixels, and each column of pixels includes 1080 pixels.
渲染在计算机术语中是指根据图像模型生成图像的过程。图像模型是用严格定义的语言或者数据结构对于三维场景的描述,它包括几何、视点、纹理、照明信息及渲染参数。渲染参数中可以包括上述画质指标。Rendering in computer terms refers to the process of generating an image from an image model. An image model is a description of a three-dimensional scene using a strictly defined language or data structure, including geometry, viewpoint, texture, lighting information, and rendering parameters. The rendering parameters may include the above-mentioned image quality indicators.
当前市面上出现了越来越多画面精细的产品,例如,高画质的游戏和视频。There are more and more products with fine pictures on the market today, such as high-definition games and videos.
这些产品对电子设备的硬件资源要求较高。当电子设备在渲染这些产品的画面时,渲染功耗高,并且,如果电子设备的硬件资源不足,那么电子设备只能以较低的画质运行这些产品,影响用户的使用体验。These products have higher requirements on the hardware resources of electronic devices. When an electronic device renders images of these products, the rendering power consumption is high, and if the hardware resources of the electronic device are insufficient, the electronic device can only run these products at a lower image quality, which affects the user experience.
例如,如果用户在具备RTX2080显卡级别的硬件资源的电子设备上运行一款制作精细的游戏,即使用户将图像分辨率调节至2048×1080,电子设备的帧率也能保持在90帧/秒左右。For example, if a user runs a well-crafted game on an electronic device with RTX2080 graphics card-level hardware resources, even if the user adjusts the image resolution to 2048×1080, the frame rate of the electronic device can remain around 90 frames per second .
但是,如果用户在手机平台上以较高的图像分辨率运行一款制作精细的游戏,即使该手机平台是当前较高水准的手机平台Mali-G76,电子设备的帧率通常也只能保持在40帧/秒左右。如果用户调低图像分辨率,电子设备的帧率通常也只能保持在60帧/秒。However, if a user runs a well-crafted game with a higher image resolution on a mobile platform, even if the mobile platform is the current high-level mobile platform Mali-G76, the frame rate of the electronic device can usually only be maintained at 40 frames per second or so. If the user turns down the image resolution, the frame rate of the electronic device is usually only kept at 60 frames per second.
对此,提供了一种图像加速(GPU-turbo)技术。GPU-turbo技术在电子设备的系统底层重构了传统的GPU架构,实现了软硬件协协同,使得GPU整体运算效率得到了大幅度提升。并且,GPU-turbo技术可以通过人工智能(Artificial Intelligence,AI)技术检测相邻帧图像的画质异同,进行相邻帧的差异部分进行渲染,保留相邻帧相同的内容,通过这种方式,GPU-turbo可以节约80%的计算,极大地提高GPU的渲染速度。In this regard, a graphics acceleration (GPU-turbo) technology is provided. GPU-turbo technology reconstructs the traditional GPU architecture at the bottom layer of the electronic device system, realizes the coordination of software and hardware, and greatly improves the overall computing efficiency of the GPU. In addition, GPU-turbo technology can detect the similarities and differences of image quality of adjacent frame images through artificial intelligence (AI) technology, render the difference parts of adjacent frames, and retain the same content of adjacent frames. In this way, GPU-turbo can save 80% of the calculation, greatly improving the rendering speed of the GPU.
但是,GPU-turbo技术的图像渲染方式与传统的GPU渲染方式一致,都是由GPU直接将初始的图像文件渲染成最终上屏显示的图像。因此,使用GPU-turbo技术运行高画质的产品时,仍会对电子设备的GPU产生较大的负荷,渲染功耗高。However, the image rendering method of GPU-turbo technology is consistent with the traditional GPU rendering method. The GPU directly renders the initial image file into the final image displayed on the screen. Therefore, when using the GPU-turbo technology to run high-quality products, it will still generate a large load on the GPU of the electronic device, and the rendering power consumption will be high.
有鉴于此,本申请实施例提供了一种图像处理方法、装置、电子设备及计算机可读存储介质,以解决现有的图像渲染方法在渲染高画质的产品时,渲染功耗高,计算量大的问题。In view of this, embodiments of the present application provide an image processing method, apparatus, electronic device, and computer-readable storage medium, so as to solve the problem of high rendering power consumption and high computational cost when rendering high-quality products in the existing image rendering method. volume problem.
可以理解的是,本申请实施例中提供的图像渲染方法中所涉及到的步骤仅仅作为示例,并非所有的步骤均是必须执行的步骤,或者并非各个信息或消息中的内容均是 必选的,在使用过程中可以根据需要酌情增加或减少。It can be understood that the steps involved in the image rendering method provided in the embodiments of the present application are only used as examples, and not all steps are required to be performed, or not all information or contents in the message are required to be selected. , which can be increased or decreased as needed during use.
本申请实施例中同一个步骤或者具有相同功能的步骤或者消息在不同实施例之间可以互相参考借鉴。The same step or steps or messages with the same function in the embodiments of the present application may refer to each other for reference between different embodiments.
本申请实施例描述的业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. With the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请实施例中描述的电子设备可以是手机、平板电脑、手持计算机、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、穿戴设备等设备,本申请实施例对该电子设备的具体形态/类型不作任何限制。The electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a handheld computer, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, a media For devices such as players and wearable devices, the embodiments of the present application do not impose any restrictions on the specific forms/types of the electronic devices.
示例性的,图1示出了电子设备100的一种结构示意图。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S) 接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明, 并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处 理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口, 美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate for according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮 度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数 据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
图2是本发明实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with the capturing and photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera 193 captures still images or video.
接下来,将从第一电子设备的角度,对本实施例提供的一种图像处理方法进行描述。请参阅图3所示的图像处理方法的流程图,该方法包括:Next, an image processing method provided by this embodiment will be described from the perspective of the first electronic device. Please refer to the flowchart of the image processing method shown in FIG. 3, the method includes:
S301、第一电子设备通过第一图形渲染硬件对原生图像数据进行渲染,得到第一图像;S301. The first electronic device renders the native image data through the first graphics rendering hardware to obtain a first image;
当用户在使用第一电子设备的应用程序时,应用程序将原生图像数据传递至第一电子设备的第一图形渲染硬件进行渲染。原生图像数据是指应用程序产生,未经过渲染的图像文件。When the user is using the application program of the first electronic device, the application program transmits the native image data to the first graphics rendering hardware of the first electronic device for rendering. Native image data refers to unrendered image files generated by the application.
渲染是指通过光栅化等技术,将第一电子设备中存储的图像数据转化为可见像素的过程。Rendering refers to a process of converting the image data stored in the first electronic device into visible pixels through techniques such as rasterization.
在本实施例的图像处理方法中,第一电子设备可以通过图像超分辨率重建的方式,得到目标画质指标的目标图像。但是,第一电子设备无法直接对原生图像数据进行超分辨率重建。In the image processing method of this embodiment, the first electronic device may obtain the target image of the target image quality index by means of image super-resolution reconstruction. However, the first electronic device cannot directly perform super-resolution reconstruction on the native image data.
因此,第一电子设备需要对原生图像数据进行初步渲染,得到可以进行超分辨率重建的第一图像。Therefore, the first electronic device needs to perform preliminary rendering on the original image data to obtain a first image that can be reconstructed with super-resolution.
第一电子设备在初步渲染的过程中,可以调用第一图形渲染硬件以第一画质指标对原生图像数据进行渲染,得到第一图像。During the preliminary rendering process, the first electronic device may call the first graphics rendering hardware to render the native image data with the first image quality index to obtain the first image.
第一图形渲染硬件以第一画质指标对原生图像数据进行初步渲染时,可以是以第一图像分辨率对原生图像数据进行渲染,第一图像分辨率低于预设图像分辨率;或者,第一图形渲染硬件也可以是调节其他画质指标,使得第一画质指标低于预设画质指标,然后对原生图像数据进行渲染。When the first graphics rendering hardware preliminarily renders the native image data with the first image quality index, the native image data may be rendered at the first image resolution, and the first image resolution is lower than the preset image resolution; or, The first graphics rendering hardware may also adjust other image quality indicators so that the first image quality indicator is lower than the preset image quality indicator, and then render the native image data.
上述第一画质指标可以特制某一种画质指标,或者,上述第一画质指标可以为多 种画质指标的集合。当上述第一画质指标为多种画质指标的集合时,上述第一画质指标低于预设画质指标可以理解为第一画质指标中的部分画质指标或全部画质指标低于预设画质指标。The above-mentioned first image quality index may be a specific type of image quality index, or the above-mentioned first image quality index may be a collection of multiple image quality indexes. When the first image quality index is a set of multiple image quality indexes, it may be understood that the first image quality index is lower than the preset image quality index, and it can be understood that some or all of the image quality indexes in the first image quality index are low at the default image quality index.
例如,如图4和图5所示的示例图像,当除了图像分辨率以外的其他画质指标相同时,图4的图像分辨率低于图5的图像分辨率,则可以认为图4的画质低于图5的画质。请参阅图5和图6所示的示例图像,当图5和图6的图像分辨率一致时,由于图6的清晰度低于图5的清晰度,也可以认为图6的画质低于图5的画质。For example, in the example images shown in Fig. 4 and Fig. 5, when other image quality indicators except image resolution are the same, and the image resolution of Fig. 4 is lower than that of Fig. 5, it can be considered that the image of Fig. 4 The quality is lower than the picture quality in Figure 5. Please refer to the example images shown in Fig. 5 and Fig. 6. When the resolutions of the images in Fig. 5 and Fig. 6 are the same, since the resolution of Fig. 6 is lower than that of Fig. 5, it can also be considered that the image quality of Fig. 6 is lower than that of Fig. 6. The image quality of Figure 5.
由于第一图形渲染硬件在渲染图像时,渲染图像的画质指标越高,则第一图形渲染硬件占用的硬件资源也会越多,渲染功耗越高。所以,当第一图形渲染硬件以低于预设画质指标的第一画质指标对原生图像数据进行初步渲染时,可以减少第一图形渲染硬件渲染时所占用的硬件资源,并且减少渲染功耗。When the first graphics rendering hardware renders an image, the higher the image quality index of the rendered image is, the more hardware resources the first graphics rendering hardware occupies, and the higher the rendering power consumption. Therefore, when the first graphics rendering hardware preliminarily renders the native image data with the first image quality index lower than the preset image quality index, the hardware resources occupied by the first graphics rendering hardware during rendering can be reduced, and the rendering function can be reduced. consumption.
上述第一图形渲染硬件可以根据实际情况进行选择。在一些实施例中,第一图形渲染硬件可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)以及神经网络处理器(neural-network processing units,NPU)中的一种或多种。例如,当第一电子设备采用GPU-turbo技术对原生图像数据进行初步渲染时,上述第一图形渲染硬件可以为CPU和GPU的组合。The above-mentioned first graphics rendering hardware can be selected according to the actual situation. In some embodiments, the first graphics rendering hardware may be one of a central processing unit (CPU), a graphics processing unit (GPU), and a neural-network processing unit (NPU). one or more. For example, when the first electronic device uses the GPU-turbo technology to perform preliminary rendering on the native image data, the above-mentioned first graphics rendering hardware may be a combination of a CPU and a GPU.
S302、第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像。S302. The first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware to obtain a target image.
在S301中,第一电子设备通过第一图形渲染硬件对应用程序的原生图像数据进行初步渲染,得到第一图像。但是,第一图像的画质较低,难以满足用户对产品画质的要求。In S301, the first electronic device performs preliminary rendering on the native image data of the application through the first graphics rendering hardware to obtain a first image. However, the image quality of the first image is low, and it is difficult to meet the user's requirements for product image quality.
超分辨率重建是指应用AI技术,将低分辨率的图像映射至高分辨率,以期望达到增强图像画质的作用。Super-resolution reconstruction refers to the application of AI technology to map low-resolution images to high-resolution, with the expectation of enhancing image quality.
在第一图形渲染硬件得到第一图像之后,第一电子设备使用过第二图形渲染硬件可以对上述第一图像进行超分辨率重建。After the first graphics rendering hardware obtains the first image, the first electronic device may perform super-resolution reconstruction on the first image by using the second graphics rendering hardware.
第一电子设备对第一图像进行超分辨率重建时,可以将上述第一图像输入经过训练的超分模型中,通过超分模型对第一图像进行画质增强,得到目标图像。When the first electronic device performs super-resolution reconstruction on the first image, the first image can be input into a trained super-resolution model, and the image quality of the first image is enhanced by the super-resolution model to obtain the target image.
上述超分模型的类型可以根据实际情况进行选择。例如,上述超分模型可以为超分辨率卷积神经网络模型(super-resolution convolutional neural network,SRCNN模型)、快速超分辨率卷积神经网络模型(fast super-resolution convolutional neural network,SRCNN模型)、亚像素卷积神经网络模型(efficient sub-pixel convolutional neural network,ESPCN模型)、深度递归模型(deeply-recursive convolutional network,DRCN模型)以及深度超分辨网络模型(very deep network for super-resolution,VSDR模型)等模型中任意一种。The type of the above-mentioned super-score model can be selected according to the actual situation. For example, the above-mentioned super-resolution model can be a super-resolution convolutional neural network model (super-resolution convolutional neural network, SRCNN model), a fast super-resolution convolutional neural network model (fast super-resolution convolutional neural network, SRCNN model), Sub-pixel convolutional neural network model (efficient sub-pixel convolutional neural network, ESPCN model), deep recursive model (deeply-recursive convolutional network, DRCN model) and deep super-resolution network model (very deep network for super-resolution, VSDR model) ) and other models.
并且,如果第一电子设备处理单帧的图像耗费了较长的时间,会使得应用程序无法保持一定的送显帧率,从而导致第一电子设备的屏幕出现画面卡顿的现象。因此,开发人员在选择超分模型时,应当限制超分模型的规模,从而使超分模型的单帧运行时间满足应用程序送显帧率的单帧时间的要求。例如,假设应用程序送显帧率为90帧/秒,则应用程序送显帧率的单帧时间为1/90秒。此时,应当限制超分模型的规模, 使得超分模型的单帧运行时间小于1/90秒,从而确保应用程序的送显帧率尽量保持在90帧/秒,减少画面卡顿现象的发生。Moreover, if it takes a long time for the first electronic device to process a single frame of image, the application program cannot maintain a certain frame rate, which causes the screen of the first electronic device to freeze. Therefore, developers should limit the size of the super-resolution model when choosing the super-resolution model, so that the single-frame running time of the super-resolution model meets the requirements of the application's single-frame time for the display frame rate. For example, if an application sends a frame rate of 90 frames per second, the single frame time for an application to send a frame rate is 1/90 of a second. At this time, the scale of the super-scoring model should be limited, so that the single-frame running time of the super-scoring model should be less than 1/90 of a second, so as to ensure that the sending frame rate of the application is kept at 90 frames per second as much as possible, and the occurrence of screen freezes can be reduced. .
在训练上述超分模型时,第一电子设备可以获取至少一组图像样本对,通过图像样本对训练超分模型。图像样本对是指成对的样本图像。每一组图像样本对中包括第一样本图像和第二样本图像。第一样本图像和第二样本图像的内容一致,但是第一样本图像的画质低于第二样本图像的画质。When training the above-mentioned super-score model, the first electronic device may acquire at least one set of image sample pairs, and train the super-score model by using the image sample pairs. Image sample pairs refer to pairs of sample images. Each set of image sample pairs includes a first sample image and a second sample image. The contents of the first sample image and the second sample image are consistent, but the image quality of the first sample image is lower than that of the second sample image.
第一电子设备在使用图像样本对训练超分模型时,可以将图像样本对中的第一样本图像输入超分模型,得到第一输出图像。When using the image sample pair to train the super-score model, the first electronic device may input the first sample image in the image sample pair into the super-score model to obtain a first output image.
然后,第一电子设备根据第一输出图像、第二样本图像和预设的损失函数计算损失值,根据损失值以及预设的网络更新算法对超分模型进行更新。Then, the first electronic device calculates the loss value according to the first output image, the second sample image and the preset loss function, and updates the super-score model according to the loss value and the preset network update algorithm.
超分模型更新后,再返回执行前一步骤,循环使用图像样本对训练超分模型,直至循环次数达到预设次数阈值或损失值小于预设损失阈值。After the super-score model is updated, go back to the previous step, and use the image samples to train the over-score model in a loop until the number of cycles reaches the preset number of times threshold or the loss value is less than the preset loss threshold.
上述图像样本对的获取方式可以根据实际情况进行选择。例如,上述图像样本对可以是原生成对的图像数据集,或者,上述图像样本对也可以是将高画质图像退化成低画质图像,从而得到成对的图像样本对。The acquisition method of the above-mentioned image sample pair can be selected according to the actual situation. For example, the above-mentioned image sample pair may be an image dataset from which a pair was originally generated, or the above-mentioned image sample pair may also be a pair of image sample pairs obtained by degrading a high-quality image into a low-quality image.
并且,图像样本对的来源会对超分模型的性能造成一定的影响。如果开发人员想要训练通用的超分模型,则开发人员在采样图像样本对时,可以无针对性地进行样本采集,得到通用的图像样本对。Moreover, the source of image sample pairs will have a certain impact on the performance of the super-resolution model. If the developer wants to train a general super-score model, the developer can collect samples in an untargeted manner when sampling image sample pairs to obtain general image sample pairs.
此时,第一电子设备使用通用的图像样本对训练的超分模型,可以得到通用超分模型。通用超分模型的适用性较高,可以应用于较多的应用场景。但是,通用超分模型的画质优化能力有限,难以对各应用场景的图像都进行较高程度的画质优化。At this time, the first electronic device can obtain the general super-score model by using the general image sample pair to train the super-score model. The general super-score model has high applicability and can be applied to many application scenarios. However, the image quality optimization capability of the general super-resolution model is limited, and it is difficult to optimize the image quality of each application scenario to a high degree.
因此,如果开发人员想要超分模型能够对某一产品或某一类产品进行较高程度的画质优化时,则开发人员在采样图像样本对时,应当只采集与该产品或该类产品有关的图像样本对,得到特定的图像样本对。Therefore, if the developer wants the super-score model to be able to optimize the image quality of a certain product or a certain type of product, the developer should only collect the same product or type of product when sampling the image sample pair. Related image sample pairs, get a specific image sample pair.
此时,第一电子设备使用特定的图像样本对训练超分模型,可以得到针对某一产品或某一类产品的特定超分模型。特定超分模型的适用性较差,只能应用于特定的产品。但是,特定超分模型的画质优化能力较高,可以对特定产品的图像进行较高程度的画质优化。At this time, the first electronic device uses a specific pair of image samples to train a super-scoring model, and can obtain a specific super-scoring model for a certain product or a certain type of product. The applicability of specific super-score models is poor and can only be applied to specific products. However, the image quality optimization capability of a specific super-scoring model is high, and a higher degree of image quality optimization can be performed on the image of a specific product.
以游戏类的应用程序为例。当开发人员想要训练通用的游戏类超分模型时,开发人员可以从各种游戏应用程序中获取图像样本对。例如,开发人员可以从《Arena of Valor》(中文译名《传说对决》)、《PUBG Mobile》(中文译名《绝地求生》)、《Carrot Fantasy》(中文译名《萝卜保卫战》)、《Plants vs.Zombies》(中文译名《植物大战僵尸》)、《Minecraft》(中文译名《我的世界》)、《Life After》(中文译名《明日之后》)等相同类型或不同类型的游戏应用程序中获取通用游戏图像样本对。Take gaming applications as an example. When a developer wants to train a general game-like superscore model, the developer can obtain pairs of image samples from various game applications. For example, developers can choose from "Arena of Valor" (Chinese translation "Legendary Showdown"), "PUBG Mobile" (Chinese translation "PUBG"), "Carrot Fantasy" (Chinese translation "Radish Defense"), "Plants vs. .Zombies" (Chinese translation "Plants vs. Zombies"), "Minecraft" (Chinese translation "Minecraft"), "Life After" (Chinese translation "After Tomorrow") and other game applications of the same type or different types Generic game image sample pair.
然后,第一电子设备使用上述通用游戏图像样本对训练超分模型,从而使训练后的超分模型可以适用于各种不同的游戏应用程序。Then, the first electronic device uses the above-mentioned generic game image sample pair to train a super-score model, so that the trained super-score model can be applied to various game applications.
当开发人员想要针对现象级的游戏应用程序训练针对性的超分模型时,开发人员可以只获取该游戏应用程序的图像作为特定游戏图像样本对。例如,当前《Arena of Valor》属于现象级游戏,玩家众多,为了使玩家在玩《Arena of Valor》时可以得到更 流畅的游戏体验,开发人员可以针对《Arena of Valor》训练超分模型。When a developer wants to train a targeted super-score model for a phenomenal game application, the developer can only acquire images of that game application as a sample pair of specific game images. For example, the current "Arena of Valor" is a phenomenon-level game with a large number of players. In order to enable players to get a smoother game experience when playing "Arena of Valor", developers can train a super-scoring model for "Arena of Valor".
开发人员在针对《Arena of Valor》训练超分模型时,应当只将《Arena of Valor》内的游戏图像作为特定游戏图像样本对。上述游戏图像可以为《Arena of Valor》内的角色图像、地形图像、技能图像等。When training a superscore model for Arena of Valor, developers should only use the game images in Arena of Valor as a specific game image sample pair. The above game images can be character images, terrain images, skill images, etc. in "Arena of Valor".
然后,第一电子设备再根据上述特定游戏图像样本对训练超分模型,使得训练后的超分模型可以针对性地增强《Arena of Valor》这一款游戏的图像的画质。Then, the first electronic device trains the super-scoring model according to the above-mentioned specific game image sample pair, so that the trained super-scoring model can specifically enhance the image quality of the game "Arena of Valor".
当第一电子设备设置有多个训练后的超分模型时,第一电子设备可以在用户启动应用程序时,检测该应用程序的标识,根据应用程序的标识选择相应的超分模型执行上述步骤S302的操作。When the first electronic device is provided with multiple trained super-score models, the first electronic device can detect the identifier of the application when the user starts the application, and select the corresponding super-score model according to the identifier of the application to perform the above steps Operation of S302.
如果第一电子设备未检测到应用程序的标识对应的超分模型,则第一电子设备可以调用通用超分模型执行上述步骤S302的步骤。并且,当第一电子设备中设置有多个通用超分模型时,第一电子设备还可以在使用通用超分模型对第一图像进行超分辨率重建之后,建立该通用超分模型与上述应用程序的标识的关联关系,以便第一电子设备下一次处理该应用程序的第一图像时,可以根据前述关联关系查找到同一通用超分模型对第一图像进行处理。If the first electronic device does not detect the super-score model corresponding to the identifier of the application, the first electronic device may call the general super-score model to perform the steps of the above-mentioned step S302. In addition, when the first electronic device is provided with a plurality of general super-resolution models, the first electronic device can also use the general super-resolution model to perform super-resolution reconstruction on the first image, and establish the general super-resolution model and the above application. The association relationship between the program identifiers, so that when the first electronic device processes the first image of the application program next time, it can find the same general super-score model to process the first image according to the foregoing association relationship.
在一些实施例中,上述应用程序的标识可以为应用程序的包名(packname)。例如,第一电子设备在训练了针对《Arena of Valor》的超分模型之后,可以将该超分模型与《Arena of Valor》的包名相关联。当《Arena of Valor》被启动或唤醒后,第一电子设备获取《Arena of Valor》的包名,根据包名查找相应的超分模型,使用相应的超分模型对《Arena of Valor》的图像进行处理。In some embodiments, the identifier of the application program may be the package name (packname) of the application program. For example, after training the super-scoring model for "Arena of Valor", the first electronic device may associate the super-scoring model with the package name of "Arena of Valor". When "Arena of Valor" is activated or awakened, the first electronic device obtains the package name of "Arena of Valor", searches for the corresponding super-score model according to the package name, and uses the corresponding super-score model to compare the image of "Arena of Valor" to be processed.
或者,在另一些实施例中,应用程序的标识也可以为用户自定义的。例如,用户将《Arena of Valor》的标识定义为0010。然后,第一电子设备将“0010”与《Arena of Valor》以及针对《Arena of Valor》的超分模型相关联。当《Arena of Valor》被启动或唤醒后,第一电子设备查找《Arena of Valor》对应的标识,得到《Arena of Valor》的标识“0010”。然后,第一电子设备根据标识“0010”查找相应的超分模型,使用相应的超分模型对《Arena of Valor》的图像进行处理。Alternatively, in other embodiments, the identifier of the application program may also be user-defined. For example, the user defines the ID of "Arena of Valor" as 0010. Then, the first electronic device associates "0010" with "Arena of Valor" and a super-resolution model for "Arena of Valor". When "Arena of Valor" is activated or awakened, the first electronic device searches for the logo corresponding to "Arena of Valor", and obtains the logo "0010" of "Arena of Valor". Then, the first electronic device searches for a corresponding super-resolution model according to the identifier "0010", and uses the corresponding super-resolution model to process the image of "Arena of Valor".
此外,上述超分模型可以为单倍增强型超分模型,或者,上述超分模型也可以是多倍增强型超分模型。单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。In addition, the above-mentioned super-score model may be a single-enhanced super-score model, or, the above-mentioned super-score model may also be a multiple-enhancement type of over-score model. The haplointensive super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same. The multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than that of the output image.
当上述超分模型为单倍增强型超分模型时,第一图像的图像分辨率和目标图像的图像分辨率一致,单倍增强型超分模型通过改善第一图像的其他画质指标的方式增强第一图像的画质,得到目标图像。When the above-mentioned super-score model is a single-enhanced super-score model, the image resolution of the first image is consistent with the image resolution of the target image, and the single-enhancement super-score model improves other image quality indicators of the first image by means of The image quality of the first image is enhanced to obtain the target image.
当上述超分模型为多倍增强型超分模型时,第一图像的图像分辨率小于目标图像的图像分辨率。第一电子设备的第一图形渲染硬件在对应用程序的原生图像数据进行初步渲染时,可以以较小的图像分辨率进行渲染,从而降低第一图形渲染硬件在渲染过程中所占用的硬件资源,以及降低渲染功耗。When the above-mentioned super-resolution model is a multiple-enhanced super-resolution model, the image resolution of the first image is smaller than that of the target image. When initially rendering the native image data of the application, the first graphics rendering hardware of the first electronic device may render at a smaller image resolution, thereby reducing the hardware resources occupied by the first graphics rendering hardware in the rendering process , as well as reducing rendering power consumption.
当第一图形渲染硬件渲染得到图像分辨率较小的第一图像后,第一电子设备再根据用户配置的目标分辨率,通过多倍增强型超分模型对第一图像进行画质增强,将第 一图像的图像分辨率适配至目标图像分辨率,得到目标图像。After the first graphics rendering hardware renders a first image with a smaller image resolution, the first electronic device enhances the image quality of the first image through the multiple-enhanced super-resolution model according to the target resolution configured by the user, and converts the The image resolution of the first image is adapted to the target image resolution to obtain the target image.
需要说明的是,第一电子设备在执行上述超分辨率重建操作时,运行上述超分模型的第二图形渲染硬件可以根据实际情况进行设置。在一些实施例中,第一电子设备可以在CPU上运行上述超分模型,通过CPU对上述第一图像进行画质增强;在另一些实施例中,第一电子设备可以在GPU上运行上述超分模型,通过GPU对上述第一图像进行画质增强;或者,第一电子设备可以在NPU上运行上述超分模型,通过NPU对上述第一图像进行画质增强。本申请在此不对第一电子设备内执行上述超分辨率重建操作的硬件进行限定。It should be noted that, when the first electronic device performs the above-mentioned super-resolution reconstruction operation, the second graphics rendering hardware that runs the above-mentioned super-resolution model may be set according to the actual situation. In some embodiments, the first electronic device may run the above-mentioned super-score model on a CPU, and use the CPU to perform image quality enhancement on the above-mentioned first image; in other embodiments, the first electronic device may run the above-mentioned super-resolution model on a GPU The sub-model is used to enhance the image quality of the first image through the GPU; or, the first electronic device may run the super-resolution model on the NPU to enhance the image quality of the first image through the NPU. The present application does not limit the hardware for performing the above-mentioned super-resolution reconstruction operation in the first electronic device.
为了更好地对本申请实施例提供的图像处理方法进行说明,以下结合具体的场景进行描述。In order to better describe the image processing method provided by the embodiments of the present application, the following description is made with reference to a specific scenario.
图7为本实施例提供的适用于场景一、场景二、场景三和场景四的第一电子设备的示意图。如图7所示,第一电子设备内可以设置有GPU 701和NPU 702。在NPU 702内,预设有通用的游戏类超分模型以及针对游戏A的超分模型,针对游戏A的超分模型与游戏A的应用标识相关联。FIG. 7 is a schematic diagram of a first electronic device suitable for scenario 1, scenario 2, scenario 3, and scenario 4 according to this embodiment. As shown in FIG. 7 , a GPU 701 and an NPU 702 may be provided in the first electronic device. In the NPU 702, a general game-type super-score model and a super-score model for game A are preset, and the over-score model for game A is associated with the application identifier of game A.
场景一:scene one:
如8所示,第一电子设备的主页面上可以设置有多个图标,包括“时钟”、“日历”、“游戏B”、“备忘录”、“相机”、“通讯录”、“电话”、“信息”等图标。一个图标表示一种应用程序。As shown in 8, a plurality of icons can be set on the main page of the first electronic device, including "clock", "calendar", "game B", "memo", "camera", "address book", "phone" , Information and other icons. An icon represents an application.
用户点击第一电子设备上游戏B的图标,第一电子设备响应于用户的点击操作,启动游戏B。The user clicks the icon of the game B on the first electronic device, and the first electronic device starts the game B in response to the user's click operation.
如图9所示,游戏B启动后,游戏B的应用程序逐帧发送原生图像数据至GPU 701。As shown in FIG. 9 , after the game B is started, the application program of the game B sends the native image data to the GPU 701 frame by frame.
GPU 701对上述原生图像数据进行逐帧渲染,得到与各帧原生图像数据对应的第一图像,并将第一图像逐帧发送至NPU 702。The GPU 701 performs frame-by-frame rendering on the above-mentioned native image data, obtains a first image corresponding to each frame of native image data, and sends the first image to the NPU 702 frame by frame.
NPU 702接收到第一图像后,获取游戏B的应用标识,根据游戏B的应用标识未找到与游戏B对应的超分模型,则选用通用游戏类的超分模型作为目标超分模型。After receiving the first image, NPU 702 obtains the application identifier of game B, and does not find the super-score model corresponding to game B according to the application identifier of game B, then selects the super-score model of the general game class as the target over-score model.
NPU 702逐帧地将第一图像输入目标超分模型中,通过目标超分模型对第一图像进行画质增强,得到各帧第一图像对应的目标图像,并将目标图像逐帧送至第一电子设备的显示屏。The NPU 702 inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains target images corresponding to the first images of each frame, and sends the target images to the first image frame by frame. A display screen of an electronic device.
如图10所示,显示屏获取到目标图像之后,将目标图像上屏显示,从而使显示屏显示游戏B的画面。As shown in FIG. 10 , after the display screen acquires the target image, the target image is displayed on the screen, so that the screen of the game B is displayed on the display screen.
此外,如果第一电子设备中仅设置有一个通用游戏类的超分模型,则当用户再次触发游戏B时,第一电子设备依然使用同一通用游戏类的超分模型对游戏B的图像进行处理。In addition, if only one super-score model of a general game class is set in the first electronic device, when the user triggers Game B again, the first electronic device still uses the same super-score model of the same general game class to process the image of Game B .
如果第一电子设备中存在多个通用游戏类的超分模型,则当用户再次触发游戏B时,第一电子设备可以从多个通用游戏类的超分模型中随机选择一个超分模型对游戏B的图像进行处理。If there are multiple super-score models of general game types in the first electronic device, when the user triggers game B again, the first electronic device can randomly select a super-score model from the multiple general game-type super-score models to match the game The image of B is processed.
或者,如果第一电子设备中存在多个通用游戏类的超分模型,第一电子设备也可以在首次使用通用游戏类的超分模型对游戏B的图像进行处理后,建立游戏B的应用标识与该通用游戏类的超分模型的关联关系。当用户再次触发游戏B时,第一电子设 备可以获取游戏B的应用标识,根据游戏B的应用标识找到同一通用游戏类的超分模型对游戏B的图像进行处理。Alternatively, if there are multiple super-score models of the general game class in the first electronic device, the first electronic device may also establish the application identifier of the game B after using the super-score model of the general game class to process the image of the game B for the first time. The association with the superscore model for this generic game class. When the user triggers the game B again, the first electronic device can obtain the application identifier of the game B, find the super-score model of the same general game class according to the application identifier of the game B, and process the image of the game B.
场景二:Scenario two:
如图11所示,第一电子设备的主页面上可以设置有多个图标,包括“时钟”、“日历”、“游戏A”、“备忘录”、“相机”、“通讯录”、“电话”、“信息”等图标。一个图标表示一种应用程序。As shown in FIG. 11 , a plurality of icons can be set on the main page of the first electronic device, including “clock”, “calendar”, “game A”, “memo”, “camera”, “contact book”, “phone” ”, “Information” and other icons. An icon represents an application.
如图9所示,用户点击第一电子设备上游戏A的图标,第一电子设备响应于用户的点击操作,启动游戏A。As shown in FIG. 9 , the user clicks the icon of the game A on the first electronic device, and the first electronic device starts the game A in response to the user's click operation.
游戏A启动后,游戏A的应用程序逐帧发送原生图像数据至GPU 701。After the game A starts, the application program of the game A sends the native image data to the GPU 701 frame by frame.
GPU 701对上述原生图像数据进行逐帧渲染,得到各帧原生图像数据对应的第一图像,并将第一图像逐帧发送至NPU 702。The GPU 701 performs frame-by-frame rendering on the above-mentioned native image data, obtains a first image corresponding to each frame of native image data, and sends the first image to the NPU 702 frame by frame.
NPU 702接收到第一图像后,获取游戏A的应用标识,根据游戏A的应用标识找到了针对游戏A的超分模型,则选用针对游戏A的超分模型作为目标超分模型。After receiving the first image, NPU 702 obtains the application identifier of game A, finds the super-score model for game A according to the application identifier of game A, and selects the super-score model for game A as the target over-score model.
NPU 702逐帧地将第一图像输入目标超分模型中,通过目标超分模型对第一图像进行画质增强,得到各帧第一图像对应的目标图像,并将目标图像逐帧送至第一电子设备的显示屏。The NPU 702 inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains target images corresponding to the first images of each frame, and sends the target images to the first image frame by frame. A display screen of an electronic device.
如图12所示,显示屏获取到目标图像之后,将目标图像上屏显示,从而使显示屏显示游戏A的画面。As shown in FIG. 12 , after the display screen acquires the target image, the target image is displayed on the screen, so that the screen of the game A is displayed on the display screen.
场景三:Scenario three:
如图11所示,用户点击第一电子设备上游戏A的图标,第一电子设备响应于用户的点击操作,启动游戏A。As shown in FIG. 11 , the user clicks the icon of the game A on the first electronic device, and the first electronic device starts the game A in response to the user's click operation.
如图13和14所示,游戏A启动后,游戏A的应用程序逐帧发送原生图像数据1301至GPU 701。原生图像数据1301的图像分辨率为480×360。As shown in Figures 13 and 14, after the game A is started, the application of the game A sends the native image data 1301 to the GPU 701 frame by frame. The image resolution of the native image data 1301 is 480×360.
GPU 701对上述原生图像数据1301进行逐帧渲染,得到各帧原生图像数据1301对应的第一图像1302,第一图像1302的图像分辨率为1920×1080。GPU 701将初步渲染后的第一图像1302逐帧发送至NPU 702。The GPU 701 performs frame-by-frame rendering on the above-mentioned native image data 1301 to obtain a first image 1302 corresponding to each frame of the native image data 1301, and the image resolution of the first image 1302 is 1920×1080. The GPU 701 sends the initially rendered first image 1302 to the NPU 702 frame by frame.
NPU 702接收到第一图像1302后,获取游戏A的应用标识,根据游戏A的应用标识找到针对游戏A的超分模型,则选用针对游戏A的超分模型作为目标超分模型。该目标超分模型为单倍增强型超分模型,目标超分模型的输出图像的目标分辨率为1920×1080。After receiving the first image 1302, the NPU 702 obtains the application identification of game A, finds the super-score model for game A according to the application identification of game A, and selects the super-score model for game A as the target over-score model. The target super-resolution model is a haplo-enhanced super-resolution model, and the target resolution of the output image of the target super-resolution model is 1920×1080.
NPU 702逐帧地将第一图像1302输入目标超分模型中,通过目标超分模型对第一图像1302进行画质增强,得到图像分辨率为1920×1080的目标图像1303。The NPU 702 inputs the first image 1302 into the target super-resolution model frame by frame, and enhances the image quality of the first image 1302 through the target super-resolution model to obtain a target image 1303 with an image resolution of 1920×1080.
如图14所示,目标图像1303的图像分辨率与第一图像1302的图像分辨率相同,但是目标图像1303的清晰度高于第一图像1302,目标图像1303的画质高于第一图像1302的画质。As shown in FIG. 14 , the image resolution of the target image 1303 is the same as that of the first image 1302 , but the definition of the target image 1303 is higher than that of the first image 1302 , and the image quality of the target image 1303 is higher than that of the first image 1302 picture quality.
NPU 702获取到目标图像1303之后,将目标图像1303逐帧送至第一电子设备的显示屏。After acquiring the target image 1303, the NPU 702 sends the target image 1303 to the display screen of the first electronic device frame by frame.
场景四:Scenario four:
如图11所示,用户点击第一电子设备上游戏A的图标,第一电子设备响应于用 户的点击操作,启动游戏A。As shown in Figure 11, the user clicks the icon of the game A on the first electronic device, and the first electronic device starts the game A in response to the user's click operation.
如图15和图16所示,游戏A启动后,游戏A的应用程序逐帧发送原生图像数据1501至GPU 701。原生图像数据1501的图像分辨率为480×360。As shown in FIG. 15 and FIG. 16 , after the game A is started, the application program of the game A sends the native image data 1501 to the GPU 701 frame by frame. The image resolution of the native image data 1501 is 480×360.
GPU 701对上述原生图像数据1501进行逐帧渲染,得到各帧原生图像数据对应的第一图像1502,第一图像1502的图像分辨率为480×360。GPU 701将初步渲染后的第一图像1502逐帧发送至NPU 702。The GPU 701 performs frame-by-frame rendering on the above-mentioned native image data 1501 to obtain a first image 1502 corresponding to each frame of native image data, and the image resolution of the first image 1502 is 480×360. The GPU 701 sends the initially rendered first image 1502 to the NPU 702 frame by frame.
NPU 702接收到第一图像1502后,获取游戏A的应用标识,根据游戏A的应用标识找到针对游戏A的超分模型,则选用针对游戏A的超分模型作为目标超分模型。该目标超分模型为多倍增强型超分模型,目标超分模型的输出图像的目标分辨率为1920×1080。After receiving the first image 1502, the NPU 702 obtains the application identifier of game A, finds the super-score model for game A according to the application identifier of game A, and selects the super-score model for game A as the target over-score model. The target super-resolution model is a multiple-enhanced super-resolution model, and the target resolution of the output image of the target super-resolution model is 1920×1080.
NPU 702逐帧地将第一图像1502输入目标超分模型中,通过目标超分模型对第一图像1502进行画质增强,并对第一图像1502进行分辨率适配,得到图像分辨率为1920×1080的目标图像1503。The NPU 702 inputs the first image 1502 into the target super-resolution model frame by frame, enhances the image quality of the first image 1502 through the target super-resolution model, and performs resolution adaptation on the first image 1502 to obtain an image resolution of 1920 Target image 1503 of ×1080.
如图16所示,目标图像1503的清晰度与第一图像1502的清晰度相同,但是目标图像1503的图像分辨率高于第一图像1502的图像分辨率,目标图像1503的画质高于第一图像1502的画质。As shown in FIG. 16, the definition of the target image 1503 is the same as that of the first image 1502, but the image resolution of the target image 1503 is higher than that of the first image 1502, and the image quality of the target image 1503 is higher than that of the first image 1502. The quality of an image 1502.
NPU 702获取到目标图像1503之后,将目标图像1503逐帧送至第一电子设备的显示屏上屏显示。After acquiring the target image 1503, the NPU 702 sends the target image 1503 frame by frame to the display screen of the first electronic device for display on the upper screen.
综上可得,在本实施例提供的图像处理方法中,第一电子设备先对应用程序的原生图像数据进行初步渲染,得到第一图像。然后,第一电子设备再通过超分模型对第一图像进行超分辨率重建,提高第一图像的画质,得到用于上屏显示的目标图像。与目前对原生图像数据进行渲染,直接得到高画质的图像的方案相比,本实施例提供的图像处理方法可以减少对第一电子设备的硬件资源的要求,且降低渲染功耗,解决了现有的图像处理方法在渲染高画质的产品时,渲染功耗高,计算量大的问题。To sum up, in the image processing method provided in this embodiment, the first electronic device firstly renders the native image data of the application program to obtain the first image. Then, the first electronic device performs super-resolution reconstruction on the first image through the super-resolution model, so as to improve the image quality of the first image, and obtain a target image for display on the upper screen. Compared with the current solution of rendering native image data to directly obtain a high-quality image, the image processing method provided in this embodiment can reduce the requirements on the hardware resources of the first electronic device, and reduce the rendering power consumption, thereby solving the problem. The existing image processing methods have problems of high rendering power consumption and large amount of computation when rendering high-quality products.
此外,上述初步渲染的步骤以及超分辨率重建的步骤可以由第一电子设备内相同的图形渲染硬件执行。例如,在一些实施例中,上述初步渲染的步骤以及超分辨率重建的步骤可以均由第一电子设备内的GPU执行;在另一些实施例中,上述初步渲染的步骤以及超分辨率重建的步骤可以均由第一电子设备内的NPU执行。In addition, the above-mentioned steps of preliminary rendering and super-resolution reconstruction may be performed by the same graphics rendering hardware in the first electronic device. For example, in some embodiments, the above-mentioned steps of preliminary rendering and super-resolution reconstruction may both be performed by a GPU in the first electronic device; in other embodiments, the above-mentioned steps of preliminary rendering and super-resolution reconstruction may be performed by a GPU. The steps may all be performed by an NPU within the first electronic device.
或者,上述初步渲染的步骤以及超分辨率重建的步骤也可以由第一电子设备内不同的图形渲染硬件执行,即上述第一图形渲染硬件和第二图形渲染硬件为不同的图形渲染硬件。例如,在一些实施例中,上述初步渲染的步骤可以由第一电子设备的GPU执行,上述超分辨率重建的步骤可以由第一电子设备的NPU执行;在另一些实施例中,上述初步渲染的步骤可以由第一电子设备的CPU执行,上述超分辨率重建的步骤可以由第一电子设备的NPU执行。Alternatively, the above-mentioned steps of preliminary rendering and super-resolution reconstruction may also be performed by different graphics rendering hardware in the first electronic device, that is, the above-mentioned first graphics rendering hardware and second graphics rendering hardware are different graphics rendering hardware. For example, in some embodiments, the foregoing preliminary rendering step may be performed by a GPU of the first electronic device, and the foregoing super-resolution reconstruction step may be performed by an NPU of the first electronic device; in other embodiments, the foregoing preliminary rendering The steps of the super-resolution reconstruction may be performed by the CPU of the first electronic device, and the above-mentioned steps of super-resolution reconstruction may be performed by the NPU of the first electronic device.
当上述初步渲染的步骤以及超分辨率重建的步骤由不同的硬件执行时,可以充分利用第一电子设备内多种异构硬件资源,降低对第一电子设备的硬件资源的要求,在硬件资源有限的条件下更好地提升图像的画质。When the above steps of preliminary rendering and super-resolution reconstruction are performed by different hardware, a variety of heterogeneous hardware resources in the first electronic device can be fully utilized, and the requirements on the hardware resources of the first electronic device can be reduced. Improve image quality under limited conditions.
在进行超分辨率重建时,第一电子设备选用的超分模型可以为单倍增强型超分模型,或者,第一电子设备选用的超分模型也可以为多倍增强型超分模型。当第一电子 设备选用的超分模型为多倍增强型超分模型时,可以降低初步渲染过程中图形渲染硬件所占用的硬件资源以及初步渲染的渲染功耗。When performing super-resolution reconstruction, the super-resolution model selected by the first electronic device may be a single-enhanced super-resolution model, or the super-resolution model selected by the first electronic device may also be a multiple-enhanced super-resolution model. When the super-resolution model selected by the first electronic device is the multiple-enhanced super-resolution model, the hardware resources occupied by the graphics rendering hardware in the preliminary rendering process and the rendering power consumption of the preliminary rendering can be reduced.
此外,上述超分模型可以为通用超分模型,或者,上述超分模型也可以为针对某一应用程序或某一类应用程序的特定超分模型。特定超分模型的适用范围比通用超分模型的适用范围小,但是通常特定超分模型的画质增强效果优于通用超分模型。In addition, the above-mentioned super-scoring model may be a general super-scoring model, or, the above-mentioned super-scoring model may also be a specific super-scoring model for a certain application or a certain type of application. The applicable range of the specific super-resolution model is smaller than that of the general super-resolution model, but usually the image quality enhancement effect of the specific super-resolution model is better than that of the general super-resolution model.
以上为本申请实施例提供的一种图像处理方法,以下将从第一电子设备和指定设备的角度,对本实施例提供的另一种图像处理方法进行描述。请参阅图8所示的图像处理方法的流程图,该方法包括:The above is an image processing method provided by an embodiment of the present application, and the following describes another image processing method provided by this embodiment from the perspectives of the first electronic device and the designated device. Please refer to the flowchart of the image processing method shown in FIG. 8, the method includes:
S1701、第一电子设备对原生图像数据进行渲染,得到第一图像;S1701. The first electronic device renders the native image data to obtain a first image;
在本实施例中,将对多个电子设备协同进行图像渲染的方法进行介绍。In this embodiment, a method for collaboratively performing image rendering by multiple electronic devices will be introduced.
当第一电子设备与其他电子设备多屏互动时,第一电子设备可能需要将本设备的显示画面投屏至其他电子设备。When the first electronic device interacts with other electronic devices on multiple screens, the first electronic device may need to project the display screen of the device to the other electronic devices.
例如,当用户在用手机玩游戏时,用户可能会觉得手机的屏幕太小,视觉效果不佳。此时,如果用户拥有一智能电视,则用户可以控制手机与智能电视进行多屏互动,建立手机和智能电视的通信连接,将手机上的游戏画面投屏至智能电视进行显示,从而使用户可以通过智能电视观看游戏画面,得到更好的视觉体验。For example, when a user is playing a game on a mobile phone, the user may feel that the screen of the mobile phone is too small and the visual effect is not good. At this point, if the user owns a smart TV, the user can control the mobile phone to interact with the smart TV on multiple screens, establish a communication connection between the mobile phone and the smart TV, and project the game screen on the mobile phone to the smart TV for display, so that the user can Watch the game screen through the smart TV to get a better visual experience.
在当前的投屏方案中,投屏方的第一电子设备需要独立完成图像渲染工作,然后将渲染后的图像传递至被投屏方的第一电子设备。之后,被投屏方的第一电子设备会对渲染后的图像进行分辨率适配,将分辨率适配后的图像上屏显示。In the current screen projection solution, the first electronic device of the projection side needs to independently complete the image rendering work, and then transmits the rendered image to the first electronic device of the projection side. Afterwards, the first electronic device of the screen-projected party performs resolution adaptation on the rendered image, and displays the image after resolution adaptation on the screen.
由于在当前的投屏方案中,图像的渲染工作完全由投屏方的第一电子设备处理,所以,这会占用投屏方的电子设备大量的硬件资源,渲染功耗大,未充分利用同一局域网内的多个电子设备的硬件资源。In the current screencasting solution, the rendering of the image is completely handled by the first electronic device of the screencaster. Therefore, this will occupy a lot of hardware resources of the electronic equipment of the screencaster, and the rendering power consumption is high, and the same device is not fully utilized. Hardware resources of multiple electronic devices within a local area network.
并且,通常投屏技术用于将小屏设备的显示画面投屏至大屏设备的屏幕,此时,低图像分辨率的图像难以适配高图像分辨率的显示设备,从而导致用户使用体验不佳。In addition, the screen projection technology is usually used to project the display screen of the small-screen device to the screen of the large-screen device. At this time, it is difficult for the image with low image resolution to adapt to the display device with high image resolution, resulting in poor user experience. good.
为此,在本实施例提供的图像处理方法中,当用户在第一电子设备上启动应用程序,并开启了多屏互动功能时,第一电子设备可以对应用程序产生的原生图像数据进行初步渲染,得到第一图像。For this reason, in the image processing method provided in this embodiment, when the user starts the application program on the first electronic device and enables the multi-screen interaction function, the first electronic device can perform preliminary processing on the native image data generated by the application program Render to get the first image.
初步渲染的过程可以参照上一实施例中关于步骤S301的描述,在此不重复赘述。For the preliminary rendering process, reference may be made to the description of step S301 in the previous embodiment, and details are not repeated here.
S1702、第一电子设备将第一图像发送至指定设备,以指示指定设备对第一图像进行超分辨率重建,得到目标图像。S1702. The first electronic device sends the first image to the designated device to instruct the designated device to perform super-resolution reconstruction on the first image to obtain the target image.
指定设备(即前述第二电子设备)为用户选定的,与上述第一电子设备处于同一局域网络的其他电子设备。The designated device (ie, the aforementioned second electronic device) is another electronic device selected by the user and located in the same local area network as the aforementioned first electronic device.
例如,如图18所示,当用户希望将手机的游戏画面投屏至智能电视时,用户可以开启手机的“无线投屏”功能。用户开启了手机的“无线投屏”功能之后,手机开始搜索同一局域网内可用的电子设备。手机搜索到电子设备1、电子设备2和电子设备3。当手机检测到用户对电子设备1的点击操作时,表示电子设备1被用户选定,手机将电子设备1确定为指定设备。For example, as shown in FIG. 18, when the user wishes to project the game screen of the mobile phone to the smart TV, the user can enable the "wireless screen projection" function of the mobile phone. After the user turns on the "wireless screen projection" function of the mobile phone, the mobile phone starts to search for available electronic devices in the same local area network. The mobile phone searches for electronic device 1, electronic device 2, and electronic device 3. When the mobile phone detects the user's click operation on the electronic device 1, it means that the electronic device 1 is selected by the user, and the mobile phone determines the electronic device 1 as the designated device.
第一电子设备在得到第一图像后,将第一图像发送至指定设备。上述指定设备为被投屏的电子设备。指定设备的数量可以为一个,或者,指定设备的数量也可以为多 个。After obtaining the first image, the first electronic device sends the first image to the designated device. The above designated device is the electronic device to be projected. The number of specified devices can be one, or the number of specified devices can be multiple.
例如,请参阅图18,假设电子设备1为智能电视,电子设备2为电脑。当用户操作手机,如果用户希望将手机的游戏画面投屏至智能电视时,则手机为投屏方的第一电子设备,智能电视为被投屏方的电子设备(即指定设备),此时用户可以开启手机的“无线投屏”功能。用户开启了手机的“无线投屏”功能之后,手机开始搜索同一局域网内可用的电子设备。手机搜索到电子设备1、电子设备2和电子设备3。然后用户点击电子设备1,手机响应于用户的操作,将电子设备1设置为指定设备,指定设备的数量为1。For example, referring to FIG. 18 , it is assumed that the electronic device 1 is a smart TV and the electronic device 2 is a computer. When the user operates the mobile phone, if the user wishes to project the game screen of the mobile phone to the smart TV, the mobile phone is the first electronic device of the screen-casting party, and the smart TV is the electronic device of the screen-casting party (ie the designated device). Users can turn on the "wireless screen projection" function of the mobile phone. After the user enables the "wireless screen projection" function of the mobile phone, the mobile phone starts to search for available electronic devices in the same local area network. The mobile phone searches for electronic device 1, electronic device 2 and electronic device 3. Then the user clicks on the electronic device 1, and the mobile phone sets the electronic device 1 as a designated device in response to the user's operation, and the number of designated devices is one.
当用户操作手机,如果用户希望将手机的游戏画面同时投屏至智能电视和电脑时,则手机为投屏方的第一电子设备,智能电视和电脑为被投屏方的电子设备(即指定设备),此时用户可以开启手机的“无线投屏”功能。用户开启了手机的“无线投屏”功能之后,手机开始搜索同一局域网内可用的第一电子设备。手机搜索到电子设备1、电子设备2和电子设备3。然后用户点击电子设备1和电子设备2,手机响应于用户的操作,将电子设备1和电子设备2设置为指定设备,指定设备的数量为2。When the user operates the mobile phone, if the user wants to project the game screen of the mobile phone to the smart TV and the computer at the same time, the mobile phone is the first electronic device of the screen-casting party, and the smart TV and the computer are the electronic devices of the screen-casting party (that is, the specified device), the user can turn on the "wireless screen projection" function of the mobile phone. After the user enables the "wireless screen projection" function of the mobile phone, the mobile phone starts to search for the first electronic device available in the same local area network. The mobile phone searches for electronic device 1, electronic device 2, and electronic device 3. Then the user clicks on electronic device 1 and electronic device 2, and the mobile phone sets electronic device 1 and electronic device 2 as designated devices in response to the user's operation, and the number of designated devices is 2.
指定设备在接收到第一图像后,将第一图像输入经过训练的超分模型中,对第一图像进行超分辨率重建,得到目标图像并显示。After receiving the first image, the designated device inputs the first image into the trained super-resolution model, performs super-resolution reconstruction on the first image, and obtains and displays the target image.
可以理解的是,在本实施例的图像处理方法中,第一电子设备不仅可以使用本地的硬件资源对图像进行渲染,还可以利用指定设备的硬件资源对图像的画质进行优化,充分利用同一局域网内多个电子设备的硬件资源,从而减少第一电子设备在渲染高画质图像时对本地硬件资源的负荷,以及减少第一电子设备渲染高画质图像的渲染功耗。It can be understood that, in the image processing method of this embodiment, the first electronic device can not only use the local hardware resources to render the image, but also can use the hardware resources of the designated device to optimize the image quality of the image, and make full use of the same hardware resources. hardware resources of multiple electronic devices in the local area network, thereby reducing the load of the first electronic device on local hardware resources when rendering high-quality images, and reducing the rendering power consumption of the first electronic device for rendering high-quality images.
指定设备上的超分模型可以为单倍增强型超分模型,或者,指定设备上的超分模型也可以为多倍增强型超分模型。单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The superscore model on a specified device can be a haplo-enhanced super-score model, or the super-score model on a specified device can also be a multiple-enhanced over-score model. The haplointensive super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same. The multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than that of the output image.
在一些实施例中,当指定设备上的超分模型为单倍增强型超分模型时,第一电子设备可以获取指定设备上配置的目标图像分辨率。目标图像分辨率为指定设备上设置的屏幕显示图像的图像分辨率。In some embodiments, when the super-resolution model on the specified device is a haplo-enhanced super-resolution model, the first electronic device may acquire the target image resolution configured on the specified device. The target image resolution is the image resolution of the screen display image set on the specified device.
第一电子设备根据目标图像分辨率对应用程序产生的原生图像数据进行渲染,得到第一图像。此时,第一图像的图像分辨率为目标图像分辨率。The first electronic device renders the native image data generated by the application according to the target image resolution to obtain a first image. At this time, the image resolution of the first image is the target image resolution.
然后,第一电子设备将第一图像传递至指定设备。指定设备将第一图像输入单倍增强型超分模型,通过单倍增强型超分模型提高第一图像的画质,得到目标图像并上屏显示。目标图像的图像分辨率为目标图像分辨率。Then, the first electronic device transmits the first image to the designated device. The designated device inputs the first image into the single-enhanced super-resolution model, improves the image quality of the first image through the single-enhanced super-score model, and obtains the target image and displays it on the screen. The image resolution of the target image is the target image resolution.
在另一些实施例中,当指定设备上的超分模型为单倍增强型超分模型时,第一电子设备也可以直接根据用户配置的第一图像分辨率对应用程序产生的原生图像数据进行渲染,得到第一图像。此时,第一图像的图像分辨率为第一图像分辨率。In other embodiments, when the super-resolution model on the specified device is a single-enhanced super-resolution model, the first electronic device can also directly perform the processing on the native image data generated by the application program according to the first image resolution configured by the user. Render to get the first image. At this time, the image resolution of the first image is the first image resolution.
然后,第一电子设备将第一图像传递至指定设备。由于指定设备上的超分模型为单倍增强型超分模型,无法使第一图像的分辨率适配至目标图像分辨率。目标图像分辨率为指定设备设置的上屏显示的图像分辨率。因此,指定设备在获取到第一图像之后,可以对第一图像进行上采样处理,将第一图像的分辨率适配为指定设备上配置的 目标图像分辨率,得到第二图像。第二图像的图像分辨率为目标图像分辨率。Then, the first electronic device transmits the first image to the designated device. Since the super-resolution model on the specified device is a haplo-enhanced super-resolution model, the resolution of the first image cannot be adapted to the target image resolution. The target image resolution is the upper-screen display image resolution set by the specified device. Therefore, after acquiring the first image, the designated device can perform up-sampling processing on the first image, and adapt the resolution of the first image to the target image resolution configured on the designated device to obtain the second image. The image resolution of the second image is the target image resolution.
上采样所应用的算法可以是最邻近元法、双线性内插法、三次内插法等插值算法中的任意一种。指定设备通过预设的上采样算法对第一图像进行上采样处理,得到第二图像。The algorithm applied for up-sampling can be any one of interpolation algorithms such as the nearest neighbor method, bilinear interpolation method, and cubic interpolation method. The designated device performs up-sampling processing on the first image through a preset up-sampling algorithm to obtain the second image.
之后,指定设备将第二图像输入单倍增强型超分网络,通过单倍增强型超分网络增强上述第二图像的画质,得到目标图像。目标图像的图像分辨率为目标图像分辨率。After that, the designated device inputs the second image into the single-enhanced super-score network, and enhances the image quality of the second image through the single-enhancement super-score network to obtain the target image. The image resolution of the target image is the target image resolution.
在另一些实施例中,当指定设备上的超分模型为多倍增强型超分模型时,第一电子设备可以根据用户配置的第一图像分辨率对应用程序产生的原生图像数据进行渲染,得到第一图像。此时,第一图像的图像分辨率为第一图像分辨率。In other embodiments, when the super-resolution model on the specified device is a multiple-enhanced super-resolution model, the first electronic device may render the native image data generated by the application according to the first image resolution configured by the user, Get the first image. At this time, the image resolution of the first image is the first image resolution.
然后,第一电子设备将第一图像传递至指定设备。指定设备将第一图像输入多倍增强型超分网络,通过多倍增强型超分网络增强上述第一图像的画质,并将上述第一图像的分辨率适配至指定设备上配置的目标图像分辨率,得到目标图像。目标图像的图像分辨率为目标图像分辨率。Then, the first electronic device transmits the first image to the designated device. The designated device inputs the first image into the multiple-enhanced super-division network, enhances the image quality of the first image through the multiple-enhanced super-division network, and adapts the resolution of the first image to the target configured on the designated device Image resolution to get the target image. The image resolution of the target image is the target image resolution.
此外,指定设备上的超分模型可以为通用超分模型,或者,上述超分模型也可以为针对某一产品或者某一类产品而训练的特定超分模型。上述通用超分模型以及特定超分模型的训练方式可以参见上一实施例的描述,在此不再赘述。In addition, the super-scoring model on the specified device may be a general super-scoring model, or the above-mentioned super-scoring model may also be a specific super-scoring model trained for a certain product or a certain type of product. For the training methods of the general super-resolution model and the specific super-resolution model, reference may be made to the description of the previous embodiment, and details are not repeated here.
当指定设备上设置有多个训练后的超分模型时,指定设备可以在接收到第一图像后,获取上述第一图像对应的应用程序的标识,根据应用程序的标识选择相应的超分模型对第一图像进行超分辨率重建处理。When multiple trained super-score models are set on the designated device, the designated device may, after receiving the first image, obtain the identifier of the application corresponding to the first image, and select the corresponding super-score model according to the identifier of the application. Perform super-resolution reconstruction processing on the first image.
如果指定设备未检测到应用程序的标识对应的超分模型,则指定设备可以调用通用超分模型进行超分辨率重建处理。并且,当指定设备中设置有多个通用超分模型时,指定设备还可以在使用通用超分模型对第一图像进行超分辨率重建之后,建立该通用超分模型与上述应用程序的标识的关联关系,以便指定设备下一次处理该应用程序的第一图像时,可以根据前述关联关系查找到同一通用超分模型对第一图像进行处理。If the specified device does not detect the super-resolution model corresponding to the identifier of the application, the specified device can call the general super-resolution model to perform super-resolution reconstruction processing. In addition, when a plurality of general super-resolution models are set in the designated device, the designated device can also establish a relationship between the general super-resolution model and the identifier of the above-mentioned application after performing super-resolution reconstruction on the first image using the general super-resolution model. association relationship, so that when the specified device processes the first image of the application program next time, the same general super-score model can be found to process the first image according to the foregoing association relationship.
需要说明的是,第一电子设备可以根据实际情况选择合适的图形渲染硬件对原生图像数据进行初步渲染,得到第一图像。上述图形渲染硬件可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)以及神经网络处理器(neural-network processing units,NPU)中的一种或多种。例如,当第一电子设备采用GPU-turbo技术对原生图像数据进行初步渲染时,上述图形渲染硬件可以为CPU和GPU的组合。It should be noted that the first electronic device may select appropriate graphics rendering hardware to perform preliminary rendering on the native image data according to the actual situation to obtain the first image. The above-mentioned graphics rendering hardware may be one or more of a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU), and a neural-network processing unit (neural-network processing units, NPU). For example, when the first electronic device uses the GPU-turbo technology to initially render the native image data, the above-mentioned graphics rendering hardware may be a combination of a CPU and a GPU.
指定设备可以根据实际情况选择合适的硬件运行上述超分模型。在一些实施例中,指定设备可以在CPU上运行上述超分模型,通过CPU对上述第一图像进行画质增强;在另一些实施例中,指定设备可以在GPU上运行上述超分模型,通过GPU对上述第一图像进行画质增强;或者,指定设备可以在NPU上运行上述超分模型,通过NPU对上述第一图像进行画质增强。本申请在此不对指定设备内执行上述超分重建操作的硬件进行限定。The specified device can choose suitable hardware to run the above super-score model according to the actual situation. In some embodiments, the designated device may run the above-mentioned super-score model on the CPU, and enhance the image quality of the above-mentioned first image through the CPU; in other embodiments, the designated device may run the above-mentioned super-score model on the GPU, through The GPU enhances the image quality of the first image; or, the designated device may run the super-score model on the NPU, and enhance the image quality of the first image through the NPU. The present application does not limit the hardware for performing the above-mentioned super-division reconstruction operation in the specified device.
为了更好地对本申请实施例提供的图像处理方法进行说明,以下结合具体的场景进行描述。In order to better describe the image processing method provided by the embodiments of the present application, the following description is made with reference to a specific scenario.
在以下的应用场景中,第一电子设备(即投屏方的电子设备)可以为手机,手机 内可以设置有GPU。指定设备(即被投屏方的电子设备)可以为智能电视以及电脑,智能电视以及电脑内可以设置有NPU。在NPU内,预设有通用游戏类的超分模型以及针对游戏A的超分模型,针对游戏A的超分模型与游戏A的应用标识相关联。In the following application scenarios, the first electronic device (that is, the electronic device of the screen-casting party) may be a mobile phone, and a GPU may be provided in the mobile phone. The designated device (ie, the electronic device of the screen-casting party) may be a smart TV and a computer, and an NPU may be provided in the smart TV and the computer. In the NPU, a general game-type super-score model and a super-score model for game A are preset, and the over-score model for game A is associated with the application identifier of game A.
场景五:Scenario five:
用户操作手机,将手机的显示画面投屏至智能电视。The user operates the mobile phone and projects the display screen of the mobile phone to the smart TV.
如图8和图19所示,用户点击手机上游戏B的图标,手机响应于用户的点击操作,启动游戏B。As shown in FIG. 8 and FIG. 19 , the user clicks the icon of the game B on the mobile phone, and the mobile phone starts the game B in response to the user's click operation.
游戏B启动后,游戏B的应用程序逐帧发送原生图像数据至手机GPU。After Game B is started, the application of Game B sends native image data to the GPU of the mobile phone frame by frame.
手机的GPU对上述原生图像数据进行逐帧渲染,得到各帧原生图像数据对应的第一图像,并通过手机的无线通信模块将第一图像逐帧发送至智能电视。The GPU of the mobile phone renders the above-mentioned native image data frame by frame, obtains the first image corresponding to each frame of native image data, and sends the first image frame by frame to the smart TV through the wireless communication module of the mobile phone.
智能电视接收到第一图像后,获取第一图像对应的应用标识,根据游戏B的应用标识未找到与游戏B对应的超分模型,则选用通用的游戏类超分模型作为目标超分模型。After receiving the first image, the smart TV obtains the application identifier corresponding to the first image, and if no super-score model corresponding to game B is found according to the application identifier of game B, a general game-type super-score model is selected as the target over-score model.
智能电视的NPU逐帧地将第一图像输入目标超分模型中,通过目标超分模型对第一图像进行画质增强,得到各帧第一图像对应的目标图像,并将目标图像逐帧送至智能电视的显示屏上屏显示。The NPU of the smart TV inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains the target image corresponding to each frame of the first image, and sends the target image frame by frame. to the upper screen of the Smart TV's display.
场景六:Scenario six:
用户操作手机,将手机的显示画面投屏至智能电视。The user operates the mobile phone and projects the display screen of the mobile phone to the smart TV.
如图9和图19所示,用户点击手机上游戏A的图标,手机响应于用户的点击操作,启动游戏A。As shown in FIG. 9 and FIG. 19 , the user clicks the icon of the game A on the mobile phone, and the mobile phone starts the game A in response to the user's click operation.
游戏A启动后,游戏A的应用程序逐帧发送原生图像数据至手机的GPU。After Game A starts, the application of Game A sends native image data frame by frame to the GPU of the mobile phone.
手机的GPU对上述原生图像数据进行逐帧渲染,得到各帧原生图像数据对应的第一图像,并通过手机的无线通信模块将第一图像发送至智能电视。The GPU of the mobile phone renders the above-mentioned native image data frame by frame, obtains a first image corresponding to each frame of native image data, and sends the first image to the smart TV through the wireless communication module of the mobile phone.
智能电视接收到第一图像后,获取第一图像对应的应用标识,根据游戏A的应用标识找到了针对游戏A的超分模型,则选用针对游戏A的超分模型作为目标超分模型。After receiving the first image, the smart TV obtains the application identifier corresponding to the first image, finds a superscore model for game A according to the application identifier of game A, and selects the superscore model for game A as the target overscore model.
智能电视的NPU逐帧地将第一图像输入目标超分模型中,通过目标超分模型对第一图像进行画质增强,得到各帧第一图像对应的目标图像,并将目标图像逐帧送至智能电视的显示屏上屏显示。The NPU of the smart TV inputs the first image into the target super-resolution model frame by frame, enhances the image quality of the first image through the target super-resolution model, obtains the target image corresponding to each frame of the first image, and sends the target image frame by frame. to the upper screen of the Smart TV's display.
场景七:Scenario Seven:
请参阅图20和图21,用户操作手机2001,将手机2001的显示画面投屏至智能电视2002和电脑2003。Referring to FIG. 20 and FIG. 21 , the user operates the mobile phone 2001 to project the display screen of the mobile phone 2001 to the smart TV 2002 and the computer 2003 .
用户点击手机2001上游戏A的图标,手机2001响应于用户的点击操作,启动游戏A。The user clicks the icon of the game A on the mobile phone 2001, and the mobile phone 2001 starts the game A in response to the user's click operation.
游戏A启动后,游戏A的应用程序逐帧发送原生图像数据20011至手机2001的GPU。原生图像数据20011的图像分辨率为480×360。After the game A is started, the application of the game A sends the native image data 20011 to the GPU of the mobile phone 2001 frame by frame. The image resolution of native image data 20011 is 480×360.
并且,手机2001通过无线通信模块与智能电视2002以及电脑2003进行数据交互,获取智能电视2002上配置的图像分辨率1920×1080和电脑2003上配置的图像分辨率2560×1440。Moreover, the mobile phone 2001 performs data interaction with the smart TV 2002 and the computer 2003 through the wireless communication module, and obtains the image resolution 1920×1080 configured on the smart TV 2002 and the image resolution 2560×1440 configured on the computer 2003 .
手机2001根据智能电视2002上配置的图像分辨率1920×1080,对上述原生图像 数据20011进行逐帧渲染,得到图像20012,图像20012的分辨率为1920×1080。The mobile phone 2001 renders the above-mentioned native image data 20011 frame by frame according to the image resolution 1920×1080 configured on the smart TV 2002, and obtains the image 20012. The resolution of the image 20012 is 1920×1080.
同时,手机2001根据电脑2003上配置的图像分辨率2560×1440,对上述原生图像数据20011进行逐帧渲染,得到图像20013,图像20013的分辨率为2560×1440。At the same time, the mobile phone 2001 renders the above-mentioned native image data 20011 frame by frame according to the image resolution 2560×1440 configured on the computer 2003 to obtain the image 20013, and the resolution of the image 20013 is 2560×1440.
手机2001通过无线通信模块将图像20012发送至智能电视2002,并且通过无线通信模块将图像20013发送至电脑2003。The mobile phone 2001 sends the image 20012 to the smart TV 2002 through the wireless communication module, and sends the image 20013 to the computer 2003 through the wireless communication module.
智能电视2002接收到图像20012后,获取图像20012对应的应用标识,根据游戏A的应用标识找到了针对游戏A的单倍增强型超分模型,则选用针对游戏A的单倍增强型超分模型作为目标超分模型。After receiving the image 20012, the smart TV 2002 obtains the application identifier corresponding to the image 20012, and finds the single-enhanced super-score model for the game A according to the application identifier of the game A, and selects the single-enhanced super-score model for the game A. as the target superscore model.
智能电视2002的NPU逐帧地将图像20012输入目标超分模型中,通过目标超分模型对图像20012进行超分辨率重建,得到图像20021。图像20021的图像分辨率为1920×1080。The NPU of the smart TV 2002 inputs the image 20012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 20012 through the target super-resolution model to obtain the image 20021. Image 20021 has an image resolution of 1920×1080.
如图21所示,图像20012的图像分辨率和图像20021的图像分辨率都是1920×1080,但是图像20021的清晰度高于图像20012的清晰度,图像20021的画质高于图像20012的画质。As shown in Figure 21, the image resolution of image 20012 and the image resolution of image 20021 are both 1920×1080, but the resolution of image 20021 is higher than that of image 20012, and the image quality of image 20021 is higher than that of image 20012 quality.
智能电视2002得到图像20012之后,将图像20012逐帧传递至智能电视2002的显示屏上屏显示。After the smart TV 2002 obtains the image 20012, the image 20012 is transmitted frame by frame to the display screen of the smart TV 2002 for on-screen display.
电脑2003接收到图像20013后,获取图像20013对应的应用标识,根据游戏A的应用标识找到了针对游戏A的单倍增强型超分模型,则选用针对游戏A的单倍增强型超分模型作为目标超分模型。After receiving the image 20013, the computer 2003 obtains the application identifier corresponding to the image 20013, and finds the haplo-enhanced super-score model for game A according to the application identifier of game A, and selects the haplo-enhanced super-score model for game A as the Goal overscore model.
电脑2003的NPU逐帧地将图像20013输入目标超分模型中,通过目标超分模型对图像20013进行超分辨率重建,得到图像20031。图像20031的图像分辨率为2560×1440。The NPU of the computer 2003 inputs the image 20013 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 20013 through the target super-resolution model to obtain the image 20031. Image 20031 has an image resolution of 2560×1440.
如图21所示,图像20013的图像分辨率和图像20031的图像分辨率都是2560×1440,但是图像20031的清晰度高于图像20013的清晰度,图像20031的画质高于图像20013的画质。As shown in Figure 21, the image resolution of image 20013 and the image resolution of image 20031 are both 2560×1440, but the resolution of image 20031 is higher than that of image 20013, and the image quality of image 20031 is higher than that of image 20013 quality.
电脑2003得到图像20031之后,将图像20031逐帧传递至电脑2003的显示屏上屏显示。After the computer 2003 obtains the image 20031, it transmits the image 20031 frame by frame to the display screen of the computer 2003 for display on the upper screen.
场景八:Scene Eight:
请参阅图22和图23,用户操作手机2201,将手机2201的显示画面投屏至智能电视2202和电脑2203。Referring to FIG. 22 and FIG. 23 , the user operates the mobile phone 2201 to project the display screen of the mobile phone 2201 to the smart TV 2202 and the computer 2203 .
用户点击手机2201上游戏A的图标,手机2201响应于用户的点击操作,启动游戏A。The user clicks the icon of the game A on the mobile phone 2201, and the mobile phone 2201 starts the game A in response to the user's click operation.
游戏A启动后,游戏A的应用程序逐帧发送原生图像数据22011至手机2201的GPU。原生图像数据22011的图像分辨率为480×360。After the game A is started, the application program of the game A sends the native image data 22011 to the GPU of the mobile phone 2201 frame by frame. The image resolution of native image data 22011 is 480×360.
手机2201根据预先配置的图像分辨率,对上述原生图像数据22011进行逐帧渲染,得到图像22012,图像22012的分辨率为480×360。The mobile phone 2201 renders the above-mentioned native image data 22011 frame by frame according to the pre-configured image resolution to obtain an image 22012, and the resolution of the image 22012 is 480×360.
手机2201通过无线通信模块将图像22012发送至智能电视2202,并且通过无线通信模块将图像22012发送至电脑2203。The mobile phone 2201 sends the image 22012 to the smart TV 2202 through the wireless communication module, and sends the image 22012 to the computer 2203 through the wireless communication module.
智能电视2202接收到图像22012后,获取图像22012对应的应用标识,根据游戏 A的应用标识找到了针对游戏A的单倍增强型超分模型,则选用针对游戏A的单倍增强型超分模型作为目标超分模型。After receiving the image 22012, the smart TV 2202 obtains the application identifier corresponding to the image 22012, and finds the single-enhanced super-score model for the game A according to the application identifier of the game A, and selects the single-enhanced super-score model for the game A. as the target superscore model.
智能电视2202的NPU逐帧地对图像22012进行上采样,得到图像22021,图像22021的图像分辨率为1920×1080。然后,智能电视2202的NUP逐帧地将图像22021输入目标超分模型中,通过目标超分模型对图像22021进行超分辨率重建,得到图像22022。The NPU of the smart TV 2202 upsamples the image 22012 frame by frame to obtain the image 22021, and the image resolution of the image 22021 is 1920×1080. Then, the NUP of the smart TV 2202 inputs the image 22021 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 22021 through the target super-resolution model to obtain the image 22022.
如图23所示,图像22021的图像分辨率和图像22022的图像分辨率都是1920×1080,但是图像22022的清晰度高于图像22021的清晰度,图像22022的画质高于图像22021的画质。As shown in Figure 23, the image resolution of image 22021 and the image resolution of image 22022 are both 1920×1080, but the resolution of image 22022 is higher than that of image 22021, and the image quality of image 22022 is higher than that of image 22021 quality.
智能电视2202得到图像22022之后,将图像22022逐帧传递至智能电视2202的显示屏上屏显示。After the smart TV 2202 obtains the image 22022, the image 22022 is transmitted frame by frame to the display screen of the smart TV 2202 for on-screen display.
电脑2203接收到图像22012后,获取图像22012对应的应用标识,根据游戏A的应用标识找到了针对游戏A的单倍增强型超分模型,则选用针对游戏A的单倍增强型超分模型作为目标超分模型。After receiving the image 22012, the computer 2203 obtains the application identifier corresponding to the image 22012, and finds the haplo-enhanced super-score model for game A according to the application identifier of game A, and selects the haplo-enhanced super-score model for game A as the Goal overscore model.
电脑2203的NPU逐帧地对图像22012进行上采样,得到图像22031,图像22031的图像分辨率为2560×1440。然后,电脑2203的NUP逐帧地将图像22031输入目标超分模型中,通过目标超分模型对图像22031进行超分辨率重建,得到图像22032。The NPU of the computer 2203 upsamples the image 22012 frame by frame to obtain the image 22031, and the image resolution of the image 22031 is 2560×1440. Then, the NUP of the computer 2203 inputs the image 22031 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 22031 through the target super-resolution model to obtain the image 22032.
如图23所示,图像22031的图像分辨率和图像22032的图像分辨率都是1920×1080,但是图像22032的清晰度高于图像22031的清晰度,图像22032的画质高于图像22031的画质。As shown in Figure 23, the image resolution of image 22031 and the image resolution of image 22032 are both 1920×1080, but the resolution of image 22032 is higher than that of image 22031, and the image quality of image 22032 is higher than that of image 22031 quality.
电脑2203得到图像22032之后,将图像22032逐帧传递至电脑2203的显示屏上屏显示。After the computer 2203 obtains the image 22032, it transmits the image 22032 frame by frame to the display screen of the computer 2203 for display on the upper screen.
场景九:Scene Nine:
请参阅图24和图25,用户操作手机2401,将手机2401的显示画面投屏至智能电视2402和电脑2403。Referring to FIG. 24 and FIG. 25 , the user operates the mobile phone 2401 to project the display screen of the mobile phone 2401 to the smart TV 2402 and the computer 2403 .
用户点击手机2401上游戏A的图标,手机2401响应于用户的点击操作,启动游戏A。The user clicks the icon of the game A on the mobile phone 2401, and the mobile phone 2401 starts the game A in response to the user's click operation.
游戏A启动后,游戏A的应用程序逐帧发送原生图像数据24011至手机2401的GPU。After the game A is started, the application of the game A sends the native image data 24011 to the GPU of the mobile phone 2401 frame by frame.
手机2401根据预先配置的图像分辨率,对上述原生图像数据24011进行逐帧渲染,得到图像24012,图像24012的分辨率为480×360。The mobile phone 2401 performs frame-by-frame rendering on the above-mentioned native image data 24011 according to the pre-configured image resolution to obtain an image 24012, and the resolution of the image 24012 is 480×360.
手机2401通过无线通信模块将图像24012发送至智能电视2402,并且通过无线通信模块将图像24012发送至电脑2403。The mobile phone 2401 sends the image 24012 to the smart TV 2402 through the wireless communication module, and sends the image 24012 to the computer 2403 through the wireless communication module.
智能电视2402接收到图像24012后,获取图像24012对应的应用标识,根据游戏A的应用标识找到了针对游戏A的多倍增强型超分模型,则选用针对游戏A的多倍增强型超分模型作为目标超分模型。After receiving the image 24012, the smart TV 2402 obtains the application identifier corresponding to the image 24012, and finds a multiple-enhanced super-score model for the game A according to the application identifier of the game A, and selects the multiple-enhanced super-score model for the game A. as the target superscore model.
智能电视2402的NPU逐帧地将图像24012输入目标超分模型中,通过目标超分模型对图像24012进行超分辨率重建,得到图像24021。图像24021的图像分辨率为1920×1080。The NPU of the smart TV 2402 inputs the image 24012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 24012 through the target super-resolution model to obtain the image 24021. Image 24021 has an image resolution of 1920×1080.
如图25所示,图像24021的图像分辨率大于图像24012的图像分辨率,且图像24021的清晰度大于图像24012的清晰度,所以图像24021的画质高于图像24012的画质。As shown in FIG. 25 , the image resolution of image 24021 is greater than that of image 24012 , and the resolution of image 24021 is greater than that of image 24012 , so the image quality of image 24021 is higher than that of image 24012 .
智能电视2402得到图像24021之后,将图像24021逐帧传递至智能电视2402的显示屏上屏显示。After the smart TV 2402 obtains the image 24021, it transmits the image 24021 frame by frame to the display screen of the smart TV 2402 for on-screen display.
电脑2403接收到图像24012后,获取图像24012对应的应用标识,根据游戏A的应用标识找到了针对游戏A的多倍增强型超分模型,则选用针对游戏A的多倍增强型超分模型作为目标超分模型。After receiving the image 24012, the computer 2403 obtains the application identifier corresponding to the image 24012, and finds the multiple-enhanced super-score model for the game A according to the application identifier of the game A, and selects the multiple-enhanced super-score model for the game A as the Goal overscore model.
电脑2403的NPU逐帧地将图像24012输入目标超分模型中,通过目标超分模型对图像24012进行超分辨率重建,得到图像24031。图像24031的图像分辨率为2560×1440。The NPU of the computer 2403 inputs the image 24012 into the target super-resolution model frame by frame, and performs super-resolution reconstruction on the image 24012 through the target super-resolution model to obtain the image 24031. Image 24031 has an image resolution of 2560×1440.
图像24031的图像分辨率大于图像24012的图像分辨率,且图像24031的清晰度大于图像24012的清晰度,所以图像24031的画质高于图像24012的画质。The image resolution of image 24031 is greater than that of image 24012, and the resolution of image 24031 is greater than that of image 24012, so the image quality of image 24031 is higher than that of image 24012.
电脑2403得到图像24031之后,将图像24031逐帧传递至电脑2403的显示屏上屏显示。After the computer 2403 obtains the image 24031, the image 24031 is transmitted frame by frame to the display screen of the computer 2403 for display on the upper screen.
综上可得,在本实施例提供的图像处理方法中,第一电子设备先对应用程序的原生图像数据进行初步渲染,得到第一图像。然后,第一电子设备再将第一图像传输至需要投屏的指定设备,由指定设备对第一图像进行超分辨率重建,提高第一图像的画质,得到用于上屏显示的目标图像。也即是说,在本实施例提高的图像处理方法中,将图像渲染过程分成初步渲染和超分辨率重建两个步骤,初步渲染步骤由投屏方的第一电子设备执行,超分辨率重建的步骤由被投屏方的指定设备执行,从而减少投屏方的第一电子设备的硬件资源的负荷,降低渲染功效,并且可以充分利用投屏方的第一电子设备的硬件资源以及被投屏方的指定设备的硬件资源。To sum up, in the image processing method provided in this embodiment, the first electronic device firstly renders the native image data of the application program to obtain the first image. Then, the first electronic device transmits the first image to the designated device that needs to be projected, and the designated device performs super-resolution reconstruction on the first image, improves the quality of the first image, and obtains the target image for display on the upper screen . That is to say, in the image processing method improved in this embodiment, the image rendering process is divided into two steps: preliminary rendering and super-resolution reconstruction. The preliminary rendering step is performed by the first electronic device on the screen projection side, and super-resolution reconstruction is performed. The steps are executed by the designated device of the screen-casting party, thereby reducing the load on the hardware resources of the first electronic device of the screen-casting party, reducing the rendering efficiency, and making full use of the hardware resources of the screen-casting party's first electronic device and the casting party's first electronic device. The hardware resources of the specified device on the screen side.
此外,采用本实施例提供的图像处理方法,可以使画质增强后的目标图像的显示分辨率与指定设备的显示分辨率相适配,提高用户的使用体验。In addition, by using the image processing method provided in this embodiment, the display resolution of the target image after image quality enhancement can be adapted to the display resolution of the specified device, thereby improving the user experience.
其中,指定设备在进行超分辨率重建时,指定设备选用的超分模型可以为单倍增强型超分模型,或者,也可以为多倍增强型超分模型。当指定设备选用的超分模型为多倍增强型超分模型时,可以降低初步渲染所占用的硬件资源以及初步渲染的渲染功耗。Wherein, when the designated device performs super-resolution reconstruction, the super-resolution model selected by the designated device may be a single-enhanced super-resolution model, or may also be a multiple-enhanced super-resolution model. When the super-resolution model selected by the specified device is the multiple-enhanced super-resolution model, the hardware resources occupied by the preliminary rendering and the rendering power consumption of the preliminary rendering can be reduced.
此外,上述超分模型可以通用超分模型,或者,也可以为针对某一应用程序或某一类应用程序的特定超分模型。特定超分模型的适用范围比通用超分模型的适用范围小,但是通常特定超分模型的画质增强效果优于通用超分模型。In addition, the above-mentioned super-scoring model may be a general super-scoring model, or may also be a specific super-scoring model for a certain application or a certain type of application. The applicable range of the specific super-resolution model is smaller than that of the general super-resolution model, but usually the image quality enhancement effect of the specific super-resolution model is better than that of the general super-resolution model.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
请参阅图26,本申请实施例还提供了一种电子设备。如图26所示,该实施例的电子设备26包括:处理器260、存储器261以及存储在所述存储器261中并可在所述处理器260上运行的计算机程序262。所述处理器260执行所述计算机程序262时实现上述屏幕扩展方法实施例中的步骤,例如图1所示的步骤S301至S302。或者,所 述处理器260执行所述计算机程序262时实现上述各装置实施例中各模块/单元的功能,例如图26所示模块2601至2602的功能。Referring to FIG. 26 , an embodiment of the present application further provides an electronic device. As shown in FIG. 26 , the electronic device 26 of this embodiment includes a processor 260 , a memory 261 , and a computer program 262 stored in the memory 261 and executable on the processor 260 . When the processor 260 executes the computer program 262, the steps in the above embodiments of the screen expansion method are implemented, for example, steps S301 to S302 shown in FIG. 1 . Alternatively, when the processor 260 executes the computer program 262, the functions of the modules/units in the foregoing device embodiments are implemented, for example, the functions of the modules 2601 to 2602 shown in FIG. 26 .
示例性的,所述计算机程序262可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器261中,并由所述处理器260执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序262在所述电子设备26中的执行过程。例如,所述计算机程序262可以被分割成原生数据模块、初步渲染模块以及第一超分模块,各模块具体功能如下:Exemplarily, the computer program 262 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 261 and executed by the processor 260 to complete the this application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 262 in the electronic device 26 . For example, the computer program 262 can be divided into a native data module, a preliminary rendering module and a first super-divided module, and the specific functions of each module are as follows:
原生数据模块,用于获取原生图像数据,所述原生图像数据为应用程序生成的、且未经过渲染的图像数据;A native data module, used to obtain native image data, where the native image data is image data generated by an application and not rendered;
初步渲染模块,用于通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像;a preliminary rendering module, configured to render the native image data through the first graphics rendering hardware to obtain a first image;
第一超分模块,用于通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,所述第一图形渲染硬件和第二图形渲染硬件为不同的图形渲染硬件。The first super-resolution module is configured to perform super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
所述电子设备26可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述电子设备可包括,但不仅限于,处理器260、存储器261。本领域技术人员可以理解,图26仅仅是电子设备26的示例,并不构成对电子设备26的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。The electronic device 26 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The electronic device may include, but is not limited to, the processor 260 and the memory 261 . Those skilled in the art can understand that FIG. 26 is only an example of the electronic device 26, and does not constitute a limitation on the electronic device 26, and may include more or less components than the one shown, or combine some components, or different components For example, the electronic device may further include an input and output device, a network access device, a bus, and the like.
所称处理器260可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件硬件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 260 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware hardware, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器261可以是所述电子设备26的内部存储单元,例如电子设备26的硬盘或内存。所述存储器261也可以是所述电子设备26的外部存储设备,例如所述电子设备26上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器261还可以既包括所述电子设备26的内部存储单元也包括外部存储设备。所述存储器261用于存储所述计算机程序以及所述电子设备所需的其他程序和数据。所述存储器261还可以用于暂时地存储已经输出或者将要输出的数据。The memory 261 may be an internal storage unit of the electronic device 26 , such as a hard disk or a memory of the electronic device 26 . The memory 261 may also be an external storage device of the electronic device 26, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device 26 card, Flash Card, etc. Further, the memory 261 may also include both an internal storage unit of the electronic device 26 and an external storage device. The memory 261 is used to store the computer program and other programs and data required by the electronic device. The memory 261 may also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法 实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或硬件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the above-described embodiments of the apparatus/electronic device are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Either the hardware may be incorporated or integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or replacements within the technical scope disclosed in the present application should be covered by the present application. within the scope of protection of the application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (17)

  1. 一种图像处理方法,其特征在于,应用于第一电子设备,包括:An image processing method, characterized in that, applied to a first electronic device, comprising:
    所述第一电子设备获取原生图像数据,所述原生图像数据为应用程序生成的、且未经过渲染的图像数据;The first electronic device acquires native image data, where the native image data is unrendered image data generated by an application;
    所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像;The first electronic device renders the native image data through the first graphics rendering hardware to obtain a first image;
    所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,所述第一图形渲染硬件和第二图形渲染硬件为不同的图形渲染硬件。The first electronic device performs super-resolution reconstruction on the first image through second graphics rendering hardware to obtain a target image, and the first graphics rendering hardware and the second graphics rendering hardware are different graphics rendering hardware.
  2. 如权利要求1所述的图像处理方法,其特征在于,所述第一电子设备通过第一图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:The image processing method according to claim 1, wherein the first electronic device performs super-resolution reconstruction on the first image through first graphics rendering hardware to obtain the target image, comprising:
    所述第一电子设备获取所述应用程序的标识;The first electronic device obtains the identifier of the application;
    所述第一电子设备查找与所述标识关联的目标超分模型;the first electronic device searches for a target super-score model associated with the identifier;
    所述第一电子设备通过所述第一图形渲染硬件以及查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The first electronic device performs super-resolution reconstruction on the first image through the first graphics rendering hardware and the found target super-resolution model to obtain a target image.
  3. 如权利要求2所述的图像处理方法,其特征在于,在所述第一电子设备查找与所述标识关联的目标超分模型之后,还包括:The image processing method according to claim 2, wherein after the first electronic device searches for the target super-score model associated with the identifier, the method further comprises:
    若未查找到与所述标识关联的目标超分模型,则所述第一电子设备通过所述第一图形渲染硬件以及预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。If the target super-resolution model associated with the identifier is not found, the first electronic device performs super-resolution reconstruction on the first image by using the first graphics rendering hardware and a preset general super-resolution model, Get the target image.
  4. 如权利要求1所述的图像处理方法,其特征在于,所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像,包括:The image processing method according to claim 1, wherein the first electronic device renders the native image data through first graphics rendering hardware to obtain the first image, comprising:
    所述第一电子设备通过所述第一图形渲染硬件以及预设的第一图像分辨率对所述原生图像数据进行渲染,得到第一图像。The first electronic device renders the native image data by using the first graphics rendering hardware and a preset first image resolution to obtain a first image.
  5. 如权利要求4所述的图像处理方法,其特征在于,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:The image processing method according to claim 4, wherein the first electronic device performs super-resolution reconstruction on the first image through second graphics rendering hardware to obtain the target image, comprising:
    所述第一电子设备通过所述第二图形渲染硬件以及单倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率和所述目标图像的图像分辨率一致,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware and the single-enhanced super-resolution model to obtain a target image, wherein the first image resolution and the The image resolutions of the target images are the same, and the single-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image and the image resolution of the output image are the same.
  6. 如权利要求4所述的图像处理方法,其特征在于,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率重建,得到目标图像,包括:The image processing method according to claim 4, wherein the first electronic device performs super-resolution reconstruction on the first image through second graphics rendering hardware to obtain the target image, comprising:
    所述第一电子设备通过所述第二图形渲染硬件以及多倍增强型超分模型对所述第一图像进行超分辨率重建,得到目标图像,其中,所述第一图像分辨率小于所述目标图像的图像分辨率,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The first electronic device performs super-resolution reconstruction on the first image by using the second graphics rendering hardware and the multiple-enhanced super-resolution model to obtain a target image, wherein the resolution of the first image is smaller than the resolution of the first image. The image resolution of the target image. The multiple-enhanced super-resolution model is a super-resolution model in which the image resolution of the input image is smaller than the image resolution of the output image.
  7. 如权利要求1所述的图像处理方法,其特征在于,所述第一电子设备通过第一图形渲染硬件对所述原生图像数据进行渲染,得到第一图像,包括:The image processing method according to claim 1, wherein the first electronic device renders the native image data through first graphics rendering hardware to obtain the first image, comprising:
    所述第一电子设备通过图形处理器对所述原生图像数据进行渲染,得到第一图像;The first electronic device renders the native image data through a graphics processor to obtain a first image;
    相应的,所述第一电子设备通过第二图形渲染硬件对所述第一图像进行超分辨率 重建,得到目标图像,包括:Correspondingly, the first electronic device performs super-resolution reconstruction on the first image through the second graphics rendering hardware to obtain the target image, including:
    所述第一电子设备通过神经网络处理器对所述第一图像进行超分辨率重建,得到目标图像。The first electronic device performs super-resolution reconstruction on the first image through a neural network processor to obtain a target image.
  8. 一种图像处理方法,其特征在于,应用于第二电子设备,包括:An image processing method, characterized in that, applied to a second electronic device, comprising:
    所述第二电子设备接收第一电子设备发送的第一图像,所述第一图像为所述第一电子设备对应用程序生成的原生图像数据渲染后得到的图像;The second electronic device receives a first image sent by the first electronic device, where the first image is an image obtained by the first electronic device rendering the native image data generated by the application;
    所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像。The second electronic device performs super-resolution reconstruction on the first image to obtain a target image.
  9. 如权利要求8所述的图像处理方法,其特征在于,所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The image processing method according to claim 8, wherein the second electronic device performs super-resolution reconstruction on the first image to obtain a target image, comprising:
    所述第二电子设备获取所述应用程序的标识;acquiring, by the second electronic device, the identifier of the application;
    所述第二电子设备查找与所述标识关联的目标超分模型;the second electronic device searches for a target super-score model associated with the identifier;
    所述第二电子设备通过查找到的所述目标超分模型对所述第一图像进行超分辨率重建,得到目标图像。The second electronic device performs super-resolution reconstruction on the first image by using the found target super-resolution model to obtain a target image.
  10. 如权利要求9所述的图像处理方法,其特征在于,在所述第二电子设备查找与所述标识关联的目标超分模型之后,还包括:The image processing method according to claim 9, wherein after the second electronic device searches for the target super-score model associated with the identifier, further comprising:
    若未查找到与所述标识关联的目标超分模型,则所述第二电子设备通过预设的通用超分模型对所述第一图像进行超分辨率重建,得到目标图像。If the target super-resolution model associated with the identifier is not found, the second electronic device performs super-resolution reconstruction on the first image by using a preset general super-resolution model to obtain a target image.
  11. 如权利要求8所述的图像处理方法,其特征在于,所述第一图像的第一图像分辨率和所述目标图像的图像分辨率一致;The image processing method according to claim 8, wherein the first image resolution of the first image is consistent with the image resolution of the target image;
    所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
    所述第二电子设备通过单倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The second electronic device performs super-resolution reconstruction on the first image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
  12. 如权利要求8所述的图像处理方法,其特征在于,所述第一图像的第一图像分辨率低于所述目标图像的图像分辨率;The image processing method according to claim 8, wherein the first image resolution of the first image is lower than the image resolution of the target image;
    所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
    所述第二电子设备对所述第一图像进行上采样处理,得到第二图像,所述第二图像的图像分辨率与所述目标图像的图像分辨率一致;The second electronic device performs up-sampling processing on the first image to obtain a second image, and the image resolution of the second image is consistent with the image resolution of the target image;
    所述第二电子设备通过单倍增强型超分模型对所述第二图像进行超分辨率重建,得到所述目标图像,其中,所述单倍增强型超分模型为输入图像的图像分辨率和输出图像的图像分辨率相同的超分模型。The second electronic device performs super-resolution reconstruction on the second image through a single-enhanced super-resolution model to obtain the target image, wherein the single-enhanced super-resolution model is the image resolution of the input image A superresolution model with the same image resolution as the output image.
  13. 如权利要求8所述的图像处理方法,其特征在于,所述第一图像的第一图像分辨率低于所述目标图像的分辨率;The image processing method according to claim 8, wherein the first image resolution of the first image is lower than the resolution of the target image;
    所述第二电子设备对所述第一图像进行超分辨率重建,得到目标图像,包括:The second electronic device performs super-resolution reconstruction on the first image to obtain a target image, including:
    所述第二电子设备通过多倍增强型超分模型对所述第一图像进行超分辨率重建,得到所述目标图像,其中,所述多倍增强型超分模型为输入图像的图像分辨率小于输出图像的图像分辨率的超分模型。The second electronic device performs super-resolution reconstruction on the first image through a multiple-enhanced super-resolution model to obtain the target image, wherein the multiple-enhanced super-resolution model is the image resolution of the input image A superresolution model with an image resolution smaller than the output image.
  14. 一种图像处理系统,其特征在于,所述系统包括第一电子设备和第二电子设备;An image processing system, characterized in that the system includes a first electronic device and a second electronic device;
    所述第一电子设备用于对应用程序生成的原生图像数据进行渲染,得到第一图像,并将所述第一图像发送至所述第二电子设备;The first electronic device is configured to render the native image data generated by the application to obtain a first image, and send the first image to the second electronic device;
    所述第二电子设备用于执行权利要求8至13中任一项所述的图像处理方法。The second electronic device is used to execute the image processing method according to any one of claims 8 to 13 .
  15. 一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的方法,或者,实现如权利要求8至13任一项所述的方法。An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the computer program according to claim 1 to 7. The method of any one of claims 8 to 13, or implementing the method of any one of claims 8 to 13.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法,或者,实现如权利要求8至13任一项所述的方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented, or, A method as claimed in any one of claims 8 to 13 is carried out.
  17. 一种芯片系统,其特征在于,所述芯片系统包括存储器和处理器,所述处理器执行所述存储器中存储的计算机程序,以实现如权利要求1至7任一项所述的方法,或者,实现如权利要求8至13任一项所述的方法。A chip system, characterized in that the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement the method according to any one of claims 1 to 7, or , implementing the method as claimed in any one of claims 8 to 13.
PCT/CN2021/105060 2020-07-08 2021-07-07 Image processing method, system, electronic device and computer readable storage medium WO2022007862A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010653106.7 2020-07-08
CN202010653106.7A CN113935898A (en) 2020-07-08 2020-07-08 Image processing method, system, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2022007862A1 true WO2022007862A1 (en) 2022-01-13

Family

ID=79273437

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/105060 WO2022007862A1 (en) 2020-07-08 2021-07-07 Image processing method, system, electronic device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN113935898A (en)
WO (1) WO2022007862A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114638951A (en) * 2022-03-29 2022-06-17 北京有竹居网络技术有限公司 House model display method and device, electronic equipment and readable storage medium
CN116033065A (en) * 2022-12-29 2023-04-28 维沃移动通信有限公司 Playing method, playing device, electronic equipment and readable storage medium
CN117689796A (en) * 2023-07-07 2024-03-12 荣耀终端有限公司 Rendering processing method and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860141A (en) * 2022-05-23 2022-08-05 Oppo广东移动通信有限公司 Image display method, image display device, electronic equipment and computer readable medium
CN115474090B (en) * 2022-08-31 2023-05-16 北京理工大学 Application method of heterogeneous embedded real-time processing architecture supporting video target detection tracking
CN116012474B (en) * 2022-12-13 2024-01-30 昆易电子科技(上海)有限公司 Simulation test image generation and reinjection method and system, industrial personal computer and device
CN117130766B (en) * 2023-01-17 2024-06-07 荣耀终端有限公司 Thread processing method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107680042A (en) * 2017-09-27 2018-02-09 杭州群核信息技术有限公司 Rendering intent, device, engine and storage medium
CN107742317A (en) * 2017-09-27 2018-02-27 杭州群核信息技术有限公司 A kind of acquisition methods for rendering image, device, rendering system and storage medium
CN108694685A (en) * 2017-04-01 2018-10-23 英特尔公司 Multi-resolution images image plane in improved graphics processor micro-architecture renders
WO2019187298A1 (en) * 2018-03-29 2019-10-03 Mitsubishi Electric Corporation Image processing system and image processing method
CN110827380A (en) * 2019-09-19 2020-02-21 北京铂石空间科技有限公司 Image rendering method and device, electronic equipment and computer readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694685A (en) * 2017-04-01 2018-10-23 英特尔公司 Multi-resolution images image plane in improved graphics processor micro-architecture renders
CN107680042A (en) * 2017-09-27 2018-02-09 杭州群核信息技术有限公司 Rendering intent, device, engine and storage medium
CN107742317A (en) * 2017-09-27 2018-02-27 杭州群核信息技术有限公司 A kind of acquisition methods for rendering image, device, rendering system and storage medium
WO2019187298A1 (en) * 2018-03-29 2019-10-03 Mitsubishi Electric Corporation Image processing system and image processing method
CN110827380A (en) * 2019-09-19 2020-02-21 北京铂石空间科技有限公司 Image rendering method and device, electronic equipment and computer readable medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114638951A (en) * 2022-03-29 2022-06-17 北京有竹居网络技术有限公司 House model display method and device, electronic equipment and readable storage medium
CN114638951B (en) * 2022-03-29 2023-08-15 北京有竹居网络技术有限公司 House model display method and device, electronic equipment and readable storage medium
CN116033065A (en) * 2022-12-29 2023-04-28 维沃移动通信有限公司 Playing method, playing device, electronic equipment and readable storage medium
CN117689796A (en) * 2023-07-07 2024-03-12 荣耀终端有限公司 Rendering processing method and electronic equipment

Also Published As

Publication number Publication date
CN113935898A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
US11669242B2 (en) Screenshot method and electronic device
WO2020253719A1 (en) Screen recording method and electronic device
JP7238115B2 (en) Photography scenarios and methods for displaying images on electronic devices
WO2022007862A1 (en) Image processing method, system, electronic device and computer readable storage medium
CN115473957B (en) Image processing method and electronic equipment
US20240179237A1 (en) Screenshot Generating Method, Control Method, and Electronic Device
WO2020093988A1 (en) Image processing method and electronic device
CN113254120B (en) Data processing method and related device
WO2022017261A1 (en) Image synthesis method and electronic device
CN113448382B (en) Multi-screen display electronic device and multi-screen display method of electronic device
WO2022257474A1 (en) Image prediction method, electronic device and storage medium
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
CN113986162B (en) Layer composition method, device and computer readable storage medium
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2022095744A1 (en) Vr display control method, electronic device, and computer readable storage medium
CN116051351B (en) Special effect processing method and electronic equipment
CN113542574A (en) Shooting preview method under zooming, terminal, storage medium and electronic equipment
WO2022078116A1 (en) Brush effect picture generation method, image editing method and device, and storage medium
WO2022135195A1 (en) Method and apparatus for displaying virtual reality interface, device, and readable storage medium
WO2022033344A1 (en) Video stabilization method, and terminal device and computer-readable storage medium
WO2021204103A1 (en) Picture preview method, electronic device, and storage medium
CN117724863A (en) Target signal processing method and electronic equipment
CN115686403A (en) Display parameter adjusting method, electronic device, chip and readable storage medium
CN114827098A (en) Method and device for close shooting, electronic equipment and readable storage medium

Legal Events

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

Ref document number: 21838599

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21838599

Country of ref document: EP

Kind code of ref document: A1