Shooting processing method and device, electronic equipment and storage medium
By obtaining shooting instructions for two different image configurations in parallel in electronic devices, and using multiple transmission channels to process in parallel, the problem of slow shooting processing speed in the prior art is solved, and more efficient shooting processing and better users are achieved Experience.
Patent Information
- Application Number
- CN202310952503.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
When shooting images, existing electronic devices are limited by software resources and hardware resources, resulting in slow shooting processing speed and cannot process multiple shooting requests in parallel.
By acquiring shooting instructions for two different image configurations, requesting and outputing shooting images of two different image configurations in parallel, and processing is performed in parallel using at least two transmission channels.
It achieves the reduction of shooting processing time, improves shooting efficiency, improves user shooting experience, and avoids the reduction of memory resource peaks and equipment lag.
Smart Images

Figure CN119450186A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to a shooting processing method and device, an electronic device and a storage medium. Background Art
[0002] With the continuous development of electronic technology and communication technology, the shooting function of electronic devices is becoming more and more popular, and users have higher and higher requirements for image shooting. In order to give users a good shooting experience, it is necessary to improve the image shooting processing speed.
[0003] Due to the limitation of software and hardware resources of electronic devices, electronic devices can only process each shooting request in sequence, and need to wait for the transmission of the last shot image to be completed before the next shot can be taken. The image shooting processing speed is relatively slow. Summary of the invention
[0004] The embodiments of the present disclosure disclose a shooting processing method and device, an electronic device, and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a shooting processing method is provided, the method comprising:
[0006] Acquire two shooting instructions; wherein the two shooting instructions are used to instruct to shoot two images with different image configurations; the image configurations include: image size, image ratio and / or image type;
[0007] Based on the two shooting instructions, requesting the captured images of two different image configurations in parallel;
[0008] The captured images are outputted in two different image configurations.
[0009] In some embodiments, the step of requesting the captured images of two different image configurations in parallel based on the two capturing instructions includes:
[0010] Through at least two transmission channels of the first hardware abstraction layer, the captured images of the two different image configurations indicated by the two shooting instructions are requested in parallel; wherein the image configurations of the at least two transmission channels correspond one-to-one to the two different image configurations indicated by the two shooting instructions for capturing the captured images.
[0011] In some embodiments, the obtaining two shooting instructions includes: obtaining two shooting instructions sent by the application layer;
[0012] The outputting the captured images with two different image configurations includes: outputting the captured images with two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer.
[0013] In some embodiments, the obtaining two shooting instructions sent by the application layer includes: obtaining the two shooting instructions sent by the application layer through the framework layer;
[0014] The step of outputting the captured images with two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer comprises: uploading the captured images with two different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer; and outputting the captured images with two different image configurations to the application layer through the framework layer.
[0015] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the step of requesting in parallel through at least two transmission channels of the first hardware abstraction layer the captured images of two different image configurations indicated by the two shooting instructions includes:
[0016] If the first number is less than or equal to the second number, selecting the first number of transmission channels from the second number of transmission channels as target transmission channels to be configured; wherein the image configurations of the first number of target transmission channels correspond one-to-one to the image configurations of the first number of shooting instructions for shooting the captured images;
[0017] The first number of captured images of different image configurations are requested in parallel via the first number of transmission channels.
[0018] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the step of requesting in parallel through at least two transmission channels of the first hardware abstraction layer the captured images of two different image configurations indicated by the two shooting instructions includes:
[0019] If the first number is greater than the second number, selecting the second number of image configurations from the first number of image configurations; wherein the selected second number of image configurations have a one-to-one correspondence with the image configurations of the second number of transmission channels;
[0020] The captured images of the second number of image configurations are requested in parallel via the second number of transmission channels.
[0021] In some embodiments, the concurrently requesting, through at least two transmission channels of the first hardware abstraction layer, the captured images of two different image configurations captured by the two capture instructions, comprises:
[0022] After any one of the transmission channels of the second number of transmission channels has received the captured image corresponding to the image configuration, the image configuration of the transmission channel is reconfigured based on the image configuration of the third number of transmission channels; wherein the image configuration of the third number of transmission channels is the image configuration of the first number of image configurations other than the image configuration of the second number of transmission channels;
[0023] Based on the third number of the transmission channels, the captured images of the third number of image configurations are requested in parallel.
[0024] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the method further includes:
[0025] If the first number is greater than the second number, the number of transmission channels in the first hardware abstraction layer is increased to be greater than or equal to the first number; wherein at least the image configuration of the first number of transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number.
[0026] In some embodiments, the method further comprises:
[0027] Sending a resource request to the framework layer through the at least two transmission channels in the first hardware abstraction layer; wherein the resource request is used to request the framework layer to allocate storage space for the transmission channel;
[0028] The storage space corresponding to the image configuration is allocated to the transmission channel through the framework layer according to the resource request.
[0029] According to a second aspect of an embodiment of the present disclosure, a shooting processing device is provided, the device comprising:
[0030] An acquisition module, used for acquiring two shooting instructions; wherein the two shooting instructions are used for instructing to shoot two images with different image configurations; the image configurations include: image size, image ratio and / or image type;
[0031] A processing module, configured to request in parallel the captured images of two different image configurations based on the two capturing instructions;
[0032] A transmission module is used to output the captured images in two different image configurations.
[0033] In some embodiments, the processing module is used to, through at least two transmission channels of the first hardware abstraction layer, concurrently request the captured images of the two different image configurations indicated by the two shooting instructions; wherein the image configurations of the at least two transmission channels correspond one-to-one to the two different image configurations indicated by the two shooting instructions for capturing the captured images.
[0034] In some embodiments, it is characterized in that the acquisition module is used to acquire two shooting instructions sent by the application layer;
[0035] The transmission module is used to output the captured images of two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer.
[0036] In some embodiments, the acquisition module is used to acquire the two shooting instructions issued by the application layer through the framework layer;
[0037] The transmission module is used to upload two captured images with different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer; and output the captured images with two different image configurations to the application layer through the framework layer.
[0038] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number;
[0039] The processing module is used to select the first number of transmission channels from the second number of transmission channels as target transmission channels that need to be configured if the first number is less than or equal to the second number; wherein the image configuration of the first number of target transmission channels corresponds one-to-one to the image configuration of the captured image indicated by the shooting instructions of the first number; and request the first number of captured images with different image configurations in parallel through the first number of transmission channels.
[0040] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number;
[0041] The processing module is used to select the second number of image configurations from the first number of image configurations if the first number is greater than the second number; wherein the selected second number of image configurations correspond one-to-one to the image configurations of the second number of transmission channels; and request the captured images of the second number of image configurations in parallel through the second number of transmission channels.
[0042] In some embodiments, the processing module is used to, after receiving the captured image corresponding to the image configuration on any one of the second number of transmission channels, reconfigure the image configuration of the transmission channel based on a third number of image configurations; wherein the third number of image configurations are the image configurations of the first number of image configurations excluding the second number of image configurations; and based on the third number of transmission channels, request the captured images of the third number of image configurations in parallel.
[0043] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the device further includes:
[0044] The processing module is used to increase the number of transmission channels in the first hardware abstraction layer to be greater than or equal to the first number if the first number is greater than the second number; wherein at least the image configuration of the first number of transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number.
[0045] In some embodiments, the apparatus further comprises:
[0046] A request module, configured to send a resource request to the framework layer through the at least two transmission channels in the first hardware abstraction layer; wherein the resource request is used to request the framework layer to allocate storage space for the transmission channel;
[0047] An allocation module is used to allocate the storage space corresponding to the image configuration to the transmission channel according to the resource request through the framework layer.
[0048] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0049] a memory for storing processor-executable instructions;
[0050] A processor connected to the memory;
[0051] Wherein, the processor is configured to: implement the shooting processing method described in any embodiment of the present disclosure when executing the executable instructions.
[0052] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, wherein the storage medium stores a computer executable program, wherein the computer executable program, when executed by a processor, implements the shooting processing method described in any embodiment of the present disclosure.
[0053] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0054] In an embodiment of the present disclosure, two shooting instructions are obtained; wherein the two shooting instructions are used to instruct the shooting of two images with different image configurations; the image configuration includes: image size, image ratio and / or image type; based on the two shooting instructions, the two images with different image configurations are requested in parallel; and the images with two different image configurations are output.
[0055] In this way, compared with the related art that requires waiting for the last captured image to be transmitted before the next capture can be performed, two captured images with different image configurations can be requested in parallel, thereby reducing the capture processing time, improving the capture efficiency, and thus improving the user's capture experience. In addition, parallel request processing can also increase the speed of returning captured images, avoid the accumulation of capture tasks in the memory, and cause the peak value of the electronic device's memory resources to decrease, thereby reducing the situation where the electronic device freezes due to insufficient memory resources.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0058] Figure 1 is a flowchart of a shooting processing method according to an exemplary embodiment;
[0059] Figure 2 is a schematic diagram showing the size of a captured image according to an exemplary embodiment;
[0060] Figure 3 is a schematic diagram of a framework of a shooting processing method according to an exemplary embodiment;
[0061] Figure 4 is a schematic diagram of a framework of a shooting processing method according to an exemplary embodiment;
[0062] Figure 5 is a schematic diagram of a framework of a shooting processing method according to an exemplary embodiment;
[0063] Figure 6 is a flowchart of a shooting processing method according to an exemplary embodiment;
[0064] Figure 7 is a structural schematic diagram of a shooting and processing device according to an exemplary embodiment;
[0065] Figure 8The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0067] In the disclosed embodiment, Figure 1 is a block diagram of a shooting processing method according to an exemplary embodiment, such as Figure 1 As shown, the shooting processing method includes:
[0068] Step S110: acquiring two shooting instructions; wherein the two shooting instructions are used to instruct shooting images with two different image configurations; the image configurations include: image size, image ratio and / or image type;
[0069] Step S120: Based on the two shooting instructions, requesting the captured images of two different image configurations in parallel;
[0070] Step S130: outputting the captured images in two different image configurations.
[0071] The method described in the embodiments of the present disclosure is performed by an electronic device. The electronic device can be any mobile terminal or fixed terminal with a shooting function. Exemplarily, the terminal can be an Internet of Things terminal, such as a mobile phone (or "cellular" phone) and a computer with an Internet of Things terminal, for example, it can be a fixed, portable, pocket-sized, handheld, computer-built-in or vehicle-mounted device. Alternatively, the terminal can also be a device of an unmanned aerial vehicle. Alternatively, the terminal can also be a vehicle-mounted device, for example, it can be a driving computer with a shooting function, or a wireless terminal of an external driving computer. Alternatively, the terminal can also be a roadside device, for example, it can be a street lamp, a signal lamp or other roadside device with a shooting function.
[0072] In some embodiments, obtaining two shooting instructions in step S110 may be obtaining at least two shooting instructions. At least one involved in the embodiments of the present disclosure may be one or more; at least two and more may be two or more.
[0073] Optionally, a shooting instruction includes one or more image configurations, or a shooting instruction is used to indicate one or more image configurations.
[0074] Optionally, the shooting instruction is used to instruct shooting of a target object based on a carried image configuration.
[0075] Optionally, the shooting instruction is used to instruct shooting of multiple different target objects based on a carried image configuration.
[0076] Optionally, the shooting instruction is used to instruct shooting a target object based on a plurality of different image configurations carried.
[0077] Exemplarily, the first shooting instruction includes: a first image configuration; the first shooting instruction is used to instruct to capture the first image based on the first image configuration; wherein the first image configuration includes: a first image size, a first image ratio and / or a first image type.
[0078] Exemplarily, the two shooting instructions include a first shooting instruction and a second shooting instruction; the first shooting instruction includes: a first image configuration and a second image configuration; the first shooting instruction is used to instruct to shoot the first target object based on the first image configuration to obtain a first image, and to shoot the second target object based on the second image configuration to obtain a second image; wherein the first image configuration includes: a first image size, a first image ratio and / or a first image type; the second image configuration includes: a second image size, a second image ratio and / or a second image type.
[0079] Exemplarily, the two shooting instructions include a first shooting instruction and a second shooting instruction; the second shooting instruction includes: a third image configuration and a fourth image configuration; the second shooting instruction is used to instruct shooting a third target object based on the third image configuration and the fourth image configuration to obtain a third image and a fourth image; wherein the third image configuration includes: a third image size, a third image ratio and / or a third image type; the fourth image configuration includes: a fourth image size, a fourth image ratio and / or a fourth image type.
[0080] In some embodiments, the image size may be an image resolution; the image size indicates the number of pixels contained in a unit length in the image.
[0081] Optionally, the image size can be any size. For example, the image size can be (4368*2912) or (1920*1080). For example, Figure 2 As shown, an embodiment of the present disclosure provides a schematic diagram of taking photos of the same target object at different image sizes.
[0082] In some embodiments, an image scale may be used to indicate the length and width of an image.
[0083] Optionally, the image ratio may be any size ratio. For example, the image ratio may be 4:3, and the image corresponding to the image ratio may be 8 inches long and 6 inches wide, or the image may be 16 inches long and 12 inches wide.
[0084] In some embodiments, the image type may be an image format; the image type may indicate a format in which the image file is stored.
[0085] Optionally, the image type includes, but is not limited to, at least one of the following: Joint Photographic Experts Group (JPEG), Graphics Interchange Format (GIF), Portable Network Graphics (PNG), Tag Image File Format (TIFF) and Bitmap (BMP).
[0086] In one embodiment, the electronic device obtains a first shooting instruction and a second shooting instruction; wherein the first shooting instruction is used to indicate the shooting of a first shot image with an image size of (4096*3072); the second shooting instruction is used to indicate the shooting of a second shot image with an image size of (3072*3072); the electronic device simultaneously processes and requests the first shot image with an image size of (4096*3072) and the second shot image with an image size of (3072*3072) according to the first shooting instruction and the second shooting instruction; the electronic device outputs the first shot image with an image size of (4096*3072) and the second shot image with an image size of (3072*3072) obtained by shooting in parallel.
[0087] In this way, compared with the related art that requires waiting for the last captured image to be transmitted before the next capture can be performed, two captured images with different image configurations can be requested in parallel, thereby reducing the capture processing time, improving the capture efficiency, and thus improving the user's capture experience. In addition, parallel request processing can also increase the speed of returning captured images, avoid the accumulation of capture tasks in the memory, and cause the peak value of the electronic device's memory resources to decrease, thereby reducing the situation where the electronic device freezes due to insufficient memory resources.
[0088] In some embodiments, step S120 includes:
[0089] Through at least two transmission channels of the first hardware abstraction layer, the captured images of the two different image configurations indicated by the two shooting instructions are requested in parallel; wherein the image configurations of the at least two transmission channels correspond one-to-one to the at least two different image configurations indicated by the two shooting instructions for capturing the captured images.
[0090] In some embodiments, the Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuit; the hardware abstraction layer is used to abstract the hardware; the hardware abstraction layer provides a virtual hardware platform for the operating system.
[0091] Optionally, the hardware abstraction layer is used to implement functions of the hardware platform and / or control the hardware platform.
[0092] Optionally, the hardware abstraction layer is used to provide a unified application programming interface (Application Program Interface, API) for the software module.
[0093] Exemplarily, the hardware abstraction layer can be located between the framework layer and the kernel driver layer. For example, the hardware abstraction layer can be used to convert the RAW data output by the sensor into YUV data, and send the YUV data to the framework layer. In this way, the hardware abstraction layer can abstract the commonality of hardware operation and control, and provide a unified control interface for the upper-level software module, thereby realizing the isolation of the software module from the underlying hardware.
[0094] In some embodiments, the hardware abstraction layer includes: a first hardware abstraction layer. The first hardware abstraction layer is used to post-process and / or transmit the captured image; here, the captured image indicates the acquired original captured image data.
[0095] Exemplarily, the first hardware abstraction layer is used to abstract the control logic and implementation details of software resources and / or hardware resources related to camera processing.
[0096] In some embodiments, the first hardware abstraction layer includes but is not limited to at least one of the following: a first interactive interface layer, a session layer, an execution layer, a second interactive interface layer and a post-processing algorithm engine; wherein the post-processing algorithm engine includes multiple image processing algorithms and / or strategy information; the first interactive interface layer is used to interact with the framework layer, the session layer and the post-processing algorithm engine for data respectively; the execution layer is used to interact with the session layer, the second interactive interface layer and the post-processing algorithm engine for data respectively; the second interactive interface layer is used to interact with other external layers for data.
[0097] In some embodiments, the first hardware abstraction layer may be a hardware abstraction layer corresponding to a device manufacturer. Exemplarily, the device manufacturer may be any device manufacturer using a predetermined system architecture; the device manufacturer is used to produce electronic devices; the predetermined system may include: Android or iOS.
[0098] In some embodiments, a transmission channel is used to transmit a data stream (Stream) such as an image and request a corresponding storage space for the data stream; different transmission channels are used to transmit data streams with different configurations.
[0099] Optionally, the transmission channel may be a virtual camera (MockCamera); each virtual camera is used to transmit an image data stream of the same image configuration.
[0100] Optionally, the first transmission channel is configured in the first virtual camera, and the second transmission channel is configured in the second virtual camera.
[0101] Optionally, the first transmission channel may be understood as a first virtual camera, and the second transmission channel may be understood as a second virtual camera.
[0102] Exemplarily, the first shooting instruction is used to indicate shooting a first shot image with an image size of (4096*3072); the second shooting instruction is used to indicate shooting a second shot image with an image size of (3072*3072). The image configuration of the first transmission channel (e.g., the first virtual camera) corresponds to the image configuration of the image shot indicated by the first shooting instruction, and the first transmission channel is used to transmit an image with an image size of (4096*3072); the image configuration of the second transmission channel (e.g., the second virtual camera) corresponds to the image configuration of the image shot indicated by the second shooting instruction, and the second transmission channel is used to transmit an image with an image size of (3072*3072).
[0103] Thus, compared with the related art that needs to wait for the transmission of the last captured image to be completed before the next capture can be performed, on the one hand, the disclosed embodiment can request multiple captured images corresponding to multiple different image configurations through multiple transmission channels at the same time in parallel, which can improve the capture speed and efficiency and enhance the user's capture experience; on the other hand, it can reduce the situation where the image configuration information used to transmit the image through the transmission channel has changed due to the slow processing speed of the last capture, thereby optimizing the user's capture experience. In addition, the speed of returning the captured image can be increased through parallel request processing, avoiding the accumulation of capture tasks in the memory, which leads to a decrease in the peak value of the electronic device's memory resources, and thus reducing the situation where the electronic device is stuck due to insufficient memory resources.
[0104] In some embodiments, the method further includes: configuring at least one transmission channel for transmitting an image configuration of the captured image.
[0105] In some embodiments, configuring at least one transmission channel for transmitting an image configuration of a captured image includes: pre-configuring the transmission channel for transmitting the image configuration of the captured image.
[0106] For example, Figure 3As shown, the electronic device receives two image sizes through the first hardware abstraction layer, and the two image sizes include a first image size and a second image size; when configuring at least two transmission channels through the first hardware abstraction layer, the electronic device pre-configures the image size of the first transmission channel for transmitting images based on the received first image size, and pre-configures the image size of the second transmission channel for transmitting images based on the received second image size.
[0107] In this way, the embodiment of the present disclosure can pre-configure the transmission channel for transmitting the image configuration before receiving the shooting instruction, so that when the shooting instruction is received, the corresponding transmission channel can be matched at the first time without waiting for the configuration of the transmission channel, thereby improving the shooting processing speed and having relatively good timeliness.
[0108] In some embodiments, step S110 includes: obtaining two shooting instructions sent by the application layer;
[0109] Step S130 includes: outputting the captured images of two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer.
[0110] In some embodiments, the application layer is used to implement communication between a user and an application or between applications. The application layer may include multiple applications that have a camera call function (or a shooting function).
[0111] Optionally, the application program may include but is not limited to at least one of the following: a camera application, a communication application, a music application, a video application, a shopping application, etc.
[0112] Optionally, the application may be a native application in a native system of the electronic device; the native application is an application created and distributed by a device manufacturer or an operating system creator. Exemplarily, the application may be a system camera application.
[0113] Optionally, the application may be a third-party application; the third-party application is an application created by a vendor (collectively or individually), the vendor being different from the device manufacturer and / or the operating system creator. Exemplarily, the application may be a third-party camera application.
[0114] Exemplarily, the application layer includes a camera application. The electronic device can process and transfer data to the camera service of the framework layer by calling a universal interface of the camera application provided by the operating system.
[0115] Optionally, the application layer is used to obtain a shooting instruction input by a user.
[0116] Exemplarily, the application layer of the electronic device responds to detecting an input operation of the user; and obtains a shooting instruction based on the input operation.
[0117] Optionally, the application layer is used to receive and display the captured image returned by the first hardware abstraction layer.
[0118] In some embodiments, the obtaining two shooting instructions sent by the application layer includes: obtaining the two shooting instructions sent by the application layer through the framework layer;
[0119] The step of outputting the captured images with two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer comprises: uploading the captured images with two different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer; and outputting the captured images with two different image configurations to the application layer through the framework layer.
[0120] In some embodiments, the framework layer is located between the application layer and the hardware abstraction layer; the framework layer is used to implement data transfer and / or scheduling between the application layer and the hardware abstraction layer; the framework layer includes service layers corresponding to multiple application programs.
[0121] Exemplarily, the framework layer includes a camera (application) service layer. The framework layer is used to pass data sent by the application layer to the hardware abstraction layer; and / or, the framework layer is used to pass data sent by the hardware abstraction layer to the application layer.
[0122] Optionally, the framework layer is used to provide APIs and / or components for the application layer.
[0123] Optionally, the framework layer is used to provide a framework interface for the hardware abstraction layer. Figure 3 As shown, the first transmission channel in the electronic device sends the first captured image corresponding to the received image size (4096*3072) to the framework layer; the second transmission channel in the electronic device sends the second captured image corresponding to the received image size (3072*3072) to the framework layer at the same time and in parallel; the electronic device sends the first captured image and the second captured image to the application layer through the framework layer at the same time.
[0124] In some embodiments, the configuring of at least one transmission channel for transmitting the image configuration of the captured image includes: if two shooting instructions of the application layer are received through the framework layer, based on the image configurations carried by the two shooting instructions, respectively configuring at least two transmission channels for transmitting the image configuration of the captured image.
[0125] Exemplarily, the electronic device receives a first shooting instruction and a second shooting instruction sent by an application layer through a first hardware abstraction layer; the electronic device configures a first transmission channel for transmitting an image configuration based on a first image configuration carried in the first shooting instruction through the first hardware abstraction layer; the electronic device configures a second transmission channel for transmitting an image configuration based on a second image configuration carried in the second shooting instruction through the first hardware abstraction layer.
[0126] In this way, the embodiment of the present disclosure can directly configure at least one transmission channel for transmitting image configuration information of the image based on the image configuration requirements carried in the request message, without the need to additionally transmit the image configuration information, and multiplex the transmission signaling (request message) to reduce resource consumption for transmission signaling.
[0127] In some embodiments, the configuring at least two transmission channels for transmitting the image configuration based on the image configurations carried by the two shooting instructions respectively includes:
[0128] If the image configuration carried by the shooting instruction does not match the image configuration configured on the transmission channel, the image configuration of the transmission channel is reconfigured to be the image configuration carried by the shooting instruction.
[0129] In some embodiments, the image configuration carried by the shooting instruction represents the image size, image ratio and / or image type of the image required to be shot by the user; the image configuration configured in the transmission channel represents the image size, image ratio and / or image type used to transmit the image of the pre-configured transmission channel.
[0130] Exemplarily, the first hardware abstraction layer of the electronic device receives two shooting instructions from the application layer through the framework layer; if the image configuration carried by the first shooting instruction is the first image configuration, and the image configuration carried by the second shooting instruction is the third image configuration; the image configuration that has been successfully configured on the first transmission channel is the second image configuration, and the image configuration that has been successfully configured on the second transmission channel is the third image configuration; then the electronic device determines that the image configuration carried by the second shooting instruction matches the image configuration that has been successfully configured on the second transmission channel, and the image configuration carried by the first shooting instruction does not match the image configuration that has been successfully configured on any transmission channel; the electronic device can update the second image configuration used to transmit the image on the first transmission channel to the first image configuration based on the first image configuration carried by the first shooting instruction through the first hardware abstraction layer.
[0131] In this way, in the embodiment of the present disclosure, the electronic device can determine whether the image configuration that has been successfully configured on any transmission channel matches the image configuration carried by the shooting instruction; if the electronic device determines that neither of them matches, it selects one of the transmission channels and reconfigures the image configuration used to transmit the image of the transmission channel to the image configuration carried by the shooting instruction, thereby ensuring the image quality and transmission quality of the captured image.
[0132] In some embodiments, before uploading two captured images with different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer, the method further includes:
[0133] Based on the at least two transmission channels respectively configured according to the image configurations of the transmission channels, captured images corresponding to the image configurations returned by the second hardware abstraction layer are received in parallel.
[0134] In some embodiments, the hardware abstraction layer includes: a second hardware abstraction layer. The second hardware abstraction layer is used to transmit shooting instructions and / or transmit shooting images; here, the shooting image indicates the acquired original shooting image data. In some embodiments, the second hardware abstraction layer can be a hardware abstraction layer corresponding to the platform side. Exemplarily, the platform side can be any manufacturer that provides hardware to the device manufacturer (for example, the platform side can be a manufacturer that provides chips to the device manufacturer).
[0135] Exemplarily, the first hardware abstraction layer is integrated between the framework layer and the second hardware abstraction layer, and can serve as an intermediate layer between the framework layer and the second hardware abstraction layer.
[0136] Exemplarily, the second interaction interface layer in the first hardware abstraction layer is used to perform data interaction with the second hardware abstraction layer.
[0137] In some embodiments, the first hardware abstraction layer may be a wrapper for the second hardware abstraction layer program.
[0138] Exemplarily, the first hardware abstraction layer is used to forward the camera application's (e.g., a third-party camera application) shooting request to the camera to the post-processing algorithm engine for reconstruction, and processes the data obtained by the first hardware abstraction layer to return it to the application layer and the framework layer.
[0139] In some embodiments, the second hardware abstraction layer may be a wrapper for a kernel driver.
[0140] Exemplarily, the second hardware abstraction layer is used to transfer the camera shooting requests of the application layer, framework layer and first hardware abstraction layer to the correct hardware driver to execute the action corresponding to the shooting request, and return the data obtained from the hardware to the first hardware abstraction layer, framework layer and application layer.
[0141] For example, Figure 3 As shown, the first transmission channel in the electronic device receives the first captured image corresponding to the image size configured for the first transmission channel and returned by the second hardware abstraction layer according to the configured image size (4096*3072); the second transmission channel in the electronic device receives the second captured image corresponding to the image size configured for the second transmission channel and returned by the second hardware abstraction layer according to the configured image size (3072*3072).
[0142] In some embodiments, the method includes: based on any transmission channel according to the image configuration configured by the transmission channel, receiving a plurality of captured images corresponding to the image configuration configured by the transmission channel and returned by the second hardware abstraction layer in a first predetermined order.
[0143] Optionally, the first predetermined order can be determined based on the chronological order of multiple captured images corresponding to the same image configuration returned by the second hardware abstraction layer; or, the first predetermined order can be determined based on the importance of multiple captured images corresponding to the same image configuration returned by the second hardware abstraction layer, without further limitation.
[0144] In this way, compared with the related art of receiving images sequentially, the embodiment of the present disclosure can simultaneously and in parallel receive captured images corresponding to multiple different image configurations, which can improve the image receiving speed and efficiency, and further reduce the time required to display the captured images to the user, thereby improving the user's shooting experience.
[0145] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the step of requesting in parallel through at least two transmission channels of the first hardware abstraction layer the captured images of two different image configurations indicated by the two shooting instructions includes:
[0146] If the first number is less than or equal to the second number, selecting the first number of transmission channels from the second number of transmission channels as target transmission channels to be configured; wherein the image configurations of the first number of target transmission channels correspond one-to-one to the image configurations of the first number of shooting instructions for shooting the captured images;
[0147] The first number of captured images of different image configurations are requested in parallel via the first number of transmission channels.
[0148] In some embodiments, after selecting the first number of transmission channels from the second number of transmission channels as target transmission channels to be configured, the method further includes:
[0149] The images indicated by the first number of shooting instructions are sequentially configured to the first number of target transmission channels.
[0150] Exemplarily, the electronic device receives three shooting instructions through the application layer. The three shooting instructions are used to instruct the shooting of three shooting images with different image configurations, for example, the first shooting instruction is used to instruct the shooting of the first shooting image of the first image size, the second shooting instruction is used to instruct the shooting of the second shooting image of the second image size, and the third shooting instruction is used to instruct the shooting of the third shooting image of the third image size. The electronic device determines that the number of transmission channels is five, then the first number is three, the second number is five, and the first number is less than the second number. The electronic device can select any three (for example, the first three) transmission channels from the five transmission channels as the target transmission channels that need to be configured; wherein the image configuration of the first target transmission channel corresponds to the first image size of the first shooting instruction to shoot the first shooting image, the image configuration of the second target transmission channel corresponds to the second image size of the second shooting instruction to shoot the second shooting image, and the image configuration of the third target transmission channel corresponds to the third image size of the third shooting instruction to shoot the third shooting image; the electronic device can request three shooting images of the first image size to the third image size in parallel through the three target transmission channels in the first hardware abstraction layer.
[0151] In this way, the embodiment of the present disclosure can simultaneously select and configure the same number of transmission channels as the shooting instructions as the target transmission channels. Through the transmission channels with multiple different image configurations, multiple captured images with different image configurations can be requested and transmitted in parallel, thereby reducing the shooting processing time, improving the shooting efficiency, and thus enhancing the user's shooting experience.
[0152] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the step of requesting in parallel through at least two transmission channels of the first hardware abstraction layer the captured images of two different image configurations indicated by the two shooting instructions includes:
[0153] If the first number is greater than the second number, selecting the second number of image configurations from the first number of image configurations; wherein the selected second number of image configurations have a one-to-one correspondence with the image configurations of the second number of transmission channels;
[0154] The captured images of the second number of image configurations are requested in parallel via the second number of transmission channels.
[0155] In some embodiments, selecting the second number of image configurations from the first number of image configurations comprises:
[0156] The second number of image configurations is selected from the first number of image configurations according to a second predetermined order.
[0157] Optionally, the second predetermined order can be determined according to the order of time of obtaining the shooting instructions corresponding to the received image configuration; or, the second predetermined order can be determined according to the priority of the image configuration; or, the second predetermined order can be determined according to the importance of the images taken according to the requirements of the image configuration.
[0158] In some embodiments, after selecting the second number of image configurations from the first number of image configurations, the method further includes:
[0159] The second number of image configurations are sequentially configured to the second number of transmission channels.
[0160] Exemplarily, the electronic device receives three shooting instructions through the application layer; the three shooting instructions are used to instruct the shooting of three images with different image configurations, for example, the first shooting instruction is used to instruct the shooting of the first shot image of the first image size, the second shooting instruction is used to instruct the shooting of the second shot image of the second image size, and the third shooting instruction is used to instruct the shooting of the third shot image of the third image size. The electronic device determines that the number of transmission channels is two, then the first number is three, the second number is two, and the first number is greater than the second number; the electronic device selects two image configurations with higher image configuration priority rankings from the three image configurations (for example, the priority ranking is that the first image size is higher than the third image size, and the third image size is higher than the second image size), and sequentially configures the two image configurations (the first image size and the third image size) to the two transmission channels; through the two transmission channels, the first image corresponding to the first image size and the third image corresponding to the third image size are requested in parallel.
[0161] In some embodiments, the concurrently requesting, through at least two transmission channels of the first hardware abstraction layer, the captured images of two different image configurations captured by the two capture instructions, comprises:
[0162] After any one of the transmission channels of the second number of transmission channels has received the captured image corresponding to the image configuration, the image configuration of the transmission channel is reconfigured based on the image configuration of the third number of transmission channels; wherein the image configuration of the third number of transmission channels is the image configuration of the first number of image configurations other than the image configuration of the second number of transmission channels;
[0163] Based on the third number of the transmission channels, the captured images of the third number of image configurations are requested in parallel.
[0164] In some embodiments, the method includes determining a target quantity based on a difference between the first quantity and the second quantity.
[0165] Optionally, the third number is any number less than or equal to the target number; the third number is a positive integer.
[0166] Exemplarily, the electronic device receives three shooting instructions through the application layer; the three shooting instructions are used to instruct the shooting of three shooting images with different image configurations, for example, the first shooting instruction is used to instruct the shooting of the first shooting image of the first image configuration, the second shooting instruction is used to instruct the shooting of the second shooting image of the second image configuration, and the third shooting instruction is used to instruct the shooting of the third shooting image of the third image configuration; the electronic device determines that the number of transmission channels is two. After the two image configurations (the first image configuration and the second image configuration) are sequentially configured to the two transmission channels, the electronic device determines whether there is a transmission channel in the two transmission channels that has received the shooting image corresponding to the image configuration; if the electronic device determines that there is a transmission channel (for example, the second transmission channel) in the two transmission channels that has received the shooting image corresponding to the image configuration (the second image configuration), the image configuration (the third image configuration) that has not been configured is reconfigured, and the transmission channel (the second transmission channel) is used for the image configuration of the transmission image; based on the configured transmission channel (the second transmission channel), the third shooting image corresponding to the image configuration (the third image configuration) is requested.
[0167] In this way, the embodiment of the present disclosure can reconfigure the image configuration of the transmission channel that has received the captured image corresponding to the image configuration based on the third number of image configurations while ensuring a relatively fast processing speed of the captured image, without creating more transmission channels to save memory resources of the electronic device.
[0168] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the method further includes:
[0169] If the first number is greater than the second number, the number of transmission channels in the first hardware abstraction layer is increased to be greater than or equal to the first number; wherein at least the image configuration of the first number of transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number.
[0170] In some embodiments, the method comprises:
[0171] Adding a third number of the transmission channels in the first hardware abstraction layer;
[0172] Based on the third number of image configurations, the image configurations for transmitting images of the third number of transmission channels are configured in sequence; wherein the third number of image configurations are image configurations other than the second number of image configurations in the first number of image configurations.
[0173] Exemplarily, the electronic device determines that the number of shooting instructions is five and the number of transmission channels is two; then the electronic device determines that the number of targets is three, and the third number may be three. The electronic device may add three transmission channels in the first hardware abstraction layer; the electronic device sequentially configures the image configurations for transmitting images of the three newly added transmission channels based on the image configurations indicated by the remaining three shooting instructions that have not been configured.
[0174] Exemplarily, the electronic device determines that the number of shooting instructions is five and the number of transmission channels is two; then the electronic device determines that the number of targets is three, and the third number may be one. The electronic device may add a transmission channel in the first hardware abstraction layer; the electronic device selects an image configuration carried by a shooting instruction from the image configurations carried by the remaining three shooting instructions that have not been configured according to the second predetermined order, and configures the newly added transmission channel. The electronic device can also determine whether there is a transmission channel for captured images corresponding to the image configuration that has been received among the two configured transmission channels; if the electronic device determines that there are two transmission channels for captured images corresponding to the image configuration that has been received, it reconfigures the two transmission channels for captured images corresponding to the image configuration that has been received based on the image configurations carried by the remaining two shooting instructions that have not been configured; if the electronic device determines that there is a transmission channel for captured images corresponding to the image configuration that has been received, it selects the image configuration carried by one of the remaining two shooting instructions that have not been configured according to a second predetermined order, and reconfigures a transmission channel for captured images corresponding to the image configuration that has been received; then, the electronic device again determines whether there is a transmission channel for captured images corresponding to the image configuration that has been received among the three transmission channels, and reconfigures any one of the transmission channels for captured images corresponding to the image configuration that has been received with the image configuration carried by the remaining one shooting instruction that has not been configured.
[0175] In this way, the disclosed embodiment can reduce the shooting processing time and improve the shooting efficiency without creating more transmission channels to save the memory resources of the electronic device, so as to achieve a balance between the memory resource utilization of the electronic device and the shooting processing speed, and also improve the user's shooting experience.
[0176] In some embodiments, the method further comprises:
[0177] Sending a resource request to the framework layer through the at least two transmission channels in the first hardware abstraction layer; wherein the resource request is used to request the framework layer to allocate storage space for the transmission channel;
[0178] The storage space corresponding to the image configuration is allocated to the transmission channel through the framework layer according to the resource request.
[0179] In some embodiments, the storage space is used to store the captured image returned by the second hardware abstraction layer.
[0180] Exemplarily, the electronic device allocates a first bit of storage space corresponding to a first image configuration to a first transmission channel through a framework layer, and the electronic device allocates a second bit of storage space corresponding to a second image configuration to a second transmission channel through a framework layer; wherein the first bit and the second bit are different in size.
[0181] In one embodiment, the method further includes: processing the captured image based on the policy information of the first hardware abstraction layer to obtain a processed captured image;
[0182] Providing the captured image to an application layer based on the at least two transmission channels includes: providing the processed captured image to the application layer in parallel based on the at least two transmission channels.
[0183] In some embodiments, the policy information is used to indicate at least one of the following: rectification, filtering, and noise reduction.
[0184] In some embodiments, the correction processing of the captured image includes at least one of the following:
[0185] Amplifying the captured image;
[0186] Reducing the captured image;
[0187] Cropping the captured image;
[0188] Performing perspective deformation on the captured image;
[0189] Performing text enhancement on the captured image;
[0190] Display parameters of the captured image are adjusted, wherein the display parameters include at least one of the following: contrast, brightness, color gamut, and gamma value.
[0191] For example, Figure 3 As shown, the electronic device sends the first captured image and the second captured image simultaneously and in parallel to the post-processing algorithm engine in the first hardware abstraction layer through the second hardware abstraction layer; the electronic device processes the captured images based on the strategy information of the post-processing algorithm engine; the electronic device sends the processed captured images in parallel to the transmission channels corresponding to the captured image configuration.
[0192] In this way, the captured images can be processed based on the strategy information to eliminate shooting errors generated during shooting, improve the clarity of the captured images, and ensure the quality of the captured images; and different processing of the captured images can meet different image quality requirements of the captured images.
[0193] Four specific examples are provided below in combination with any of the above embodiments:
[0194] Example 1: Figure 4 As shown, the first hardware abstraction layer in the electronic device includes a transmission channel (virtual camera). The electronic device processes the shooting tasks corresponding to the shooting instructions in sequence according to the order in which the shooting instructions are obtained: based on the image size (4096*3072) indicated by the first image configuration requirement represented by the first shooting instruction, the transmission channel is configured for transmitting the image configuration of the shot image, the first shot image corresponding to the image size (4096*3072) returned by the second hardware abstraction layer is received based on the transmission channel, and the first shot image is provided to the application layer based on the transmission channel; based on the image size (3072*3072) indicated by the second image configuration requirement represented by the second shooting instruction, the transmission channel is configured for transmitting the image configuration of the shot image, the second shot image corresponding to the image size (3072*3072) returned by the second hardware abstraction layer is received based on the transmission channel, and the second shot image is provided to the application layer based on the transmission channel.
[0195] Example 2: Figure 5 As shown, the system architecture of the electronic device includes at least one of the following:
[0196] The application layer is used to provide the user interface (UI) of the application (APP). The application layer includes: camera applications; camera applications include: system applications and third-party applications.
[0197] The framework layer is used to obtain the shooting instruction issued by the application layer and send it to the first hardware abstraction layer, and / or receive the shooting image transmitted by the first hardware abstraction layer and send it to the application layer. The framework layer includes: camera application interface, camera service, framework Binder interface; illustratively, the framework layer can be an Android native framework layer.
[0198] The first hardware abstraction layer is used to receive the simple shooting task corresponding to the shooting instruction sent by the application layer and the algorithm corresponding to the shooting instruction, customize the simple shooting task into a complex shooting task according to the algorithm and send it to the second hardware abstraction layer, and receive the shooting image (original image) returned by the second hardware abstraction layer. The first hardware abstraction layer includes: the first abstraction layer Binder service, the camera control module and the first abstraction layer Binder interface; the first abstraction layer Binder service includes: interface (HAL3.0); the camera control module includes: business logic control module and image post-processing intelligent engine; wherein, the original image is used to indicate the original image that has not been processed by the algorithm.
[0199] The second hardware abstraction layer is used to receive complex shooting tasks and send the shot images (original images) to the first hardware abstraction layer. The second hardware abstraction layer includes: a second abstraction layer Binder service; the second abstraction layer Binder service includes: an interface (HAL3.0).
[0200] The post-processing algorithm engine is used to receive the captured image (original image) and process the captured image according to the strategy information and / or algorithm. The post-processing algorithm engine includes: a post-processing algorithm management module, a hardware algorithm module and a software algorithm module; the hardware algorithm module includes: a hardware resource management module; the software algorithm module includes: a plug-in algorithm library.
[0201] The kernel driver layer is used to provide a unified driver operation interface for the application layer to use and control the hardware device. The kernel driver layer includes: driver. Exemplarily, the kernel driver layer can be used to realize the control of the lens module, photosensitive element, etc. in the hardware layer.
[0202] The hardware layer includes: lens module, photosensitive element and image signal processor.
[0203] Example 3: Figure 6 As shown, a shooting processing method is performed by an electronic device, including:
[0204] Step S601: Obtain at least two shooting instructions;
[0205] In an optional embodiment, a second hardware abstraction layer in an electronic device receives at least two shooting instructions issued by a first hardware abstraction layer; wherein the shooting instructions are used to instruct the shooting of an image; different shooting instructions indicate different image configurations of the captured images; and the image configuration includes: image size, image ratio and / or image type.
[0206] Step S602: receiving a captured image corresponding to the capturing instruction, and processing the captured image based on the strategy information to obtain a processed captured image;
[0207] In an optional embodiment, a post-processing algorithm engine of a first hardware abstraction layer in an electronic device receives in parallel at least two captured images of different image configurations indicated by at least two shooting instructions and sent by a second hardware abstraction layer; the electronic device processes the captured images of at least two different image configurations based on strategy information of the post-processing algorithm engine to obtain processed captured images of at least two different image configurations.
[0208] Step S603: configuring at least two transmission channels;
[0209] In an optional embodiment, the first hardware abstraction layer in the electronic device configures at least two transmission channels based on the image configuration sent by the framework layer; wherein the image configurations of the at least two transmission channels correspond one-to-one to at least two different image configurations of the at least two shooting instructions for shooting images. Optionally, if the number of image configurations is greater than the number of transmission channels, the number of transmission channels is increased to be greater than or equal to the number of image configurations.
[0210] Step S604: Allocate storage space corresponding to the image configuration to the transmission channel through the framework layer.
[0211] Step S605: sending the processed captured images with at least two different image configurations to the application layer based on at least two transmission channels;
[0212] In an optional embodiment, the first hardware abstraction layer in the electronic device sends the received at least two captured images with different image configurations to the framework layer based on at least two transmission channels; and sends the received at least two captured images with different image configurations to the application layer through the framework layer.
[0213] In this way, compared with the related art that needs to wait for the transmission of the last shot image to be completed before the next shot can be taken, multiple transmission channels for transmitting images with different image configuration information can be configured in the first hardware abstraction layer; on the one hand, multiple images with different image configuration information can be transmitted in parallel at the same time, reducing the shooting processing time, improving shooting efficiency, and thus improving the user's shooting experience; on the other hand, it can reduce the situation where the image configuration information used to transmit the image through the transmission channel has changed due to the slow processing speed of the last shot, thereby optimizing the user's shooting experience. In addition, parallel shooting processing can also increase the speed of returning the shot image, avoid the accumulation of shooting tasks in the memory, and cause the peak value of the electronic device's memory resources to decrease, thereby reducing the situation where the electronic device is stuck due to insufficient memory resources.
[0214] Example 4: The present disclosure provides a method for photographing and processing, and the specific steps are as follows:
[0215] 1) The electronic device sends the stream configuration corresponding to the target image to the second hardware abstraction layer through the photographing strategy module in the first hardware abstraction layer; wherein the stream configuration corresponding to the target image includes: image size and aspect ratio; the target image can be a captured image whose image size and / or aspect ratio is greater than a preset value.
[0216] 2) The electronic device sends the shooting results of the sensor in the hardware layer (i.e., the original image corresponding to the target image obtained by shooting) to the post-processing algorithm engine in the first hardware abstraction layer through the second hardware abstraction layer; the electronic device post-processes the shooting results according to the algorithm strategy determined in different shooting scenes and / or modes.
[0217] 3) The electronic device configures the stream configuration corresponding to the target image to the virtual camera in the first hardware layer through the framework layer, and then sends a shooting request to the virtual camera to allocate storage space for the stream corresponding to the target image.
[0218] 4) When the electronic device determines that the stream configuration of the target image includes different image sizes, the electronic device creates a new virtual camera at the first hardware abstraction layer; the electronic device reconfigures the new virtual camera and issues a shooting request based on the stream configuration corresponding to the unconfigured target image through the framework layer.
[0219] 5) The electronic device copies the processed shooting result to the stream queue in the virtual camera corresponding to the shooting result through the post-processing algorithm engine in the first hardware abstraction layer; the electronic device returns the processed shooting result to the framework layer through the stream queue in the virtual camera.
[0220] like Figure 7 As shown, based on the same inventive concept as the shooting and processing method provided in the above-mentioned embodiment, the embodiment of the present disclosure provides a shooting and processing device, the device comprising:
[0221] The acquisition module 710 is used to acquire two shooting instructions; wherein the two shooting instructions are used to instruct to shoot two images with different image configurations; the image configurations include: image size, image ratio and / or image type;
[0222] A processing module 720 is used for requesting the captured images of two different image configurations in parallel based on the two capturing instructions;
[0223] The transmission module 730 is used to output the captured images in two different image configurations.
[0224] In some embodiments, the processing module 720 is used to parallelly request, through at least two transmission channels of the first hardware abstraction layer, the captured images of at least two different image configurations indicated by the two shooting instructions; wherein the image configurations of the at least two transmission channels correspond one-to-one to the two different image configurations indicated by the two shooting instructions for capturing the captured images.
[0225] In some embodiments, it is characterized in that the acquisition module 710 is used to acquire two shooting instructions sent by the application layer;
[0226] The transmission module 730 is used to output the captured images of two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer.
[0227] In some embodiments, the acquisition module 710 is used to acquire the two shooting instructions issued by the application layer through the framework layer;
[0228] The transmission module 730 is used to upload two captured images with different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer; and output the captured images with two different image configurations to the application layer through the framework layer.
[0229] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number;
[0230] The processing module 720 is used to select the first number of transmission channels from the second number of transmission channels as target transmission channels that need to be configured if the first number is less than or equal to the second number; wherein the image configuration of the first number of target transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number for shooting the captured images; and through the first number of transmission channels, the first number of captured images with different image configurations are requested in parallel.
[0231] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number;
[0232] The processing module 720 is used to select the second number of image configurations from the first number of image configurations if the first number is greater than the second number; wherein the selected second number of image configurations correspond one-to-one to the image configurations of the second number of transmission channels; and request the captured images of the second number of image configurations in parallel through the second number of transmission channels.
[0233] In some embodiments, the processing module 720 is used to reconfigure the image configuration of the transmission channel based on a third number of image configurations after receiving the captured image corresponding to the image configuration on any one of the second number of transmission channels; wherein the third number of image configurations are the image configurations of the first number of image configurations excluding the second number of image configurations; and based on the third number of transmission channels, request the captured images of the third number of image configurations in parallel.
[0234] In some embodiments, the number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the device further includes:
[0235] The processing module 720 is used to increase the number of the transmission channels in the first hardware abstraction layer to be greater than or equal to the first number if the first number is greater than the second number; wherein at least the image configuration of the first number of transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number.
[0236] In some embodiments, the apparatus further comprises:
[0237] A request module, configured to send a resource request to the framework layer through the at least two transmission channels in the first hardware abstraction layer; wherein the resource request is used to request the framework layer to allocate storage space for the transmission channel;
[0238] An allocation module is used to allocate the storage space corresponding to the image configuration to the transmission channel according to the resource request through the framework layer.
[0239] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0240] An embodiment of the present disclosure provides an electronic device, the electronic device comprising:
[0241] a memory for storing processor-executable instructions;
[0242] A processor connected to the memory;
[0243] Wherein, the processor is configured to: implement the shooting processing method described in any embodiment of the present disclosure when executing the executable instructions.
[0244] The memory may be various types of memory, such as random access memory, read-only memory, flash memory, etc. The memory may be used for information storage, for example, storing computer executable instructions, etc. The computer executable instructions may be various program instructions, for example, target program instructions and / or source program instructions, etc.
[0245] The processor may be any type of processor, for example, a central processing unit, a microprocessor, a digital signal processor, a programmable array, a digital signal processor, an application specific integrated circuit or a virtual camera, etc. The processor may be connected to the memory via a bus, which may be an integrated circuit bus, etc.
[0246] like Figure 8 As shown, an embodiment of the present disclosure shows a structure of an electronic device. Figure 8The electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932 for storing instructions executable by the processing component 922, such as an application. The application stored in the memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute instructions to perform the aforementioned method.
[0247] The electronic device 900 may also include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input / output (I / O) interface 958. The electronic device 900 may operate based on an operating system stored in the memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0248] An embodiment of the present disclosure provides a storage medium, wherein the storage medium stores a computer executable program, wherein the computer executable program, when executed by a processor, can implement the shooting processing method described in any embodiment of the present disclosure.
[0249] The computer-readable storage medium provided in the embodiments of the present disclosure may be any storage medium that can store program codes, such as ROM, PROM, EPROM, EEPROM, FlashMemory, magnetic surface storage, optical disk, or CD-ROM.
[0250] In the above embodiments provided in the present disclosure, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0251] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present disclosure.
[0252] In addition, all functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may be distinguished as a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0253] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0254] In addition, the technical solutions described in the embodiments of the present disclosure may be arbitrarily combined without conflict.
[0255] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0256] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A shooting processing method, characterized in that: The method comprises: Acquire two shooting instructions; wherein the two shooting instructions are used to instruct to shoot two images with different image configurations; the image configurations include: image size, image ratio and / or image type; Based on the two shooting instructions, requesting the captured images of two different image configurations in parallel; The captured images are outputted in two different image configurations.
2. The method according to claim 1, characterized in that The step of requesting the captured images of two different image configurations in parallel based on the two capturing instructions comprises: Through at least two transmission channels of the first hardware abstraction layer, the captured images of the two different image configurations indicated by the two shooting instructions are requested in parallel; wherein the image configurations of the at least two transmission channels correspond one-to-one to the two different image configurations indicated by the two shooting instructions for capturing the captured images.
3. The method according to claim 1 or 2, characterized in that: The obtaining of two shooting instructions comprises: obtaining two shooting instructions sent by the application layer; The outputting the captured images with two different image configurations includes: outputting the captured images with two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer.
4. The method according to claim 3, characterized in that The obtaining of two shooting instructions sent by the application layer includes: obtaining the two shooting instructions sent by the application layer through the framework layer; The step of outputting the captured images with two different image configurations to the application layer through the at least two transmission channels of the first hardware abstraction layer comprises: uploading the captured images with two different image configurations to the framework layer in parallel through the at least two transmission channels of the first hardware abstraction layer; and outputting the captured images with two different image configurations to the application layer through the framework layer.
5. The method according to claim 2, characterized in that: The number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the parallel request for the captured images of two different image configurations captured by the two shooting instructions through at least two transmission channels of the first hardware abstraction layer includes: If the first number is less than or equal to the second number, selecting the first number of transmission channels from the second number of transmission channels as target transmission channels to be configured; wherein the image configurations of the first number of target transmission channels correspond one-to-one to the image configurations of the first number of shooting instructions for shooting the captured images; The first number of captured images of different image configurations are requested in parallel via the first number of transmission channels.
6. The method according to claim 2, characterized in that The number of the shooting instructions is a first number, and the number of the transmission channels is a second number; the parallel request for the captured images of two different image configurations captured by the two shooting instructions through at least two transmission channels of the first hardware abstraction layer includes: If the first number is greater than the second number, selecting the second number of image configurations from the first number of image configurations; wherein the selected second number of image configurations have a one-to-one correspondence with the image configurations of the second number of transmission channels; The captured images of the second number of image configurations are requested in parallel via the second number of transmission channels.
7. The method according to claim 6, characterized in that The step of requesting in parallel through at least two transmission channels of the first hardware abstraction layer the captured images of two different image configurations captured by at least the capturing instruction comprises: After any one of the transmission channels of the second number of transmission channels has received the captured image corresponding to the image configuration, the image configuration of the transmission channel is reconfigured based on the image configuration of the third number of transmission channels; wherein the image configuration of the third number of transmission channels is the image configuration of the first number of image configurations other than the image configuration of the second number of transmission channels; Based on the third number of the transmission channels, the captured images of the third number of image configurations are requested in parallel.
8. The method according to claim 2, characterized in that: The number of shooting instructions is a first number, and the number of transmission channels is a second number; the method further includes: If the first number is greater than the second number, the number of transmission channels in the first hardware abstraction layer is increased to be greater than or equal to the first number; wherein at least the image configuration of the first number of transmission channels corresponds one-to-one to the image configuration indicated by the shooting instruction of the first number.
9. The method according to claim 2, characterized in that: The method further comprises: Sending a resource request to the framework layer through the at least two transmission channels in the first hardware abstraction layer; wherein the resource request is used to request the framework layer to allocate storage space for the transmission channel; The storage space corresponding to the image configuration is allocated to the transmission channel through the framework layer according to the resource request.
10. A shooting and processing device, characterized in that: The device comprises: An acquisition module, used for acquiring two shooting instructions; wherein the two shooting instructions are used for instructing to shoot two images with different image configurations; the image configurations include: image size, image ratio and / or image type; A processing module, configured to request in parallel the captured images of two different image configurations based on the two capturing instructions; A transmission module is used to output the captured images in two different image configurations.
11. An electronic device, comprising: a memory for storing processor-executable instructions; A processor connected to the memory; The processor is configured to execute the shooting processing method according to any one of claims 1 to 9.
12. A storage medium, characterized in that: The storage medium stores an executable computer program, wherein when the executable computer program is executed by a processor, the shooting processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method and device for shooting pictures and recording videos
CN102938825A
Terminal photographing method and device
CN105141833A
Photographic image pre-processing method, device, storage medium, and mobile terminal
CN109089043A
Equipment imaging method and device, storage medium and electronic equipment
CN110620873A
Shooting method and device and storage medium
CN116419057A