CN116419075A - Image data processing method, device and storage medium - Google Patents

Image data processing method, device and storage medium Download PDF

Info

Publication number
CN116419075A
CN116419075A CN202111630399.8A CN202111630399A CN116419075A CN 116419075 A CN116419075 A CN 116419075A CN 202111630399 A CN202111630399 A CN 202111630399A CN 116419075 A CN116419075 A CN 116419075A
Authority
CN
China
Prior art keywords
image data
data processing
mode
module
request
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
CN202111630399.8A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202111630399.8A priority Critical patent/CN116419075A/en
Publication of CN116419075A publication Critical patent/CN116419075A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region

Abstract

The present disclosure provides a processing method, apparatus and storage medium for image data. The processing method is applied to the terminal, an operating system of the terminal comprises an image data processing layer, and the processing method comprises the following steps: the strategy module of the image data processing layer forms an image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of the terminal; wherein the image data processing request is from a third party application; and the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data. The image processing function of the image under the image data processing request of the third party application is realized, and the user experience is improved.

Description

Image data processing method, device and storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method and apparatus for processing image data, and a storage medium.
Background
In the related art, the image processing technology of the terminal is mature, and image processing functions such as beauty, HDR (High Dynamic Range, high dynamic range image), and human image blurring can be realized. However, these functions are limited to the camera module of the terminal, which can be used, but not for third party applications. As the third party applications of the terminal are increased, the requirement for realizing image shooting on the third party applications is increased, and the defect that the image processing function cannot be used on the third party applications is also more remarkable.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, apparatus, and storage medium for processing image data that can use an image processing function on a third party application.
According to a first aspect of embodiments of the present disclosure, there is provided a processing method of image data, applied to a terminal, the processing method including:
the operating system of the terminal comprises an image data processing layer, and the processing method comprises the following steps:
the strategy module of the image data processing layer forms an image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of the terminal; wherein the image data processing request is from a third party application;
And the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data.
In some exemplary embodiments, the image data processing layer is located between a frame layer and a hardware abstraction layer of an operating system of the terminal, and the processing method includes:
the image data processing layer receives the image data processing request from a third party application of an application layer of an operating system of the terminal;
the strategy module of the image data processing layer forms the image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request;
the image data processing layer sends the image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
the image data processing layer receives initial image data from the image processing unit;
the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data;
The image data processing layer provides the processed image data to the third party application.
In some exemplary embodiments, the policy module of the image data processing layer forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request, including:
the strategy module determines an image data acquisition strategy according to the image data processing mode and the corresponding shooting mode;
and the strategy module forms the image data acquisition request according to the image data acquisition strategy.
In some exemplary embodiments, the policy module determining the image data acquisition policy based on the image data processing mode and the corresponding capture mode comprises:
when the image data processing request comprises an image data processing mode, determining the image data acquisition strategy according to the corresponding shooting mode;
and when the image data processing request comprises a plurality of image data processing modes, determining the image data acquisition strategy according to a preset rule.
In some exemplary embodiments, forming an image data acquisition request according to the image data acquisition policy of the policy module includes:
When the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
when the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming the image data acquisition requests according to each frame of image data; or (b)
And when the image data acquisition strategy is a multi-stream image data acquisition mode, forming the image data acquisition request for acquiring multi-stream image data, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
In some exemplary embodiments, the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request, to obtain processed image data, including:
determining a processing order of image data processing modes in a plurality of image data processing modes when the image data processing request includes the plurality of image data processing modes;
and processing the initial image data according to the processing sequence of the image data processing mode to obtain processed image data.
In some exemplary embodiments, the processing method further comprises:
the third party application sends a query request to a frame layer of an operating system of the terminal to determine an image data processing mode usable by the third party application;
and displaying the usable image data processing mode on a shooting interface opened by the third party application.
According to a second aspect of the embodiments of the present disclosure, there is provided an image data processing apparatus applied to a terminal, wherein an operating system of the terminal includes an image data processing layer, the processing apparatus includes a policy module and an image data processing module, and the policy module and the image data processing module are located in the image data processing layer:
the strategy module forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of the terminal; the image data processing request is from a third party application, and the image data processing module is configured to process the initial image data according to an image data processing mode in the image data processing request to obtain processed image data.
In some exemplary embodiments, the processing apparatus further includes a receiving module, a first transmitting module, and a second transmitting module, where the receiving module, the first transmitting module, and the second transmitting module are located in the image data processing layer:
the receiving module is configured to receive the image data processing request from a third party application of an application layer of an operating system of the terminal;
the strategy module is configured to form the image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request;
the first sending module is configured to send the image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
the receiving module is configured to receive initial image data from the image processing unit;
the image data processing module is configured to process the initial image data according to the image data processing mode in the image data processing request to obtain processed image data;
the second sending module is configured to provide the processed image data to the third party application.
In some exemplary embodiments, the policy module is configured to:
determining an image data acquisition strategy according to the image data processing mode and the corresponding shooting mode;
and forming an image data acquisition request according to the image data acquisition strategy.
In some exemplary embodiments, the policy module is configured to:
when the image data processing request comprises an image data processing mode, determining the image data acquisition strategy according to the corresponding shooting mode;
and when the image data processing request comprises a plurality of image data processing modes, determining the image data acquisition strategy according to a preset rule.
In some exemplary embodiments, the policy module is configured to:
when the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
when the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming the image data acquisition requests according to each frame of image data; or (b)
And when the image data acquisition strategy is a multi-stream image data acquisition mode, forming the image data acquisition request for acquiring multi-stream image data, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
In some exemplary embodiments, the image data processing module includes:
determining a processing order of image data processing modes in a plurality of image data processing modes when the image data processing request includes the plurality of image data processing modes;
and processing the initial image data according to the processing sequence of the image data processing mode to obtain processed image data.
In some exemplary embodiments, the operating system of the terminal further includes an application layer, and the processing device queries a module and a display module, where the querying module and the display module are located in the application layer:
the query module is configured to send a query request to a framework layer of the terminal by the third party application so as to determine an image data processing mode which can be used by the third party application;
the display module is configured to display the usable image data processing mode on a shooting interface opened by the third party application, and according to a third aspect of the embodiment of the present disclosure, there is provided an image data processing apparatus, including:
a processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to perform the method of processing image data provided by the exemplary embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, which when executed by a processor of a terminal, enables the terminal to perform the method of processing image data provided by the exemplary embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: the image data processing method provided by the exemplary embodiment of the disclosure realizes the image processing function on the image under the image data processing request of the third party application, and improves the user experience.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating an exemplary method of processing image data provided by the present disclosure;
FIG. 2 illustrates a schematic diagram of an operating system of a terminal in an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating an exemplary method of processing image data provided by the present disclosure;
FIG. 4 is a flowchart showing a method in which the policy module of the image data processing layer forms an image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request in step S102;
fig. 5 shows a flow of processing of a single frame image data acquisition request;
fig. 6 shows a flow of processing of a multi-frame image data acquisition request;
FIG. 7 illustrates a process flow of a multi-stream image data acquisition request;
fig. 8 is a flowchart showing a method in which the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain the processed image data in step S105;
FIG. 9 is a flowchart illustrating a method of processing image data according to an exemplary embodiment of the present disclosure;
fig. 10 is a schematic structural view of a processing apparatus of image data shown according to an exemplary embodiment;
fig. 11 shows a block diagram of an image data processing apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
Exemplary embodiments of the present disclosure provide a processing method of image data, which is exemplarily applied to a terminal. The operating system of the terminal includes an image data processing layer, as shown in fig. 1, fig. 1 exemplarily shows a flowchart of a processing method of image data provided by the present disclosure, including:
step S101, a strategy module of an image data processing layer forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of a terminal; wherein the image data processing request is from a third party application;
step S102, the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request, so as to obtain the processed image data.
In an exemplary embodiment of the present disclosure, in order to enable a third party application to implement an image processing function, an image data processing layer is designed in an operating system of a terminal. The image data processing layer comprises a strategy module and an image data processing module, the strategy module can receive an image data processing request from a third party application, analyze the image data processing request, determine an image data processing mode and a shooting mode included in the image data processing request, and form an image data acquisition request of a hardware layer of an operating system of the terminal according to the image data processing mode and the shooting mode. The image data acquisition request may access a hardware layer of an operating system of the terminal so that initial image data photographed through the third party application may be acquired from the hardware layer.
The image processing mode includes performing optimization processing on an initial image of a photographing trip, such as beauty, HDR (High Dynamic Range, high dynamic range image), human image blurring, and the like. The shooting mode includes a mode of shooting an image, the shooting mode is related to an image data processing mode, for example, when the image data processing mode is a beauty, the corresponding shooting mode can be a single-frame shooting mode. When the image data processing mode is HDR, the corresponding shooting mode may be a multi-frame shooting mode, for example, a three-frame shooting mode. The multi-frame shooting mode comprises a shooting mode that the same shooting module of the terminal continuously shoots multi-frame images. When the image data processing mode is the portrait blurring, the corresponding shooting mode is a multi-stream shooting mode, and the multi-stream shooting mode comprises a shooting mode of carrying out multi-frame images by two or more shooting modules which are arbitrarily combined in a plurality of shooting modules of the terminal. The image data processing module in the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data.
The image data processing method provided by the exemplary embodiment of the disclosure realizes the image processing function on the image under the image data processing request of the third party application, and improves the user experience.
In an operating system of a terminal, for example, in an Android operating system, the operating system includes an Application layer (Application), a Framework layer (Framework), a Hardware abstraction layer (Hardware abstract layer), a kernel layer (kernel) and a Hardware layer (Hardware). The image data processing layer may be disposed between a Framework layer (Framework) and a hardware abstraction layer (hardware abstract layer) of the terminal system. As shown in fig. 2, fig. 2 is a schematic structural diagram of an operating system of a terminal in an exemplary embodiment of the present disclosure, and in fig. 2, an image data processing layer is disposed between a frame layer and a hardware abstraction layer of the operating system of the terminal, so as to implement image processing on a captured image when the image is captured by a third party application. As shown in fig. 3, fig. 3 is a flowchart exemplarily showing a method for processing image data provided by the present disclosure, including:
step S201, the image data processing layer receives an image data processing request of a third party application of an application layer of an operating system of the terminal;
step S202, a strategy module of an image data processing layer forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request;
Step S203, the image data processing layer sends an image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
step S204, the image data processing layer receives initial image data from the image processing unit;
step S205, an image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data;
in step S206, the image data processing layer provides the processed image data to the third party application.
As shown in fig. 2, the third party applications are all installed at the application layer of the operating system of the terminal. The method comprises the steps that a third party application at an application layer of an operating system of a terminal initiates an image data processing request, a shooting module application interface of a framework layer receives the image data processing request, the framework layer forwards the image data processing request to the image data processing layer, and after the image data processing interface of the image data processing layer receives the image data processing request, a strategy module forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request, and sends the image data acquisition request to an image processing unit so as to acquire original image data of an image shot by the third party application. The image processing unit is used for receiving the image shot by the terminal camera module and forming initial image data, which can be positioned on a hardware layer of an operating system of the terminal. The image data processing layer receives the initial image data provided by the image processing unit, processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data, and provides the processed image data for a third party application.
The image data processing layer interacts with the hardware layer through a hardware abstraction layer of an operating system of the terminal via a kernel layer (not shown) so as to obtain initial image data shot according to an image data processing request of a third party application according to an image data acquisition request sent by the image data processing layer.
In the exemplary embodiment of the disclosure, an image data processing layer is disposed between an operating system of a terminal, for example, a frame layer and a hardware abstraction layer in an Android operating system, so as to process image data captured by an image data processing request of a third party application through the image data processing layer, and return the processed image data to the third party, so that a function of processing a photo captured by the third party application is realized, and user experience is improved.
In the image data processing method provided in the exemplary embodiment of the present disclosure, after receiving an image data processing request, an image data processing layer forms an image data acquisition request according to an image data processing mode in the image data processing request and a corresponding photographing mode, the image data acquisition request being a request for acquiring initial image data to an image data processing unit. As shown in fig. 4, fig. 4 shows a flowchart of a method in which the policy module of the image data processing layer forms an image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request in step S202:
Step S2021, the policy module determines an image data acquisition policy according to the image data processing mode and the corresponding shooting mode;
in step S2022, the policy module forms an image data acquisition request according to the image data acquisition policy.
After the interface of the image data processing layer receives the image data processing request, the policy module of the image data processing layer analyzes the image data processing request and determines an image data processing mode and a corresponding shooting mode in the image data processing request. And determining an image data acquisition strategy and an image number processing strategy according to the image data processing mode and the corresponding shooting mode. An image data acquisition request is formed according to the image data acquisition policy.
Since in the image data processing request, the image data processing mode for processing the image may include one or more, for example, the image data processing mode may include beauty, or may include both beauty and HDR.
When an image data processing mode is included, an image data acquisition strategy can be determined according to the corresponding shooting mode; when a plurality of image data processing modes are included, an image data acquisition policy may be determined according to a preset rule.
The preset rule determines an image data acquisition strategy according to the characteristics of a shooting mode corresponding to each image data processing mode, for example, when the image data processing modes comprise beauty and HDR, the shooting mode corresponding to the beauty is single-frame shooting, the shooting mode corresponding to the HDR is multi-frame shooting, and when the image data processing modes comprise beauty and HDR at the same time, the image data acquisition strategy can be determined as a multi-frame image data acquisition mode. When the image data processing mode comprises beauty and image blurring, as the shooting mode corresponding to the beauty is single-frame shooting and the shooting mode corresponding to the image blurring is multi-stream shooting, when the image data processing mode comprises beauty and image blurring at the same time, the image data acquisition strategy can be determined as a multi-stream image data acquisition mode.
The combination mode and the corresponding image data acquisition strategy of the image data processing modes which can be used by the third party application can be preset through the image data processing layer and stored in the terminal, and when the image data processing layer receives an image data processing request from the third party and analyzes that the image data processing modes included in the image data processing request comprise various image data processing modes, the corresponding image data acquisition strategy can be inquired and acquired.
In an exemplary embodiment of the disclosure, an image acquisition policy is determined according to an image data processing mode and a corresponding shooting mode included in an image data processing request, and an image data acquisition mode may be determined according to characteristics of the image data processing mode in the image data processing request, so as to accurately achieve an image processing effect according to the image data processing mode.
In the image data processing method provided by the exemplary embodiment of the disclosure, the image data processing layer is arranged below the frame layer, the image data acquisition request can be quickly obtained according to the image data processing request through the policy module of the image data processing layer, the policy module can automatically obtain the image data acquisition request according to the image data processing request without complicated setting by a third party application, and therefore a lightweight interface is provided for the third party application through the policy module of the image data processing layer, so that corresponding system functions can be opened to the third party application in fewer operation steps and in shorter time. In the related art, the system function is directly called through the application layer, however, the method is limited by the application layer, the image data acquisition request can not be obtained quickly according to the image data processing request, and a series of complicated operations are needed to realize the conversion from the image data processing request to the image data acquisition request, so that the time consumption is long.
In an exemplary embodiment of the present disclosure, the policy module of the image data processing layer may form an image data acquisition request according to an image data acquisition policy:
when the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
when the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming an image data acquisition request according to each frame of image data; or (b)
When the image data acquisition strategy is a multi-stream image data acquisition mode, an image data acquisition request for acquiring multi-stream image data is formed, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
When the image data acquisition strategy is a single-frame image acquisition mode, the formed image data request is a single-frame image data acquisition request, as shown in fig. 5, and fig. 5 shows a processing flow of the single-frame image data acquisition request. The image data processing layer receives the image data processing request from the third party application, analyzes the image data processing request, and obtains an image data processing mode and a corresponding shooting mode. When the image data acquisition strategy is determined to be the acquisition mode of the single-frame image data according to the image data processing mode and the corresponding shooting mode, an image data acquisition request for acquiring the single-frame image data is formed and sent to a hardware abstraction layer, and the hardware abstraction layer acquires initial image data from the hardware layer through a kernel layer. The image data processing layer processes the image data according to the image data processing mode after obtaining the single-frame initial image data, and sends the processed image data to the third party application so as to realize the image data processing of the image shot by the third party application.
When the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming an image data acquisition request according to each frame of image data. As shown in fig. 6, fig. 6 shows a flow of processing of a multi-frame image data acquisition request. The image data processing layer receives the image data processing request from the third party application, analyzes the image data processing request, and obtains an image data processing mode and a corresponding shooting mode. When the image data acquisition strategy is determined to be the acquisition mode of multi-frame image data according to the image data processing mode and the corresponding shooting mode, respectively forming an image data acquisition request according to each frame of image data, sending the image data acquisition request to a hardware abstraction layer, and acquiring initial image data from the hardware abstraction layer to the hardware layer through a kernel layer. Taking three frames of image data as an example, a first frame of image data acquisition request is sent first, and the hardware layer returns the first frame of initial image data. After receiving the first frame of initial image data, the image data processing layer sends a second frame of image data request, and the hardware layer returns the second frame of initial image data. After receiving the initial image data of the second frame, the image data processing layer sends a request for image data of a third frame, and the hardware layer returns the initial image data of the third frame. The image data processing layer processes the acquired three frames of initial image data according to the image data processing mode and sends the processed image data to the third party application so as to realize the image data processing of the image shot by the third party application.
When the image data acquisition strategy is a multi-stream image data acquisition mode, respectively forming an image data acquisition request according to each frame of image data. As shown in fig. 7, fig. 7 shows a flow of processing of a multi-stream image data acquisition request. The image data processing layer receives the image data processing request from the third party application, analyzes the image data processing request, and obtains an image data processing mode and a corresponding shooting mode. When the image data acquisition strategy is determined to be the acquisition mode of multi-stream image data according to the image data processing mode and the corresponding shooting mode, an image data acquisition request for acquiring the multi-stream initial image data is formed and sent to a hardware abstraction layer, and the hardware abstraction layer acquires the initial image data from the hardware layer through a kernel layer. Taking two frames of image data shot by two shooting modules of the terminal as an example, a frame image data acquisition request is sent, and the hardware layer returns to the initial image data shot by the first shooting module and then returns to the second frame initial image data shot by the second shooting module. The image data processing layer processes the acquired multi-stream initial image data according to the image data processing mode and sends the processed image data to the third party application so as to realize the image data processing of the image shot by the third party application. For the return of the multi-stream initial image data, the initial image data may be returned according to a preset sequence, for example, the first frame initial image data captured by the first camera module may be returned first, or the second frame initial image data captured by the second camera module may be returned first, which is not limited herein.
In the exemplary embodiment of the present disclosure, when a plurality of image data processing modes are included, the image data processing layer may first determine a processing order of the image data processing modes in the plurality of image data processing modes when receiving the returned initial image data, and process the initial image data according to the processing order of the image data processing modes to obtain the processed image data. As shown in fig. 8, fig. 8 shows a flowchart of a method for processing initial image data according to an image data processing mode in an image data processing request by an image data processing module of an image data processing layer in step S205, to obtain processed image data:
step S2051 of determining, when the image data processing request includes a plurality of image data processing modes, a processing order of the image data processing modes in the plurality of image data processing modes;
step S2052, processing the initial image data in the processing order of the image data processing mode to obtain the processed image data.
When the image data processing modes include a plurality of types, the processing order of the image data processing modes may be determined, and the initial image may be processed according to the processing order. For example, when the image data processing mode includes beauty and HDR, since the shooting mode corresponding to beauty is single-frame shooting, and the shooting mode corresponding to HDR is multi-frame shooting, when the image data processing mode includes beauty and HDR, initial image data is acquired according to a multi-frame image data acquisition mode, the three-frame initial image data can be subjected to HDR processing first, one image data is synthesized, then the one image data is subjected to beauty processing, and the processed image data is formed and returned to the third party application. When the image data processing mode comprises beauty and image blurring, as the shooting mode corresponding to the beauty is single-frame shooting, the shooting mode corresponding to the image blurring is multi-stream shooting, and when the image data processing mode comprises beauty and image blurring, the initial image data is acquired in a multi-stream image data acquisition mode. The multi-frame image data acquired by the plurality of camera modules can be subjected to human image blurring processing, one image data is synthesized, then the one image is subjected to face beautifying processing, the processed image data is formed, and the processed image data is returned to the third party application.
The processing sequence of the image data processing mode may be set in advance by the image data processing layer and stored in the terminal, and when the image data processing layer receives the initial image data, the processing sequence of the corresponding image data processing mode may be queried and acquired to process the initial image data according to the corresponding processing sequence.
In the exemplary embodiment of the present disclosure, when a plurality of image data processing modes are included, the initial image may be processed according to a preset processing sequence, so that the processing sequence may be set according to the characteristics of each image data processing mode, and it is ensured that the initial image number may be reasonably processed according to the image data processing mode. The management of the processing order of the image data processing modes of the image data of the third party application is managed by the image data processing layer without setting once every time the third party application is installed. The flexibility and compatibility of image data processing of third party applications are improved.
The exemplary embodiments of the present disclosure provide a method for processing image data, in which a framework layer of a third party application terminal transmits a query request to query an image data processing mode that can be used by itself. As shown in fig. 9, fig. 9 shows a flowchart of a processing method of image data according to an exemplary embodiment of the present disclosure:
Step S207, the third party application sends a query request to a frame layer of an operating system of the terminal to determine an image data processing mode usable by the third party application;
in step S208, the usable image data processing mode is displayed on the shooting interface opened by the third party application.
When the third party application uses the Camera module of the terminal to shoot an image, the terminal can be queried for the image data processing mode which can be used by the third party application, for example, the third party application can determine the image data processing mode which can be used by the third party application through a Camera module software development kit (Camera SDK, software Development Kit) and a Camera capability expansion module (Camera Extension) of the frame layer of the operating system of the terminal. When the image data processing mode available for use is acquired by the third party application, the image data processing mode available for use may be displayed on a shooting interface opened by the third party application, so that the user selects the image data processing mode by clicking or other means to enable the image data processing request to be formed.
In the processing method of the seed image data provided by the exemplary embodiment of the disclosure, different image data processing modes are provided for different third party applications according to different characteristics of the third party applications, so that the use of the image data processing modes by the third party applications can be better managed, and the flexibility of sharing the image data processing modes by the third party applications is provided.
The disclosure also provides a processing device of the image data, which is applied to the terminal, an operating system of the terminal comprises an image data processing layer, the processing device comprises a strategy module and an image data processing module, and the strategy module and the image data processing module are positioned on the image data processing layer. Fig. 10 is a schematic structural view of an image data processing apparatus according to an exemplary embodiment, and referring to fig. 10, the image data processing apparatus according to an embodiment of the present disclosure includes: a first receiving module 901, a policy module 902, a first transmitting module 903, a second receiving module 904, an image data processing module 905 and a second transmitting module 906. The first receiving module 901, the policy module 902, the first transmitting module 903, the second receiving module 904, the image data processing module 905 and the second transmitting module 906 are located at a graphic data processing layer of an operating system of the terminal. Wherein, the liquid crystal display device comprises a liquid crystal display device,
a policy module 902, configured to form an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request, so as to acquire initial image data from a hardware layer of an operating system of the terminal; wherein the image data processing request is from a third party application; the method comprises the steps of carrying out a first treatment on the surface of the
The image data processing module 905 is configured to process the initial image data according to the image data processing mode in the image data processing request, and obtain processed image data.
Wherein, the first receiving module 901 is configured to receive an image data processing request of a third party application of an application layer of an operating system of the terminal;
a policy module 902 configured to form an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request;
a first sending module 903 configured to send an image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
a second receiving module 904 configured to receive the initial image data from the image processing unit;
an image data processing module 905 configured to process the initial image data according to the image data processing mode in the image data processing request, to obtain processed image data;
a second transmission module 906 configured to provide the processed image data to the third party application.
Wherein the policy module 902 is configured to:
determining an image data acquisition strategy according to the image data processing mode and the corresponding shooting mode;
And forming an image data acquisition request according to the image data acquisition strategy.
Wherein the policy module 902 is configured to:
when the image data processing request comprises an image data processing mode, determining the image data acquisition strategy according to the corresponding shooting mode;
and when the image data processing request comprises a plurality of image data processing modes, determining the image data acquisition strategy according to a preset rule.
Wherein the policy module 902 is configured to:
when the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
when the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming the image data acquisition requests according to each frame of image data; or (b)
And when the image data acquisition strategy is a multi-stream image data acquisition mode, forming the image data acquisition request for acquiring multi-stream image data, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
Wherein the image data processing module 905 comprises:
Determining a processing order of image data processing modes in a plurality of image data processing modes when the image data processing request includes the plurality of image data processing modes;
and processing the initial image data according to the processing sequence of the image data processing mode to obtain processed image data.
Wherein, the operating system of the terminal further comprises an application layer, the processing device further comprises a query module 907 and a display module 908, and the query module 907 and the display module 908 are located in the application layer:
a query module 907 configured to send a query request to a framework layer of the terminal by the third party application to determine an image data processing mode usable by the third party application;
a display module 908 configured to display the usable image data processing mode on a photographic interface opened by the third party application.
The query module 907 and the display module 908 are provided at the application layer of the operating system of the terminal.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and are not described in detail herein.
Fig. 11 shows a block diagram of an image data processing apparatus 300 according to an exemplary embodiment. For example, the apparatus 300 may be a camera, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, or the like having an image sensor.
Referring to fig. 11, the apparatus 300 may include one or more of the following components: a processing component 302, a memory 304, a power component 306, a multimedia component 308, an audio component 310, an input/output (I/O) interface 312, a sensor component 314, and a communication component 316.
The processing component 302 generally controls overall operation of the apparatus 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 302 can include one or more modules that facilitate interactions between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate interaction between the multimedia component 308 and the processing component 302.
Memory 304 is configured to store various types of data to support operations at device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phonebook data, messages, pictures, videos, and the like. The memory 304 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 306 provides power to the various components of the device 300. The power components 306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 300.
The multimedia component 308 includes a screen between the device 300 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 300 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 310 is configured to output and/or input audio signals. For example, the audio component 310 includes a Microphone (MIC) configured to receive external audio signals when the device 300 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, audio component 310 further comprises a speaker for outputting audio signals.
The I/O interface 312 provides an interface between the processing component 302 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 314 includes one or more sensors for providing status assessment of various aspects of the apparatus 300. For example, the sensor assembly 314 may detect the on/off state of the device 300, the relative positioning of the components, such as the display and keypad of the apparatus 300, the sensor assembly 314 may also detect a change in position of the apparatus 300 or one component of the apparatus 300, the presence or absence of user contact with the apparatus 300, the orientation or acceleration/deceleration of the apparatus 300, and a change in temperature of the apparatus 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 316 is configured to facilitate communication between the apparatus 300 and other devices, either wired or wireless. The device 300 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 300 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 304, including instructions executable by processor 320 of apparatus 300 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a terminal, enables the terminal to perform the processing method of image data provided by the present disclosure.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (16)

1. A processing method of image data, applied to a terminal, characterized in that an operating system of the terminal includes an image data processing layer, the processing method comprising:
The strategy module of the image data processing layer forms an image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of the terminal; wherein the image data processing request is from a third party application;
and the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data.
2. The method according to claim 1, wherein the image data processing layer is located between a frame layer and a hardware abstraction layer of an operating system of the terminal, the method comprising:
the image data processing layer receives the image data processing request from a third party application of an application layer of an operating system of the terminal;
the strategy module of the image data processing layer forms the image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request;
the image data processing layer sends the image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
The image data processing layer receives initial image data from the image processing unit;
the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data;
the image data processing layer provides the processed image data to the third party application.
3. The method according to claim 1 or 2, wherein the policy module of the image data processing layer forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request, comprising:
the strategy module determines an image data acquisition strategy according to the image data processing mode and the corresponding shooting mode;
and the strategy module forms the image data acquisition request according to the image data acquisition strategy.
4. A method of processing image data according to claim 3, wherein the policy module determining an image data acquisition policy based on the image data processing mode and the corresponding photographing mode comprises:
When the image data processing request comprises an image data processing mode, determining the image data acquisition strategy according to the corresponding shooting mode;
and when the image data processing request comprises a plurality of image data processing modes, determining the image data acquisition strategy according to a preset rule.
5. The method of processing image data according to claim 4, wherein the policy module forms an image data acquisition request according to the image data acquisition policy, comprising:
when the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
when the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming the image data acquisition requests according to each frame of image data; or (b)
And when the image data acquisition strategy is a multi-stream image data acquisition mode, forming the image data acquisition request for acquiring multi-stream image data, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
6. The method according to claim 4, wherein the image data processing module of the image data processing layer processes the initial image data according to the image data processing mode in the image data processing request to obtain processed image data, comprising:
Determining a processing order of image data processing modes in a plurality of image data processing modes when the image data processing request includes the plurality of image data processing modes;
and processing the initial image data according to the processing sequence of the image data processing mode to obtain processed image data.
7. The processing method of image data according to claim 2, characterized in that the processing method further comprises:
the third party application sends a query request to a frame layer of an operating system of the terminal to determine an image data processing mode usable by the third party application;
and displaying the usable image data processing mode on a shooting interface opened by the third party application.
8. The processing device of the image data is applied to a terminal, and is characterized in that an operating system of the terminal comprises an image data processing layer, the processing device comprises a strategy module and an image data processing module, and the strategy module and the image data processing module are positioned on the image data processing layer:
the strategy module forms an image data acquisition request according to an image data processing mode and a corresponding shooting mode in the image data processing request so as to acquire initial image data from a hardware layer of an operating system of the terminal; the image data processing request is from a third party application, and the image data processing module is configured to process the initial image data according to an image data processing mode in the image data processing request to obtain processed image data.
9. The apparatus according to claim 8, further comprising a first receiving module, a first transmitting module, and a second transmitting module, wherein the receiving module, the first transmitting module, and the second transmitting module are located in the image data processing layer:
the first receiving module is configured to receive the image data processing request of a third party application of an application layer of an operating system of the terminal;
the strategy module is configured to form the image data acquisition request according to the image data processing mode and the corresponding shooting mode in the image data processing request;
the first sending module is configured to send the image data acquisition request to an image processing unit in a hardware layer of an operating system of the terminal;
the second receiving module is configured to receive initial image data from the image processing unit;
the image data processing module is configured to process the initial image data according to an image data processing mode in the image data processing request to obtain processed image data;
The second sending module is configured to provide the processed image data to the third party application.
10. The image data processing apparatus according to claim 8 or 9, wherein the policy module is configured to:
determining an image data acquisition strategy according to the image data processing mode and the corresponding shooting mode;
and forming an image data acquisition request according to the image data acquisition strategy.
11. The image data processing apparatus according to claim 10, wherein the policy module is configured to:
when the image data processing request comprises an image data processing mode, determining the image data acquisition strategy according to the corresponding shooting mode;
and when the image data processing request comprises a plurality of image data processing modes, determining the image data acquisition strategy according to a preset rule.
12. The image data processing apparatus of claim 11, wherein the policy module is configured to:
when the image data acquisition strategy is a single-frame image acquisition mode, forming an image data acquisition request for acquiring single-frame image data;
When the image data acquisition strategy is a multi-frame image data acquisition mode, respectively forming the image data acquisition requests according to each frame of image data; or (b)
And when the image data acquisition strategy is a multi-stream image data acquisition mode, forming the image data acquisition request for acquiring multi-stream image data, wherein the multi-stream image data acquisition mode is that a plurality of camera modules of the terminal acquire multi-frame images.
13. The apparatus according to claim 11, wherein the image data processing module includes:
determining a processing order of image data processing modes in a plurality of image data processing modes when the image data processing request includes the plurality of image data processing modes;
and processing the initial image data according to the processing sequence of the image data processing mode to obtain processed image data.
14. The image data processing device according to claim 8, wherein the operating system of the terminal further comprises an application layer, and the processing device further comprises a query module and a display module, wherein the query module and the display module are located at the application layer:
The query module is configured to send a query request to a framework layer of the terminal by the third party application so as to determine an image data processing mode which can be used by the third party application;
the display module is configured to display the usable image data processing mode on a shooting interface opened by the third party application.
15. An image data processing apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of processing image data according to any of claims 1-7.
16. A non-transitory computer readable storage medium, which when executed by a processor of a terminal, causes the terminal to perform the method of processing image data according to any one of claims 1-7.
CN202111630399.8A 2021-12-28 2021-12-28 Image data processing method, device and storage medium Pending CN116419075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111630399.8A CN116419075A (en) 2021-12-28 2021-12-28 Image data processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111630399.8A CN116419075A (en) 2021-12-28 2021-12-28 Image data processing method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116419075A true CN116419075A (en) 2023-07-11

Family

ID=87056384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111630399.8A Pending CN116419075A (en) 2021-12-28 2021-12-28 Image data processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116419075A (en)

Similar Documents

Publication Publication Date Title
US20170304735A1 (en) Method and Apparatus for Performing Live Broadcast on Game
CN108108418B (en) Picture management method, device and storage medium
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN110677734B (en) Video synthesis method and device, electronic equipment and storage medium
CN111953903A (en) Shooting method, shooting device, electronic equipment and storage medium
CN111343386B (en) Image signal processing method and device, electronic device and storage medium
CN112004020B (en) Image processing method, image processing device, electronic equipment and storage medium
CN106447747B (en) Image processing method and device
CN107885464B (en) Data storage method, device and computer readable storage medium
CN107239490B (en) Method and device for naming face image and computer readable storage medium
CN111586296B (en) Image capturing method, image capturing apparatus, and storage medium
CN111698414B (en) Image signal processing method and device, electronic device and readable storage medium
CN110874829B (en) Image processing method and device, electronic device and storage medium
CN111461950B (en) Image processing method and device
CN108769513B (en) Camera photographing method and device
CN116419075A (en) Image data processing method, device and storage medium
CN107682623B (en) Photographing method and device
CN111464753B (en) Picture shooting method and device and storage medium
CN109766506B (en) Picture processing method, device, terminal, server and storage medium
CN107220131B (en) Data communication method, device and equipment
CN108596719B (en) Image display method and device
CN106713748B (en) Method and device for sending pictures
CN112099894A (en) Content determination method and device
CN107317977B (en) Shooting method and device
CN117692769A (en) Camera control method, device, image processing frame, medium, terminal and chip

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