Image processing method, device, computer readable storage medium and electronic device

By using the graphics processor and the data processor to share the layer processing tasks in the vehicle, the problem of excessive load of the graphics processor is solved, and efficient resource utilization and performance improvement are achieved.

CN118552671BActive Publication Date: 2025-01-14BYD CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411019772.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2025-01-14
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

The vehicle's graphics processor is limited, and forced layer synthesis processing through the graphics processor leads to waste of resources and affects the performance of the vehicle.

Method used

The layer data that needs image effect processing is processed through the graphics processor, and the data processor performs layer synthesis of the layer data that does not need to be processed to avoid unnecessary graphics processor load.

Benefits of technology

Save graphics processor resources, improve vehicle performance, and improve the flexibility and efficiency of layer synthesis processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552671B_ABST
    Figure CN118552671B_ABST
Patent Text Reader

Abstract

The present application relates to an image processing method, device, computer-readable storage medium and electronic device, which determine first layer data and second layer data of an image, wherein the first layer data is layer data in the image that needs to be processed for image effects, and the second layer data is layer data in the image that does not need to be processed for image effects; image effects are processed on the first layer data by a graphics processor to obtain third layer data; layer synthesis is performed on the third layer data and the second layer data by a data processor to obtain frame data of the image, and the frame data is used for display on a display device, thereby saving a graphics processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and in particular to an image processing method, device, computer-readable storage medium, and electronic device. Background Art

[0002] With the development of science and technology, vehicles are becoming more and more intelligent. For example, vehicles are equipped with display devices, which can display content on the display devices of the vehicles. In the process of displaying content on the display device, layer synthesis processing must be performed first to obtain the displayed content.

[0003] When image effects processing is required for layer content, the graphics processor will be forced to perform image effects processing and layer synthesis processing. However, the vehicle's graphics processor is limited, and forcing the graphics processor to perform layer synthesis processing will result in a waste of graphics processors and affect the performance of the vehicle. Summary of the invention

[0004] The embodiments of the present application provide an image processing method, an apparatus, a computer-readable storage medium, and an electronic device to save a graphics processor to at least partially solve the above-mentioned technical problems.

[0005] In order to achieve the above object, according to a first aspect of the present application, there is provided an image processing method, comprising:

[0006] Determine first layer data and second layer data of the image, wherein the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with image effects;

[0007] Performing image effect processing on the first layer data by a graphics processor to obtain third layer data;

[0008] The third layer data and the second layer data are subjected to layer synthesis processing by a data processor to obtain frame data of the image, and the frame data is used for displaying on a display device.

[0009] Optionally, the performing image effect processing on the first layer data by a graphics processor to obtain the third layer data includes:

[0010] Performing image effect processing on the first layer data by a graphics processor to obtain processed first layer data;

[0011] The first layer data after the above processing is subjected to layer synthesis processing to obtain the third layer data.

[0012] Optionally, the determining of the first layer data and the second layer data of the image includes:

[0013] Acquire a layer size parameter of at least one target layer data in a layer data set of an image, wherein the target layer data includes the first layer data and the second layer data, and the layer size parameter is used to indicate a layer size corresponding to the first layer data;

[0014] Determine whether the above layer size parameters meet the preset size parameter conditions;

[0015] When the layer size parameter satisfies the preset size parameter condition, the first layer data and the second layer data of the image are screened out from the target layer data.

[0016] Optionally, the above method further includes:

[0017] When the above-mentioned layer size parameters do not meet the above-mentioned preset size parameter conditions, the above-mentioned graphics processor performs image effect processing on the above-mentioned target layer data to obtain processed layer data, and after layer synthesis processing is performed on the above-mentioned processed layer data, it is displayed on the above-mentioned display device.

[0018] Optionally, the determining whether the layer size parameter satisfies a preset size parameter condition includes:

[0019] Obtaining the size parameters of the display area of ​​the above display device;

[0020] When the size ratio between the layer size parameter and the display area size parameter is less than or equal to a preset size threshold, it is determined that the layer size parameter meets the preset size parameter condition;

[0021] When the size ratio between the layer size parameter and the size parameter of the display area is greater than the preset size threshold, it is determined that the layer size parameter does not satisfy the preset size parameter condition.

[0022] Optionally, before determining the first layer data and the second layer data, the method further includes:

[0023] Acquire the type of image effect processing of target layer data in the layer data set of the image, wherein the target layer data includes the first layer data and the second layer data;

[0024] The above-mentioned determining of the first layer data and the second layer data includes:

[0025] When the above type is a local image effect processing type, the above first layer data and the above second layer data of the above image are determined from the above target layer data.

[0026] Optionally, after obtaining the type of image effect processing of the target layer data in the layer data set of the image, the method further includes:

[0027] When the above type is the overall image effect processing type, the above target layer data is processed with the above graphics processor to obtain processed target layer data, and after layer synthesis processing is performed on the above processed target layer data, it is displayed on the above display device.

[0028] Optionally, the determining of the first layer data and the second layer data of the image includes:

[0029] Sending a synthesis message to a graphics synthesis service based on the interface data, wherein the interface data includes application interface data in the display device and / or system interface data in the display device;

[0030] When the graphic synthesis service detects a vertical synchronization signal, generating layer data corresponding to the interface data;

[0031] The first layer data and the second layer data of the image are determined according to the layer data.

[0032] Optionally, the determining of the first layer data and the second layer data of the image includes:

[0033] Acquire initial layer data, where the initial layer data is layer data of an image corresponding to a display interface of a display device;

[0034] Determine whether a display position of the initial layer data on the display device and a display area of ​​the display device overlap;

[0035] When the above-mentioned coincidence relationship exists, the above-mentioned initial layer data is added to the layer data set;

[0036] The first layer data and the second layer data are selected from the layer data set.

[0037] According to a second aspect of the present application, there is provided an image processing device, comprising:

[0038] A data determination module, used to determine first layer data and second layer data of an image, wherein the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with the image effects;

[0039] A first processing module, configured to perform image effect processing on the first layer data through a graphics processor to obtain third layer data;

[0040] The second processing module is used to perform layer synthesis processing on the third layer data and the second layer data through a data processor to obtain frame data of the above image, and the above frame data is used to display on a display device.

[0041] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions, and the processor loads instructions from the memory to execute any image processing method provided in the embodiment of the present application.

[0042] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute any image processing method provided in the embodiment of the present application.

[0043] In an embodiment of the present application, first layer data and second layer data of an image are determined, the first layer data being layer data in the image that needs to be processed for image effects, and the second layer data being layer data in the image that does not need to be processed for image effects; image effects are processed on the first layer data by a graphics processor to obtain third layer data; layer synthesis processing is performed on the third layer data and the second layer data by a data processor to obtain frame data of the above-mentioned image, and the above-mentioned frame data is used for display on a display device, so that image effects processing is performed only on the first layer data that needs to be processed for image effects by the graphics processor, and layer synthesis processing is performed on the second layer data by the data processor, and there is no need to perform layer synthesis processing on the second layer data by the graphics processor, thereby saving graphics processors and improving vehicle computer performance.

[0044] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0046] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same figure numbers represent the same parts in the following description.

[0047] Figure 1 is a flowchart of an image processing method provided in an exemplary embodiment of the present application;

[0048] Figure 2is a schematic diagram of layers provided in an exemplary embodiment of the present application;

[0049] Figure 3 is a schematic diagram of a process for determining whether to perform layer synthesis processing provided in an exemplary embodiment of the present application;

[0050] Figure 4 is a schematic diagram of performing layer synthesis processing provided in an exemplary embodiment of the present application;

[0051] Figure 5 is another schematic diagram of performing layer synthesis processing provided in an exemplary embodiment of the present application;

[0052] Figure 6 is another schematic diagram of an image processing method provided in an exemplary embodiment of the present application;

[0053] Figure 7 is another schematic diagram of an image processing method provided in an exemplary embodiment of the present application;

[0054] Figure 8 is a schematic diagram of an image processing device provided in an exemplary embodiment of the present application;

[0055] Fig. 9 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of the present application;

[0056] Description of reference numerals:

[0057] The layer corresponding to the status bar layer data is: 201; the layer corresponding to the first layer data is: 2021; the layer corresponding to the second layer data is: 2022; the layer corresponding to the navigation bar data is: 203. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0059] The embodiments of the present application provide an image processing method, device, electronic device, and computer-readable storage medium. Specifically, the image processing method of the embodiments of the present application can be performed by an electronic device, wherein the electronic device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), and a vehicle-mounted terminal.

[0060] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.

[0061] An embodiment of the present application provides an image processing method. Figure 1 FIG. 1 is a flowchart of an image processing method provided by an exemplary embodiment of the present application. Figure 1 As shown, the image processing method comprises the following steps:

[0062] S101. Determine first layer data and second layer data of an image, where the first layer data is layer data in the image that needs to be processed for image effects, and the second layer data is layer data in the image that does not need to be processed for image effects.

[0063] Among them, the image is the image to be displayed on the display device, that is, it refers to the frame image to be displayed on the display device. The first layer data and the second layer data can be layer data corresponding to different layers in the image, that is, the first layer data is the data corresponding to one layer, and the second layer data is the data corresponding to another layer. For example, the first layer data is the layer data corresponding to the status bar layer, and the second layer data is the layer data corresponding to the background layer, or the first layer data and the second layer data can be layer data corresponding to the same layer in the image, that is, the layer corresponding to the first layer data can be the area in the target layer of the image that needs to be processed with image effects, and the layer corresponding to the second layer data can be the area in the target layer that does not need to be processed with image effects, the target layer is the layer corresponding to the target layer data, and the target layer data includes the first layer data and the second layer data.

[0064] Image effect processing refers to processing that can change the display effect of the layer corresponding to the layer data. It can be set according to actual conditions. For example, the image effect processing can be Gaussian blur processing or contrast enhancement processing, which is not limited in the embodiments of the present application.

[0065] Optionally, the first layer data and the second layer data can be determined from the layer data set. When the first layer data and the second layer data are layer data corresponding to different layers, a target identifier can be set. When the layer data in the layer data set includes the target identifier, it indicates that the layer data needs to be processed with image effects, and the layer data can be called the first layer data. When the layer data does not include the target identifier, it indicates that the layer data does not need to be processed with image effects, and the layer data can be called the second layer data. When the first layer data and the second layer data are layer data corresponding to the same layer, the layer data set can include target layer data and non-target layer data, and a target identifier is set. When the layer data in the layer data set includes the target identifier, it indicates that the layer data needs to be processed with image effects, and the layer data can be called the target layer data. The first layer data and the second layer data are determined from the target layer data. When the layer data does not include the target identifier, it indicates that the layer data does not need to be processed with image effects, and the layer data can be called the non-target layer data.

[0066] The number of non-target layer data can be set according to actual conditions, and the embodiment of the present application does not limit it here.

[0067] For example, when the first layer data and the second layer data are layer data corresponding to the same layer, the layer data set includes status bar layer data, background layer data and navigation bar layer data, the target layer data is the background layer data, the status bar layer data and the navigation bar layer data are non-target layer data, the background layer data includes the first layer data and the second layer data, and the layer corresponding to the status bar layer data can be as follows Figure 2 As shown in 201, the layer corresponding to the first layer data can be as follows Figure 2 2021 shown in , the layer corresponding to the second layer data can be as follows Figure 2 As shown in 2022, the layer corresponding to the navigation bar layer data can be as follows Figure 2 203 shown in .

[0068] The layer data set is used to store the layer data to be displayed on the display device, that is, the layer data set is used to store the layer data included in the image. The layer data may include application layer data and / or system layer data. The application layer data is data generated according to the interface data corresponding to each application. One interface data can generate one layer data. The interface data of the application can also be called logical window image data (data corresponding to the surface), which refers to the data displayed on the application.

[0069] System layer data is layer data generated according to the interface data of the operating system, which may include at least one of status bar layer data, navigation bar layer data, notification bar layer data, background layer data, and lock screen layer data. The interface data of the operating system refers to the data displayed by the operating system on the graphical user interface.

[0070] When detecting that there is initial layer data of the display interface on the display device, the terminal may store the initial layer data in a layer data set, and determine the first layer data and the second layer data from the layer data set.

[0071] When the terminal detects that there is initial layer data of the display interface on the display device, it can determine whether the layer corresponding to the initial layer data is displayed on the display area of ​​the display device. If the layer corresponding to the initial layer data is displayed on the display area of ​​the display device, the initial layer data is stored in the layer data set. At this time, the first layer data and the second layer data of the image are determined, including:

[0072] Acquire initial layer data, where the initial layer data is layer data of an image corresponding to a display interface of a display device;

[0073] Determine whether the display position of the initial layer data on the display device and the display area of ​​the display device overlap;

[0074] When there is an overlap relationship, the initial layer data is added to the layer data set;

[0075] The first layer data and the second layer data of the image are filtered out from the layer data set.

[0076] When the initial layer data is detected, the layer corresponding to the initial layer data may be on the display interface of the display device, or the layer corresponding to the initial layer data may not be displayed on the display interface of the display device, or may be blocked when displayed on the display device. When the display position of the layer corresponding to the initial layer data overlaps with the display area of ​​the display device, it means that the layer corresponding to the initial layer data may be fully visible or partially visible, and the area where the fully visible or partially visible layer is located may be called a visible area.

[0077] It is understandable that the visible area of ​​the initial layer data may also be referred to as a dirty area. The dirty area refers to an area on the display device where the displayed content changes.

[0078] The display area of ​​a display device refers to the screen of the display device. If the display position of the initial layer data and the display area of ​​the display device overlap, it means that the user can see the layer corresponding to the initial layer data. At this time, the initial layer data can be added to the layer data set to avoid storing the initial layer data in the layer data set when the layer corresponding to the initial layer data is not displayed on the display area of ​​the display device, thereby saving the processor wasted on the layer synthesis processing of the layer data in the layer data set.

[0079] In some embodiments, determining first layer data and second layer data of an image includes:

[0080] Sending a synthesis message to a graphics synthesis service based on the interface data, the interface data including application interface data in the display device and / or system interface data in the display device;

[0081] When the graphic composition service detects a vertical synchronization signal, layer data corresponding to the interface data is generated, and first layer data and second layer data of the image are determined according to the layer data.

[0082] The interface data is obtained by obtaining at least one interface data. When the interface data includes multiple data, the multiple interface data may be each application interface data, or the multiple interface data may also be application interface data and system interface data. The layer data corresponding to the interface data may be called initial layer data.

[0083] When the terminal system is an Android system, the graphics synthesis service may also be called surfaceflinger, which refers to a service program that synthesizes the image data of various applications and logical windows in the applications into a physical window for display (framebuffer).

[0084] The vertical synchronization signal (VSYNC) refers to a synchronization pulse signal sent by the display device when it completes refreshing a frame of the picture. It indicates that the display device has completed all line scans of the current frame and is ready to display the next frame.

[0085] Determining the first layer data and the second layer data of the image according to the layer data can be understood as generating a layer data set according to the layer data, and determining the first layer data and the second layer data of the image from the layer data set. Alternatively, when the layer data includes multiple layers, the first layer data and the second layer data can be directly screened out from the layer data.

[0086] In an embodiment of the present application, a synthesis message is sent to a graphics synthesis service based on interface data, and the interface data includes application interface data in a display device and / or system interface data in a display device; when the graphics synthesis service detects a vertical synchronization signal, layer data corresponding to the interface data is generated, and based on the layer data, the first layer data and the second layer data of the image are determined, so as to avoid the graphics processor starting to process the data of the next frame while the display device is still displaying the current frame, thereby avoiding image tearing on the screen of the display device.

[0087] In some embodiments, before determining the first layer data and the second layer data of the image, the method further includes:

[0088] Acquire the type of image effect processing of target layer data in the layer data set of the image, where the target layer data includes first layer data and second layer data;

[0089] Determining first layer data and second layer data of an image includes:

[0090] When the type is a local image effect processing type, first layer data and second layer data of the image are determined from the target layer data.

[0091] At this time, after obtaining the type of image effect processing of the target layer data in the layer data set of the image, it also includes:

[0092] When the type is the overall image effect processing type, the target layer data is processed by the graphics processor to obtain the processed target layer data, and the processed target layer data is subjected to layer synthesis processing before being displayed on the display device.

[0093] Among them, the local image effect processing type refers to the type that only needs to perform image effect processing on part of the layer data in the target layer data, and the corresponding one is the overall image effect processing type. The overall image effect processing type refers to the type that performs image effect processing on the entire target layer data.

[0094] If the type is the overall image effect processing type, the target layer data is processed with an image effect by a graphics processor to obtain processed target layer data, and the processed target layer data is subjected to layer synthesis processing before being displayed on a display device.

[0095] In an embodiment of the present application, the type of image effect processing of the target layer data in the layer data set of the image is obtained. When the type is a local image effect processing type, the first layer data and the second layer data are determined from the target layer data, and the first layer data is processed by a graphics processor to perform image effect processing to obtain third layer data. The third layer data and the second layer data are processed by a data processor to perform layer synthesis processing. When the type is an overall image effect processing type, the target layer data is processed by a graphics processor to obtain processed target layer data, and layer synthesis processing is performed on the processed target layer data to further improve the flexibility of layer synthesis.

[0096] In some embodiments, determining first layer data and second layer data of an image includes:

[0097] Acquire a layer size parameter of at least one target layer data in a layer data set of an image, wherein the target layer data includes first layer data and second layer data, and the layer size parameter is used to indicate a layer size corresponding to the first layer data;

[0098] Determine whether the layer size parameters meet the preset size parameter conditions;

[0099] When the layer size parameter meets the preset size parameter condition, the first layer data and the second layer data of the image are filtered from the target layer data.

[0100] Among them, when there is one first layer data to be processed with image effects in the target layer data, the layer size parameter may be the size parameter corresponding to the layer of one first layer data, and when there are multiple first layer data, the layer size parameter may be the sum of the size parameters of the layers corresponding to the multiple first layer data. For example, the first layer data includes L1, L2 and L3, the size parameter of the layer corresponding to L1 is s1, the size parameter of the layer corresponding to L2 is s2, and the size parameter of the layer corresponding to L3 is s3, then the layer size parameter is (s1+s2+s3).

[0101] Optionally, the layer data set may include layer size parameters of the target layer data, and the terminal may read the layer size parameters directly from the layer data set. Alternatively, the terminal may first read the first layer data from the layer data set, and then determine the size parameters of the layer corresponding to the first layer data based on the first layer data, and finally determine the layer size parameters based on the size parameters of the layer corresponding to the first layer data.

[0102] In an embodiment of the present application, a layer size parameter of at least one target layer data in a layer data set of an image is obtained, the target layer data includes first layer data and second layer data, and the layer size parameter is used to indicate a layer size corresponding to the first layer data; it is determined whether the layer size parameter satisfies a preset size parameter condition; when the layer size parameter satisfies the preset size parameter condition, the first layer data and the second layer data are screened out from the target layer data, so as to determine whether a processor for performing layer synthesis processing on the layer data is a graphics processor or a graphics processor and a data processor according to the layer size parameter, thereby further saving graphics processors and improving the flexibility of layer synthesis.

[0103] In some embodiments, after determining whether the layer size parameter meets the preset size parameter condition, the embodiment of the present application further includes:

[0104] When the layer size parameters do not meet the preset size parameter conditions, the target layer data is processed by the graphics processor to obtain processed layer data, and the processed layer data is subjected to layer synthesis processing before being displayed on the display device.

[0105] Since the target layer data may include multiple ones, the processed layer data also includes multiple ones, and performing layer synthesis processing on the processed layer data may refer to performing layer synthesis processing on multiple processed layer data.

[0106] And / or, since the layer data set includes non-target layer data in addition to the target layer data, the non-target layer data may include first non-target layer data and / or second non-target layer data, the first non-target layer data is non-target layer data that needs to be synthesized through graphics processing, and the second non-target layer data is non-target layer data that needs to be synthesized through a data processor.

[0107] When the non-target layer data includes the first non-target layer data, the processed layer data and the first non-target layer data can be subjected to layer synthesis processing by a graphics processor, and after obtaining the fourth layer data, it is displayed on a display device.

[0108] When the non-target layer data includes the second non-target layer data, the processed layer data and the second non-target layer data can be subjected to layer synthesis processing by a data processor, and after obtaining the fifth layer data, the fifth layer data can be displayed on a display device.

[0109] When the non-target layer data includes first non-target layer data and second non-target layer data, the processed layer data and the first non-target layer data can be subjected to layer synthesis processing by a graphics processor to obtain fourth layer data, and the fourth layer data and the second non-target layer data can be subjected to layer synthesis processing by a data processor to obtain frame data and then displayed on a display device.

[0110] In an embodiment of the present application, when the layer size parameter does not meet the preset size parameter condition, when the layer size parameter does not meet the preset size parameter condition, the target layer data is processed by the graphics processor to obtain the processed layer data, and the processed layer data is subjected to layer synthesis processing before being displayed on the display device, so that when the layer size parameter is small, the first layer data is processed by the graphics processor for image effect, and the second layer data is processed by the data processor for layer synthesis processing, and when the layer size parameter is large, the target layer data is processed by the graphics processor for graphic effect processing and layer synthesis processing, thereby ensuring saving of the graphics processor and further improving the flexibility of layer synthesis.

[0111] In some embodiments, the method for determining whether the layer size parameters satisfy the preset size parameter conditions can be set according to actual conditions. For example, the method for determining whether the layer size parameters satisfy the preset size parameter conditions can be determined based on the layer size parameters and a preset size threshold. Alternatively, the method for determining whether the layer size parameters satisfy the preset size parameter conditions can be determined based on the layer size parameters and an idle graphics processor. This embodiment of the present application is not limited here.

[0112] In some embodiments, when determining whether the layer size parameter satisfies the preset size parameter condition according to the layer size parameter and the preset size threshold, determining whether the layer size parameter satisfies the preset size parameter condition includes:

[0113] Get the size parameters of the display area of ​​the display device;

[0114] When the size ratio between the layer size parameter and the display area size parameter is less than or equal to the preset size threshold, determining that the layer size parameter meets the preset size parameter condition;

[0115] When the size ratio between the layer size parameter and the size parameter of the display area is greater than a preset size threshold, it is determined that the layer size parameter does not meet the preset size parameter condition.

[0116] The size parameter of the display area of ​​the display device refers to the size parameter of the screen of the display device. The preset size threshold can be set according to actual conditions, for example, the preset size threshold can be 1 / 2 or 1 / 3, which is not limited in the embodiment of the present application.

[0117] Optionally, the preset size threshold may be a fixed value, or the preset size threshold may be dynamically changed according to the idle GPUs. The more idle GPUs there are, the smaller the preset size threshold is, and the fewer idle GPUs there are, the larger the preset size threshold is.

[0118] In an embodiment of the present application, the size parameters of the display area of ​​the display device are obtained, and when the size ratio between the layer size parameters and the size parameters of the display area is less than or equal to a preset size threshold, it is determined that the layer size parameters meet the preset size parameter conditions, and when the size ratio between the layer size parameters and the size parameters of the display area is greater than the preset size threshold, it is determined that the layer size parameters do not meet the preset size parameter conditions, so that when the layer size parameters are small, the first layer data is processed by the graphics processor for image effects and layer synthesis, and the second layer data is processed by the data processor for layer synthesis; when the layer size parameters are large, the first layer data is processed by the graphics processor for graphic effects and layer synthesis, and the second layer data is processed for layer synthesis, thereby ensuring that the graphics processor is saved and the flexibility of layer synthesis is further improved.

[0119] In some embodiments, when determining whether the layer size parameter satisfies a preset size parameter condition based on the layer size parameter and an idle graphics processor, determining whether the layer size parameter satisfies the preset size parameter condition comprises:

[0120] Get the idle GPUs;

[0121] Determine a first preset size threshold corresponding to an idle graphics processor;

[0122] When the layer size parameter is less than or equal to a first preset size threshold, determining that the layer size parameter satisfies a preset size parameter condition;

[0123] When the layer size parameter is greater than a first preset size threshold, it is determined that the layer size parameter does not satisfy a preset size parameter condition.

[0124] The more idle graphics processors there are, the smaller the first preset size threshold is, and the fewer idle graphics processors there are, the larger the first preset size threshold is.

[0125] In an embodiment of the present application, an idle graphics processor is obtained, and a first preset size threshold corresponding to the idle graphics processor is determined. When the layer size parameter is less than or equal to the first preset size threshold, it is determined that the layer size parameter satisfies the preset size parameter condition. When the layer size parameter is greater than the first preset size threshold, it is determined that the layer size parameter does not satisfy the preset size parameter condition. This enables real-time judgment based on the idle first preset size threshold whether the processor performing layer synthesis processing is a graphics processor, or a graphics processor and a data processor, to ensure that the speed of layer synthesis processing can be guaranteed while saving graphics processors.

[0126] S102: Perform image effect processing on the first layer data by using a graphics processor to obtain third layer data.

[0127] After obtaining the first layer of data, the terminal calls a graphics processing unit (GPU) to perform image effect processing on the first layer of data to obtain the third layer of data.

[0128] S103: Perform layer synthesis processing on the third layer data and the second layer data by a data processor to obtain frame data of an image, and the frame data is used for displaying on a display device.

[0129] Among them, after the third layer data and the second layer data are subjected to layer synthesis processing by the data processor, the frame data of the image can be obtained. The frame data refers to the data corresponding to the frame picture to be displayed on the display device (the frame picture to be displayed on the display device can also be called the image to be displayed on the display device). After obtaining the frame data, the image is displayed on the display device according to the frame data.

[0130] After obtaining the second layer data, the terminal calls a data processor (Data Processing Unit, DPU) to perform layer synthesis processing on the third layer data and the second layer data to obtain frame data.

[0131] In some embodiments, performing image effect processing on the first layer data by a graphics processor to obtain the third layer data includes:

[0132] Performing image effect processing on the first layer data by a graphics processor to obtain processed first layer data;

[0133] The processed first layer data is subjected to layer synthesis processing to obtain third layer data.

[0134] Among them, when the first layer data and the second layer data are layer data of different layers, if the first layer data includes multiple layers, layer synthesis processing is performed on the processed first layer data to obtain third layer data, which can be understood as layer synthesis processing is performed on multiple processed first layer data to obtain third layer data. If the first layer data includes one, there may be first other layer data that needs to be layer synthesized by the graphics processor. At this time, layer synthesis processing is performed on the processed first layer data to obtain third layer data, which can be understood as synthesis processing is performed on the processed first layer data and the first other layer data to obtain the third layer data.

[0135] When the first layer data and the second layer data are layer data corresponding to the same layer, layer synthesis processing is performed on the processed first layer data to obtain third layer data, which can be understood as layer synthesis processing is performed on multiple processed first layer data and first non-target layer data to obtain third layer data. At this time, if second non-target layer data still exists, layer synthesis processing is performed on the third layer data and the second layer data through the data processor, which can be understood as layer synthesis processing is performed on the third layer data, the second non-target layer data and the second layer data through the data processor.

[0136] In the related art, if there is layer data that needs to be processed for image effects in a layer data set, a graphics processor performs layer synthesis processing on all the layer data in the layer data set; or, when there is layer data that needs to be processed for image effects in a layer data set and the layer data that needs to be processed for image effects includes sub-layer data that needs to be processed for image effects and sub-layer data that does not need to be processed for image effects, a graphics processor performs layer synthesis processing on the layer data that needs to be processed for image effects, which wastes the graphics processor.

[0137] In an embodiment of the present application, if there is layer data that needs to be processed for image effects in the layer data set, the layer data that needs to be processed for image effects is processed for image effects by a graphics processor to obtain third layer data, and the third layer data and the second layer data are synthesized by a data processor, so that there is no need to synthesize the layer data that does not need to be processed for image effects by the graphics processor or to synthesize the sub-layer data that does not need to be processed for image effects by the graphics processor, thereby saving the graphics processor and improving terminal performance.

[0138] After obtaining the frame data, the terminal displays it on the display device according to the frame data. The display device may be integrated in the terminal, or the display device may exist separately. When the display device exists separately, after obtaining the frame data, the terminal outputs the frame data to the display device, and the display device renders according to the frame data so as to display the frame picture on the display device.

[0139] In an embodiment of the present application, first layer data and second layer data of an image are determined, the first layer data being layer data in the image that needs to be processed for image effects, and the second layer data being layer data in the image that does not need to be processed for image effects; image effects are processed on the first layer data by a graphics processor to obtain third layer data; layer synthesis processing is performed on the third layer data and the second layer data by a data processor to obtain frame data of the above-mentioned image, and the above-mentioned frame data is used for display on a display device, so that image effects processing is performed only on the first layer data that needs to be processed for image effects by the graphics processor, and layer synthesis processing is performed on the second layer data by the data processor, and there is no need to perform layer synthesis processing on the second layer data by the graphics processor, thereby saving graphics processors and improving vehicle computer performance.

[0140] According to the following Figure 3-Figure 5 , taking the vehicle-mounted terminal as the terminal as an example, the Android system as the system as an example, Gaussian blur processing as the image effect processing as an example, and the first layer data and the second layer data as the sub-layer data of the target layer data as an example, the image processing method provided by the present application is further explained.

[0141] like Figure 3 As shown, the vehicle terminal creates Surface and obtains system interface data in different applications, and stores the data corresponding to Surface (the data corresponding to Surface can also be called application interface data) and system interface data in the buffer queue (BufferQueue). Send a synthesis message to the graphics synthesis service (SurfaceFlinger) through the consumer interface (onFrameAvaliable) of the buffer queue. Through the graphics synthesis service, call the invalidate method of the message queue (MessageQueue) to request a vertical synchronization signal. Listen for the vertical synchronization signal through the graphics synthesis service. When the vertical synchronization signal is listened to through the graphics synthesis service, the interface data is stored in the message queue so that the layer synthesis processing can be performed through the message queue.

[0142] The process of layer synthesis processing through the message queue can be as follows Figure 4As shown. The vehicle terminal calls the pre-composition sub-service (preComposition) through the graphics composition service to determine whether there is interface data in the message queue. If there is interface data in the message queue, a composition operation message is sent to the layer data creation sub-service through signalLayerUpdate. The vehicle terminal generates initial layer data based on the interface data through the layer data creation sub-service (rebuildLayerStacks), and determines whether there is an overlap between the display position of the initial layer data and the display area of ​​the display device. If there is an overlap, the initial layer data is added to the layer data collection, and the layer data collection is set to the display device.

[0143] The vehicle terminal creates a work list (workList) for the display device by constructing a hardware synthesis work sequence sub-service (setUpHWComposer) based on the layer data set. The work list is used to record the layer synthesis processing and output operations to be performed. Each item or entry in the work list represents a layer data in the layer data set. The target layer data, the first non-target layer data, and the second non-target layer data are filtered out from the layer data set, and the first non-target layer data is provided to the graphics processor, and the second non-target layer data is provided to the data processor. The vehicle terminal sets the relevant data (Frame Data) of the frame image to be displayed on the display device by constructing the hardware synthesis work sequence sub-service. The relevant data includes layer data and attribute data. The attribute data includes the transparency, position, size parameters, and change matrix of the layer. The vehicle terminal determines the layer synthesis method through the hardware synthesizer (HWComposer).

[0144] The process of determining the layer synthesis method by the vehicle terminal through the hardware synthesizer (HWComposer) can be as follows: Figure 5 As shown. The vehicle terminal obtains the type of Gaussian blur processing of the application. If the type of Gaussian blur processing is a local Gaussian blur processing type, it is determined whether the size ratio between the layer size parameter corresponding to the target layer data of the application and the size parameter of the display area is less than or equal to the preset size threshold.

[0145] If the size ratio between the layer size parameter and the size parameter of the display area is less than or equal to the preset size threshold, the first layer data that needs to be Gaussian blurred and the second layer data that does not need to be Gaussian blurred are screened out from the target layer data. The first layer data is provided to the graphics processor, and the second layer data is provided to the data processor. The first layer data is subjected to Gaussian blur processing by the graphics processor to obtain the processed first layer data, and the processed first layer data and the first non-target layer data are subjected to layer synthesis processing to obtain the third layer data, and the third layer data is sent to the hardware synthesizer, and the third layer data is sent to the data processor by the hardware synthesizer. The third layer data, the second non-target layer data and the second layer data are subjected to layer synthesis processing by the data processor to obtain frame data.

[0146] If the size ratio between the layer size parameter and the size parameter of the display area is greater than a preset size threshold, the target layer data is provided to the graphics processor. The graphics processor performs Gaussian blur processing on the target layer data to obtain processed layer data, and performs layer synthesis processing on the processed layer data and the first non-target layer data to obtain fourth layer data, and sends the fourth layer data to the data processor. The data processor performs layer synthesis processing on the fourth layer data and the second non-target layer data to obtain frame data.

[0147] If the type of Gaussian blur processing is the overall Gaussian blur processing type, the target layer data is provided to the graphics processor. The graphics processor performs Gaussian blur processing on the target layer data to obtain processed target layer data, performs layer synthesis processing on the processed target layer data and the first non-target layer data to obtain fourth layer data, and sends the fourth layer data to the data processor. The data processor performs layer synthesis processing on the fourth layer data and the second non-target layer data to obtain frame data.

[0148] The frame data is stored in the cache so that the graphics composition service can read the frame data from the cache and send the frame data to the display device for display.

[0149] Alternatively, if Figure 3 As shown, after obtaining the frame data, the doTransaction function may be called to set the attributes of the frame data, where the attributes of the frame data include at least one of transparency, position, and size.

[0150] After the attributes of the frame data are set, the dirty area of ​​the display device is determined according to the frame data, and the data corresponding to the dirty area in the frame data is sent to the cache.

[0151] Optionally, when there are multiple graphics processors and multiple display devices and layer synthesis processing needs to be performed by the graphics processor, the first layer data or target layer data displayed on the same display device can be processed by the same graphics processor. At this time, the layer data set can include layer data sets for different display devices, so that the above-mentioned layer synthesis processing can be performed on the layer data sets for different display devices. At this time, layer synthesis processing is performed on the first layer data and the first non-target layer data of a display device by a graphics processor, or layer synthesis processing is performed on the target layer data and the first non-target layer data of a display device by a graphics processor. Finally, the data processor processes the results output by each graphics processor to obtain frame data, and then outputs the frame data to the display device through the graphics synthesis service.

[0152] For example, the display device includes a display device D1 and a display device D2, the layer processor includes a graphics processor G1 and a layer processor G2, the layer data includes layer data L0 corresponding to application 1, the layer data corresponding to application 2 includes layer data L1, layer data L2 and layer data L3, the layer data corresponding to application 3 includes layer data L4 and layer data L5, the layer data L0, layer data L1 and layer data L2 are data corresponding to the layer displayed on the display device D1, the layer data L3, layer data L4 and layer data L5 are data corresponding to the layer displayed on the display device D2, the layer data L0 includes first layer data L01 and second layer data L02, the layer data L0 is the target layer data, the layer data L3 includes first layer data L31 and second layer data L32, the layer data L3 is the target layer data, the layer data L1 and layer data L4 are first non-target layer data, and the layer data L2 and layer data L5 are second non-target layer data.

[0153] At this time, layer data L0, layer data L1 and layer data L2 can carry the collection identifier of display device D1, and layer data L3, layer data L4 and layer data L5 can carry the collection identifier of display device D2. For example, the collection identifier of display device D1 is display layerstack:0, and the collection identifier of display device D2 is display layerstack:1.

[0154] When the layer size parameter of the first layer data L01 does not meet the preset size parameter condition, such as Figure 6As shown, the layer data L0 is subjected to Gaussian blur processing by the graphics processor G1 to obtain processed layer data, the processed layer data and the layer data L1 are subjected to layer synthesis processing to obtain third layer data, the third layer data is sent to the data processor through the hardware synthesizer, the third layer data and the layer data L2 are subjected to layer synthesis processing by the data processor to obtain frame data for the display device D1, and the frame data for the display device D1 is sent to the display device D1 for display.

[0155] When the layer size parameter of the first layer data L31 does not meet the preset size parameter condition, such as Figure 6 As shown, the layer data L3 is subjected to Gaussian blur processing by the graphics processor G2 to obtain processed layer data, the processed layer data and the layer data L4 are subjected to layer synthesis processing to obtain third layer data, the third layer data is sent to the data processor through the hardware synthesizer, the third layer data and the layer data L5 are subjected to layer synthesis processing to obtain frame data for the display device D2, and the frame data for the display device D2 is sent to the display device D2 for display.

[0156] When the layer size parameter of the first layer data L01 meets the preset size parameter condition, such as Figure 7 As shown, the first layer data L01 is subjected to Gaussian blur processing by the graphics processor G1 to obtain the processed first layer data, the processed first layer data and the layer data L1 are subjected to layer synthesis processing to obtain the third layer data, the third layer data is sent to the data processor through the hardware synthesizer, the third layer data, the first layer data L02 and the layer data L2 are subjected to layer synthesis processing by the data processor to obtain the frame data for the display device D1, and the frame data for the display device D1 is sent to the display device D1 for display.

[0157] When the layer size parameter of the first layer data L31 meets the preset size parameter condition, such as Figure 7 As shown, the first layer data L31 is subjected to Gaussian blur processing by the graphics processor G2 to obtain the processed first layer data, the processed first layer data and the layer data L4 are subjected to layer synthesis processing to obtain the third layer data, the third layer data is sent to the data processing through the hardware synthesizer, the third layer data, the first layer data L32 and the layer data L5 are subjected to layer synthesis processing by the data processor to obtain the frame data for the display device D2, and the frame data for the display device D2 is sent to the display device D2 for display.

[0158] The name explanation, specific implementation method and corresponding beneficial effects of this embodiment are not repeated here.

[0159] In order to better implement the image processing method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above image processing method. The meanings of the terms are the same as those in the above image processing method, and the specific implementation details can refer to the description in the method embodiment.

[0160] For example, Figure 8 As shown, the image processing device may include:

[0161] The data determination module 801 is used to determine the first layer data and the second layer data of the image, where the first layer data is the layer data in the image that needs to be processed for image effects, and the second layer data is the layer data in the image that does not need to be processed for image effects.

[0162] The first processing module 802 is used to perform image effect processing on the first layer data through a graphics processor to obtain third layer data.

[0163] The second processing module 803 is used to perform layer synthesis processing on the third layer data and the second layer data through a data processor to obtain frame data of an image, and the frame data is used to be displayed on a display device.

[0164] Optionally, the first processing module 802 is specifically configured to execute:

[0165] Performing image effect processing on the first layer data by a graphics processor to obtain processed first layer data;

[0166] The processed first layer data is subjected to layer synthesis processing to obtain third layer data.

[0167] Optionally, the data determination module 801 is specifically configured to execute:

[0168] Acquire a layer size parameter of at least one target layer data in a layer data set of an image, wherein the target layer data includes first layer data and second layer data, and the layer size parameter is used to indicate a layer size parameter corresponding to the first layer data;

[0169] Determine whether the layer size parameters meet the preset size parameter conditions;

[0170] When the layer size parameter meets the preset size parameter condition, the first layer data and the second layer data of the image are screened out from the target layer data.

[0171] Optionally, the first processing module 802 is further configured to execute:

[0172] When the layer size parameters do not meet the preset size parameter conditions, the target layer data is processed by the graphics processor to obtain processed layer data, and the processed layer data is subjected to layer synthesis processing before being displayed on the display device.

[0173] Optionally, the data determination module 801 is specifically configured to execute:

[0174] Get the size parameters of the display area of ​​the display device;

[0175] When the size ratio between the layer size parameter and the display area size parameter is less than or equal to the preset size threshold, determining that the layer size parameter meets the preset size parameter condition;

[0176] When the size ratio between the layer size parameter and the size parameter of the display area is greater than a preset size threshold, it is determined that the layer size parameter does not meet the preset size parameter condition.

[0177] Optionally, the data determination module 801 is specifically configured to execute:

[0178] Acquire the type of image effect processing of target layer data in the layer data set of the image, where the target layer data includes first layer data and second layer data;

[0179] When the type is a local image effect processing type, first layer data and second layer data of the image are determined from the target layer data.

[0180] Optionally, the data determination module 801 is further configured to execute:

[0181] When the type is the overall image effect processing type, the target layer data is processed by the graphics processor to obtain the processed target layer data, and the processed target layer data is subjected to layer synthesis processing before being displayed on the display device.

[0182] Optionally, the data determination module 801 is specifically configured to execute:

[0183] Sending a synthesis message to a graphics synthesis service based on the interface data, the interface data including application interface data in the display device and / or system interface data in the display device;

[0184] When the graphics synthesis service detects a vertical synchronization signal, it generates layer data corresponding to the interface data;

[0185] According to the layer data, first layer data and second layer data of the image are determined.

[0186] Optionally, the data determination module 801 is specifically configured to execute:

[0187] Acquire initial layer data, where the initial layer data is layer data of an image corresponding to a display interface of a display device;

[0188] Determine whether the display position of the initial layer data on the display device and the display area of ​​the display device overlap;

[0189] When there is an overlap relationship, the initial layer data is added to the layer data set;

[0190] The first layer data and the second layer data of the image are filtered out from the layer data set.

[0191] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0192] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 900 includes a processor 901 having one or more processing cores, a memory 902 having one or more computer-readable storage media, and a computer program stored in the memory 902 and executable on the processor. The processor 901 is electrically connected to the memory 902. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0193] The processor 901 is the control center of the electronic device 900. It uses various interfaces and lines to connect various parts of the entire electronic device 900, executes various functions of the electronic device 900 and processes data by running or loading software programs and / or modules stored in the memory 902, and calling data stored in the memory 902, thereby monitoring the electronic device 900 as a whole.

[0194] In the embodiment of the present application, the processor 901 in the electronic device 900 will load instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 will run the application programs stored in the memory 902 to implement various functions, such as:

[0195] Determine first layer data and second layer data of the image, the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with image effects;

[0196] Performing image effect processing on the first layer data by a graphics processor to obtain third layer data;

[0197] The third layer data and the second layer data are subjected to layer synthesis processing by a data processor to obtain frame data of an image, and the frame data is used for displaying on a display device.

[0198] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the image processing method above, which will not be elaborated here.

[0199] Optional, such as Fig. 9 As shown, the electronic device 900 further includes: a touch screen 903, a radio frequency circuit 904, an audio circuit 905, an input unit 906, and a power supply 907. The processor 901 is electrically connected to the touch screen 903, the radio frequency circuit 904, the audio circuit 905, the input unit 906, and the power supply 907, respectively. Those skilled in the art can understand that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0200] The touch display screen 903 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 903 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, which can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc. The touch panel can be used to collect the user's touch operations on or near it (such as the user's operation on the touch panel or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 901, and can receive the command sent by the processor 901 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 901 to determine the type of touch event, and then the processor 901 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 903 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 903 can also be used as a part of the input unit 906 to realize the input function.

[0201] The radio frequency circuit 904 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.

[0202] The audio circuit 905 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 905 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 905 and converted into audio data, and then the audio data is output to the processor 901 for processing, and then sent to another electronic device through the radio frequency circuit 904, or the audio data is output to the memory 902 for further processing. The audio circuit 905 may also include an earplug jack to provide communication between an external headset and an electronic device.

[0203] The input unit 906 may be configured to receive input numbers, character information, or user feature information (eg, fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0204] The power supply 907 is used to supply power to various components of the electronic device 900. Optionally, the power supply 907 can be logically connected to the processor 901 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. The power supply 907 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0205] although Fig. 9 Not shown, the electronic device 900 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0206] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0207] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0208] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any image processing method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0209] Determine first layer data and second layer data of the image, the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with image effects;

[0210] Performing image effect processing on the first layer data by a graphics processor to obtain third layer data;

[0211] The third layer data and the second layer data are subjected to layer synthesis processing by a data processor to obtain frame data of an image, and the frame data is used for displaying on a display device.

[0212] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the image processing method above, which will not be elaborated here.

[0213] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0214] Since the computer program stored in the computer-readable storage medium can execute any image processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any image processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0215] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0216] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0217] The embodiments, implementation methods and related technical features of the present application can be combined and replaced with each other without conflict.

[0218] The above are only preferred embodiments of the present application and do not constitute any form of limitation to the present application. Although the descriptions of various embodiments in the embodiments of the present application have different focuses, for parts not described in detail in a certain embodiment, reference can be made to the relevant embodiments of other embodiments. However, any modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.

Claims

1. An image processing method, characterized in that: include: Obtain the type of image effect processing of at least one target layer data in the layer data set of the image; Acquire a layer size parameter of the target layer data, the target layer data includes first layer data and second layer data, the layer size parameter is used to indicate a layer size corresponding to the first layer data, the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with image effects; Get the size parameters of the display area of ​​the display device; When the size ratio between the layer size parameter and the size parameter of the display area is less than or equal to a preset size threshold, determining that the layer size parameter meets the preset size parameter condition; When the size ratio between the layer size parameter and the size parameter of the display area is greater than the preset size threshold, determining that the layer size parameter does not meet the preset size parameter condition; When the layer size parameter satisfies the preset size parameter condition, filtering out the first layer data and the second layer data of the image from the target layer data; Performing image effect processing on the first layer data by a graphics processor to obtain third layer data; The third layer data and the second layer data are subjected to layer synthesis processing by a data processor to obtain frame data of the image, and the frame data is used to display the image on the display device.

2. The image processing method according to claim 1, characterized in that: The step of performing image effect processing on the first layer data by a graphics processor to obtain the third layer data includes: Performing image effect processing on the first layer data by the graphics processor to obtain processed first layer data; Perform layer synthesis processing on the processed first layer data to obtain the third layer data.

3. The image processing method according to claim 1, characterized in that: The method further comprises: When the layer size parameter does not meet the preset size parameter condition, the target layer data is processed by the graphics processor to obtain processed layer data; after the processed layer data is subjected to layer synthesis processing, it is displayed on the display device.

4. The image processing method according to claim 1, characterized in that: The step of obtaining the layer size parameter of the target layer data includes: When the type is a local image effect processing type, a layer size parameter of the target layer data is obtained.

5. The image processing method according to claim 4, characterized in that: After acquiring the type of image effect processing of at least one target layer data in the layer data set of the image, the method further includes: When the type is an overall image effect processing type, the target layer data is subjected to image effect processing by the graphics processor to obtain processed target layer data, and the processed target layer data is subjected to layer synthesis processing before being displayed on the display device.

6. The image processing method according to claim 1, characterized in that: Before acquiring the type of image effect processing of at least one target layer data in the layer data set of the image, the method further includes: Sending a synthesis message to a graphics synthesis service based on the interface data, wherein the interface data includes application interface data in the display device and / or system interface data in the display device; When the graphics synthesis service detects a vertical synchronization signal, generating layer data corresponding to the interface data; The layer data set is generated according to the layer data.

7. The image processing method according to claim 1, characterized in that: Before acquiring the type of image effect processing of at least one target layer data in the layer data set of the image, the method further includes: Acquire initial layer data, where the initial layer data is layer data of the image corresponding to the display interface of the display device; Determine whether a display position of the initial layer data on the display device and a display area of ​​the display device overlap; When the overlap relationship exists, the initial layer data is added to the layer data set.

8. An image processing device, characterized in that: include: A data determination module, used for obtaining a type of image effect processing of at least one target layer data in a layer data set of an image; Acquire a layer size parameter of the target layer data, the target layer data includes first layer data and second layer data, the layer size parameter is used to indicate a layer size corresponding to the first layer data, the first layer data is layer data in the image that needs to be processed with image effects, and the second layer data is layer data in the image that does not need to be processed with image effects; acquire a size parameter of a display area of ​​a display device; when a size ratio between the layer size parameter and the size parameter of the display area is less than or equal to a preset size threshold, determine that the layer size parameter meets a preset size parameter condition; When the size ratio between the layer size parameter and the size parameter of the display area is greater than the preset size threshold, determining that the layer size parameter does not meet the preset size parameter condition; When the layer size parameter satisfies the preset size parameter condition, filtering out the first layer data and the second layer data of the image from the target layer data; A first processing module, configured to perform image effect processing on the first layer data through a graphics processor to obtain third layer data; The second processing module is used to perform layer synthesis processing on the third layer data and the second layer data through a data processor to obtain frame data of the image, and the frame data is used to display the image on the display device.

9. A computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the image processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the image processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Special effect processing method and electronic equipment

    CN117611423A