[go: up one dir, main page]

CN107592453B - A kind of image pickup method and mobile terminal - Google Patents

A kind of image pickup method and mobile terminal Download PDF

Info

Publication number
CN107592453B
CN107592453B CN201710803154.8A CN201710803154A CN107592453B CN 107592453 B CN107592453 B CN 107592453B CN 201710803154 A CN201710803154 A CN 201710803154A CN 107592453 B CN107592453 B CN 107592453B
Authority
CN
China
Prior art keywords
camera
scene detection
scene
image
detection results
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
CN201710803154.8A
Other languages
Chinese (zh)
Other versions
CN107592453A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710803154.8A priority Critical patent/CN107592453B/en
Publication of CN107592453A publication Critical patent/CN107592453A/en
Application granted granted Critical
Publication of CN107592453B publication Critical patent/CN107592453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Abstract

本发明提供一种拍摄方法及移动终端,该方法包括:控制第一摄像头采集预览图像;控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。本发明既可以提高场景检测的可靠性,也可以提高预览图像的质量。

The present invention provides a shooting method and a mobile terminal. The method includes: controlling the first camera to collect a preview image; controlling the second camera to detect the shooting scene in the background to obtain the first scene detection result; based on the first scene detection result, Image processing is performed on the preview image collected by the first camera. The invention can not only improve the reliability of scene detection, but also improve the quality of the preview image.

Description

一种拍摄方法及移动终端A shooting method and mobile terminal

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种拍摄方法及移动终端。The invention relates to the field of communication technologies, in particular to a photographing method and a mobile terminal.

背景技术Background technique

目前,手机等移动通信终端都具有拍照功能,并且随着技术的进步,移动终端可以利用摄像头采集的预览图像进行拍摄场景检测,得到拍摄场景的类型。At present, mobile communication terminals such as mobile phones have a camera function, and with the advancement of technology, the mobile terminal can use the preview image collected by the camera to detect the shooting scene and obtain the type of the shooting scene.

现有技术在拍摄过程中,在拍摄预览时进行场景检测,得到场景检测结果,在检测到用户按下拍照按钮后,然后拍摄一张图像,对拍摄的图像进行场景检测结果相应的图像处理,由于目前的场景检测算法都是基于图像进行图像识别分析,且场景检测后的图像处理效果在拍摄完成之后才生效,在预览图像数据有逆向改变的情况下,会使得场景检测算法失效,导致预览图像频繁不断的发生拍摄效果的变化和闪烁。In the prior art, during the shooting process, the scene detection is performed during the shooting preview, and the scene detection result is obtained. After it is detected that the user presses the camera button, an image is captured, and the captured image is subjected to image processing corresponding to the scene detection result. Since the current scene detection algorithms are based on images for image recognition and analysis, and the image processing effect after scene detection takes effect after the shooting is completed, in the case of a reverse change in the preview image data, the scene detection algorithm will fail, resulting in preview The image changes and flickers frequently and continuously.

发明内容Contents of the invention

本发明实施例提供一种拍摄方法及移动终端,以解决现有技术中在预览图像数据有逆向改变的情况下,场景检测算法失效,导致预览图像频繁不断的发生拍摄效果的变化和闪烁的问题。Embodiments of the present invention provide a shooting method and a mobile terminal to solve the problem in the prior art that when the preview image data is reversed, the scene detection algorithm fails, resulting in frequent changes in the shooting effect and flickering of the preview image .

第一方面,本发明实施例提供了一种拍摄方法,该照预览显示方法应用于设置有第一摄像头和第二摄像头的移动终端,该照预览显示方法包括:In the first aspect, an embodiment of the present invention provides a photographing method. The photo preview display method is applied to a mobile terminal provided with a first camera and a second camera. The photo preview display method includes:

控制第一摄像头采集预览图像;Control the first camera to capture preview images;

控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;Control the second camera to detect the shooting scene in the background, and obtain the detection result of the first scene;

基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。Based on the first scene detection result, image processing is performed on the preview image collected by the first camera.

第二方面,本发明实施例还提供一种移动终端,该移动终端设置有第一摄像头和第二摄像头,包括:In the second aspect, the embodiment of the present invention also provides a mobile terminal, the mobile terminal is provided with a first camera and a second camera, including:

第一控制模块,用于控制第一摄像头采集预览图像;The first control module is used to control the first camera to collect preview images;

第二控制模块,用于控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;The second control module is used to control the second camera to detect the shooting scene in the background to obtain the first scene detection result;

处理模块,用于基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。A processing module, configured to perform image processing on the preview image captured by the first camera based on the first scene detection result.

第三方面,本发明实施例还提供一种移动终端,该移动终端包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的拍摄方法的步骤。In the third aspect, the embodiment of the present invention also provides a mobile terminal, the mobile terminal includes a processor, a memory, and a computer program stored in the memory and operable on the processor, the computer program is controlled by the The processor implements the steps of the above-mentioned photographing method when executed.

第四方面,本发明实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的拍摄方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the photographing method as described above are implemented.

在本发明实施例中,控制第一摄像头采集预览图像;控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。区别于现有技术,本发明利用控制第二摄像头在后台进行拍摄场景检测,得到的第一场景检测结果,对第一摄像头采集的预览图像进行图像处理,从而可以避免图像处理后的预览图像对拍摄场景检测的干扰,既可以提高场景检测的可靠性,也可以提高预览图像的质量。In the embodiment of the present invention, the first camera is controlled to collect a preview image; the second camera is controlled to perform shooting scene detection in the background to obtain the first scene detection result; based on the first scene detection result, the image collected by the first camera is Preview images for image processing. Different from the prior art, the present invention controls the second camera to detect the shooting scene in the background, obtains the result of the first scene detection, and performs image processing on the preview image collected by the first camera, so that the preview image after image processing can be avoided. The interference of shooting scene detection can improve the reliability of scene detection and improve the quality of preview image.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本发明实施例提供的拍摄方法的流程图之一;Fig. 1 is one of the flowcharts of the photographing method provided by the embodiment of the present invention;

图2是本发明实施例提供的拍摄方法的流程图之二;Fig. 2 is the second flowchart of the photographing method provided by the embodiment of the present invention;

图3是本发明实施例提供的移动终端的结构图之一;Fig. 3 is one of the structural diagrams of the mobile terminal provided by the embodiment of the present invention;

图4是本发明实施例提供的移动终端的结构图之二;FIG. 4 is the second structural diagram of the mobile terminal provided by the embodiment of the present invention;

图5是本发明实施例提供的移动终端的结构图之三;FIG. 5 is the third structural diagram of the mobile terminal provided by the embodiment of the present invention;

图6是本发明实施例提供的移动终端的结构图之四;FIG. 6 is a fourth structural diagram of a mobile terminal provided by an embodiment of the present invention;

图7是本发明实施例提供的移动终端的结构图之五;FIG. 7 is the fifth structural diagram of the mobile terminal provided by the embodiment of the present invention;

图8是本发明实施例提供的移动终端的结构图之六。FIG. 8 is a sixth structural diagram of a mobile terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例中,移动终端设置有第一摄像头和第二摄像头。其中,第一摄像头采集的图像主要用于显示,以供用户进行拍照预览;第二摄像头采集的图像主要用于场景检测,得到当前的拍摄场景。移动终端可以是手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the mobile terminal is provided with a first camera and a second camera. Wherein, the image collected by the first camera is mainly used for displaying for the user to preview the photo; the image collected by the second camera is mainly used for scene detection to obtain the current shooting scene. The mobile terminal can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a personal digital assistant (personal digital assistant, PDA for short), a mobile Internet device (Mobile Internet Device, MID) or a wearable device (Wearable Device) and so on.

本发明实施例中的拍摄方法,利用第二摄像头采集的图像进行拍摄场景检测,得到第一场景检测结果,并根据上述第一场景检测结果,对第一摄像头采集的预览图像进行图像处理,从而可以避免图像处理后的预览图像对拍摄场景检测的干扰,既可以提高场景检测的可靠性,也可以提高预览图像的质量。The shooting method in the embodiment of the present invention uses the image collected by the second camera to detect the shooting scene to obtain the first scene detection result, and performs image processing on the preview image collected by the first camera according to the above first scene detection result, thereby The interference of the preview image after image processing on the shooting scene detection can be avoided, the reliability of the scene detection can be improved, and the quality of the preview image can also be improved.

参见图1,图1是本发明实施例提供的拍摄方法的流程图之一,如图1所示,本实施例的拍摄方法包括以下步骤:Referring to Fig. 1, Fig. 1 is one of the flowcharts of the photographing method provided by the embodiment of the present invention. As shown in Fig. 1, the photographing method of this embodiment includes the following steps:

步骤101、控制第一摄像头采集预览图像。Step 101. Control the first camera to capture a preview image.

本实施例中,移动终端在检测到相机被启动后,可以同时开启第一摄像头和第二摄像头,以分别采集图像。其中,控制第一摄像头采集的图像用于显示在移动终端的显示屏上,以供用户预览。In this embodiment, after the mobile terminal detects that the camera is activated, the first camera and the second camera can be turned on at the same time to capture images respectively. Wherein, the image collected by the first camera is controlled to be displayed on the display screen of the mobile terminal for the user to preview.

步骤102、控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果。Step 102, controlling the second camera to detect the shooting scene in the background, and obtain the first scene detection result.

该步骤中,移动终端控制第二摄像头采集预览图像,并在后台,即控制系统中利用第二摄像头采集到的预览图像进行拍摄场景检测,得到当前环境下的场景类型,即第一场景检测结果,提高了场景类型的得到的准确率。In this step, the mobile terminal controls the second camera to collect a preview image, and in the background, that is, the control system uses the preview image collected by the second camera to detect the shooting scene, and obtain the scene type in the current environment, that is, the first scene detection result , which improves the accuracy of the scene type.

具体地,移动终端可以通过第二摄像头采集的预览图像中的不同参数,来得到第二摄像头采集的预览图像的第一场景检测结果,例如:通过检测第二摄像头采集的预览图像的亮度来判断第一场景检测结果是否为夜景场景;可以通过对第二摄像头采集的预览图像中的明像素和暗像素的数量进行统计与比较,来判断第一场景检测结果是否为逆光场景;可以通过对第二摄像头在相邻时刻采集的预览图像的像素值的大小进行比较,来判断第一场景检测结果是否为运动场景。当然,在其他实施例中,还可以通过第二摄像头采集到的预览图像的其他参数来判断第一场景检测结果是否属于其他类型的场景,本发明实施例对此不作限定。相应地,本发明实施例中,第一场景检测结果可以为上述的夜晚场景、逆光场景或运动场景,还可以为室内场景或阴雨天场景等其他类型的场景结果。Specifically, the mobile terminal can obtain the first scene detection result of the preview image collected by the second camera through different parameters in the preview image collected by the second camera, for example, by detecting the brightness of the preview image collected by the second camera to determine Whether the first scene detection result is a night scene scene; can judge whether the first scene detection result is a backlight scene by counting and comparing the number of bright pixels and dark pixels in the preview image collected by the second camera; The pixel values of the preview images collected by the two cameras at adjacent moments are compared to determine whether the first scene detection result is a moving scene. Of course, in other embodiments, other parameters of the preview image collected by the second camera may also be used to determine whether the first scene detection result belongs to other types of scenes, which is not limited in this embodiment of the present invention. Correspondingly, in the embodiment of the present invention, the first scene detection result may be the above-mentioned night scene, backlight scene or sports scene, or other types of scene results such as indoor scene or rainy day scene.

步骤103、基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。Step 103 , based on the first scene detection result, perform image processing on the preview image captured by the first camera.

本发明实施例中,移动终端可以基于所述第一场景检测结果,通过不同的图像处理算法对所述第一摄像头采集的预览图像进行图像处理。例如:对于夜景场景,第一摄像头采集的预览图像的噪点较多,亮度较低,可以实行多帧合成算法来提升拍摄图像的亮度与信噪比;对于逆光场景,第一摄像头采集的预览图像明暗反差强烈,可以实行高动态光照渲染图像(High-Dynamic Range,简称HDR)算法来获取高动态范围图像,即亮处不至于过曝,而暗处又可以看清细节;对于运动场景,第一摄像头采集的预览图像容易模糊,可以实行防抖算法来降低拍摄图像的模糊度。从而可以提高第一摄像头采集的预览图像的质量。In the embodiment of the present invention, the mobile terminal may perform image processing on the preview image collected by the first camera through different image processing algorithms based on the first scene detection result. For example: for night scenes, the preview image captured by the first camera has more noise and low brightness, and a multi-frame synthesis algorithm can be implemented to improve the brightness and signal-to-noise ratio of the captured image; for backlit scenes, the preview image captured by the first camera The contrast between light and dark is strong, and the High-Dynamic Range (HDR) algorithm can be implemented to obtain high-dynamic-range images, that is, the bright parts will not be overexposed, and the details can be seen clearly in the dark; for sports scenes, the first The preview image collected by a camera is easy to blur, and an anti-shake algorithm can be implemented to reduce the blur of the captured image. Therefore, the quality of the preview image collected by the first camera can be improved.

当然,移动终端也可以根据第一场景检测结果,确定图像处理参数,以使用确定的图像处理参数,对所述第一摄像头采集的预览图像进行图像处理,以提高上述预览图像的质量。Of course, the mobile terminal may also determine image processing parameters according to the first scene detection result, so as to use the determined image processing parameters to perform image processing on the preview image captured by the first camera, so as to improve the quality of the preview image.

可以理解的,移动终端可以在对所述第一摄像头采集的预览图像进行图像处理后,才在显示屏上显示第一摄像头采集的预览图像;移动终端也可以在第一摄像头采集到预览图像后,显示预览图像,再基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。本发明实施例对此不作限定。It can be understood that the mobile terminal may display the preview image collected by the first camera on the display screen after performing image processing on the preview image collected by the first camera; the mobile terminal may also display the preview image collected by the first camera. , displaying a preview image, and then performing image processing on the preview image captured by the first camera based on the first scene detection result. This embodiment of the present invention does not limit it.

另外,移动终端可以根据第一场景检测结果调整第一摄像头的参数,如:曝光时间、感光度和光圈等。这样,区别于调整参数前的第一摄像头采集到的预览图像,调整参数后的第一摄像头采集到的预览图像的质量得到了提高,质量较好。以目标场景是夜景场景为例进行说明,由于此时环境较暗、光线较弱,可以根据夜景场景,调整第一摄像头的曝光时间和感光度来提升预览图像的亮度,提高预览图像的质量。In addition, the mobile terminal may adjust parameters of the first camera, such as exposure time, sensitivity, aperture, etc., according to the first scene detection result. In this way, different from the preview image collected by the first camera before the parameter is adjusted, the quality of the preview image collected by the first camera after the parameter is adjusted is improved, and the quality is better. The target scene is a night scene as an example. Since the environment is dark and the light is weak at this time, the exposure time and sensitivity of the first camera can be adjusted according to the night scene to increase the brightness of the preview image and improve the quality of the preview image.

现有技术中,摄像头采集的图像同时用于预览与场景检测,假设检测到当前场景夜景场景,此时若对预览图像进行优化处理,提升预览图像的亮度,则场景检测算法根据优化处理后的预览图像检测到的场景不符合夜景场景,场景检测的可靠性低,且容易导致预览图像产生频繁不断的效果变化和闪烁。而在本发明实施例中,移动终端通过第二摄像头采集到的预览图像得到第一场景检测结果,并基于该第一场景检测结果对第一摄像头采集到的图像进行图像处理。因此,区别于现有技术,本发明可以避免目标预览图像对场景检测的干扰,从而既可以提高场景检测的可靠性,也可以提高显示的预览图像的质量。In the prior art, the image collected by the camera is used for preview and scene detection at the same time. Assuming that the night scene of the current scene is detected, if the preview image is optimized at this time to increase the brightness of the preview image, the scene detection algorithm will be based on the optimized image. The scene detected by the preview image does not conform to the night scene, the reliability of scene detection is low, and it is easy to cause frequent and continuous effect changes and flickering of the preview image. However, in the embodiment of the present invention, the mobile terminal obtains the first scene detection result through the preview image collected by the second camera, and performs image processing on the image collected by the first camera based on the first scene detection result. Therefore, different from the prior art, the present invention can avoid the interference of the target preview image on the scene detection, thereby not only improving the reliability of the scene detection, but also improving the quality of the displayed preview image.

本发明实施例中,移动终端在得到第一场景检测结果后,可以将第一场景检测结果信息反馈给第一摄像头。具体地,第一场景检测结果信息可以为第一场景检测结果的表征形式。在具体的实施例中,第一场景检测结果的表征形式可以为数值,即用不同的值代表不同的第一场景检测结果,例如:用“1”代表夜景场景,“2”代表逆光场景,“3”代表运动场景等,这样,第一摄像头在读取到具体值时,就可以通过查找预设的值与场景类型的映射关系,获取该值对应的场景类型,即第一场景检测结果。当然,在其他实施例中,第一场景检测结果也可以通过其他形式进行表征,本发明实施例对此不作限定。In the embodiment of the present invention, after obtaining the first scene detection result, the mobile terminal may feed back the first scene detection result information to the first camera. Specifically, the first scene detection result information may be a representation form of the first scene detection result. In a specific embodiment, the representation form of the first scene detection result can be a numerical value, that is, different values are used to represent different first scene detection results, for example: use "1" to represent a night scene scene, "2" to represent a backlight scene, "3" represents sports scenes, etc. In this way, when the first camera reads a specific value, it can obtain the scene type corresponding to the value by looking up the mapping relationship between the preset value and the scene type, that is, the first scene detection result . Of course, in other embodiments, the first scene detection result may also be represented in other forms, which is not limited in this embodiment of the present invention.

本发明实施例中,第一摄像头可以为主摄像头;第二摄像头可以为副摄像头,即辅助摄像头。In the embodiment of the present invention, the first camera may be a main camera; the second camera may be a secondary camera, that is, an auxiliary camera.

本实施例的拍摄方法,控制第一摄像头采集预览图像;控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。区别于现有技术,本发明利用控制第二摄像头在后台进行拍摄场景检测,得到的第一场景检测结果,对第一摄像头采集的预览图像进行图像处理,从而可以避免图像处理后的预览图像对拍摄场景检测的干扰,既可以提高场景检测的可靠性,也可以提高预览图像的质量。In the shooting method of this embodiment, the first camera is controlled to collect a preview image; the second camera is controlled to detect the shooting scene in the background to obtain the first scene detection result; based on the first scene detection result, the first camera captures the Preview images for image processing. Different from the prior art, the present invention controls the second camera to detect the shooting scene in the background, obtains the result of the first scene detection, and performs image processing on the preview image collected by the first camera, so that the preview image after image processing can be avoided. The interference of shooting scene detection can improve the reliability of scene detection and improve the quality of preview image.

参见图2,图2是本发明实施例提供的拍摄方法的流程图之二,本实施例与上述实施例的第二要区别在于,在所述控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果的步骤之前,对拍摄方法作了进一步的限定,具体为:对所述第一摄像头采集的预览图像进行拍摄场景检测,得到第二场景检测结果;判断所述第二场景检测结果是否为预设的场景类型;若所述第二场景检测结果为预设的场景类型,则控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果。Referring to FIG. 2, FIG. 2 is the second flow chart of the shooting method provided by the embodiment of the present invention. The second difference between this embodiment and the above embodiment is that the second camera is controlled to detect the shooting scene in the background and obtain Before the step of the first scene detection result, the shooting method is further limited, specifically: the shooting scene detection is performed on the preview image collected by the first camera to obtain the second scene detection result; and the second scene detection is judged Whether the result is a preset scene type; if the second scene detection result is a preset scene type, then control the second camera to detect the shooting scene in the background to obtain the first scene detection result.

如图2所示,包括以下步骤:As shown in Figure 2, it includes the following steps:

步骤201、控制第一摄像头采集预览图像。Step 201. Control the first camera to capture a preview image.

区别于上述方法实施例,在本实施例中,移动终端在检测到相机被启动后,先开启第一摄像头,第二摄像头仍处于关闭状态。Different from the method embodiments described above, in this embodiment, after detecting that the camera is activated, the mobile terminal first turns on the first camera, and the second camera is still turned off.

该步骤与上述方法实施例中的步骤101相同,具体可参考上述实施例中的描述,为避免重复,在此不再赘述。This step is the same as step 101 in the above-mentioned method embodiment. For details, reference may be made to the description in the above-mentioned embodiment. To avoid repetition, details are not repeated here.

步骤202、对所述第一摄像头采集的预览图像进行拍摄场景检测,得到第二场景检测结果。Step 202: Perform shooting scene detection on the preview image captured by the first camera to obtain a second scene detection result.

该步骤与上述方法实施例中的步骤102类似,区别在于,该步骤中利用第一摄像头采集到的预览图像进行拍摄场景检测,得到第二场景检测结果,因此,具体可参考上述实施例中的描述,为避免重复,在此不再赘述。This step is similar to step 102 in the above-mentioned method embodiment, the difference is that in this step, the preview image collected by the first camera is used to detect the shooting scene, and the second scene detection result is obtained. Therefore, for details, please refer to the above-mentioned embodiment. The description is omitted here to avoid repetition.

步骤203、判断所述第二场景检测结果是否为预设的场景类型。Step 203, judging whether the second scene detection result is a preset scene type.

该步骤中,预设的场景类型可以但不仅限于包括夜景场景、逆光场景或运动场景,可以理解的,预设场景可以根据实际需求决定,本发明实施例对此不作限定。若第二场景检测结果为预设的场景类型,说明此时第二摄像头采集的预览图像的质量较差,需要对预览图像进行优化处理。In this step, the preset scene types may include, but are not limited to, night scene scenes, backlight scenes, or sports scenes. It can be understood that the preset scene types may be determined according to actual needs, which is not limited in this embodiment of the present invention. If the second scene detection result is the preset scene type, it means that the quality of the preview image captured by the second camera is poor at this time, and the preview image needs to be optimized.

本实施例中,若所述第二场景检测结果属于预设的场景类型,则开启第二摄像头,并执行步骤204;若所述第二场景检测结果不属于预设的场景类型,且未接收到拍照指令,则可以重复执行步骤202与步骤203,并保持第二摄像头处于关闭状态,直至第二场景检测结果属于预设的场景类型。从而可以节约移动终端的耗电量。In this embodiment, if the second scene detection result belongs to the preset scene type, turn on the second camera, and perform step 204; if the second scene detection result does not belong to the preset scene type, and does not receive When a photographing instruction is received, step 202 and step 203 can be repeatedly executed, and the second camera is kept turned off until the second scene detection result belongs to the preset scene type. Therefore, the power consumption of the mobile terminal can be saved.

步骤204、若所述第二场景检测结果为预设的场景类型,则控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果。Step 204: If the second scene detection result is a preset scene type, control the second camera to detect the shooting scene in the background to obtain the first scene detection result.

该步骤与上述方法实施例中的步骤102相同,具体可参考上述实施例中的描述,为避免重复,在此不再赘述。This step is the same as step 102 in the above-mentioned method embodiment. For details, reference may be made to the description in the above-mentioned embodiment. To avoid repetition, details are not repeated here.

步骤205、基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。Step 205 , based on the first scene detection result, perform image processing on the preview image captured by the first camera.

该步骤与上述方法实施例中的步骤103相同,具体可参考上述实施例中的描述,为避免重复,在此不再赘述。This step is the same as step 103 in the above-mentioned method embodiment. For details, reference may be made to the description in the above-mentioned embodiment. To avoid repetition, details are not repeated here.

另外,若得到的第一场景检测结果不属于上述的预设的场景类型,则说明此时第一摄像头采集的预览图像质量较好,不需要对其进行效果优化,从而可以关闭第一摄像头,重新执行步骤201。从而可以节约移动终端的耗电量。In addition, if the obtained first scene detection result does not belong to the above-mentioned preset scene type, it means that the quality of the preview image collected by the first camera is good at this time, and there is no need to optimize its effect, so that the first camera can be turned off. Step 201 is performed again. Therefore, the power consumption of the mobile terminal can be saved.

本实施例的拍摄方法,可以避免图像处理后的预览图像对拍摄场景检测的干扰,既可以提高场景检测的可靠性,也可以提高预览图像的质量。另外,移动终端在开启第一摄像头之前,利用第一摄像头采集的预览图像进行拍照场景检测,得到第二场景检测结果,并在判定第二检测结果为预设的场景类型时,才开启第二摄像头,控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果,并基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。从而可以节约移动终端的耗电量。The shooting method of this embodiment can avoid the interference of the image-processed preview image on the shooting scene detection, can improve the reliability of the scene detection, and can also improve the quality of the preview image. In addition, before turning on the first camera, the mobile terminal uses the preview image collected by the first camera to detect the scene of taking pictures, obtains the second scene detection result, and only turns on the second scene when the second detection result is determined to be a preset scene type. The camera controls the second camera to detect the shooting scene in the background, obtains the first scene detection result, and performs image processing on the preview image collected by the first camera based on the first scene detection result. Therefore, the power consumption of the mobile terminal can be saved.

可选的,所述控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果的步骤,包括:Optionally, the step of controlling the second camera to perform shooting scene detection in the background to obtain the first scene detection result includes:

控制第二摄像头根据预设的预览尺寸采集预览图像;Control the second camera to capture preview images according to the preset preview size;

对所述第二摄像头采集的预览图像进行拍摄场景检测,得到第一场景检测结果。The shooting scene detection is performed on the preview image collected by the second camera to obtain a first scene detection result.

该步骤中,考虑到第二摄像头采集的预览图像用于拍摄场景检测,不用于显示。因此,可以将第一摄像头的预览尺寸调整为预设的预览尺寸,控制第二摄像头根据预设的预览尺寸采集预览图像,对所述第二摄像头采集的预览图像进行拍摄场景检测,得到第一场景检测结果。从而提高拍摄场景检测的检测效率,降低移动终端的运行负荷。其中,上述预设的预览尺寸小于第一摄像头的预览尺寸,例如:第一摄像头的预览尺寸为960*640像素,则预设的预览尺寸可以为640*480像素。In this step, it is considered that the preview image collected by the second camera is used for shooting scene detection and not for display. Therefore, the preview size of the first camera can be adjusted to a preset preview size, the second camera is controlled to capture a preview image according to the preset preview size, and the shooting scene detection is performed on the preview image collected by the second camera to obtain the first Scene detection results. Therefore, the detection efficiency of shooting scene detection is improved, and the operation load of the mobile terminal is reduced. Wherein, the above preset preview size is smaller than the preview size of the first camera, for example, if the preview size of the first camera is 960*640 pixels, the preset preview size may be 640*480 pixels.

可选的,所述基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理的步骤,包括:Optionally, the step of performing image processing on the preview image collected by the first camera based on the first scene detection result includes:

确定所述第一场景检测结果关联的图像处理参数;determining image processing parameters associated with the first scene detection result;

按照所述图像处理参数,对所述第一摄像头采集的预览图像进行图像处理。Perform image processing on the preview image captured by the first camera according to the image processing parameters.

为方便理解,以第一场景检测结果为夜景场景为例进行说明,可以确定夜景场景关联的图像处理参数为亮度,移动终端可以通过提高第一摄像头采集的预览图像的亮度,实现对所述第一摄像头采集的预览图像的图像处理。对于其他场景类型的第一场景检测结果,可以采用对应的方式处理,本发明实施例对此不作限定。For the convenience of understanding, the first scene detection result is a night scene scene as an example for illustration. It can be determined that the image processing parameter associated with the night scene scene is brightness, and the mobile terminal can realize the detection of the first scene by increasing the brightness of the preview image collected by the first camera. Image processing of preview images collected by a camera. The first scene detection results of other scene types may be processed in a corresponding manner, which is not limited in this embodiment of the present invention.

在所述基于所述第一场景检测结果,对所述第一预览图像进行图像处理的步骤之后,还包括:After the step of performing image processing on the first preview image based on the first scene detection result, further comprising:

若接收到拍照指令,则获取第一摄像头采集的一帧拍摄图像;If a photographing instruction is received, obtaining a frame of photographed image captured by the first camera;

基于所述第一场景检测结果,对所述拍摄图像进行图像处理,生成照片。Based on the first scene detection result, image processing is performed on the captured image to generate a photo.

需要说明的是,该步骤与上述方法实施例中的步骤103类似,区别在于,步骤103为基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理,本步骤为基于所述第一场景检测结果,对第一摄像头采集的拍摄图像进行图像处理,生成照片。因此,具体可参考步骤102中的描述,为避免重复,在此不再赘述。It should be noted that this step is similar to step 103 in the above method embodiment, the difference is that step 103 is to perform image processing on the preview image collected by the first camera based on the first scene detection result, this step is Based on the first scene detection result, image processing is performed on the captured image captured by the first camera to generate a photo. Therefore, reference may be made to the description in step 102 for details, and details are not repeated here to avoid repetition.

当然,在其它实施例中,第一摄像头在采集拍摄图像前,可以根据第一场景检测结果,对第一摄像头的相关参数进行调整,以捕捉到适合该第一场景检测结果的图像帧数,从而实现对采集到的拍摄图像的图像处理。例如:对于夜景场景,在该场景下采集的拍摄图像的噪点较多,亮度较低,可以实行多帧合成算法来提升拍摄图像的亮度与信噪比,因此,需要调整第一摄像头的曝光时间,以捕捉多帧长曝光的拍摄图像;对于逆光场景,在该场景下采集的拍摄图像明暗反差强烈,可以实行高动态光照渲染图像(High-Dynamic Range,简称HDR)算法来获取高动态范围图像,即亮处不至于过曝,而暗处又可以看清细节,因此,可以灵活调整第一摄像头的曝光时间,以捕捉至少3帧不同曝光时间的拍摄图像;对于运动场景,在该场景下采集的拍摄图像容易模糊,可以实行防抖算法来降低拍摄图像的模糊度,因此,可以调整第一摄像头的曝光时间,以捕捉多帧短曝光的拍摄图像。从而可以进一步提高目标照片的质量。Of course, in other embodiments, before the first camera captures the captured image, it can adjust the relevant parameters of the first camera according to the first scene detection result, so as to capture the number of image frames suitable for the first scene detection result, In this way, the image processing of the collected photographed images is realized. For example: for a night scene, the image captured in this scene has more noise and lower brightness, and a multi-frame synthesis algorithm can be implemented to improve the brightness and signal-to-noise ratio of the captured image. Therefore, the exposure time of the first camera needs to be adjusted , to capture multiple frames of long-exposure images; for backlit scenes, the captured images collected in this scene have a strong contrast between light and dark, and a High-Dynamic Range (HDR) algorithm can be implemented to obtain high-dynamic range images , that is, the bright places will not be overexposed, and the details can be seen clearly in the dark places. Therefore, the exposure time of the first camera can be flexibly adjusted to capture at least 3 frames of images with different exposure times; for sports scenes, in this scene The captured images are easily blurred, and an anti-shake algorithm can be implemented to reduce the blur of the captured images. Therefore, the exposure time of the first camera can be adjusted to capture multiple frames of short-exposure captured images. Thereby, the quality of the target photo can be further improved.

需要说明的是,在预览和拍照的过程中,第二摄像头的状态可以保持不变。另外,移动终端根据第一场景检测结果对第一摄像头采集的预览图像和拍摄图像进行图像处理的手段应尽量保持一致,从而可以保证显示屏上显示的预览图像与照片基本一致,提升用户体验。It should be noted that, during the process of previewing and taking pictures, the state of the second camera may remain unchanged. In addition, according to the detection result of the first scene, the means of image processing of the preview image collected by the first camera and the shot image by the mobile terminal should be as consistent as possible, so as to ensure that the preview image displayed on the display screen is basically consistent with the photo, and improve user experience.

需要说明的是,该可选步骤同样可适用于上述实施例中。It should be noted that this optional step is also applicable to the foregoing embodiments.

参见图3,图3是本发明实施例提供的移动终端的结构图之一,如图3所示,移动终端300包括:第一控制模块301、第二控制模块302以及处理模块303。Referring to FIG. 3 , FIG. 3 is one of the structural diagrams of the mobile terminal provided by the embodiment of the present invention. As shown in FIG. 3 , the mobile terminal 300 includes: a first control module 301 , a second control module 302 and a processing module 303 .

其中,第一控制模块301,用于控制第一摄像头采集预览图像;Wherein, the first control module 301 is used to control the first camera to collect preview images;

第二控制模块302,用于控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;The second control module 302 is configured to control the second camera to perform shooting scene detection in the background to obtain the first scene detection result;

处理模块303,用于基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。The processing module 303 is configured to perform image processing on the preview image collected by the first camera based on the first scene detection result.

可选的,如图4所示,第二控制模块302,包括:Optionally, as shown in FIG. 4, the second control module 302 includes:

控制子模块3021,用于控制第二摄像头根据预设的预览尺寸采集预览图像;The control sub-module 3021 is configured to control the second camera to capture a preview image according to a preset preview size;

检测子模块3022,用于对所述第二摄像头采集的预览图像进行拍摄场景检测,得到第一场景检测结果。The detection sub-module 3022 is configured to perform shooting scene detection on the preview image collected by the second camera to obtain a first scene detection result.

可选的,如图5所示,移动终端300还包括:Optionally, as shown in FIG. 5, the mobile terminal 300 also includes:

检测模块304,用于在控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果之前,对所述第一摄像头采集的预览图像进行拍摄场景检测,得到第二场景检测结果;The detection module 304 is configured to perform scene detection on the preview image collected by the first camera to obtain a second scene detection result before controlling the second camera to detect the shooting scene in the background to obtain the first scene detection result;

判断模块305,用于判断所述第二场景检测结果是否为预设的场景类型;A judging module 305, configured to judge whether the second scene detection result is a preset scene type;

第二控制模块302,具体用于在所述第二场景检测结果为预设的场景类型时,控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果的步骤。The second control module 302 is specifically used to control the second camera to detect the shooting scene in the background and obtain the first scene detection result when the second scene detection result is a preset scene type.

可选的,如图6所示,处理模块303,包括:Optionally, as shown in Figure 6, the processing module 303 includes:

确定子模块3031,用于确定所述第一场景检测结果关联的图像处理参数;A determining submodule 3031, configured to determine image processing parameters associated with the first scene detection result;

处理子模块3032,用于按照所述图像处理参数,对所述第一摄像头采集的预览图像进行图像处理。The processing sub-module 3032 is configured to perform image processing on the preview image captured by the first camera according to the image processing parameters.

可选的,如图7所示,移动终端300还包括:Optionally, as shown in FIG. 7, the mobile terminal 300 further includes:

获取模块306,用于在所述基于所述第一场景检测结果,对所述第一预览图像进行图像处理之后,若接收到拍照指令,则获取第一摄像头采集的一帧拍摄图像;An acquisition module 306, configured to acquire a frame of captured image captured by the first camera if a photographing instruction is received after performing image processing on the first preview image based on the first scene detection result;

生成模块307,用于基于所述第一场景检测结果,对所述拍摄图像进行图像处理,生成照片。The generation module 307 is configured to perform image processing on the captured image based on the first scene detection result to generate a photo.

移动终端300能够实现图1至图2的方法实施例中的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。The mobile terminal 300 can implement each process in the method embodiments shown in FIG. 1 to FIG. 2 and achieve the same beneficial effects. To avoid repetition, details will not be described here.

参见图8,图8是本发明实施例提供的移动终端的结构图之六,如图8所示,移动终端800包括:至少一个处理器801、存储器802、至少一个网络接口804和用户接口803。移动终端800中的各个组件通过总线系统805耦合在一起。可理解,总线系统805用于实现这些组件之间的连接通信。总线系统805除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图8中将各种总线都标为总线系统805。移动终端800还包括第一摄像头806和第二摄像头807,其中,第一摄像头806和第二摄像头807具有图像采集功能。另外,第一摄像头806和第二摄像头807通过总线系统805与移动终端800的各个组件连接。Referring to FIG. 8, FIG. 8 is the sixth structural diagram of the mobile terminal provided by the embodiment of the present invention. As shown in FIG. . Various components in the mobile terminal 800 are coupled together through a bus system 805 . It can be understood that the bus system 805 is used to realize connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 805 in FIG. 8 for clarity of illustration. The mobile terminal 800 also includes a first camera 806 and a second camera 807, wherein the first camera 806 and the second camera 807 have an image acquisition function. In addition, the first camera 806 and the second camera 807 are connected to various components of the mobile terminal 800 through the bus system 805 .

其中,用户接口803可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(track ball)、触感板或者触摸屏等。Wherein, the user interface 803 may include a display, a keyboard or a pointing device (for example, a mouse, a track ball (track ball), a touch panel or a touch screen, and the like.

可以理解,本发明实施例中的存储器802可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable P ROM,EPROM)、电可擦除可编程只读存储器(Electrically EP ROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous D RAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSD RAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SD RAM,ESDRAM)、同步连接动态随机存取存储器(Synch link D RAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的系统和方法的存储器802旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 802 in the embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable P ROM, EPROM), electronic Erasable programmable read-only memory (Electrically EP ROM, EEPROM) or flash memory. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM , SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SD RAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SD RAM, ESDRAM), synchronous connection dynamic random access memory (Synch link D RAM, SLDRAM) and Direct Memory Bus Random Access Memory (Direct Rambus RAM, DRRAM). Memory 802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

在一些实施方式中,存储器802存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统8021和应用程序8022。In some implementations, the memory 802 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 8021 and an application program 8022 .

其中,操作系统8021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序8022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序8022中。Among them, the operating system 8021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 8022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 8022 .

在本发明实施例中,在本发明实施例中,移动终端800还包括:存储在存储器802上并可在处理器801上运行的计算机程序,具体地,可以是应用程序8022中的计算机程序,计算机程序被处理器801执行时实现如下步骤:控制第一摄像头采集预览图像;控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果;基于所述第一场景检测结果,对所述第一摄像头采集的预览图像进行图像处理。In the embodiment of the present invention, in the embodiment of the present invention, the mobile terminal 800 further includes: a computer program stored in the memory 802 and operable on the processor 801, specifically, it may be a computer program in the application program 8022, When the computer program is executed by the processor 801, the following steps are implemented: controlling the first camera to capture a preview image; controlling the second camera to detect the shooting scene in the background to obtain the first scene detection result; based on the first scene detection result, the Image processing is performed on the preview image collected by the first camera.

上述本发明实施例揭示的方法可以应用于处理器801中,或者由处理器801实现。处理器801可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器801中的硬件的集成逻辑电路/或者软件形式的指令完成。上述的处理器801可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器802,处理器801读取存储器802中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 801 or implemented by the processor 801 . The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 801 and/or instructions in the form of software. The above-mentioned processor 801 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Program logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802, and completes the steps of the above method in combination with its hardware.

可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.

对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.

可选的,所述处理器801还用于:控制第二摄像头根据预设的预览尺寸采集预览图像;对所述第二摄像头采集的预览图像进行拍摄场景检测,得到第一场景检测结果。Optionally, the processor 801 is further configured to: control the second camera to capture a preview image according to a preset preview size; perform shooting scene detection on the preview image collected by the second camera to obtain a first scene detection result.

可选的,所述处理器801还用于:对所述第一摄像头采集的预览图像进行拍摄场景检测,得到第二场景检测结果;判断所述第二场景检测结果是否为预设的场景类型;若所述第二场景检测结果为预设的场景类型,则控制第二摄像头在后台进行拍摄场景检测,得到第一场景检测结果。Optionally, the processor 801 is further configured to: perform scene detection on the preview image collected by the first camera to obtain a second scene detection result; determine whether the second scene detection result is a preset scene type ; If the second scene detection result is a preset scene type, then control the second camera to detect the shooting scene in the background to obtain the first scene detection result.

可选的,所述处理器801还用于:确定所述第一场景检测结果关联的图像处理参数;按照所述图像处理参数,对所述第一摄像头采集的预览图像进行图像处理。Optionally, the processor 801 is further configured to: determine an image processing parameter associated with the first scene detection result; perform image processing on the preview image captured by the first camera according to the image processing parameter.

可选的,所述处理器801还用于:若接收到拍照指令,则获取第一摄像头采集的一帧拍摄图像;基于所述第一场景检测结果,对所述拍摄图像进行图像处理,生成照片。Optionally, the processor 801 is further configured to: if a photographing instruction is received, acquire a frame of photographed image captured by the first camera; perform image processing on the photographed image based on the first scene detection result to generate photo.

需要说明的是,本实施例中上述移动终端800可以是本发明实施例中方法实施例中任意实施方式的移动终端,即本发明实施例中方法实施例中移动终端的任意实施方式都可以被本实施例中的上述移动终端800所实现,以及达到相同的有益效果,为避免重复,此处不再赘述。It should be noted that the above-mentioned mobile terminal 800 in this embodiment can be a mobile terminal in any implementation manner in the method embodiment in the embodiment of the present invention, that is, any implementation manner of the mobile terminal in the method embodiment in the embodiment of the present invention can be used by this The above-mentioned mobile terminal 800 in the embodiment implements and achieves the same beneficial effect, and to avoid repetition, details are not described here again.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned shooting method embodiment can be realized, and the same technical effect can be achieved. , to avoid repetition, it will not be repeated here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1. a kind of image pickup method, applied to the mobile terminal for being provided with the first camera and second camera, which is characterized in that packet It includes:
Control the first camera acquisition preview image;
It controls second camera and carries out photographed scene detection on backstage, obtain the first scene detection results;
Based on first scene detection results, image procossing is carried out to the preview image of first camera acquisition;
Wherein, the control second camera is the step of backstage carries out photographed scene detection, obtains the first scene detection results Before, further includes:
Photographed scene detection is carried out to the preview image of first camera acquisition, obtains the second scene detection results;
Judge whether second scene detection results are preset scene type;
The step of control second camera carries out photographed scene detection on backstage, obtains the first scene detection results, comprising:
If second scene detection results are preset scene type, second camera is controlled on backstage and carries out photographed scene Detection, obtains the first scene detection results.
2. the method according to claim 1, wherein the control second camera carries out photographed scene on backstage The step of detecting, obtaining the first scene detection results, comprising:
It controls second camera and preview image is acquired according to preset preview size;
Photographed scene detection is carried out to the preview image of second camera acquisition, obtains the first scene detection results.
3. the method according to claim 1, wherein described be based on first scene detection results, to described The step of preview image of first camera acquisition carries out image procossing, comprising:
Determine the associated Image Processing parameter of the first scene detection results;
According to described image processing parameter, image procossing is carried out to the preview image of first camera acquisition.
4. according to the method in any one of claims 1 to 3, which is characterized in that examined described based on first scene It surveys as a result, after the step of carrying out image procossing to the preview image of first camera acquisition, further includes:
If receiving photographing instruction, the frame shooting image of the first camera acquisition is obtained;
Based on first scene detection results, image procossing is carried out to the shooting image, generates photo.
5. a kind of mobile terminal, the mobile terminal is provided with the first camera and second camera characterized by comprising
First control module acquires preview image for controlling the first camera;
Second control module carries out photographed scene detection on backstage for controlling second camera, obtains the first scene detection knot Fruit;
Processing module carries out the preview image of first camera acquisition for being based on first scene detection results Image procossing;
Wherein, further includes:
Detection module obtains the first scene detection results for carrying out photographed scene detection on backstage in control second camera Before, photographed scene detection is carried out to the preview image of first camera acquisition, obtains the second scene detection results;
Judgment module, for judging whether second scene detection results are preset scene type;
Second control module is specifically used for the control the when second scene detection results are preset scene type The step of two cameras carry out photographed scene detection on backstage, obtain the first scene detection results.
6. mobile terminal according to claim 5, which is characterized in that second control module, comprising:
Control submodule acquires preview image according to preset preview size for controlling second camera;
Detection sub-module, the preview image for acquiring to the second camera carry out photographed scene detection, obtain first Scape testing result.
7. mobile terminal according to claim 5, which is characterized in that the processing module, comprising:
Submodule is determined, for determining the associated Image Processing parameter of the first scene detection results;
Submodule is handled, for carrying out figure to the preview image of first camera acquisition according to described image processing parameter As processing.
8. mobile terminal according to any one of claims 5 to 7, which is characterized in that further include:
Module is obtained, for being based on first scene detection results described, to the preview graph of first camera acquisition After carrying out image procossing, if receiving photographing instruction, the frame shooting image of the first camera acquisition is obtained;
Generation module carries out image procossing to the shooting image, generates and shine for being based on first scene detection results Piece.
9. a kind of mobile terminal, which is characterized in that including processor, memory and be stored on the memory and can be described The computer program run on processor is realized when the computer program is executed by the processor as in Claims 1-4 The step of described in any item image pickup methods.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, the computer program realize the step of image pickup method according to any one of claims 1 to 4 when being executed by processor Suddenly.
CN201710803154.8A 2017-09-08 2017-09-08 A kind of image pickup method and mobile terminal Active CN107592453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710803154.8A CN107592453B (en) 2017-09-08 2017-09-08 A kind of image pickup method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710803154.8A CN107592453B (en) 2017-09-08 2017-09-08 A kind of image pickup method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107592453A CN107592453A (en) 2018-01-16
CN107592453B true CN107592453B (en) 2019-11-05

Family

ID=61051619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710803154.8A Active CN107592453B (en) 2017-09-08 2017-09-08 A kind of image pickup method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107592453B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108322646B (en) * 2018-01-31 2020-04-10 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
WO2019183813A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Image capture method and device
CN108881636B (en) * 2018-06-30 2021-05-04 成都西纬科技有限公司 Backlight mode automatic switching method and device, electronic equipment and computer readable storage medium
CN109525765A (en) * 2018-12-21 2019-03-26 浙江晶鲸科技有限公司 High-speed image acquisition system and image-pickup method with FLC Light Valve
CN111050078B (en) * 2019-12-26 2024-06-18 上海传英信息技术有限公司 Photographing method, mobile terminal and computer storage medium
CN111491101B (en) * 2020-04-20 2022-08-02 Oppo广东移动通信有限公司 Image processor, image processing method, photographing device, and electronic equipment
CN111866374A (en) * 2020-06-22 2020-10-30 上海摩象网络科技有限公司 Image shooting method and device, pan-tilt camera and storage medium
CN113873178B (en) * 2020-06-30 2024-03-22 Oppo广东移动通信有限公司 Multimedia processing chip, electronic device and image processing method
CN111866383A (en) * 2020-07-13 2020-10-30 Oppo广东移动通信有限公司 An image processing method, terminal and storage medium
CN112489004B (en) * 2020-11-25 2024-04-09 成都菲斯洛克电子技术有限公司 Intelligent image acquisition method, device, storage medium and terminal
CN112511750B (en) * 2020-11-30 2022-11-29 维沃移动通信有限公司 Video shooting method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049706A (en) * 2015-06-26 2015-11-11 深圳市金立通信设备有限公司 Image processing method and terminal
CN105611139A (en) * 2015-07-15 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Method, device and terminal for image processing
CN106060406A (en) * 2016-07-27 2016-10-26 维沃移动通信有限公司 Photographing method and mobile terminal
CN106101547A (en) * 2016-07-06 2016-11-09 北京奇虎科技有限公司 The processing method of a kind of view data, device and mobile terminal
CN106506963A (en) * 2016-11-30 2017-03-15 努比亚技术有限公司 A kind of photographic method and terminal based on dual camera

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101183781B1 (en) * 2009-12-22 2012-09-17 삼성전자주식회사 Method and apparatus for object detecting/tracking using real time motion estimation of camera
US9716876B2 (en) * 2015-04-01 2017-07-25 Sony Corporation Power efficient multiple camera system
CN106454104A (en) * 2016-10-28 2017-02-22 维沃移动通信有限公司 Photographing method and mobile terminal
CN106331519A (en) * 2016-10-31 2017-01-11 维沃移动通信有限公司 Method for adjusting supplementary light and mobile terminal
CN106331510B (en) * 2016-10-31 2019-10-15 维沃移动通信有限公司 A backlight photographing method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049706A (en) * 2015-06-26 2015-11-11 深圳市金立通信设备有限公司 Image processing method and terminal
CN105611139A (en) * 2015-07-15 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Method, device and terminal for image processing
CN106101547A (en) * 2016-07-06 2016-11-09 北京奇虎科技有限公司 The processing method of a kind of view data, device and mobile terminal
CN106060406A (en) * 2016-07-27 2016-10-26 维沃移动通信有限公司 Photographing method and mobile terminal
CN106506963A (en) * 2016-11-30 2017-03-15 努比亚技术有限公司 A kind of photographic method and terminal based on dual camera

Also Published As

Publication number Publication date
CN107592453A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN107592453B (en) A kind of image pickup method and mobile terminal
US11563897B2 (en) Image processing method and apparatus which determines an image processing mode based on status information of the terminal device and photographing scene information
CN107231530B (en) A kind of photographic method and mobile terminal
CN107205120A (en) The processing method and mobile terminal of a kind of image
US9137456B2 (en) Intelligent auto-exposure bracketing
CN107734225A (en) A kind of image pickup method and device
CN106161967A (en) A kind of backlight scene panorama shooting method and mobile terminal
CN105227858A (en) A kind of image processing method and mobile terminal
CN107222680A (en) The image pickup method and mobile terminal of a kind of panoramic picture
CN112087580A (en) Image acquisition method and apparatus, electronic device, computer-readable storage medium
CN109996009A (en) Image processing method, device, storage medium and electronic device
US10602075B2 (en) Automatically determining a set of exposure values for a high dynamic range image capture device
CN104917973A (en) dynamic exposure adjusting method and electronic device thereof
CN111405185B (en) Zoom control method and device for camera, electronic equipment and storage medium
CN110198418A (en) Image processing method, image processing device, storage medium and electronic equipment
CN117692761B (en) Motion snapshot method and electronic equipment
CN108040204B (en) A multi-camera-based image capturing method, device and storage medium
CN114418914A (en) Image processing method, device, electronic device and storage medium
CN106060408B (en) A camera method and mobile terminal
CN110266967A (en) Image processing method, image processing device, storage medium and electronic equipment
CN110278375A (en) Image processing method, image processing device, storage medium and electronic equipment
WO2024239779A1 (en) Video shooting method and electronic device
WO2024051697A1 (en) Image fusion method and apparatus, electronic device, and storage medium
CN110266965A (en) Image processing method, image processing device, storage medium and electronic equipment
CN110213503A (en) Image processing method, image processing device, storage medium and electronic equipment

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