[go: up one dir, main page]

HK1251387B - Imaging method and device based on dual camera - Google Patents

Imaging method and device based on dual camera Download PDF

Info

Publication number
HK1251387B
HK1251387B HK18110570.7A HK18110570A HK1251387B HK 1251387 B HK1251387 B HK 1251387B HK 18110570 A HK18110570 A HK 18110570A HK 1251387 B HK1251387 B HK 1251387B
Authority
HK
Hong Kong
Prior art keywords
camera
image
ambient brightness
imaging
dual
Prior art date
Application number
HK18110570.7A
Other languages
Chinese (zh)
Other versions
HK1251387A1 (en
Inventor
欧阳丹
谭国辉
Original Assignee
Oppo广东移动通信有限公司
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to HK18110570.7A priority Critical patent/HK1251387B/en
Publication of HK1251387A1 publication Critical patent/HK1251387A1/en
Publication of HK1251387B publication Critical patent/HK1251387B/en

Links

Description

基于双摄像头的成像方法和装置Dual-camera imaging method and device

技术领域Technical Field

本申请涉及图像处理技术领域,尤其涉及一种基于双摄像头的成像方法和装置。The present application relates to the field of image processing technology, and in particular to an imaging method and device based on dual cameras.

背景技术Background Art

双摄像头已经越来越多地应用于移动终端设备上,现有技术中的双摄像头,往往采用长焦镜头和广角镜头。由长焦镜头用来拍摄照片,由广角镜头用来辅助计算照片的深度信息,以便进行后续的图像虚化处理。Dual cameras are increasingly being used in mobile devices. Conventional dual cameras often employ a telephoto lens and a wide-angle lens. The telephoto lens is used to capture photos, while the wide-angle lens assists in calculating depth information for subsequent image blur processing.

但是,相关技术中的双摄像头在亮度较高,光线较高的环境,成像效果比较好,但在暗光环境下,成像效果就比较差。However, the dual cameras in the related art have better imaging effects in environments with high brightness and high light, but have poor imaging effects in dark environments.

发明内容Summary of the Invention

本申请旨在至少在一定程度上解决相关技术中的技术问题之一。The present application aims to solve one of the technical problems in the related art at least to a certain extent.

为此,本申请提出一种基于双摄像头的成像方法,以提高暗光环境下,双摄像头的成像效果。To this end, the present application proposes an imaging method based on dual cameras to improve the imaging effect of dual cameras in low-light environments.

本申请提出一种基于双摄像头的成像装置。This application proposes an imaging device based on dual cameras.

本申请提出一种移动终端。The present application provides a mobile terminal.

本申请提出一种计算机可读存储介质。The present application provides a computer-readable storage medium.

为达上述目的,本申请第一方面实施例提出了一种基于双摄像头的成像方法,双摄像头包括第一摄像头和第二摄像头,所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;To achieve the above objectives, the first embodiment of the present application proposes an imaging method based on a dual camera, wherein the dual camera includes a first camera and a second camera, wherein the resolution of the first camera is higher than that of the second camera, and the sensitivity of the second camera is higher than that of the first camera;

其中,所述方法包括以下步骤:The method comprises the following steps:

确定环境亮度;Determine the ambient brightness;

根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头;Determining a main camera and a secondary camera from the dual cameras according to the ambient brightness;

采用所述主摄像头拍摄第一拍摄图像,以及采用所述副摄像头拍摄第二拍摄图像;Using the main camera to shoot a first image, and using the secondary camera to shoot a second image;

根据所述第一拍摄图像生成成像图像,并根据所述第一拍摄图像和所述第二拍摄图像计算所述成像图像的深度信息;generating an imaged image according to the first captured image, and calculating depth information of the imaged image according to the first captured image and the second captured image;

根据所述成像图像的深度信息,对所述成像图像进行虚化处理,得到所需的目标图像。According to the depth information of the imaging image, the imaging image is blurred to obtain the desired target image.

本申请实施例的基于双摄像头的成像方法,通过确定环境亮度之后,根据环境亮度,从双摄像头中确定主摄像头和副摄像头,并采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。根据第一拍摄图像生成成像图像,并根据第一拍摄图像和所述第二拍摄图像计算成像图像的深度信息,进而根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。由于将高分辨率的摄像头作为第一摄像头,并将高感光度的摄像头作为第二摄像头,并根据环境亮度对第一摄像头和第二摄像头进行主副摄像头的切换,使得主副摄像头的性能能够与当前环境亮度匹配,保证了成像效果,解决现有技术中双摄像头在暗光环境下成像效果较差的技术问题。The imaging method based on dual cameras in the embodiment of the present application determines the ambient brightness, and then determines the main camera and the secondary camera from the dual cameras according to the ambient brightness, and uses the main camera to shoot the first captured image, and uses the secondary camera to shoot the second captured image. An imaging image is generated based on the first captured image, and the depth information of the imaging image is calculated based on the first captured image and the second captured image. Then, based on the depth information of the imaging image, the imaging image is blurred to obtain the desired target image. Since a high-resolution camera is used as the first camera and a high-sensitivity camera is used as the second camera, and the first and second cameras are switched between the main and secondary cameras according to the ambient brightness, the performance of the main and secondary cameras can match the current ambient brightness, thereby ensuring the imaging effect, and solving the technical problem of poor imaging effect of dual cameras in dark environments in the prior art.

为达上述目的,本申请第二方面实施例提出了一种基于双摄像头的成像装置,双摄像头包括第一摄像头和第二摄像头,所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;其中,所述装置包括:To achieve the above objectives, a second embodiment of the present application provides an imaging device based on a dual camera, wherein the dual camera includes a first camera and a second camera, wherein the first camera has a higher resolution than the second camera, and the second camera has a higher sensitivity than the first camera; wherein the device includes:

测光模块,用于确定环境亮度;Light metering module, used to determine the ambient brightness;

切换模块,用于根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头;A switching module, configured to determine a main camera and a secondary camera from the dual cameras according to the ambient brightness;

拍摄模块,用于采用所述主摄像头拍摄第一拍摄图像,以及采用所述副摄像头拍摄第二拍摄图像;a shooting module, configured to shoot a first shot image using the main camera, and shoot a second shot image using the auxiliary camera;

生成模块,用于根据所述第一拍摄图像生成成像图像,并根据所述第一拍摄图像和所述第二拍摄图像计算所述成像图像的深度信息;a generating module, configured to generate an imaged image according to the first captured image, and calculate depth information of the imaged image according to the first captured image and the second captured image;

处理模块,用于根据所述成像图像的深度信息,对所述成像图像进行虚化处理,得到所需的目标图像。The processing module is used to perform blurring processing on the imaging image according to the depth information of the imaging image to obtain the desired target image.

本申请实施例的基于双摄像头的成像装置,通过确定环境亮度之后,根据环境亮度,从双摄像头中确定主摄像头和副摄像头,并采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。根据第一拍摄图像生成成像图像,并根据第一拍摄图像和所述第二拍摄图像计算成像图像的深度信息,进而根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。由于将高分辨率的摄像头作为第一摄像头,并将高感光度的摄像头作为第二摄像头,并根据环境亮度对第一摄像头和第二摄像头进行主副摄像头的切换,使得主副摄像头的性能能够与当前环境亮度匹配,保证了成像效果,解决现有技术中双摄像头在暗光环境下成像效果较差的技术问题。The imaging device based on a dual camera in the embodiment of the present application determines the ambient brightness, and then determines the main camera and the secondary camera from the dual camera according to the ambient brightness, and uses the main camera to shoot the first captured image, and uses the secondary camera to shoot the second captured image. An imaging image is generated based on the first captured image, and the depth information of the imaging image is calculated based on the first captured image and the second captured image. Then, based on the depth information of the imaging image, the imaging image is blurred to obtain the desired target image. Since a high-resolution camera is used as the first camera and a high-sensitivity camera is used as the second camera, and the first and second cameras are switched between the main and secondary cameras according to the ambient brightness, the performance of the main and secondary cameras can match the current ambient brightness, ensuring the imaging effect, and solving the technical problem of poor imaging effect of dual cameras in low-light environments in the prior art.

为达上述目的,本申请第三方面实施例提出了一种移动终端,包括:第一摄像头、第二摄像头、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序;所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;所述处理器执行所述程序时,实现如第一方面所述的基于双摄像头的成像方法。To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes a mobile terminal, comprising: a first camera, a second camera, a memory, a processor, and a computer program stored in the memory and runnable on the processor; the resolution of the first camera is higher than that of the second camera, and the sensitivity of the second camera is higher than that of the first camera; when the processor executes the program, the dual-camera-based imaging method as described in the first aspect is implemented.

为了实现上述目的,本申请第四方面实施例提出了一种计算机可读存储介质,该程序被处理器执行时实现如第一方面所述的基于双摄像头的成像方法。In order to achieve the above-mentioned objectives, the fourth embodiment of the present application proposes a computer-readable storage medium, which, when executed by a processor, implements the dual-camera-based imaging method as described in the first aspect.

本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

图1为本申请实施例所提供的一种基于双摄像头的成像方法的流程示意图;FIG1 is a schematic diagram of a flow chart of an imaging method based on dual cameras provided in an embodiment of the present application;

图2A为三角测距的原理示意图;FIG2A is a schematic diagram showing the principle of triangulation distance measurement;

图2B为视差图的示意图;FIG2B is a schematic diagram of a disparity map;

图3为本申请实施例提供的另一种基于双摄像头的成像方法的流程示意图;FIG3 is a schematic diagram of a flow chart of another dual-camera-based imaging method provided in an embodiment of the present application;

图4为本申请实施例提供的一种基于双摄像头的成像装置的结构示意图;FIG4 is a schematic structural diagram of an imaging device based on dual cameras provided in an embodiment of the present application;

图5是根据本申请另一个实施例的终端设备的结构示意图;FIG5 is a schematic structural diagram of a terminal device according to another embodiment of the present application;

图6为一个实施例中图像处理电路的示意图。FIG6 is a schematic diagram of an image processing circuit in one embodiment.

具体实施方式DETAILED DESCRIPTION

下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

下面参考附图描述本申请实施例的基于双摄像头的成像方法和装置。The following describes the dual-camera imaging method and device according to an embodiment of the present application with reference to the accompanying drawings.

本申请实施例的成像方法的执行设备可以是手机、平板电脑、个人数字助理、穿戴式设备等具有双摄像头的硬件设备,该穿戴式设备可以是智能手环、智能手表、智能眼镜等。The execution device of the imaging method of the embodiment of the present application can be a hardware device with dual cameras, such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc. The wearable device can be a smart bracelet, a smart watch, smart glasses, etc.

该具有双摄像头的硬件设备中,包含摄像模组,该摄像模组中包括第一摄像头和第二摄像头。第一摄像头和第二摄像头均具有各自独立的镜片、图像传感器和音圈马达。双摄像头中的第一摄像头和第二摄像头均与摄像头连接头相连,从而根据摄像头连接头提供的电流值驱动音圈马达,使得第一摄像头和第二摄像头在音圈马达的驱动下调整镜片与图像传感器之间的距离,从而实现对焦。The hardware device with dual cameras includes a camera module, which includes a first camera and a second camera. The first camera and the second camera each have independent lenses, image sensors, and voice coil motors. The first camera and the second camera are connected to a camera connector, and the voice coil motors are driven by the current provided by the camera connector. The first camera and the second camera are driven by the voice coil motors to adjust the distance between the lenses and the image sensors, thereby achieving focus.

本实施例提供的双摄像头中,第一摄像头的分辨率高于第二摄像头,第二摄像头的感光度高于第一摄像头。因此,在进行对焦时,可以仅采用第二摄像头进行对焦,当第二摄像头合焦时,获取第二摄像头的马达的第二驱动电流值,进而在第一摄像头和所述第二摄像头具有相同合焦距离条件下,根据第二驱动电流值,确定第一摄像头的马达的第一驱动电流值,采用第一驱动电流值驱动第一摄像头进行对焦。由于第二摄像头分辨率较低,图像处理速度较快,从而能够加快对焦速度,解决了现有技术中双摄像头对焦速度较慢的技术问题。In the dual-camera setup provided in this embodiment, the first camera has a higher resolution than the second camera, and the second camera has a higher sensitivity than the first camera. Therefore, when focusing, only the second camera can be used. When the second camera is in focus, the second drive current value of the second camera's motor is obtained. Then, under the condition that the first and second cameras have the same focus distance, the first drive current value of the first camera's motor is determined based on the second drive current value, and the first camera is driven to focus using the first drive current value. Because the second camera has a lower resolution and faster image processing speed, focusing can be accelerated, resolving the technical issue of slow dual-camera focus speeds in the prior art.

图1为本申请实施例所提供的一种基于双摄像头的成像方法的流程示意图。FIG1 is a flow chart of an imaging method based on dual cameras provided in an embodiment of the present application.

如图1所示,该基于双摄像头的成像方法包括以下步骤:As shown in FIG1 , the dual-camera-based imaging method includes the following steps:

步骤101,确定环境亮度。Step 101: Determine the ambient brightness.

具体地,作为一种可能的实现形式,可以采用独立的测光器件,测量环境的亮度。Specifically, as a possible implementation form, an independent light measuring device may be used to measure the brightness of the environment.

作为另一种可能的实现形式,可以读取第一摄像头和第二摄像头自动调节的感光度(ISO)值,根据读取到的ISO值,确定环境亮度。一般来说,第一摄像头和第二摄像头应采用相同的ISO值,从而采用该ISO值,便可以确定对应的环境亮度。但若读取到的第一摄像头ISO值和第二摄像头ISO值是不同的,可以根据两者的平均值确定对应的环境亮度。As another possible implementation, the automatically adjusted ISO values of the first and second cameras can be read and the ambient brightness determined based on the read ISO values. Generally, the first and second cameras should use the same ISO value, so that the corresponding ambient brightness can be determined using that ISO value. However, if the ISO values read for the first and second cameras are different, the corresponding ambient brightness can be determined based on the average of the two values.

需要说明的是,ISO值用来指示摄像头的感光度,常用的ISO值有50、100、200、400、1000等等,摄像头可以根据环境亮度,自动调节ISO值,从而,本实施例中,可以根据ISO值,反推出环境亮度。一般在光线充足的情况下,ISO值取50或100,在光线不足的情况下,ISO值可以为400或更高。It should be noted that the ISO value indicates the camera's sensitivity to light. Commonly used ISO values include 50, 100, 200, 400, and 1000. The camera can automatically adjust the ISO value based on the ambient brightness. Therefore, in this embodiment, the ambient brightness can be inferred from the ISO value. Generally, in well-lit conditions, the ISO value is 50 or 100, while in low-light conditions, the ISO value can be 400 or higher.

步骤102,根据环境亮度,从双摄像头中确定主摄像头和副摄像头。Step 102: Determine the main camera and the secondary camera from the dual cameras according to the ambient brightness.

具体地,若环境亮度高于阈值亮度,将第一摄像头作为主摄像头,并将第二摄像头作为副摄像头。若环境亮度不高于阈值亮度,将第二摄像头作为主摄像头,并将第一摄像头作为副摄像头。Specifically, if the ambient brightness is higher than a threshold brightness, the first camera is used as the main camera and the second camera is used as the secondary camera. If the ambient brightness is not higher than the threshold brightness, the second camera is used as the main camera and the first camera is used as the secondary camera.

这是由于在环境亮度不高于阈值亮度的情况下,光线不足,采用高分辨率摄像头作为主摄像头进行拍照时,会出现较多的噪声,从而导致成像效果不佳。因此,在光线不足时,可以采用高感光度的摄像头为主摄像头进行拍照,减少图像中的噪声,提高成像效果。This is because when the ambient brightness is below the threshold, the light is insufficient. When using a high-resolution camera as the primary camera to take pictures, more noise will appear, resulting in poor imaging quality. Therefore, when the light is insufficient, you can use a high-sensitivity camera as the primary camera to reduce noise in the image and improve the imaging quality.

相反地,在环境亮度高于阈值亮度的情况下,光线充足的情况下,由于高分辨率的摄像头分辨率较高,成像也较为清晰,噪声较少,因此,可以将高分辨率摄像头作为主摄像头进行拍照,并将高感光摄像头作为副摄像头计算得到较为准确的深度信息,从而提高成像效果。On the contrary, when the ambient brightness is higher than the threshold brightness and there is sufficient light, the high-resolution camera has a higher resolution, the image is clearer and has less noise. Therefore, the high-resolution camera can be used as the main camera to take pictures, and the high-sensitivity camera can be used as the secondary camera to calculate more accurate depth information, thereby improving the imaging effect.

步骤103,采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。Step 103: Use the main camera to capture a first image, and use the auxiliary camera to capture a second image.

具体地,同时采用主摄像头和副摄像头进行取景拍摄,分别得到用于成像的第一拍摄图像,以及用于计算深度信息的第二拍摄图像。Specifically, the main camera and the auxiliary camera are used simultaneously to perform framing and shooting, and a first shot image for imaging and a second shot image for calculating depth information are obtained respectively.

在进行拍摄之前,可以对成像图像进行预览。作为一种可能的实现方式,可以仅对主摄像头采集的画面进行预览,当用户看到满意的预览画面时,点击拍照按键,从而控制主摄像头和副摄像头同时进行取景拍摄。Before shooting, you can preview the image. As a possible implementation method, you can preview only the image captured by the main camera. When the user sees a satisfactory preview image, they click the photo button to control the main camera and the secondary camera to simultaneously frame and shoot.

步骤104,根据第一拍摄图像生成成像图像,并根据第一拍摄图像和第二拍摄图像计算成像图像的深度信息。Step 104 : generating an imaged image according to the first captured image, and calculating depth information of the imaged image according to the first captured image and the second captured image.

具体地,由于第一拍摄图像和第二拍摄图像是分别由不同的摄像头拍摄得到的,两个摄像头之间具有一定的距离,从而导致的视差,根据三角测距原理,可以计算得到第一拍摄图像和第二拍摄图像中,同一对象的深度信息,也就是该对象距离主副摄像头所在平面的距离。Specifically, since the first image and the second image are taken by different cameras respectively, there is a certain distance between the two cameras, resulting in parallax. According to the principle of triangulation, the depth information of the same object in the first image and the second image can be calculated, that is, the distance between the object and the plane where the primary and secondary cameras are located.

为了清楚说明这一过程,下面将对三角测距原理进行简要介绍。In order to explain this process clearly, the principle of triangulation is briefly introduced below.

而在实际场景,人眼分辨景物的深度主要是依靠双目视觉分辨出的。这和双摄像头分辨深度的原理一样。本实施例中根据第二拍摄图像计算成像图像的深度信息,主要方法是依靠三角测距原理,图2为三角测距的原理示意图。In real-world scenarios, the human eye primarily relies on binocular vision to discern the depth of a scene. This is similar to the principle behind dual-camera depth resolution. In this embodiment, the depth information of the image is calculated based on the second captured image, primarily relying on the principle of triangulation. Figure 2 illustrates the principle of triangulation.

基于图2A中,在实际空间中,画出了成像对象,以及两个摄像头所在位置OR和OT,以及两个摄像头的焦平面,焦平面距离两个摄像头所在平面的距离为f,在焦平面位置两个摄像头进行成像,从而得到两张拍摄图像。Based on FIG2A , in the actual space, the imaging object, the positions of the two cameras OR and OT , and the focal planes of the two cameras are drawn. The distance f between the focal plane and the plane where the two cameras are located is , and the two cameras perform imaging at the focal plane position, thereby obtaining two captured images.

P和P’分别是同一对象在不同拍摄图像中的位置。其中,P点距离所在拍摄图像的左侧边界的距离为XR,P’点距离所在拍摄图像的左侧边界的距离为XT。OR和OT分别为两个摄像头,这两个摄像头在同一平面,距离为B。P and P' are the positions of the same object in different images. The distance from point P to the left edge of the image is X R , and the distance from point P' to the left edge of the image is XT . OR and OT are two cameras located on the same plane, separated by a distance B.

基于三角测距原理,图2A中的对象与两个摄像头所在平面之间的距离Z,具有如下关系:Based on the principle of triangulation, the distance Z between the object in Figure 2A and the plane where the two cameras are located has the following relationship:

基于此,可以推得其中,d为同一对象在不同拍摄图像中的位置之间的距离差。由于B、f为定值,因此,根据d可以确定出对象的距离Z。Based on this, we can deduce that d is the distance difference between the positions of the same object in different captured images. Since B and f are constants, the distance Z of the object can be determined based on d.

当然,除了三角测距法,也可以采用其他的方式来计算主图像的深度信息,比如,主摄像头和副摄像头针对同一个场景拍照时,场景中的物体距离摄像头的距离与主摄像头和副摄像头成像的位移差、姿势差等成比例关系,因此,在本申请的一个实施例中,可以根据这种比例关系获取上述距离Z。Of course, in addition to the triangulation method, other methods can also be used to calculate the depth information of the main image. For example, when the main camera and the secondary camera take pictures of the same scene, the distance between the objects in the scene and the camera is proportional to the displacement difference and posture difference of the main camera and the secondary camera imaging. Therefore, in one embodiment of the present application, the above-mentioned distance Z can be obtained based on this proportional relationship.

举例而言,如图2B所示,通过主摄像头获取的主图像以及副摄像头获取的副图像,计算出不同点差异的图,这里用视差图表示,这个图上表示的是两张图上相同点的位移差异,但是由于三角定位中的位移差异和Z成正比,因此很多时候视差图就直接被用作携带深度信息的景深图。For example, as shown in Figure 2B, the main image obtained by the main camera and the secondary image obtained by the secondary camera are used to calculate the difference between different points. This is represented by a disparity map, which shows the displacement difference of the same point in the two images. However, since the displacement difference in triangulation positioning is proportional to Z, the disparity map is often directly used as a depth map carrying depth information.

基于以上分析可知,双摄像头获取深度信息时,需要获取同一对象在不同拍摄图像中的位置,因此,如果用于获取深度信息的两张图像较为接近,则会提高深度信息获取的效率和准确率。Based on the above analysis, it can be seen that when dual cameras obtain depth information, it is necessary to obtain the position of the same object in different captured images. Therefore, if the two images used to obtain depth information are relatively close, the efficiency and accuracy of depth information acquisition will be improved.

步骤105,根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。Step 105 : blurring the image according to the depth information of the image to obtain the desired target image.

具体地,计算得到成像图像的深度信息之后,可以根据成像图像中各对象的深度信息,确定出该对象为前景还是背景。一般来说,深度信息指示对象距离主副摄像头所在平面较近,深度取值较小时,可以确定该对象为前景,否则,该对象为背景。Specifically, after calculating the depth information of the image, the depth information of each object in the image can be used to determine whether the object is foreground or background. Generally speaking, if the depth information indicates that the object is close to the plane of the primary and secondary cameras and the depth value is small, the object can be determined to be foreground; otherwise, the object is background.

可以对识别出的背景,进行虚化处理,得到目标图像,在目标图像中,前景更加突出,背景得到了虚化,呈现出对焦的前景的成像效果。The identified background can be blurred to obtain a target image. In the target image, the foreground is more prominent and the background is blurred, presenting an imaging effect of a focused foreground.

根据深度信息对成像图像的背景区域进行虚化处理时,可以采用如下处理方式:When blurring the background area of an image based on depth information, the following processing methods can be used:

根据深度信息和对焦区域获取前景区域的第一深度信息和背景区域的第二深度信息,根据第一深度信息和第二深度信息生成虚化强度,根据虚化强度对成像图像的背景区域进行虚化处理,从而,根据不同的深度信息进行不同程度的虚化,使得虚化的图像效果更加自然且富有层次感。According to the depth information and the focus area, first depth information of the foreground area and second depth information of the background area are obtained, blurring intensity is generated according to the first depth information and the second depth information, and the background area of the imaged image is blurred according to the blurring intensity. Thus, different degrees of blurring are performed according to different depth information, making the blurred image effect more natural and rich in layers.

其中,在对拍摄的主体聚焦后,在主体所在的焦点区域之前和之后一段人眼可清晰成像的空间深度范围为景深。可以理解,在对焦区域之前成像的景深范围为前景区域的第一深度信息,在对焦区域之后清晰成像的景深范围为背景区域的第二深度信息。After focusing on the subject, the depth of field is the spatial depth range that can be clearly imaged by the human eye before and after the focus area where the subject is located. It can be understood that the depth of field range imaged before the focus area is the first depth information of the foreground area, and the depth of field range clearly imaged after the focus area is the second depth information of the background area.

其中,在虚化时,可以通过不同的实现方式来根据虚化强度对成像图像的背景区域进行虚化处理:Among them, when blurring, the background area of the image can be blurred in different ways according to the blur intensity:

作为一种可能的实现方式,根据虚化强度和成像图像的背景区域中每个像素的深度信息获取每个像素的虚化系数,其中,虚化系数与虚化强度有关,虚化系数越大,虚化强度越高,比如,可通过计算虚化强度和成像图像的背景区域中每个像素的深度信息的乘积,获取每个像素的虚化系数,进而,根据每个像素的虚化系数对成像图像的背景区域进行虚化处理。As a possible implementation method, the blur coefficient of each pixel is obtained based on the blur intensity and the depth information of each pixel in the background area of the imaging image, wherein the blur coefficient is related to the blur intensity, and the larger the blur coefficient, the higher the blur intensity. For example, the blur coefficient of each pixel can be obtained by calculating the product of the blur intensity and the depth information of each pixel in the background area of the imaging image, and then the background area of the imaging image is blurred according to the blur coefficient of each pixel.

作为另一种可能的实现方式,由于第二深度信息与焦点区域的深度信息的差值越大,表示对应的背景区域与焦点区域距离越远,越不相关,从而对应的虚化强度越大,在该示例中,可以预先存储第二深度信息与焦点区域的深度信息的差值与虚化强度的对应关系,在该对应关系中,第二深度信息与焦点区域的深度信息的差值越大,对应的虚化强度越大,从而,获取成像图像的背景区域的第二深度信息与焦点区域深度信息的差值,根据该差值查询上述对应关系获取对应的虚化强度,根据该虚化强度对对应深度信息的背景区域进行虚化。As another possible implementation method, since the greater the difference between the second depth information and the depth information of the focus area, the farther the corresponding background area is from the focus area and the less correlated it is, and thus the corresponding blurring intensity is greater, in this example, the correspondence between the difference between the second depth information and the depth information of the focus area and the blurring intensity can be pre-stored. In this correspondence, the greater the difference between the second depth information and the depth information of the focus area, the greater the corresponding blurring intensity. Thus, the difference between the second depth information of the background area of the imaged image and the depth information of the focus area is obtained, and the above correspondence is queried based on the difference to obtain the corresponding blurring intensity, and the background area corresponding to the depth information is blurred based on the blurring intensity.

本实施例中,通过确定环境亮度之后,根据环境亮度,从双摄像头中确定主摄像头和副摄像头,并采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。根据第一拍摄图像生成成像图像,并根据第二拍摄图像计算成像图像的深度信息,进而根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。由于将高分辨率的摄像头作为第一摄像头,并将高感光度的摄像头作为第二摄像头,并根据环境亮度对第一摄像头和第二摄像头进行主副摄像头的切换,使得主副摄像头的性能能够与当前环境亮度匹配,保证了成像效果,解决现有技术中双摄像头在暗光环境下成像效果较差的技术问题。In this embodiment, after determining the ambient brightness, a primary camera and a secondary camera are determined from the dual camera system based on the ambient brightness. The primary camera is used to capture a first image, and the secondary camera is used to capture a second image. An image is generated based on the first image, and depth information of the image is calculated based on the second image. Based on the depth information of the image, the image is then blurred to obtain the desired target image. By using a high-resolution camera as the first camera and a high-sensitivity camera as the second camera, and switching between the primary and secondary cameras based on the ambient brightness, the performance of the primary and secondary cameras is matched to the current ambient brightness, ensuring excellent imaging quality. This addresses the technical issue of poor imaging quality in low-light environments often encountered with dual cameras in the prior art.

为了清楚说明上一实施例,本实施例提供了另一种基于双摄像头的成像方法,图3为本申请实施例提供的另一种基于双摄像头的成像方法的流程示意图。In order to clearly illustrate the previous embodiment, this embodiment provides another imaging method based on dual cameras. FIG3 is a flow chart of another imaging method based on dual cameras provided in this embodiment of the present application.

如图3所示,该方法可以包括以下步骤:As shown in FIG3 , the method may include the following steps:

步骤301,确定环境亮度,并根据环境亮度,从双摄像头中确定主摄像头和副摄像头。Step 301: Determine the ambient brightness, and determine the main camera and the secondary camera from the dual cameras based on the ambient brightness.

其中,双摄像头包括第一摄像头和第二摄像头,第一摄像头的分辨率高于第二摄像头,第二摄像头的感光度高于所述第一摄像头。The dual camera includes a first camera and a second camera, the resolution of the first camera is higher than that of the second camera, and the sensitivity of the second camera is higher than that of the first camera.

若所述环境亮度高于阈值亮度,将所述第一摄像头作为主摄像头,并将所述第二摄像头作为副摄像头;若所述环境亮度不高于所述阈值亮度,将所述第二摄像头作为主摄像头,并将所述第一摄像头作为副摄像头。If the ambient brightness is higher than the threshold brightness, the first camera is used as the main camera and the second camera is used as the secondary camera; if the ambient brightness is not higher than the threshold brightness, the second camera is used as the main camera and the first camera is used as the secondary camera.

例如:第一摄像头可以为16M摄像头,第二摄像头可以为5M摄像头,或者是四合一5M摄像头。For example, the first camera may be a 16M camera, the second camera may be a 5M camera, or a four-in-one 5M camera.

需要说明的是,四合一5M摄像头是由4个5M摄像头合成得到的,相较于单一的5M摄像头,具有更好的感光性能。It should be noted that the four-in-one 5M camera is synthesized from four 5M cameras and has better photosensitivity than a single 5M camera.

步骤302,采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。In step 302 , a first image is captured by the main camera, and a second image is captured by the auxiliary camera.

具体地,作为一种可能的实现方式,环境亮度不高于阈值亮度的情况下,也就是在环境亮度不佳时,成像效果会受到影响,导致主摄像头和副摄像头采集的图像中均存在较多噪声。Specifically, as a possible implementation method, when the ambient brightness is not higher than the threshold brightness, that is, when the ambient brightness is poor, the imaging effect will be affected, resulting in more noise in the images captured by the main camera and the secondary camera.

为了提高成像质量,可以对主摄像头和副摄像头采用多帧合成降噪方式进行图像处理。具体来说,在确定主摄像头和副摄像头后,可以同时采用主摄像头和副摄像头进行连续取景拍摄,分别得到主摄像头拍摄的n帧拍摄图像和副摄像头拍摄的m帧拍摄图像。To improve image quality, multi-frame synthesis noise reduction can be used for image processing on the main camera and the auxiliary camera. Specifically, after determining the main camera and the auxiliary camera, the main camera and the auxiliary camera can be used simultaneously to perform continuous framing and shooting, respectively obtaining n frames of images taken by the main camera and m frames of images taken by the auxiliary camera.

对主摄像头拍摄的n帧拍摄图像进行合成降噪,得到第一拍摄图像,对副摄像头拍摄的m帧拍摄图像进行合成降噪,得到第二拍摄图像。The n frames of images shot by the main camera are synthesized and denoised to obtain a first shot image, and the m frames of images shot by the secondary camera are synthesized and denoised to obtain a second shot image.

为了便于清楚理解多帧合成降噪过程,下面将对多帧合成降噪进行简要介绍。In order to facilitate a clear understanding of the multi-frame synthesis noise reduction process, a brief introduction to multi-frame synthesis noise reduction is given below.

当环境光线不足时,移动终端等成像设备一般采用自动提高感光度的方式。但这种提高感光度的方式,导致了图像中噪声较多。多帧合成降噪就是为了减少图像中的噪声点,改善高感光情况下所拍摄的图像画质。其原理在于,噪点是无序排列的这一先验知识,具体来说,连拍多帧拍摄图像后,同一个位置出现的噪点可能是红噪点,也可能是绿噪点、白噪点,甚至是没有噪点,这样就有了比对筛选的条件,可以依据多帧拍摄图像中对应同一位置的各像素点的取值,将属于噪声的像素点(即噪点)筛选出来。进一步地,在筛选出噪点之后,还可以根据进一步法的算法对噪点进行猜色和像素替换处理,达到去除噪点的效果。经过这样的过程,就能够达到画质损失度极低的降噪效果了。When ambient light is insufficient, imaging devices such as mobile terminals typically automatically increase sensitivity. However, this increased sensitivity leads to increased noise in the image. Multi-frame synthesis noise reduction is designed to reduce noise in the image and improve the quality of images captured under high-sensitivity conditions. Its principle is based on the prior knowledge that noise is disordered. Specifically, after continuously capturing multiple frames, the noise appearing at the same location may be red, green, white, or even absent. This provides a comparison and screening method, allowing the pixels corresponding to the same location in the multiple frames to be filtered out. Furthermore, after filtering out the noise, further algorithms can be used to perform color estimation and pixel replacement to effectively remove the noise. This process achieves noise reduction with minimal loss of image quality.

例如,作为一种比较简便的多帧合成降噪方法,可以在获取多帧拍摄图像之后,读取多帧拍摄图像中对应同一位置的各像素点的取值,通过对这些像素点计算加权平均值,生成合成图像中该位置的像素点的取值。通过这种方式,可以得到清晰的图像。For example, a relatively simple multi-frame synthesis noise reduction method can be used to obtain multiple frames of images, read the values of each pixel corresponding to the same position in the multiple frames, calculate the weighted average of these pixels, and generate the value of the pixel at that position in the synthesized image. In this way, a clear image can be obtained.

在多帧拍摄图像中,存在一帧最为清晰的图像,我们可以将其作为基础帧,该基础帧,作为一种可能的实现方式,该基础帧的权重可以大于其他拍摄图像的权重,也就是说,实质上,实现了以其他拍摄图像作为参考,识别并去除基础帧中的噪点的作用。Among multiple frames of captured images, there is a frame with the clearest image, which can be used as the base frame. As a possible implementation method, the weight of this base frame can be greater than the weights of other captured images. That is to say, in essence, the function of identifying and removing noise in the base frame is achieved by using other captured images as a reference.

在进行多帧合成降噪之前,可以根据环境亮度来确定多帧合成的帧数m和n的取值,环境亮度越暗用来合成的帧数越多,也就是说,这里的m和n均与环境亮度具有反向关系。作为一种可能的实现方式,m和n取值相同,取值范围均为2至6。Before performing multi-frame synthesis noise reduction, the number of frames (m) and (n) used for synthesis can be determined based on the ambient brightness. Darker ambient brightness results in more frames being used for synthesis. In other words, m and n are inversely related to ambient brightness. As a possible implementation, m and n have the same value, both ranging from 2 to 6.

例如:For example:

环境亮度等级为暗时,m=n=6;When the ambient brightness level is dark, m=n=6;

环境亮度等级为一般时,m=n=4;When the ambient brightness level is normal, m=n=4;

环境亮度等级为亮时,m=n=2。When the ambient brightness level is bright, m=n=2.

需要说明的是,以上环境亮度等级的划分,以及m和n取值仅作为示例,不构成对本实施例的限制,本领域技术人员可以想到,通过有限次试验确定出最佳的环境亮度等级划分方式及m和n的取值。It should be noted that the above-mentioned classification of ambient brightness levels and the values of m and n are only examples and do not constitute a limitation to this embodiment. Those skilled in the art can conceive of determining the best classification method of ambient brightness levels and the values of m and n through a limited number of experiments.

在一种可能的应用场景中,需要较高的处理速度,由于采用多帧合成降噪会增加处理时长,在这种应用场景中可以考虑多线程并行处理方式。In one possible application scenario, a higher processing speed is required. Since the use of multi-frame synthesis noise reduction will increase the processing time, multi-threaded parallel processing can be considered in this application scenario.

启动多线程并行处理机制,通过第一线程对主摄像头拍摄的n帧拍摄图像进行合成降噪,得到第一拍摄图像,同时,通过第二线程对副摄像头拍摄的m帧拍摄图像进行合成降噪,得到第二拍摄图像。A multi-threaded parallel processing mechanism is started, and n frames of images taken by the main camera are synthesized and denoised by a first thread to obtain a first captured image. At the same time, m frames of images taken by the secondary camera are synthesized and denoised by a second thread to obtain a second captured image.

步骤303,判断主摄像头的视场角是否小于或等于副摄像头的视场角,若是执行步骤304,否则执行步骤305。Step 303 , determine whether the field of view angle of the main camera is less than or equal to the field of view angle of the secondary camera. If so, execute step 304 ; otherwise, execute step 305 .

具体地,视场角(Field Angle of View,FOV)是指镜头所能覆盖的最大角度,景物与摄像头的夹角超过这个角度,就不会被成像。在本实施例中,主副摄像头的视场角可以是相同的,也可以是不同的。但由于不同的视场角取值情况,导致第一拍摄图像和第二拍摄图像取景之间的差异情况不一致,进而部分对象仅在第一拍摄图像和第二拍摄图像中的一个图像中进行了成像,在计算深度时,无法对这部分对象计算深度信息。为了便于深度信息的计算,本实施例中,尽量截取出第一拍摄图像和第二拍摄图像取景相同的部分作为成像图像,从而保证成像图像的深度信息的准确性。Specifically, the field of view (FOV) refers to the maximum angle that the lens can cover. If the angle between the scene and the camera exceeds this angle, it will not be imaged. In this embodiment, the field of view of the primary and secondary cameras can be the same or different. However, due to the different field of view values, the difference between the framing of the first captured image and the second captured image is inconsistent, and then some objects are imaged only in one of the first captured image and the second captured image. When calculating the depth, the depth information cannot be calculated for these objects. In order to facilitate the calculation of depth information, in this embodiment, the parts of the first captured image and the second captured image that are the same in framing are cut out as the imaged image as much as possible, so as to ensure the accuracy of the depth information of the imaged image.

步骤304,若主摄像头的视场角小于或等于副摄像头的视场角,将所述第一拍摄图像作为所述成像图像。Step 304: If the field of view angle of the main camera is less than or equal to the field of view angle of the secondary camera, use the first captured image as the imaged image.

具体地,若主摄像头的视场角小于或等于副摄像头的视场角,由于主摄像头和副摄像头通常位于同一平面上,因此,主摄像头的取景范围要小于或等于副摄像头的取景范围。基于此,主摄像头拍摄得到的第一拍摄图像中的各对象,均应被副摄像头拍摄的第二拍摄图像成像中,在这种情况下,无需对主摄像头拍摄得到的第一拍摄图像进行裁剪,直接将第一拍摄图像作为成像图像即可。Specifically, if the primary camera's field of view is smaller than or equal to that of the secondary camera, the primary camera's framing range must be smaller than or equal to that of the secondary camera, as the primary and secondary cameras are typically located on the same plane. Therefore, all objects in the first image captured by the primary camera should be included in the second image captured by the secondary camera. In this case, there's no need to crop the first image captured by the primary camera; the first image can be used directly as the final image.

步骤305,若主摄像头的视场角大于副摄像头的视场角,从第一拍摄图像中截取与第二拍摄图像的取景画面相同的区域,得到成像图像。Step 305: If the field of view angle of the main camera is greater than the field of view angle of the secondary camera, an area identical to the viewfinder of the second camera is captured from the first captured image to obtain an image.

具体地,若主摄像头的视场角大于副摄像头的视场角,由于主摄像头和副摄像头通常位于同一平面上,因此,主摄像头的取景范围要大于副摄像头的取景范围。基于此,主摄像头拍摄得到的第一拍摄图像中的各对象,存在未被副摄像头拍摄到的可能性,也就是说,该对象可能不存在于第二拍摄图像中。在这种情况下,需要对主摄像头拍摄得到的第一拍摄图像进行裁剪,截取与第二拍摄图像的取景画面相同的区域,作为成像图像。Specifically, if the primary camera's field of view is larger than that of the secondary camera, the primary camera's framing range is larger than that of the secondary camera, as the primary and secondary cameras are typically located on the same plane. Consequently, it's possible that objects in the first image captured by the primary camera may not be captured by the secondary camera; in other words, the objects may not exist in the second image. In this case, the first image captured by the primary camera needs to be cropped to capture the same area as the second image's framing range as the final image.

步骤306,根据第二拍摄图像计算成像图像的深度信息。Step 306: Calculate depth information of the imaged image based on the second captured image.

具体地,根据第二拍摄图像和第一拍摄图像中,关于同一对象的位置偏差,以及双摄像头的参数,确定出成像图像的深度信息。Specifically, the depth information of the imaging image is determined according to the position deviation of the same object in the second captured image and the first captured image, and the parameters of the dual cameras.

具体计算过程,参见前述实施例中步骤104的相关描述,本实施例中对此不再赘述。For the specific calculation process, please refer to the relevant description of step 104 in the above embodiment, which will not be repeated in this embodiment.

步骤307,根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。Step 307 : blurring the image according to the depth information of the image to obtain the desired target image.

具体地,具体地,计算得到成像图像的深度信息之后,可以根据成像图像中各对象的深度信息,确定出该对象为前景还是背景。一般来说,深度信息指示对象距离主副摄像头所在平面较近,深度取值较小时,可以确定该对象为前景,否则,该对象为背景。进而,可以对识别出的背景,进行虚化处理,得到目标图像。Specifically, after calculating the depth information of the image, the depth information of each object in the image can be used to determine whether the object is foreground or background. Generally speaking, if the depth information indicates that the object is close to the plane where the primary and secondary cameras are located and the depth value is small, the object can be determined to be foreground; otherwise, the object is background. Furthermore, the identified background can be blurred to obtain the target image.

本实施例中,通过确定环境亮度之后,根据环境亮度,从双摄像头中确定主摄像头和副摄像头,并采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。根据第一拍摄图像生成成像图像,并根据第二拍摄图像计算成像图像的深度信息,进而根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。由于将高分辨率的摄像头作为第一摄像头,并将高感光度的摄像头作为第二摄像头,并根据环境亮度对第一摄像头和第二摄像头进行主副摄像头的切换,使得主副摄像头的性能能够与当前环境亮度匹配,保证了成像效果,解决现有技术中双摄像头在暗光环境下成像效果较差的技术问题。In this embodiment, after determining the ambient brightness, a primary camera and a secondary camera are determined from the dual camera system based on the ambient brightness. The primary camera is used to capture a first image, and the secondary camera is used to capture a second image. An image is generated based on the first image, and depth information of the image is calculated based on the second image. Based on the depth information of the image, the image is then blurred to obtain the desired target image. By using a high-resolution camera as the first camera and a high-sensitivity camera as the second camera, and switching between the primary and secondary cameras based on the ambient brightness, the performance of the primary and secondary cameras is matched to the current ambient brightness, ensuring excellent imaging quality. This addresses the technical issue of poor imaging quality in low-light environments often encountered with dual cameras in the prior art.

为了实现上述实施例,本申请还提出一种基于双摄像头的成像装置。In order to implement the above embodiments, the present application also proposes an imaging device based on dual cameras.

图4为本申请实施例提供的一种基于双摄像头的成像装置的结构示意图。该成像装置,可以应用于具有双摄像头的移动终端上。双摄像头包括第一摄像头和第二摄像头,所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头。Figure 4 is a schematic diagram of the structure of a dual-camera imaging device provided in an embodiment of the present application. This imaging device can be applied to a mobile terminal with dual cameras. The dual cameras include a first camera and a second camera, wherein the first camera has a higher resolution than the second camera, and the second camera has a higher sensitivity than the first camera.

如图4所示,该成像装置包括:测光模块41、切换模块42、拍摄模块43、生成模块44和处理模块45。As shown in FIG. 4 , the imaging device includes a light metering module 41 , a switching module 42 , a shooting module 43 , a generating module 44 and a processing module 45 .

测光模块41,用于确定环境亮度。The light measuring module 41 is used to determine the ambient brightness.

具体地,测光模块41具体用于根据读取到的所述第一摄像头和所述第二摄像头的ISO值,确定所述环境亮度。Specifically, the light metering module 41 is specifically configured to determine the ambient brightness according to the read ISO values of the first camera and the second camera.

切换模块42,用于根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头。The switching module 42 is configured to determine a main camera and a secondary camera from the dual cameras according to the ambient brightness.

具体地,切换模块42具体用于:若所述环境亮度高于阈值亮度,将所述第一摄像头作为主摄像头,并将所述第二摄像头作为副摄像头;若所述环境亮度不高于所述阈值亮度,将所述第二摄像头作为主摄像头,并将所述第一摄像头作为副摄像头。Specifically, the switching module 42 is specifically used to: if the ambient brightness is higher than the threshold brightness, use the first camera as the main camera and the second camera as the secondary camera; if the ambient brightness is not higher than the threshold brightness, use the second camera as the main camera and the first camera as the secondary camera.

拍摄模块43,用于采用所述主摄像头拍摄第一拍摄图像,以及采用所述副摄像头拍摄第二拍摄图像。The shooting module 43 is configured to shoot a first image using the main camera and shoot a second image using the auxiliary camera.

生成模块44,用于根据所述第一拍摄图像生成成像图像,并根据所述第一拍摄图像和所述第二拍摄图像计算所述成像图像的深度信息。The generating module 44 is configured to generate an imaged image according to the first captured image, and calculate depth information of the imaged image according to the first captured image and the second captured image.

处理模块45,用于根据所述成像图像的深度信息,对所述成像图像进行虚化处理,得到所需的目标图像。The processing module 45 is configured to perform blurring processing on the image according to the depth information of the image to obtain a desired target image.

进一步地,在本申请实施例的一种可能的实现方式中,生成模块44具体用于若主摄像头的视场角小于或等于副摄像头的视场角,将第一拍摄图像作为成像图像。若主摄像头的视场角大于所述副摄像头的视场角,从第一拍摄图像中截取与第二拍摄图像的取景画面相同的区域,得到成像图像。Furthermore, in one possible implementation of the embodiment of the present application, the generation module 44 is specifically configured to, if the field of view angle of the primary camera is less than or equal to the field of view angle of the secondary camera, use the first captured image as the imaging image. If the field of view angle of the primary camera is greater than the field of view angle of the secondary camera, extract the same area from the first captured image as the viewfinder of the second captured image to obtain the imaging image.

需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment and will not be repeated here.

本实施例中,通过确定环境亮度之后,根据环境亮度,从双摄像头中确定主摄像头和副摄像头,并采用主摄像头拍摄第一拍摄图像,以及采用副摄像头拍摄第二拍摄图像。根据第一拍摄图像生成成像图像,并根据第一拍摄图像和所述第二拍摄图像计算成像图像的深度信息,进而根据成像图像的深度信息,对成像图像进行虚化处理,得到所需的目标图像。由于将高分辨率的摄像头作为第一摄像头,并将高感光度的摄像头作为第二摄像头,并根据环境亮度对第一摄像头和第二摄像头进行主副摄像头的切换,使得主副摄像头的性能能够与当前环境亮度匹配,保证了成像效果,解决现有技术中双摄像头在暗光环境下成像效果较差的技术问题。In this embodiment, after determining the ambient brightness, a primary camera and a secondary camera are determined from the dual camera system based on the ambient brightness. The primary camera is used to capture a first image, and the secondary camera is used to capture a second image. An image is generated based on the first image, and depth information of the image is calculated based on the first and second images. Based on the depth information of the image, the image is then blurred to obtain the desired target image. By using a high-resolution camera as the first camera and a high-sensitivity camera as the second camera, and switching between the primary and secondary cameras based on the ambient brightness, the performance of the primary and secondary cameras is matched to the current ambient brightness, ensuring imaging quality. This addresses the prior art technical issue of poor imaging quality of dual cameras in low-light environments.

为了实现上述实施例,本申请还提出一种移动终端,图5是根据本申请另一个实施例的终端设备的结构示意图,如图5所示,该终端设备1000包括:壳体1100和位于壳体1100内的第一摄像头1112、第二摄像头1113、存储器1114和处理器1115。In order to implement the above-mentioned embodiments, the present application also proposes a mobile terminal. Figure 5 is a structural schematic diagram of a terminal device according to another embodiment of the present application. As shown in Figure 5, the terminal device 1000 includes: a shell 1100 and a first camera 1112, a second camera 1113, a memory 1114 and a processor 1115 located in the shell 1100.

其中,存储器1114存储有可执行程序代码;处理器1115通过读取存储器1114中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行如前述方法实施例所述的基于双摄像头的成像方法。The memory 1114 stores executable program code; the processor 1115 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 1114, so as to execute the dual-camera-based imaging method as described in the aforementioned method embodiment.

其中,第一摄像头的分辨率高于第二摄像头,第二摄像头的感光度高于第一摄像头。The resolution of the first camera is higher than that of the second camera, and the sensitivity of the second camera is higher than that of the first camera.

作为一种可能的实现方式,第一摄像头的视场角和第二摄像头的视场角相同,从而避免了从第一拍摄图像中截取得到成像图像的过程,加快了图像处理速度。As a possible implementation, the field of view of the first camera is the same as the field of view of the second camera, thereby avoiding the process of intercepting the imaging image from the first captured image and speeding up the image processing speed.

为了使得第一摄像头具有高分辨率,可以采用16M摄像头,当然也可以采用其他高分辨率摄像头,本实施例中对此不作限定。In order to make the first camera have high resolution, a 16M camera may be used. Of course, other high-resolution cameras may also be used, which is not limited in this embodiment.

同时,为了使得第二摄像头具有高感光性,可以采用四合一5M摄像头,当然也可以采用其他高感光性摄像头,本实施例中对此不作限定。At the same time, in order to make the second camera have high sensitivity, a four-in-one 5M camera can be used. Of course, other high-sensitivity cameras can also be used, which is not limited in this embodiment.

为了实现上述实施例,本申请还提出一种计算机可读存储介质,其上存储有计算机程序,该程序被移动终端的处理器执行时实现如前述实施例中基于双摄像头的成像方法。In order to implement the above embodiments, the present application also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of a mobile terminal, implements the imaging method based on dual cameras as in the above embodiments.

上述移动终端中还包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图6为一个实施例中图像处理电路的示意图。如图6所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。The mobile terminal also includes an image processing circuit, which can be implemented using hardware and/or software components and may include various processing units that define an ISP (Image Signal Processing) pipeline. FIG6 is a schematic diagram of the image processing circuit in one embodiment. As shown in FIG6 , for ease of illustration, only the various aspects of the image processing technology relevant to the embodiments of the present application are shown.

如图6所示,图像处理电路包括ISP处理器940和控制逻辑器950。成像设备910捕捉的图像数据首先由ISP处理器940处理,ISP处理器940对图像数据进行分析以捕捉可用于确定和/或成像设备910的一个或多个控制参数的图像统计信息。成像设备910具体可以包括两个摄像头,每一个摄像头可包括具有一个或多个透镜912和图像传感器914。图像传感器914可包括色彩滤镜阵列(如Bayer滤镜),图像传感器914可获取用图像传感器914的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器940处理的一组原始图像数据。传感器920可基于传感器920接口类型把原始图像数据提供给ISP处理器940。传感器920接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。As shown in FIG6 , the image processing circuit includes an ISP processor 940 and control logic 950. Image data captured by the imaging device 910 is first processed by the ISP processor 940, which analyzes the image data to capture image statistics that can be used to determine and/or adjust one or more control parameters of the imaging device 910. Specifically, the imaging device 910 may include two cameras, each of which may include one or more lenses 912 and an image sensor 914. The image sensor 914 may include a color filter array (e.g., a Bayer filter) that acquires light intensity and wavelength information captured by each imaging pixel of the image sensor 914 and provides a set of raw image data that can be processed by the ISP processor 940. The sensor 920 may provide the raw image data to the ISP processor 940 based on the interface type of the sensor 920. The sensor 920 interface may utilize an SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of these interfaces.

ISP处理器940按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器940可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 940 processes raw image data on a pixel-by-pixel basis in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits. The ISP processor 940 may perform one or more image processing operations on the raw image data and collect statistical information about the image data. The image processing operations may be performed at the same or different bit depths of precision.

ISP处理器940还可从图像存储器930接收像素数据。例如,从传感器920接口将原始像素数据发送给图像存储器930,图像存储器930中的原始像素数据再提供给ISP处理器940以供处理。图像存储器930可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。The ISP processor 940 may also receive pixel data from the image memory 930. For example, raw pixel data may be sent from the sensor 920 interface to the image memory 930, and the raw pixel data in the image memory 930 may be provided to the ISP processor 940 for processing. The image memory 930 may be a portion of a memory device, a storage device, or an independent dedicated memory within the electronic device, and may include a DMA (Direct Memory Access) feature.

当接收到来自传感器920接口或来自图像存储器930的原始图像数据时,ISP处理器940可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器930,以便在被显示之前进行另外的处理。ISP处理器940从图像存储器930接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器970,以供用户观看和/或由图形引擎或GPU(Graphics ProcessingUnit,图形处理器)进一步处理。此外,ISP处理器940的输出还可发送给图像存储器930,且显示器970可从图像存储器930读取图像数据。在一个实施例中,图像存储器930可被配置为实现一个或多个帧缓冲器。此外,ISP处理器940的输出可发送给编码器/解码器960,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器970设备上之前解压缩。编码器/解码器960可由CPU或GPU或协处理器实现。Upon receiving raw image data from the sensor 920 interface or from the image memory 930, the ISP processor 940 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to the image memory 930 for further processing before being displayed. The ISP processor 940 receives processed data from the image memory 930 and processes the processed data in the raw domain as well as in the RGB and YCbCr color spaces. The processed image data may be output to the display 970 for user viewing and/or further processing by a graphics engine or GPU (Graphics Processing Unit). Furthermore, the output of the ISP processor 940 may be sent to the image memory 930, from which the display 970 may read image data. In one embodiment, the image memory 930 may be configured to implement one or more frame buffers. Furthermore, the output of the ISP processor 940 may be sent to the encoder/decoder 960 for encoding/decoding image data. The encoded image data may be stored and decompressed before being displayed on the display 970 device. The encoder/decoder 960 may be implemented by a CPU, a GPU, or a coprocessor.

ISP处理器940确定的统计数据可发送给控制逻辑器950单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜912阴影校正等图像传感器914统计信息。控制逻辑器950可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备910的控制参数以及的控制参数。例如,控制参数可包括传感器920控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜912控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜912阴影校正参数。The statistical data determined by the ISP processor 940 may be sent to the control logic 950 unit. For example, the statistical data may include image sensor 914 statistical information such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 912 shading correction, etc. The control logic 950 may include a processor and/or microcontroller that executes one or more routines (e.g., firmware) that may determine control parameters of the imaging device 910 and control parameters based on the received statistical data. For example, the control parameters may include sensor 920 control parameters (e.g., gain, integration time for exposure control), camera flash control parameters, lens 912 control parameters (e.g., focal length for focus or zoom), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices used for auto-white balance and color adjustment (e.g., during RGB processing), as well as lens 912 shading correction parameters.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the 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. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims (10)

1.一种基于双摄像头的成像方法,其特征在于,双摄像头包括第一摄像头和第二摄像头,所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;1. A dual-camera imaging method, characterized in that the dual-camera comprises a first camera and a second camera, wherein the first camera has a higher resolution than the second camera, and the second camera has a higher sensitivity than the first camera; 其中,所述方法包括以下步骤:The method comprises the following steps: 确定环境亮度;Determine the ambient brightness; 根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头;Determining a main camera and a secondary camera from the dual cameras according to the ambient brightness; 采用所述主摄像头拍摄n帧连续图像,对所述n帧连续图像进行合成降噪得到第一拍摄图像,以及采用所述副摄像头拍摄m帧连续图像,对所述m帧连续图像进行合成降噪得到第二拍摄图像,其中,n和m均为大于2的自然数,m和n的取值均与环境亮度具有反向关系;The main camera is used to capture n consecutive image frames, and the n consecutive image frames are synthesized and denoised to obtain a first captured image. The secondary camera is used to capture m consecutive image frames, and the m consecutive image frames are synthesized and denoised to obtain a second captured image, wherein n and m are both natural numbers greater than 2, and the values of m and n have an inverse relationship with the ambient brightness. 根据所述第一拍摄图像生成成像图像,并根据所述第一拍摄图像和所述第二拍摄图像计算所述成像图像的深度信息;generating an imaged image according to the first captured image, and calculating depth information of the imaged image according to the first captured image and the second captured image; 根据所述成像图像的深度信息,对所述成像图像进行虚化处理,得到所需的目标图像。According to the depth information of the imaging image, the imaging image is blurred to obtain the desired target image. 2.根据权利要求1所述的成像方法,其特征在于,所述根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头,包括:2. The imaging method according to claim 1, wherein determining the primary camera and the secondary camera from the dual cameras based on the ambient brightness comprises: 若所述环境亮度高于阈值亮度,将所述第一摄像头作为主摄像头,并将所述第二摄像头作为副摄像头;If the ambient brightness is higher than a threshold brightness, the first camera is used as a main camera and the second camera is used as a secondary camera; 若所述环境亮度不高于所述阈值亮度,将所述第二摄像头作为主摄像头,并将所述第一摄像头作为副摄像头。If the ambient brightness is not higher than the threshold brightness, the second camera is used as the main camera and the first camera is used as the secondary camera. 3.根据权利要求1所述的成像方法,其特征在于,所述根据所述第一拍摄图像生成成像图像,包括:3. The imaging method according to claim 1, wherein generating an image based on the first captured image comprises: 若所述主摄像头的视场角小于或等于所述副摄像头的视场角,将所述第一拍摄图像作为所述成像图像。If the field of view angle of the main camera is less than or equal to the field of view angle of the secondary camera, the first captured image is used as the imaging image. 4.根据权利要求1所述的成像方法,其特征在于,所述根据所述第一拍摄图像生成成像图像,包括:4. The imaging method according to claim 1, wherein generating an image based on the first captured image comprises: 若所述主摄像头的视场角大于所述副摄像头的视场角,从所述第一拍摄图像中截取与所述第二拍摄图像的取景画面相同的区域,得到所述成像图像。If the field of view angle of the main camera is greater than the field of view angle of the secondary camera, an area that is the same as the framing screen of the second camera is intercepted from the first captured image to obtain the imaging image. 5.根据权利要求1-4任一项所述的成像方法,其特征在于,所述确定环境亮度,包括:5. The imaging method according to any one of claims 1 to 4, wherein determining the ambient brightness comprises: 根据读取到的所述第一摄像头和所述第二摄像头的感光度ISO值,确定所述环境亮度。The ambient brightness is determined according to the read ISO values of the first camera and the second camera. 6.一种基于双摄像头的成像装置,其特征在于,双摄像头包括第一摄像头和第二摄像头,所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;6. A dual-camera imaging device, characterized in that the dual cameras include a first camera and a second camera, the first camera has a higher resolution than the second camera, and the second camera has a higher sensitivity than the first camera; 其中,所述装置包括:Wherein, the device comprises: 测光模块,用于确定环境亮度;Light metering module, used to determine the ambient brightness; 切换模块,用于根据所述环境亮度,从所述双摄像头中确定主摄像头和副摄像头;A switching module, configured to determine a main camera and a secondary camera from the dual cameras according to the ambient brightness; 拍摄模块,用于采用所述主摄像头拍摄n帧连续图像,对所述n帧连续图像进行合成降噪得到第一拍摄图像,以及采用所述副摄像头拍摄m帧连续图像,对所述m帧连续图像进行合成降噪得到第二拍摄图像,其中,n和m均为大于2的自然数,m和n的取值均与环境亮度具有反向关系;a shooting module, configured to shoot n consecutive image frames using the main camera, synthesize and reduce noise on the n consecutive image frames to obtain a first shot image, and shoot m consecutive image frames using the secondary camera, synthesize and reduce noise on the m consecutive image frames to obtain a second shot image, wherein n and m are both natural numbers greater than 2, and the values of m and n are both inversely related to the ambient brightness; 生成模块,用于根据所述第一拍摄图像生成成像图像,并根据所述第一拍摄图像和所述第二拍摄图像计算所述成像图像的深度信息;a generating module, configured to generate an imaged image according to the first captured image, and calculate depth information of the imaged image according to the first captured image and the second captured image; 处理模块,用于根据所述成像图像的深度信息,对所述成像图像进行虚化处理,得到所需的目标图像。The processing module is used to perform blurring processing on the imaging image according to the depth information of the imaging image to obtain the desired target image. 7.根据权利要求6所述的基于双摄像头的成像装置,其特征在于,所述切换模块,具体用于:7. The dual-camera imaging device according to claim 6, wherein the switching module is specifically configured to: 若所述环境亮度高于阈值亮度,将所述第一摄像头作为主摄像头,并将所述第二摄像头作为副摄像头;If the ambient brightness is higher than a threshold brightness, the first camera is used as a main camera and the second camera is used as a secondary camera; 若所述环境亮度不高于所述阈值亮度,将所述第二摄像头作为主摄像头,并将所述第一摄像头作为副摄像头。If the ambient brightness is not higher than the threshold brightness, the second camera is used as the main camera and the first camera is used as the secondary camera. 8.一种移动终端,其特征在于,包括:第一摄像头、第二摄像头、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序;所述第一摄像头的分辨率高于第二摄像头,所述第二摄像头的感光度高于所述第一摄像头;所述处理器执行所述程序时,实现如权利要求1-5中任一项所述的基于双摄像头的成像方法。8. A mobile terminal, characterized in that it comprises: a first camera, a second camera, a memory, a processor, and a computer program stored in the memory and executable on the processor; the resolution of the first camera is higher than that of the second camera, and the sensitivity of the second camera is higher than that of the first camera; when the processor executes the program, the dual-camera-based imaging method according to any one of claims 1 to 5 is implemented. 9.根据权利要求8所述的移动终端,其特征在于,所述第一摄像头的视场角和所述第二摄像头的视场角相同;9. The mobile terminal according to claim 8, wherein the field of view angle of the first camera is the same as the field of view angle of the second camera; 其中,所述第一摄像头为16M摄像头;所述第二摄像头为5M摄像头。Among them, the first camera is a 16M camera; the second camera is a 5M camera. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5中任一项所述的基于双摄像头的成像方法。10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the dual-camera-based imaging method according to any one of claims 1 to 5 is implemented.
HK18110570.7A 2018-08-16 Imaging method and device based on dual camera HK1251387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
HK18110570.7A HK1251387B (en) 2018-08-16 Imaging method and device based on dual camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
HK18110570.7A HK1251387B (en) 2018-08-16 Imaging method and device based on dual camera

Publications (2)

Publication Number Publication Date
HK1251387A1 HK1251387A1 (en) 2019-01-25
HK1251387B true HK1251387B (en) 2020-09-04

Family

ID=

Similar Documents

Publication Publication Date Title
CN107959778B (en) Imaging method and device based on dual cameras
KR102293443B1 (en) Image processing method and mobile terminal using dual camera
CN107948519B (en) Image processing method, device and equipment
KR102306283B1 (en) Image processing method and device
CN108055452B (en) Image processing method, device and equipment
CN108024054B (en) Image processing method, device, device and storage medium
CN108712608B (en) Terminal equipment shooting method and device
CN107835372A (en) Imaging method, device, mobile terminal and storage medium based on dual camera
CN108024056B (en) Imaging method and device based on dual cameras
CN107872631B (en) Image shooting method and device based on double cameras and mobile terminal
CN108156369A (en) Image processing method and device
HK1251387B (en) Imaging method and device based on dual camera
HK1249686B (en) Image processing method, apparatus and device
HK1249976B (en) Image processing method, apparatus, device and storage medium
HK1251387A1 (en) Imaging method and device based on dual camera
HK1251748B (en) Imaging method and device based on dual camera
HK1251752A1 (en) Image processing method and device
HK1249685A1 (en) Image processing method and device
HK1251749B (en) Image processing method, device and equipment
HK1251748A1 (en) Imaging method and device based on dual camera
HK1251749A1 (en) Image processing method, device and equipment