[go: up one dir, main page]

CN111405178B - Camera2-based photographing method, device, storage medium and mobile device - Google Patents

Camera2-based photographing method, device, storage medium and mobile device Download PDF

Info

Publication number
CN111405178B
CN111405178B CN202010159037.4A CN202010159037A CN111405178B CN 111405178 B CN111405178 B CN 111405178B CN 202010159037 A CN202010159037 A CN 202010159037A CN 111405178 B CN111405178 B CN 111405178B
Authority
CN
China
Prior art keywords
image data
preview
preview image
photographing
camera2
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010159037.4A
Other languages
Chinese (zh)
Other versions
CN111405178A (en
Inventor
邹剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010159037.4A priority Critical patent/CN111405178B/en
Publication of CN111405178A publication Critical patent/CN111405178A/en
Application granted granted Critical
Publication of CN111405178B publication Critical patent/CN111405178B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/65Control of camera operation in relation to power supply
    • H04N23/651Control of camera operation in relation to power supply for reducing power consumption by affecting camera operations, e.g. sleep mode, hibernation mode or power off of selective parts of the camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

本申请提出一种基于Camera2的拍照方法、装置、存储介质及移动设备,该方法包括获取目标流管道输出的预览图像数据;将预览图像数据传输至成像组件;采用成像组件对预览图像数据进行成像处理,以得到目标图像。通过本申请能够实现直接采用目标流管道输出的预览图像数据辅助后续的拍照,由于预览处理路径已对预览图像数据进行了一定的图像处理,由此,通过直接采用已有的预览图像数据辅助拍照,而不是二次处理,有效提升拍照效率,降低移动设备的运行和存储功耗。

Figure 202010159037

The present application provides a camera2-based photographing method, device, storage medium and mobile device. The method includes acquiring preview image data output from a target stream pipeline; transmitting the preview image data to an imaging component; and using the imaging component to image the preview image data processing to obtain the target image. The present application can directly use the preview image data output by the target stream pipeline to assist the subsequent photographing. Since the preview processing path has performed certain image processing on the preview image data, the existing preview image data can be directly used to assist the photographing. , instead of secondary processing, which effectively improves the efficiency of taking pictures and reduces the running and storage power consumption of mobile devices.

Figure 202010159037

Description

Camera 2-based photographing method and device, storage medium and mobile device
Technical Field
The present application relates to the field of Camera technologies, and in particular, to a Camera 2-based photographing method and apparatus, a storage medium, and a mobile device.
Background
With the improvement and enhancement of the digital photographing function of the mobile device, more and more mobile devices support the Camera2 function, in the related art, when the Camera2 function is applied, firstly, the mobile device is adjusted to enter a photographing mode, two operation surfaces (one operation surface is used for previewing and the other operation surface is used for photographing) are generally required for photographing in the photographing mode, and parameter configuration is also required, and then, the data are transmitted to an application framework Layer and are transferred to a Hardware Abstraction Layer (HAL) to realize the preprocessing of preview image data and photographed image data.
In this way, the photographing processing path may go through the same algorithm as the preview processing path, thereby causing the photographing time to be long and unnecessarily occupying the running power consumption of the mobile device.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the Camera 2-based photographing method, device, storage medium and mobile device are provided, so that photographing efficiency can be effectively improved, and operation and storage power consumption of the mobile device can be reduced.
The Camera 2-based photographing method provided by the embodiment of the first aspect of the application includes: acquiring preview image data output by a target flow pipeline; transmitting the preview image data to an imaging component; and imaging the preview image data by adopting the imaging component to obtain a target image.
According to the method provided by the embodiment of the first aspect of the application, the preview image data output by the target flow pipeline is obtained, the preview image data is transmitted to the imaging component, the imaging component is used for imaging the preview image data to obtain the target image, the preview image data output by the target flow pipeline is directly adopted to assist subsequent photographing, and the preview processing path is used for performing certain image processing on the preview image data, so that the photographing is assisted by directly adopting the existing preview image data instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
The Camera 2-based photographing device provided by the embodiment of the second aspect of the application comprises: the acquisition module is used for acquiring preview image data output by the target flow pipeline; the transmission module is used for transmitting the preview image data to an imaging component; and the first processing module is used for imaging the preview image data by adopting the imaging component so as to obtain a target image.
The device provided by the embodiment of the second aspect of the application, through obtaining the preview image data output by the target flow pipeline, and transmitting the preview image data to the imaging component, and adopting the imaging component to perform imaging processing on the preview image data to obtain the target image, the subsequent photographing is assisted by directly adopting the preview image data output by the target flow pipeline, and as the preview processing path has performed certain image processing on the preview image data, therefore, the photographing is assisted by directly adopting the existing preview image data, instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
A non-transitory computer readable storage medium is provided in an embodiment of the third aspect of the present application, and when executed by a processor of a mobile device, the instructions in the storage medium enable the mobile device to perform a Camera 2-based photographing method, the method including: the Camera 2-based photographing method is provided in the embodiment of the first aspect of the application.
The non-transitory computer readable storage medium provided in the third embodiment of the present application obtains preview image data output by a target flow pipeline, transmits the preview image data to an imaging component, and performs imaging processing on the preview image data by using the imaging component to obtain a target image, so as to implement assistance of subsequent photographing by directly using the preview image data output by the target flow pipeline.
An embodiment of a fourth aspect of the present application provides a mobile device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile equipment; the memory is used for storing executable program codes; the processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the Camera 2-based photographing method provided by the embodiment of the first aspect of the application.
The mobile device provided by the embodiment of the fourth aspect of the application, through acquiring the preview image data output by the target flow pipeline, transmitting the preview image data to the imaging component, and adopting the imaging component to perform imaging processing on the preview image data to obtain a target image, realizes that the preview image data output by the target flow pipeline is directly adopted to assist subsequent photographing, and because the preview processing path has already performed certain image processing on the preview image data, therefore, the photographing is assisted by directly adopting the existing preview image data instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a photographing method based on Camera2 according to an embodiment of the present application;
FIG. 2 is a block diagram of a mobile device according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a photographing method based on Camera2 according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of a photographing device based on Camera2 according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a Camera 2-based photographing device according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a mobile device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application. On the contrary, the embodiments of the application include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Fig. 1 is a schematic flowchart of a photographing method based on Camera2 according to an embodiment of the present application.
In this embodiment, a mobile device may communicate with one or more Core networks (Core networks) through a Radio Access Network (RAN), and the mobile device may be referred to as an Access terminal, a User Equipment (UE), a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a User terminal, a wireless communication device, a User agent, or a User Equipment.
The mobile device may also be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with Wireless communication capability, a computing device or other processing device connected to a Wireless modem, an in-vehicle device, a wearable device, a mobile device in a future 5G network, and so forth.
The mobile device in the embodiment of the present application supports the Camera2 function, and the related description of the Camera2 function may be referred to in the prior art, and is not described herein again.
The embodiment of the present application provides a photographing method based on Camera2, for solving the technical problem in the related art that the photographing processing path will go through the same algorithm as the preview processing path, thereby causing the photographing time to be long and unnecessarily occupying the operating power consumption of the mobile device, and refer to the following specifically.
Referring to fig. 2, fig. 2 is a schematic diagram of an architecture of a mobile device in an embodiment of the present application, including: the camera application layer provides icons of the applications, user interaction interfaces of the applications and the like, and particularly comprises a plurality of portals providing camera services. The conventional design of a camera application layer is that a photo mode, a camera equipment control mode, a preview mode, a photographing mode and a view layer mode are designed according to modules, and then a data control module, such as a database, a written file and the like, is used; the application framework layer is a Software Development Kit (SDK) layer opened by Android, and is a bridge layer for communication between the application layer and the HAL; HAL framework layer: is a bridge for communicating the application framework layer and the HAL layer; the HAL layer is the control layer for various sensors, or other components, that encapsulates the control logic for the various components.
The embodiment of the present application is specifically applied to the Camera application layer of the above architecture, and improves the architecture of the existing mobile device, so as to assist the photographing method based on Camera 2.
Referring to fig. 1, the method includes:
s101: and acquiring preview image data output by the target flow pipeline.
The target stream pipe is a stream pipe for outputting preview image data and assisting image preview.
Compared with the prior art in which a preview processing path and a photographing processing path are configured, each path corresponds to a flow pipeline, the embodiment of the application improves the existing architecture, deletes one photographing processing path in the architecture of the mobile device, uses the preview image data output by the existing preview processing path to assist the preview of the subsequent image, uses the photographing image data output by the photographing processing path to assist the subsequent photographing, and adjusts the preview image data output by the target flow pipeline to assist the subsequent photographing.
Referring to fig. 2, fig. 2 indicates that, except for the target stream pipe 21, in the embodiment of the present application, only one stream pipe is reserved, and the other stream pipe (the path in the dashed box 22 in fig. 2) is subjected to deletion processing.
The method for obtaining the preview image data output by the target flow pipeline specifically comprises the steps of receiving preview configuration parameters input by a user in a preview interface of the mobile equipment, obtaining initial image data output by the target flow pipeline, and configuring the initial image data by adopting the preview configuration parameters, so that the preview image data is obtained, the preview of subsequent images can be effectively assisted, and the timeliness and the preview effect of image preview are guaranteed.
It is understood that when a user starts a user interaction interface of a photographing application at a camera application layer, the user interaction interface generally displays a preview picture, and the user generally has a requirement for adjusting the preview picture, for example, adjusting a brightness value and an exposure value, parameters described by the requirement for adjusting, that is, may be referred to as preview configuration parameters, and data related to the preview picture initially displayed by the user interaction interface may be referred to as initial image data, which may be configured in a target flow pipe of a HAL framework layer, may be directly read from the target flow pipe, and configure the initial image data using the preview configuration parameters, for example, setting a brightness parameter and an exposure parameter related to the initial image data according to the brightness value and the exposure value, so as to obtain the preview image data, which is not limited.
S102: the preview image data is transmitted to the imaging component.
After the preview image data output by the target flow pipeline is acquired, the preview image data is directly transmitted to the imaging component, so that the imaging is assisted.
In the embodiment of the application, the preview image data can be output to the preview component; the preview component is adopted to carry out imaging processing on the preview image data so as to obtain the preview image, therefore, the completeness of the application function of the mobile equipment camera is effectively guaranteed, the preview efficiency and the photographing efficiency are integrally improved, and the operation power consumption of the mobile equipment is reduced.
Optionally, the acquired preview image data may be directly transmitted to the imaging component, or the preview image data may be compressed and then transmitted to the imaging component, and appropriate transformation and adjustment may be performed according to actual application requirements, which is not limited to this.
In the embodiment of the application, the preview image data can be copied to obtain copy image data; the copy image data is transmitted to the imaging component, and the copy of the preview image data is formed, so that image preview and image photographing can be simultaneously supported, and the method is simple and convenient to realize.
In the embodiment of the application, the preview image data can be copied to obtain the copy image data after the image photographing instruction is received and the preview image data output by the target flow pipeline is obtained, so that the copy image data is generated as required without occupying excessive memory resources, and the image photographing is directly assisted after the copy image data is generated, so that the photographing efficiency is ensured from multiple angles.
The image data copied from the preview image data may be referred to as copy image data.
S103: and imaging the preview image data by adopting the imaging component to obtain a target image.
It can be understood that, the preview processing path performs a certain image processing on the preview image data, for example, a brightness parameter and an exposure parameter related to the initial image data are set according to the brightness value and the exposure value, so as to obtain the preview image data, and the user may dynamically adjust the photographing requirement during the actual photographing process, and take a photograph with a photographing parameter different from the preview configuration parameter.
Therefore, in the embodiment of the application, after the preview image data is transmitted to the imaging component, the imaging component is further adopted to perform imaging processing on the preview image data to obtain the target image.
For example, a photographing instruction input by a user may be monitored, and the photographing instruction is parsed to identify a photographing parameter, so that the imaging component performs imaging processing on the preview image data by using the photographing parameter to obtain a target image.
Optionally, in some embodiments, referring to fig. 3, the imaging processing on the preview image data to obtain the target image includes:
s301: and updating the size information of the preview image data to obtain new preview image data.
S302: and coding the new preview image data to obtain a coded image.
S303: and receiving photographing configuration parameters input by a user in a photographing interface of the mobile equipment.
S304: and configuring the coded image by adopting the photographing configuration parameters so as to obtain a target image.
Referring also to fig. 2 above, the imaging assembly of fig. 2 may further include: the mobile device comprises an image processing module, an encoding module and an image information writing module, wherein the image processing module updates the size information of the preview image data to obtain new preview image data, the encoding module encodes the new preview image data to obtain an encoded image, the image information writing module receives photographing configuration parameters input by a user in a photographing interface of the mobile device, the encoded image is configured by adopting the photographing configuration parameters to obtain a target image, and the target image is written into a database without limitation.
The method comprises the steps of updating size information of preview image data to obtain new preview image data, coding the new preview image data to obtain a coded image, receiving photographing configuration parameters input by a user in a photographing interface of the mobile equipment, and configuring the coded image by adopting the photographing configuration parameters to obtain a target image, so that the output target image meets photographing requirements of the user, the preview image data can be fused into a photographing processing path continuously, and photographing effects are improved.
In this embodiment, through obtaining the preview image data output by the target flow pipeline, transmitting the preview image data to the imaging component, and adopting the imaging component to perform imaging processing on the preview image data to obtain a target image, the preview image data output by the target flow pipeline is directly adopted to assist subsequent photographing, and since the preview processing path has performed certain image processing on the preview image data, therefore, the photographing is assisted by directly adopting the existing preview image data, instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
The technical effect of the present application is illustrated below in the form of experimental data:
assuming that the photographed image data is 10MB data, generally in YUV format, the technical solution in the embodiment of the present application can save memory space of 10/2 × 3 — 15MB size.
Assuming that 3 special effect processes are required and each special effect process takes 100ms, the technical scheme in the embodiment of the application can reduce the photographing time of the mobile device by 300ms, so that the photographing is faster and the expressive force of the photographed product is improved.
Since the preview processing path does not need to be configured, the memory with the size 1.5 times that of the memory occupied by the preview processing path can be applied, so that the required memory space is less, and if the picture size of 10MB is taken, the size of 10/2 × 3 to 15MB can be saved, and the usage amount of the system memory during photographing is reduced.
By adopting the embodiment of the application, the photographing performance is faster, favorable conditions are provided for superposing more photographing algorithms again, the size of the application APK can be reduced, and the method is more suitable for application scenes of continuous photographing.
Fig. 4 is a schematic structural diagram of a photographing device based on Camera2 according to an embodiment of the present application.
Referring to fig. 4, the apparatus 400 includes:
an obtaining module 401, configured to obtain preview image data output by a target flow pipeline;
a transmission module 402 for transmitting the preview image data to the imaging component;
a first processing module 403, configured to perform imaging processing on the preview image data by using an imaging component to obtain a target image.
Optionally, in some embodiments, referring to fig. 5, the apparatus 400 further comprises:
an output module 404, configured to output the preview image data to a preview component;
and a second processing module 405, configured to perform imaging processing on the preview image data by using the preview component to obtain a preview image.
Optionally, in some embodiments, referring to fig. 5, the obtaining module 401 includes:
the first receiving submodule 4011 is configured to receive a preview configuration parameter input by a user in a preview interface of the mobile device;
the obtaining sub-module 4012 is configured to obtain initial image data output by the target flow pipeline;
the first configuring sub-module 4013 is configured to configure the initial image data by using the preview configuration parameter, so as to obtain preview image data.
Optionally, in some embodiments, referring to fig. 5, the apparatus 400 further comprises:
a copying module 406, configured to copy the preview image data to obtain copy image data;
a transmission module 402, further configured to:
the duplicate image data is transmitted to an imaging component.
Optionally, in some embodiments, referring to fig. 5, the first processing module 403 includes:
an update sub-module 4031, configured to update the size information of the preview image data to obtain new preview image data;
the encoding submodule 4032 is used for encoding the new preview image data to obtain an encoded image;
the second receiving submodule 4033 is used for receiving the photographing configuration parameters input by the user in the photographing interface of the mobile device;
and the second configuration submodule 4034 is configured to configure the encoded image by using the photographing configuration parameters, so as to obtain a target image.
It should be noted that the explanation of the aforementioned embodiment of the photographing method based on Camera2 in fig. 1-3 also applies to the photographing apparatus 400 based on Camera2 in this embodiment, and the implementation principle is similar, and is not described herein again.
In this embodiment, through obtaining the preview image data output by the target flow pipeline, transmitting the preview image data to the imaging component, and adopting the imaging component to perform imaging processing on the preview image data to obtain a target image, the preview image data output by the target flow pipeline is directly adopted to assist subsequent photographing, and since the preview processing path has performed certain image processing on the preview image data, therefore, the photographing is assisted by directly adopting the existing preview image data, instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
Fig. 6 is a schematic structural diagram of a mobile device according to an embodiment of the present application.
Referring to fig. 6, a mobile device 600 of the present embodiment includes a housing 601, a processor 602, a memory 603, a circuit board 604, and a power circuit 605, where the circuit board 604 is disposed inside a space surrounded by the housing 601, and the processor 602 and the memory 603 are disposed on the circuit board 604; a power circuit 605 for powering various circuits or devices of the mobile device 600; the memory 603 is used for storing executable program code; the processor 602 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 603, for performing:
acquiring preview image data output by a target flow pipeline;
transmitting the preview image data to an imaging component;
and imaging the preview image data by adopting the imaging component to obtain a target image.
It should be noted that the foregoing explanation of the embodiment of the photographing method based on Camera2 in the embodiments of fig. 1 to fig. 3 also applies to the mobile device 600 of this embodiment, and the implementation principle is similar and will not be described herein again.
In this embodiment, through obtaining the preview image data output by the target flow pipeline, transmitting the preview image data to the imaging component, and adopting the imaging component to perform imaging processing on the preview image data to obtain a target image, the preview image data output by the target flow pipeline is directly adopted to assist subsequent photographing, and since the preview processing path has performed certain image processing on the preview image data, therefore, the photographing is assisted by directly adopting the existing preview image data, instead of secondary processing, the photographing efficiency is effectively improved, and the operation and storage power consumption of the mobile device are reduced.
In order to implement the above embodiments, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the Camera 2-based photographing method of the foregoing method embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1.一种基于Camera2的拍照方法,其特征在于,所述方法包括:1. a photographing method based on Camera2, is characterized in that, described method comprises: 获取目标流管道输出的预览图像数据;Get the preview image data output by the target stream pipeline; 将所述预览图像数据输出至预览组件;outputting the preview image data to the preview component; 采用所述预览组件对所述预览图像数据进行成像处理,以得到预览图像;Perform imaging processing on the preview image data by using the preview component to obtain a preview image; 将所述预览图像数据传输至成像组件;transmitting the preview image data to the imaging assembly; 采用所述成像组件对所述预览图像数据进行成像处理,以得到目标图像。Perform imaging processing on the preview image data by using the imaging component to obtain a target image. 2.如权利要求1所述的基于Camera2的拍照方法,其特征在于,所述获取目标流管道输出的预览图像数据,包括:2. the photographing method based on Camera2 as claimed in claim 1, is characterized in that, the preview image data that described acquisition target stream pipeline outputs, comprises: 接收用户在移动设备的预览界面中输入的预览配置参数;Receive preview configuration parameters input by the user in the preview interface of the mobile device; 获取所述目标流管道输出的初始图像数据;obtaining the initial image data output by the target stream pipeline; 采用所述预览配置参数对所述初始图像数据进行配置,从而得到所述预览图像数据。The initial image data is configured using the preview configuration parameters, thereby obtaining the preview image data. 3.如权利要求1所述的基于Camera2的拍照方法,其特征在于,所述获取目标流管道输出的预览图像数据后,还包括:3. the photographing method based on Camera2 as claimed in claim 1, is characterized in that, after described obtaining the preview image data of target stream pipeline output, also comprises: 复制所述预览图像数据,得到副本图像数据;Duplicate the preview image data to obtain duplicate image data; 所述将所述预览图像数据传输至成像组件,包括:The transmitting the preview image data to the imaging component includes: 将所述副本图像数据传输至所述成像组件。The replica image data is transmitted to the imaging assembly. 4.如权利要求1-3任一项所述的基于Camera2的拍照方法,其特征在于,所述对所述预览图像数据进行成像处理,以得到目标图像,包括:4. The photographing method based on Camera2 according to any one of claims 1-3, wherein the image processing is performed on the preview image data to obtain a target image, comprising: 更新所述预览图像数据的尺寸信息,得到新预览图像数据;updating the size information of the preview image data to obtain new preview image data; 对所述新预览图像数据进行编码,得到编码图像;Encoding the new preview image data to obtain an encoded image; 接收用户在移动设备的拍照界面中输入的拍照配置参数;Receive the camera configuration parameters input by the user in the camera interface of the mobile device; 采用所述拍照配置参数对所述编码图像进行配置,从而得到所述目标图像。The encoded image is configured by using the photographing configuration parameters, so as to obtain the target image. 5.一种基于Camera2的拍照装置,其特征在于,所述装置包括:5. a photographing device based on Camera2, is characterized in that, described device comprises: 获取模块,用于获取目标流管道输出的预览图像数据;The acquisition module is used to acquire the preview image data output by the target stream pipeline; 传输模块,用于将所述预览图像数据传输至成像组件;及a transmission module for transmitting the preview image data to the imaging component; and 用于将所述预览图像数据输出至预览组件;for outputting the preview image data to the preview component; 第一处理模块,用于采用所述成像组件对所述预览图像数据进行成像处理,以得到目标图像;及a first processing module, configured to perform imaging processing on the preview image data by using the imaging component to obtain a target image; and 用于采用所述预览组件对所述预览图像数据进行成像处理,以得到预览图像。It is used for performing imaging processing on the preview image data by using the preview component to obtain a preview image. 6.如权利要求5所述的基于Camera2的拍照装置,其特征在于,所述获取模块,包括:6. the photographing device based on Camera2 as claimed in claim 5, is characterized in that, described acquisition module, comprises: 第一接收子模块,用于接收用户在移动设备的预览界面中输入的预览配置参数;The first receiving sub-module is used to receive the preview configuration parameters input by the user in the preview interface of the mobile device; 获取子模块,用于获取所述目标流管道输出的初始图像数据;an acquisition submodule for acquiring the initial image data output by the target stream pipeline; 第一配置子模块,用于采用所述预览配置参数对所述初始图像数据进行配置,从而得到所述预览图像数据。The first configuration sub-module is configured to use the preview configuration parameter to configure the initial image data, so as to obtain the preview image data. 7.如权利要求5所述的基于Camera2的拍照装置,其特征在于,所述装置,还包括:7. The camera-based device of claim 5, wherein the device further comprises: 复制模块,用于复制所述预览图像数据,得到副本图像数据;a copying module for copying the preview image data to obtain the copy image data; 所述传输模块,还用于:The transmission module is also used for: 将所述副本图像数据传输至所述成像组件。The replica image data is transmitted to the imaging assembly. 8.如权利要求5-7任一项所述的基于Camera2的拍照装置,其特征在于,所述第一处理模块,包括:8. The camera-based camera2 according to any one of claims 5-7, wherein the first processing module comprises: 更新子模块,用于更新所述预览图像数据的尺寸信息,得到新预览图像数据;an update submodule for updating the size information of the preview image data to obtain new preview image data; 编码子模块,用于对所述新预览图像数据进行编码,得到编码图像;an encoding submodule for encoding the new preview image data to obtain an encoded image; 第二接收子模块,用于接收用户在移动设备的拍照界面中输入的拍照配置参数;The second receiving sub-module is configured to receive the camera configuration parameters input by the user in the camera interface of the mobile device; 第二配置子模块,用于采用所述拍照配置参数对所述编码图像进行配置,从而得到所述目标图像。The second configuration sub-module is configured to configure the encoded image by using the photographing configuration parameters, so as to obtain the target image. 9.一种非临时性计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-4中任一项所述的基于Camera2的拍照方法。9. A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the method for taking pictures based on Camera2 as described in any one of claims 1-4 is realized . 10.一种移动设备,所述移动设备包括壳体、处理器、存储器、电路板和电源电路,其中,所述电路板安置在所述壳体围成的空间内部,所述处理器和所述存储器设置在所述电路板上;所述电源电路,用于为所述移动设备的各个电路或器件供电;所述存储器用于存储可执行程序代码;所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1-4中任一项所述的基于Camera2的拍照方法。10. A mobile device, the mobile device comprising a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is positioned inside the space enclosed by the housing, the processor and the The memory is arranged on the circuit board; the power circuit is used to supply power to each circuit or device of the mobile device; the memory is used to store executable program codes; the processor reads the memory by reading the memory The executable program code stored in the program code is used to run the program corresponding to the executable program code, so as to execute the camera2-based photographing method according to any one of claims 1-4.
CN202010159037.4A 2020-03-09 2020-03-09 Camera2-based photographing method, device, storage medium and mobile device Active CN111405178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010159037.4A CN111405178B (en) 2020-03-09 2020-03-09 Camera2-based photographing method, device, storage medium and mobile device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010159037.4A CN111405178B (en) 2020-03-09 2020-03-09 Camera2-based photographing method, device, storage medium and mobile device

Publications (2)

Publication Number Publication Date
CN111405178A CN111405178A (en) 2020-07-10
CN111405178B true CN111405178B (en) 2021-07-23

Family

ID=71432714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010159037.4A Active CN111405178B (en) 2020-03-09 2020-03-09 Camera2-based photographing method, device, storage medium and mobile device

Country Status (1)

Country Link
CN (1) CN111405178B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520868B (en) * 2020-11-20 2023-05-12 华为技术有限公司 Video processing method, device and storage medium
CN114519935B (en) * 2020-11-20 2023-06-06 华为技术有限公司 Road recognition method and device
CN113890998B (en) * 2021-10-26 2024-08-20 Oppo广东移动通信有限公司 Image data processing method and device, electronic equipment and storage medium
CN115714907A (en) * 2022-11-11 2023-02-24 深圳市广和通无线股份有限公司 Photographing method, monitoring device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100018666A (en) * 2008-08-07 2010-02-18 주식회사 케이티테크 Preview utilizing method, and imaging apparatus and handheld apparatus performing the method
CN108337433A (en) * 2018-03-19 2018-07-27 广东欧珀移动通信有限公司 A kind of photographic method, mobile terminal and computer readable storage medium
CN110300240A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Image processor, image processing method, photographing device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763475B (en) * 2014-01-28 2017-11-17 宇龙计算机通信科技(深圳)有限公司 A kind of photographic method and device
CN105554364A (en) * 2015-07-30 2016-05-04 宇龙计算机通信科技(深圳)有限公司 Image processing method and terminal
US10769935B2 (en) * 2016-09-12 2020-09-08 Sensormatic Electronics, LLC Method and apparatus for unified mobile application for installation of security products
CN107277353B (en) * 2017-06-30 2019-02-15 维沃移动通信有限公司 A method and mobile terminal for taking pictures
CN108282608B (en) * 2017-12-26 2020-10-09 努比亚技术有限公司 Multi-region focusing method, mobile terminal and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100018666A (en) * 2008-08-07 2010-02-18 주식회사 케이티테크 Preview utilizing method, and imaging apparatus and handheld apparatus performing the method
CN108337433A (en) * 2018-03-19 2018-07-27 广东欧珀移动通信有限公司 A kind of photographic method, mobile terminal and computer readable storage medium
CN110300240A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Image processor, image processing method, photographing device and electronic equipment

Also Published As

Publication number Publication date
CN111405178A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN111405178B (en) Camera2-based photographing method, device, storage medium and mobile device
JP4313311B2 (en) Camera module chipset
CN114125284B (en) Image processing method, electronic device and storage medium
CN115499579B (en) Processing method and device based on zero-second delay ZSL
CN114866681B (en) Cross-device collaborative shooting method, related devices and systems
WO2022160985A1 (en) Distributed photographing method, electronic device, and medium
JP2009060163A (en) Wireless communication system, method and program
JP2002101226A (en) Imaging device and method, storage medium, and communication device and method, and storage medium
CN111371997A (en) Control method of mobile equipment and mobile equipment
CN115225753A (en) Shooting method, related device and system
JP6433265B2 (en) Information processing apparatus, electronic device, control method thereof, program, and storage medium
CN114928898B (en) Method and device for establishing session based on WiFi direct connection
CN111314606A (en) Photographing method and device, electronic equipment and storage medium
CN111726516A (en) Image processing method and device
CN118646948B (en) Image processing method, electronic device and computer readable storage medium
JP2003202989A (en) Method for updating function of electronic equipment
US7164857B2 (en) Communication terminal and program
JP2004140799A (en) Method, apparatus, and program for controlling image pickup device
JP7218164B2 (en) Communication device and its control method
JP2004112360A (en) Digital camera
JP7146434B2 (en) COMMUNICATION DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
JP6976722B2 (en) Communication equipment and its control method, and programs
CN117082295B (en) Image stream processing method, equipment and storage medium
CN116701288B (en) Streaming media characteristic architecture, processing method, electronic device and readable storage medium
CN117499780B (en) Photographing method, electronic device and collaborative working system

Legal Events

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