CN117156059A - Image processing method, electronic device, and readable storage medium - Google Patents

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

Info

Publication number
CN117156059A
CN117156059A CN202311177668.9A CN202311177668A CN117156059A CN 117156059 A CN117156059 A CN 117156059A CN 202311177668 A CN202311177668 A CN 202311177668A CN 117156059 A CN117156059 A CN 117156059A
Authority
CN
China
Prior art keywords
image
buffer queue
image frame
application
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311177668.9A
Other languages
Chinese (zh)
Inventor
黄南海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202311177668.9A priority Critical patent/CN117156059A/en
Publication of CN117156059A publication Critical patent/CN117156059A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/21Intermediate information storage
    • H04N1/2104Intermediate information storage for one or a few pictures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/21Intermediate information storage
    • H04N1/2166Intermediate information storage for mass storage, e.g. in document filing systems
    • H04N1/2195Intermediate information storage for mass storage, e.g. in document filing systems with temporary storage before final recording or on play-back, e.g. in a frame buffer

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses an image processing method, electronic equipment and a readable storage medium, and belongs to the technical field of image processing. Wherein the method comprises the following steps: determining a first buffer queue from the at least one buffer queue, wherein the first buffer queue stores first image frames of a first application; performing image post-processing on the first image frame to generate a second image frame; storing the second image frame in a second buffer queue; and displaying a third image frame, wherein the third image frame is obtained according to the second image frame in the second buffer queue.

Description

Image processing method, electronic device, and readable storage medium
Technical Field
The application belongs to the technical field of image processing, and particularly relates to an image processing method, electronic equipment and a readable storage medium.
Background
Currently, with the development of the mobile internet, image frames displayed by electronic devices are diversified. Taking a game application as an example, the image post-processing is an indispensable link in game development, and can improve the quality of image frames in the game application.
Conventional image post-processing is usually calculated by using a graphics processor, and various applications develop respective image post-processing algorithms for adjusting the display effect of the image frames, which is inefficient.
Disclosure of Invention
An object of an embodiment of the application is to provide an image processing method, an electronic device and a readable storage medium, which can solve the problem of low efficiency.
In a first aspect, an embodiment of the present application provides an image processing method, applied to an electronic device, where the method includes:
determining a first buffer queue from the at least one buffer queue, wherein the first buffer queue stores first image frames of a first application;
performing image post-processing on the first image frame to generate a second image frame;
storing the second image frame in a second buffer queue;
and displaying a third image frame, wherein the third image frame is obtained according to the second image frame in the second buffer queue.
In a second aspect, an embodiment of the present application provides an electronic device, including:
a first determining module, configured to determine a first buffer queue from at least one buffer queue, where a first image frame of a first application is stored in the first buffer queue;
the image processing module is used for carrying out image post-processing on the first image frame to generate a second image frame;
the storage module is used for storing the second image frames in a second buffer queue;
and the display module is used for displaying a third image frame, wherein the third image frame is obtained according to the second image frame in the second buffer queue.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, the first buffer queue is determined from at least one buffer queue, the first image frame of the first application is stored in the first buffer queue, so that the first buffer queue corresponding to the first application needing to perform image post-processing can be determined from the at least one buffer queue, the subsequent image post-processing of the first image frame in the first buffer queue is facilitated, then the electronic equipment performs the image post-processing of the first image frame to generate the second image frame, and because the process is not required to be executed by an application process, development and maintenance of image post-processing source codes by all application sides are not required, the efficiency is improved, the second image frame is stored in the second buffer queue, and finally, the third image frame obtained according to the second image frame in the second buffer queue is displayed. Therefore, the image display effect of the first application can be improved, the image processing process can be suitable for any first application needing image post-processing in the electronic equipment, development and maintenance of image post-processing source codes by each application side are avoided, and efficiency is improved.
Drawings
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an image super-resolution algorithm according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an image frame interpolation algorithm according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
fig. 6 is a second schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the accompanying drawings of the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
And (3) post-processing, namely performing algorithm processing on the single-frame image frame to improve or enhance the visual effect of the single-frame image frame.
High dynamic range imaging (High Dynamic Range Imaging, HDR), in computer graphics and cinematography, is a set of techniques used to achieve a larger dynamic range of exposure (i.e., larger contrast) than conventional digital image techniques. The method can make the image more balanced between the bright and dark areas and make the image detail more abundant.
The layer deliverer (SurfaceFlinger, SF) is a system service in the Android system, and is responsible for managing and controlling all display operations, including graphic drawing of an application program, layout of a window, hierarchical structure of the window, animation effect, switching, sliding and the like, and finally synthesizing all graphic contents into a complete screen display picture.
A Buffer Queue (BQ), an object in the system for managing graphics buffers, is used to interact the application's graphics data buffer with the graphics display buffer in the SF process for display on the screen.
Buffer queues, also known as producer consumer models, in which there are two roles, producer and consumer, that communicate through a memory buffer, produce data that the consumer needs, and the consumer obtains the data produced by the producer for consumption.
If the consumer model of the producer is not available, the producer and the consumer are in direct calling relationship, the production speed and the consumption speed are mutually tired, and the next production can be carried out after the consumption is completed;
after the producer and consumer models exist, the data produced by the producer is stored in the buffer queue, and the consumer takes the data from the queue for consumption, so that the data are not affected by each other, are not tired of each other, and have low coupling property.
A hardware synthesizer (Hardware Composer, HWC) is a system service in the system that acts to synthesize graphics data in the SF process into final graphics display content and pass it to the display hardware for display.
The image processing method provided by the embodiment of the application can be at least applied to the following application scenes, and is explained below.
Currently, with the development of the mobile internet, pictures displayed by electronic devices are various. Taking game application as an example, the image post-processing is an indispensable link in game development, and can improve the quality of image frames in the game application, namely the quality of game pictures, enhance the immersion of games and improve the playability and visual effect of the games.
The traditional game image post-processing usually adopts a graphic processor to calculate, the calculated amount is large, different game applications can develop respective image post-processing algorithms for adjusting the display effect of game pictures, and the efficiency is low.
In addition, as the electronic device is continuously updated, the hardware of the electronic device is continuously updated, the original codes in the application are not completely suitable for the updated hardware any more, and the development party of the game application needs to update the application version, so that resources and manpower are consumed, and the efficiency is low.
Aiming at the problems of the related art, the embodiment of the application provides an image processing method, electronic equipment and a readable storage medium, which can solve the problem of low efficiency in the related art.
The image processing method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present application.
As shown in fig. 1, the image processing method may include steps 110 to 140, and the method is applied to an electronic device, specifically as follows:
step 110, determining a first buffer queue from at least one buffer queue, wherein a first image frame of a first application is stored in the first buffer queue.
The at least one buffer queue comprises a plurality of buffer queues corresponding to the applications, wherein the first image frame generated by the first application is an image frame needing image post-processing in the embodiment of the application. The first application may be any application installed in the electronic device.
Therefore, the first buffer queue corresponding to the first application needing image post-processing is determined from the at least one buffer queue, so that the subsequent image processing of the first image frame in the first buffer queue is facilitated.
The embodiment of the application is based on the image post-processing of the first image frame by the electronic equipment, so the embodiment of the application adds the processing procedure of the first buffer queue, and therefore, the first buffer queue needs to be determined from the buffer queues corresponding to at least one application process so as to facilitate the subsequent image processing of the first image frame in the first buffer queue.
In a possible embodiment, before step 110, the following steps may be further included:
in the case of launching a first application, a first buffer queue corresponding to the first application is created.
Each application corresponds to a respective buffer queue, and image frames of the applications can be stored in the buffer queues. Here, in the case of starting the first application, it is explained that the image frame of the first application needs to be displayed subsequently, so that a first buffer queue corresponding to the first application is created at this time, so that the first image frame of the first application is stored in the first buffer queue, so that the image processing is performed on the first image frame in the first buffer queue subsequently.
The application process invokes its own rendering code and renders the first image frame. If the first application is a gaming application, the first image frame may include: image elements such as game characters, game scenes, terrains and the like. When the drawing of the first image frame is finished, namely after the application process generates the first image frame, the first image frame is stored in a first buffer queue.
In a possible embodiment, in step 110, the following steps may be specifically included:
determining a first buffer queue from at least one buffer queue according to the first identifier, wherein the first buffer queue corresponds to the first identifier; the first application corresponds to the first identifier.
The first identifier may be an application name of the first application, or a symbol for indicating the first application. Such as a game application with a specific identification.
Since image post-processing is not required for image frames generated by each application process, a first buffer queue which needs to be subjected to image post-processing needs to be identified from at least one buffer queue, so that subsequent image processing on first image frames in the first buffer queue is facilitated.
Therefore, the first buffer queue can be determined from at least one buffer queue through the first identifier in the first buffer queue, so that the subsequent image processing of the first image frame is facilitated, and the efficiency of the image processing is improved.
In order to quickly and accurately determine the first buffer queue from the at least one buffer queue, in a possible embodiment, before the step of determining the first buffer queue from the at least one buffer queue according to the first identifier, the method may further include the following steps:
determining a first identifier of the first application under the condition that the first application is detected to be started;
and setting the parameter value of the interface parameter of the first buffer queue as a first identifier.
In the case of detecting that the first application is started, determining a first identification of the first application, wherein the first identification can be determined according to the name of an installation package of the first application.
Specifically, an identifier generation algorithm may be invoked to generate a first identifier according to a name of an installation package of the first application, where the first identifier is used to indicate a calling procedure of an application process of the first application.
And setting the parameter value of the interface parameter of the first buffer queue as a first identifier, so that the first buffer queue can be conveniently determined from at least one buffer queue according to the first identifier.
In addition, the parameter value of the interface parameter of the operation interface of the second buffer queue can be set as the first identifier, so that the second buffer queue can be determined from at least one buffer queue according to the first identifier.
Because the embodiment of the application needs to set the parameter value of the interface parameter of the first buffer queue as the first identifier, the calling method in the buffer queue needs to be modified in the application frame code layer of the system, and when an application program calls the creating method of the buffer queue to create the buffer queue, the original request creating logic needs to be modified. The specific implementation mode is as follows:
in a possible embodiment, before the step of setting the parameter value of the interface parameter of the first buffer queue to the first identifier, the method may further include the following steps:
and expanding interface parameters of an operation interface of the first buffer queue, wherein the interface parameters are used for indicating application identification.
In addition, the interface parameters of the operation interface of the second buffer queue can be extended, and the interface parameters are used for indicating the application identifier.
In order to enable SF processes to identify buffer queues corresponding to different application processes, interface parameters of operation interfaces of the first buffer queue and the second buffer queue need to be extended, where the interface parameters are used to indicate application identifiers.
The SF can monitor the buffer queue operation action of the appointed application process by expanding the interface source code implementation method related to the buffer queue module of the system. The buffer queue is an interactive intermediate component for providing image buffer zone interaction between the application process and the SF process service, so that the operation interface of the buffer queue can be expanded, interface parameters of the operation interfaces of the first buffer queue and the second buffer queue are specifically expanded, the interface parameters are used for indicating application identifiers, and the application identifiers are used for marking calling processes of the application process.
Wherein, the operation interface includes: an image cache producer interface (Graphic Buffer Producer Interface) and an image cache consumer interface (Graphic Buffer Consumer Interface), the producer interface for inheritance and implementation by an application process, the producer interface acting to produce a game image frame data buffer, an image cache object; the consumer interface is used for inheriting and realizing the SF process and other system service components, and is used for performing some operations on the generated image frame data buffer area, such as rotating the image, enlarging the image to the same size as the resolution of the display screen, and cutting out invisible image areas.
Accordingly, when the first application is detected to be started, that is, when the game picture super-resolution display effect is to be enhanced for the game process, the creating method of the buffer queue is called, the first identification of the first application is determined, and the first identification is filled into the interface method of the producer interface, so that when other processes in the system acquire the interface, the application corresponding to the created application process can be judged.
The method can specifically expand the producer interface to enable the interface parameters of the producer interface to support field identification, and the field type is integer; the consumer interface is extended so that the interface parameters of the consumer interface support field identification, and the field type is integer.
Step 120, performing image post-processing on the first image frame to generate a second image frame;
the step of generating the second image frame is realized by running codes of image post-processing built in the electronic equipment, source codes of the first application are not required to be changed, the processing process of the first application is unchanged, interference to the first application is avoided, and stability of the first application is not affected.
The image processing process can be suitable for a plurality of first applications needing image post-processing in the electronic equipment, and the resource utilization rate can be improved.
In one possible embodiment, the system process of the electronic device has an operation code of image post-processing, and the system process is used for performing image post-processing on the first image frame to generate a second image frame;
wherein the running code of the image post-processing comprises: the running code of the image super-segmentation algorithm and/or the running code of the image frame inserting algorithm.
It will be appreciated that a process is a binary executable, i.e., binary executable code. The running code of the image post-processing can be understood as a binary executable program having the image post-processing function.
The running code of the SF process is provided with new function codes, and the new function codes comprise: run code and buffer queue creation code for image post-processing. The functions realized by the method comprise: creating an additional second buffer queue object when initializing a process, and initializing an image post-processing frame module in the electronic device when starting a new function code; the image post-processing frame module comprises: run code for image post-processing.
Wherein the running code of the image post-processing comprises: the operation code of the image super-segmentation algorithm and the operation code of the image frame insertion algorithm are respectively described below:
image super-resolution algorithms aim to convert low resolution images to high resolution images, for example 480p resolution video to 1080p resolution video. Common image superfractionation algorithms include interpolation, statistical-based algorithms, and learning-based algorithms.
Wherein, interpolation method: the simplest image super-resolution method is interpolation, which interpolates pixel values in a low resolution image directly into a high resolution image. The most common interpolation method is bilinear interpolation, but this method is less effective at the edges.
Statistical-based algorithms: improved methods are statistical-based algorithms such as least squares reconstruction and learning-based mapping algorithms. These algorithms use statistical knowledge to better understand the image and computationally optimize to generate a more accurate image.
Learning-based algorithms: recent developments have been to implement image superfractionation using deep learning algorithms.
The image interpolation algorithm generally carries out intermediate interpolation on two adjacent image frames to generate a new image frame which is displayed in a screen, so that a first number of image frames rendered by a first application are displayed in a screen in a second number of image frames, and the display frame rate of a game video is improved; the user feels the improvement of the frame rate of the game, and the picture is smoother; the second number is greater than the first number, and the second number may be 2 times the first number.
Therefore, the running code suitable for image post-processing for improving the game image quality is integrated in the system, has no direct relation with the source code of the first application, and is convenient for updating and upgrading the software and hardware systems in the electronic equipment.
In a possible embodiment, in step 120, the following steps may be specifically included:
and calling an operation code of an image super-division algorithm, and performing image processing on the first image frame to generate a second image frame.
As shown in fig. 2, an application process of a first application is submitted to a first image frame of a system as an input image, an operation code of an image super-resolution algorithm is called, and after a display effect is enhanced by the first image frame with low resolution, the first image frame is expanded to a second image frame with the resolution consistent with that of a display area of a display screen of an electronic device, so that the displayed application picture effect is far clearer than the picture effect which is directly amplified and displayed to the display area of the display screen by the system.
Therefore, the running code of the image super-division algorithm is called, the first image frame is subjected to image processing to generate the second image frame, the enhancement of the picture effect is realized, and the second image frame is scaled to the size consistent with the resolution of the display screen, so that the purpose of improving the image display definition is achieved.
In a possible embodiment, in step 120, the following steps may be specifically included:
invoking an operation code of an image interpolation algorithm, performing image processing on a first number of first image frames, and generating a second number of second image frames; the second number is greater than the first number, the first number being a positive integer greater than 1.
The double buffer queue mechanism of the first buffer queue and the second buffer queue can separate the frame rate updating rhythm of image drawing of the application process from the frame rate rhythm of frame display of the SF, so that the display frame rate of the SF can be conveniently improved to a high frame rate, for example, an intermediate frame is interpolated between adjacent image frames submitted by the game process through AI hardware, and the display frame rate is improved. For example, the first number is 30; the first number is 60.
As shown in fig. 3, the running code of the image interpolation algorithm is invoked to perform image processing on a first number of first image frames to generate a second number of second image frames, the second number being greater than the first number, thereby enabling more image frames to be generated such that a third image frame is displayed at a higher frame rate.
Here, by calling the running code of the image frame inserting algorithm, image processing is performed on the first image frames of the first number, and the second image frames of the second number are generated, so that the power consumption overhead of the graphics processor can be reduced, and the display frame rate in unit time can be improved.
Therefore, the double buffer queue mechanism of the first buffer queue and the second buffer queue enables the progress of generating the first image frame and the progress of displaying the third image frame of the application process to be spaced apart, and is convenient for improving the image quality.
Step 130, storing the second image frame in a second buffer queue.
And storing the second image frames in a second buffer queue, informing the SF process to acquire the second image frames in the second buffer queue, and then carrying out subsequent display synthesis and displaying on a display screen.
And for the running code for calling the image interpolation algorithm, performing image processing on the first image frames of the first number, generating a second image frame of a second number, wherein the second image frame comprises the first image frame and also comprises a newly generated intermediate image frame, submitting the second image frame of the second number to an SF process, and setting the SF to display the second image frame of the second number at proper time intervals.
For example, if the application process generates first image frames at a rate of 30 frames per second, and the image processing module performs image processing on a first number of the first image frames by running code of an image interpolation algorithm, a second number of the second image frames is generated. The second number can be 2 times of the first number, so that 30 frames per second game pictures can be displayed at the rate of 60 frames per second, and the animation of characters in the game pictures can be smoother, and the game video is smoother.
In step 140, a third image frame is displayed, and the third image frame is obtained according to the second image frame in the second buffer queue.
After the SF performs appropriate rotation operation on all the second image frames stored in the image processing module, the HWC may perform display synthesis and display the resultant image frame on the display screen, that is, display the third image frame on the display screen. Therefore, the image processing scheme of the embodiment of the application can be rapidly applied to different applications, and solves the problem of compatibility existing when the new technology pushed by the prior application program is applied to different hardware platforms.
In addition, the image processing process can be suitable for a plurality of first applications needing image post-processing in the electronic equipment, so that the resource utilization rate can be improved.
In addition, a developer of the electronic equipment can independently control the new technology to be in upgrading iteration of different hardware platforms, and can be quickly adapted to different applications when the electronic equipment with a new model is released, so that the image processing algorithm developed by the developer of the electronic equipment is maximally adapted to the new hardware platform, and the image quality experience of an application picture is greatly improved.
In the embodiment of the application, the first buffer queue is determined from at least one buffer queue, the first image frame of the first application is stored in the first buffer queue, so that the first buffer queue corresponding to the first application needing to perform image post-processing can be determined from the at least one buffer queue, the subsequent image post-processing of the first image frame in the first buffer queue is facilitated, then the electronic equipment performs the image post-processing of the first image frame to generate the second image frame, and because the process is not required to be executed by an application process, development and maintenance of image post-processing source codes by all application sides are not required, the efficiency is improved, the second image frame is stored in the second buffer queue, and finally, the third image frame obtained according to the second image frame in the second buffer queue is displayed. Therefore, the image display effect of the first application can be improved, the image processing process can be suitable for any first application needing image post-processing in the electronic equipment, development and maintenance of image post-processing source codes by each application side are avoided, and efficiency is improved.
According to the image processing method provided by the embodiment of the application, the execution subject can be electronic equipment. In the embodiment of the application, an image processing method executed by an electronic device is taken as an example, and the electronic device provided by the embodiment of the application is described.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present application, where the electronic device 400 includes:
a first determining module 410, configured to determine a first buffer queue from at least one buffer queue, where a first image frame of a first application is stored in the first buffer queue;
an image processing module 420, configured to perform image post-processing on the first image frame to generate a second image frame;
a storage module 430 for storing the second image frame in a second buffer queue;
the display module 440 is configured to display a third image frame, where the third image frame is obtained according to the second image frame in the second buffer queue.
In one possible embodiment, the system process of the electronic device has an operation code of image post-processing, and the system process is used for performing image post-processing on the first image frame to generate a second image frame;
wherein the running code of the image post-processing comprises: the running code of the image super-segmentation algorithm and/or the running code of the image frame inserting algorithm.
In one possible embodiment, the image processing module 420 is specifically configured to:
and calling an operation code of an image super-division algorithm, and performing image processing on the first image frame to generate a second image frame.
In one possible embodiment, the image processing module 420 is specifically configured to:
invoking an operation code of an image interpolation algorithm, performing image processing on a first number of first image frames, and generating a second number of second image frames; the second number is greater than the first number, the first number being a positive integer greater than 1.
In one possible embodiment, the first determining module 410 is specifically configured to:
determining a first buffer queue from at least one buffer queue according to the first identifier, wherein the first buffer queue corresponds to the first identifier; the first application corresponds to the first identifier.
In one possible embodiment, the electronic device 400 may further include:
the second determining module is used for determining a first identifier of the first application under the condition that the first application is detected to be started;
the setting module is used for setting the parameter value of the interface parameter of the first buffer queue as a first identifier.
In one possible embodiment, the electronic device 400 may further include:
The creating module is used for creating a first buffer queue corresponding to the first application under the condition of starting the first application.
In the embodiment of the application, the first buffer queue is determined from at least one buffer queue, the first image frame of the first application is stored in the first buffer queue, so that the first buffer queue corresponding to the first application needing to perform image post-processing can be determined from the at least one buffer queue, the subsequent image post-processing of the first image frame in the first buffer queue is facilitated, then the electronic equipment performs the image post-processing of the first image frame to generate the second image frame, and because the process is not required to be executed by an application process, development and maintenance of image post-processing source codes by all application sides are not required, the efficiency is improved, the second image frame is stored in the second buffer queue, and finally, the third image frame obtained according to the second image frame in the second buffer queue is displayed. Therefore, the image display effect of the first application can be improved, the image processing process can be suitable for any first application needing image post-processing in the electronic equipment, development and maintenance of image post-processing source codes by each application side are avoided, and efficiency is improved.
The electronic device in the embodiment of the application can also be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The electronic device of the embodiment of the application can be an electronic device with an action system. The action system may be an Android (Android) action system, an iOS action system, or other possible action systems, and the embodiment of the application is not limited specifically.
The electronic device provided by the embodiment of the present application can implement each process implemented by the above method embodiment, and in order to avoid repetition, details are not repeated here.
Optionally, as shown in fig. 5, the embodiment of the present application further provides an electronic device 510, including a processor 511, a memory 512, and a program or an instruction stored in the memory 512 and capable of being executed on the processor 511, where the program or the instruction implements each step of any one of the above embodiments of the image processing method when executed by the processor 511, and the steps achieve the same technical effects, and for avoiding repetition, a description is omitted herein.
The electronic device of the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
Those skilled in the art will appreciate that the electronic device 600 may further include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 610 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 610 is configured to determine a first buffer queue from at least one buffer queue, where a first image frame of a first application is stored;
the processor 610 is further configured to perform image post-processing on the first image frame to generate a second image frame;
a memory 609 for storing the second image frame in a second buffer queue;
and a display unit 606, configured to display a third image frame, where the third image frame is obtained according to the second image frame in the second buffer queue.
Optionally, the system process of the electronic device 600 has an operation code for image post-processing, where the system process is used to perform image post-processing on the first image frame to generate a second image frame;
wherein the running code of the image post-processing comprises: the running code of the image super-segmentation algorithm and/or the running code of the image frame inserting algorithm.
Optionally, the processor 610 is further configured to invoke an operation code of the image super-division algorithm to perform image processing on the first image frame to generate a second image frame.
Optionally, the processor 610 is further configured to invoke an operation code of an image frame inserting algorithm, perform image processing on the first number of first image frames, and generate a second number of second image frames; the second number is greater than the first number, the first number being a positive integer greater than 1.
Optionally, the processor 610 is further configured to determine, according to the first identifier, a first buffer queue from at least one buffer queue, where the first buffer queue corresponds to the first identifier; the first application corresponds to the first identifier.
Optionally, the processor 610 is further configured to determine, in case of detecting that the first application is launched, a first identification of the first application;
the processor 610 is further configured to set a parameter value of an interface parameter of the first buffer queue to a first identifier.
Optionally, the processor 610 is further configured to create a first buffer queue corresponding to the first application in case the first application is started.
In the embodiment of the application, the first buffer queue is determined from at least one buffer queue, the first image frame of the first application is stored in the first buffer queue, so that the first buffer queue corresponding to the first application needing to perform image post-processing can be determined from the at least one buffer queue, the subsequent image post-processing of the first image frame in the first buffer queue is facilitated, then the electronic equipment performs the image post-processing of the first image frame to generate the second image frame, and because the process is not required to be executed by an application process, development and maintenance of image post-processing source codes by all application sides are not required, the efficiency is improved, the second image frame is stored in the second buffer queue, and finally, the third image frame obtained according to the second image frame in the second buffer queue is displayed. Therefore, the image display effect of the first application can be improved, the image processing process can be suitable for any first application needing image post-processing in the electronic equipment, development and maintenance of image post-processing source codes by each application side are avoided, and efficiency is improved.
It should be appreciated that in an embodiment of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes image data of still pictures or video images obtained by an image capturing apparatus (e.g., a camera) in a video image capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an action system. The processor 610 may integrate an application processor that primarily processes action systems, user pages, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 609 may include volatile memory or nonvolatile memory, or the memory x09 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 609 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the above image processing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, a detailed description is omitted here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the embodiment of the image processing method, and can achieve the same technical effects, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described image processing method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (16)

1. An image processing method, applied to an electronic device, comprising:
determining a first buffer queue from at least one buffer queue, wherein the first buffer queue stores first image frames of a first application;
performing image post-processing on the first image frame to generate a second image frame;
storing the second image frame in a second buffer queue;
and displaying a third image frame, wherein the third image frame is obtained according to the second image frame in the second buffer queue.
2. The method of claim 1, wherein the system process of the electronic device has an operation code for image post-processing, and the system process is configured to perform image post-processing on the first image frame to generate the second image frame;
wherein the running code of the image post-processing includes: the running code of the image super-segmentation algorithm and/or the running code of the image frame inserting algorithm.
3. The method of claim 2, wherein the performing image post-processing on the first image frame to generate a second image frame comprises:
and calling an operation code of the image super-division algorithm, performing image processing on the first image frame, and generating the second image frame.
4. The method of claim 2, wherein the performing image post-processing on the first image frame to generate a second image frame comprises:
invoking an operation code of the image frame inserting algorithm, performing image processing on a first number of the first image frames, and generating a second number of second image frames; the second number is greater than the first number, which is a positive integer greater than 1.
5. The method of claim 1, wherein said determining a first buffer queue from at least one buffer queue comprises:
determining a first buffer queue from at least one buffer queue according to a first identifier, wherein the first buffer queue corresponds to the first identifier; the first application corresponds to the first identifier.
6. The method of claim 5, wherein prior to determining the first buffer queue from at least one of the buffer queues according to a first identification, the method further comprises:
determining the first identification of the first application in case of detecting that the first application is started;
setting the parameter value of the interface parameter of the first buffer queue as the first identifier.
7. The method of claim 1, wherein prior to determining the first buffer queue from the at least one buffer queue, the method further comprises:
and under the condition of starting a first application, creating a first buffer queue corresponding to the first application.
8. An electronic device, the electronic device comprising:
a first determining module, configured to determine a first buffer queue from at least one buffer queue, where a first image frame of a first application is stored in the first buffer queue;
the image processing module is used for carrying out image post-processing on the first image frame to generate a second image frame;
the storage module is used for storing the second image frames in a second buffer queue;
and the display module is used for displaying a third image frame, wherein the third image frame is obtained according to the second image frame in the second buffer queue.
9. The electronic device of claim 8, wherein the system process of the electronic device has an operation code for image post-processing, and the system process is configured to perform image post-processing on the first image frame to generate the second image frame;
wherein the running code of the image post-processing includes: the running code of the image super-segmentation algorithm and/or the running code of the image frame inserting algorithm.
10. The electronic device according to claim 9, wherein the image processing module is specifically configured to:
and calling an operation code of the image super-division algorithm, performing image processing on the first image frame, and generating the second image frame.
11. The electronic device according to claim 9, wherein the image processing module is specifically configured to:
invoking an operation code of the image frame inserting algorithm, performing image processing on a first number of the first image frames, and generating a second number of second image frames; the second number is greater than the first number, which is a positive integer greater than 1.
12. The electronic device of claim 8, wherein the first determining module is specifically configured to:
determining a first buffer queue from at least one buffer queue according to a first identifier, wherein the first buffer queue corresponds to the first identifier; the first application corresponds to the first identifier.
13. The electronic device of claim 12, wherein the electronic device further comprises:
a second determining module, configured to determine, when it is detected that the first application is started, the first identifier of the first application;
And the setting module is used for setting the parameter value of the interface parameter of the first buffer queue as the first identifier.
14. The electronic device of claim 8, wherein the electronic device further comprises:
the system comprises a creation module, a first buffer queue and a second buffer queue, wherein the creation module is used for creating the first buffer queue corresponding to a first application under the condition of starting the first application.
15. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method of any one of claims 1 to 7.
16. A readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the steps of the method according to any of claims 1-7.
CN202311177668.9A 2023-09-11 2023-09-11 Image processing method, electronic device, and readable storage medium Pending CN117156059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311177668.9A CN117156059A (en) 2023-09-11 2023-09-11 Image processing method, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311177668.9A CN117156059A (en) 2023-09-11 2023-09-11 Image processing method, electronic device, and readable storage medium

Publications (1)

Publication Number Publication Date
CN117156059A true CN117156059A (en) 2023-12-01

Family

ID=88911830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311177668.9A Pending CN117156059A (en) 2023-09-11 2023-09-11 Image processing method, electronic device, and readable storage medium

Country Status (1)

Country Link
CN (1) CN117156059A (en)

Similar Documents

Publication Publication Date Title
CN108010112B (en) Animation processing method, device and storage medium
KR101239029B1 (en) Multi-buffer support for off-screen surfaces in a graphics processing system
JP2024505995A (en) Special effects exhibition methods, devices, equipment and media
EP4050561A1 (en) Augmented reality-based display method, device, and storage medium
US20220241689A1 (en) Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium
CN112053449A (en) Augmented reality-based display method, device and storage medium
CN113141537A (en) Video frame insertion method, device, storage medium and terminal
CN109065001B (en) Image down-sampling method and device, terminal equipment and medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN107943805A (en) A kind of animation renders and dissemination method, device
CN106648623B (en) Display method and device for characters in android system
CN116091329B (en) Image processing method, device, equipment and storage medium
CN117156059A (en) Image processing method, electronic device, and readable storage medium
CN115988265A (en) Rendering method and device of display picture and terminal equipment
CN115410133A (en) Video dense prediction method and device
CN116966546A (en) Image processing method, apparatus, medium, device, and program product
CN111708533B (en) Method and device for setting mouse display state in application thin client
CN116129534A (en) Image living body detection method and device, storage medium and electronic equipment
CN114820318A (en) Wallpaper display method and device, electronic equipment and readable storage medium
CN113791857A (en) Application window background fuzzy processing method and device in Linux system
CN112418942A (en) Advertisement display method and device and electronic equipment
WO2024087971A1 (en) Method and apparatus for image processing, and storage medium
CN116912093A (en) Picture rendering method and device, electronic equipment and storage medium
CN117372597A (en) Animation rendering method and device, electronic equipment and readable storage medium
CN116823669A (en) Image processing method, device, electronic equipment and storage medium

Legal Events

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