CN106231189A - Take pictures treating method and apparatus - Google Patents
Take pictures treating method and apparatus Download PDFInfo
- Publication number
- CN106231189A CN106231189A CN201610626415.9A CN201610626415A CN106231189A CN 106231189 A CN106231189 A CN 106231189A CN 201610626415 A CN201610626415 A CN 201610626415A CN 106231189 A CN106231189 A CN 106231189A
- Authority
- CN
- China
- Prior art keywords
- target
- photo preview
- image
- focus
- focus object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000003672 processing method Methods 0.000 claims abstract description 14
- 230000009977 dual effect Effects 0.000 claims description 12
- 238000005516 engineering process Methods 0.000 abstract description 10
- 230000000694 effects Effects 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000005669 field effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
本发明实施例公开了一种拍照处理方法和装置,涉及图像处理技术领域。其中,该方法包括:在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应;获取选择的目标对焦物体;根据所述目标对焦物体,对所述拍照预览图像进行对焦。本发明实施例的技术方案实现了在至少一个参考对焦物体中,根据用户选择的目标对焦物体,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求的技术效果,优化了现有智能终端拍照技术,提升了用户的使用体验。
The embodiment of the invention discloses a photographing processing method and device, which relate to the technical field of image processing. Wherein, the method includes: identifying at least one reference focus object in the depth-of-field map generated in the photographing preview state, wherein the depth-of-field map corresponds to the photographing preview image displayed in the photographing preview interface; obtaining the selected target focusing object; Focusing on the photo preview image according to the target focusing object. The technical solution of the embodiment of the present invention achieves the technical effect of accurately focusing on the target focusing object according to the target focusing object selected by the user in at least one reference focusing object, so that the final focusing result is closer to the user's actual focusing needs. It optimizes the existing smart terminal camera technology and improves the user experience.
Description
技术领域technical field
本发明实施例涉及图像处理技术,尤其涉及一种拍照处理方法和装置。Embodiments of the present invention relate to image processing technologies, and in particular, to a photographing processing method and device.
背景技术Background technique
随着互联网、计算机和通信技术的发展,诸如智能手机等智能终端的功能也越来越强大,用户对智能终端的依赖程度也在不断增加,比如查询天气预报,拍摄照片等。With the development of Internet, computer and communication technologies, the functions of smart terminals such as smart phones are becoming more and more powerful, and the user's dependence on smart terminals is also increasing, such as querying weather forecasts and taking photos.
通常,用户在利用智能终端进行拍摄时,智能终端会根据摄像头拍摄的画面自动完成对焦,并将对焦后的预览画面显示在显示界面中。Usually, when the user uses the smart terminal to shoot, the smart terminal will automatically complete the focusing according to the picture captured by the camera, and display the focused preview picture on the display interface.
然而,在发明人实现本发明的过程中,发现本发明的缺陷在于:当智能终端针对摄像头拍摄的画面完成自动对焦后,自动对焦的画面可能不是用户实际需要清晰拍摄的画面,或者,在用户手动选择对焦的中心点时,可能该中心点与用户实际希望的对焦中心点有一定的偏差,使得基于该中心点的对焦画面不满足用户实际的对焦需求。例如,用户手动选择被摄物体的中心点为对焦中心点,然而,实际操作过程中,用户选择的中心点与被摄物体的实际中心点通常会存在一定偏差,此时,基于用户选择的中心点的对焦画面就难以满足用户实际的对焦需求。However, in the process of realizing the present invention, the inventor found that the defect of the present invention is that: after the smart terminal finishes auto-focusing on the picture captured by the camera, the auto-focused picture may not be the picture that the user actually needs to take clearly, or, when the user When manually selecting the focus center point, there may be a certain deviation between the center point and the focus center point that the user actually wants, so that the focus image based on the center point does not meet the user's actual focus needs. For example, the user manually selects the center point of the subject as the focus center point. However, in the actual operation process, there is usually a certain deviation between the center point selected by the user and the actual center point of the subject. At this time, based on the center point selected by the user It is difficult to meet the user's actual focusing needs with a single-point focusing screen.
发明内容Contents of the invention
有鉴于此,本发明实施例提供一种拍照处理方法和装置,以解决智能终端现有的对焦技术不能满足用户实际需求的问题。In view of this, the embodiments of the present invention provide a method and device for photographing processing, so as to solve the problem that the existing focusing technology of the smart terminal cannot meet the actual needs of the user.
第一方面,本发明实施例提供了一种拍照处理方法,其包括:In a first aspect, an embodiment of the present invention provides a photographing processing method, which includes:
在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应;Identifying at least one reference focus object in the depth of field map generated in the photo preview state, wherein the depth of field map corresponds to the photo preview image displayed in the photo preview interface;
获取选择的目标对焦物体;Get the selected target focus object;
根据所述目标对焦物体,对所述拍照预览图像进行对焦。Focusing on the photo preview image according to the target focusing object.
进一步的,获取选择的目标对焦物体包括:Further, obtaining the selected target focus object includes:
在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示;In the photo preview interface, the identified reference focus object is calibrated and prompted;
获取用户根据所述标定提示选择的目标对焦物体。Obtain the target focusing object selected by the user according to the calibration prompt.
可选的,在拍照预览状态下生成的景深图包括:Optionally, the depth map generated in the photo preview state includes:
通过双摄像头进行拍照预览,以获取景深图,且在拍照预览界面中呈现拍照预览图像。The photo preview is performed through dual cameras to obtain the depth of field map, and the photo preview image is presented in the photo preview interface.
进一步的,在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体包括:Further, in the depth-of-field map generated in the photo preview state, identifying at least one reference focus object includes:
获取景深图中各图像像素点的景深信息,其中,所述景深信息中包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息;Obtaining the depth of field information of each image pixel in the depth of field map, wherein the depth of field information includes the distance information between the subject associated with the image pixel and the camera lens;
将距离信息之间的差值满足设定阈值条件的图像像素点归集于同一像素分组中;Collect the image pixels whose difference between the distance information satisfies the set threshold condition into the same pixel group;
将各像素分组中图像像素坐标连续的图像像素点识别为参考对焦物体。Image pixel points with continuous image pixel coordinates in each pixel group are identified as reference focus objects.
可选的,在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示包括:Optionally, in the photo preview interface, prompting for calibration of the identified reference focus object includes:
根据识别出的所述参考对焦物体的数量,为所述参考对焦物体建立身份标识;Establishing an identity mark for the reference focusing object according to the number of identified reference focusing objects;
根据所述参考对焦物体在所述景深图中的图像像素坐标,确定所述参考对焦物体在所述拍照预览界面中的位置;determining the position of the reference focus object in the photo preview interface according to the image pixel coordinates of the reference focus object in the depth map;
根据所述参考对焦物体在所述拍照预览界面中的位置,确定与所述参考对焦物体对应的标定位置;determining a calibration position corresponding to the reference focus object according to the position of the reference focus object in the photo preview interface;
在所述拍照预览界面中的所述标定位置处,显示与所述参考对焦物体对应的身份标识。At the marked position in the photo preview interface, an identity mark corresponding to the reference focus object is displayed.
可选的,根据所述参考对焦物体在所述景深图中的图像像素坐标,确定所述参考对焦物体在所述拍照预览界面中的位置包括:Optionally, according to the image pixel coordinates of the reference focus object in the depth map, determining the position of the reference focus object in the photo preview interface includes:
将所述参考对焦物体在所述景深图中的图像像素坐标作为所述参考对焦物体在所述拍照预览图像中的图像像素坐标;Using the image pixel coordinates of the reference focus object in the depth map as the image pixel coordinates of the reference focus object in the photo preview image;
根据拍照预览界面的屏幕分辨率与所述拍照预览图像的图像分辨率之间的对应关系,获取所述拍照预览界面中与所述拍照预览图像中的图像像素坐标对应的屏幕像素坐标,作为所述参考对焦物体在所述拍照预览界面中的位置。According to the corresponding relationship between the screen resolution of the photo preview interface and the image resolution of the photo preview image, obtain the screen pixel coordinates corresponding to the image pixel coordinates in the photo preview image in the photo preview interface, as the The position of the reference focus object in the photo preview interface.
进一步的,获取用户根据所述标定提示选择的目标对焦物体包括:Further, obtaining the target focusing object selected by the user according to the calibration prompt includes:
实时获取用户输入的语音信息;Obtain the voice information input by the user in real time;
如果在语音信息中识别出与标定提示匹配的关键词,则获取与所述标定提示对应的目标对焦物体。If a keyword matching the calibration prompt is recognized in the voice information, a target focusing object corresponding to the calibration prompt is acquired.
可选的,根据所述目标对焦物体,对所述拍照预览图像进行对焦包括:Optionally, focusing on the photo preview image according to the target focusing object includes:
根据所述景深图,确定所述目标对焦物体与摄像头镜头之间的目标距离信息;Determine the target distance information between the target focus object and the camera lens according to the depth-of-field map;
根据预存的被摄物体到达镜头的距离与对焦马达移动距离之间的对应关系,以及所述目标距离信息,确定对焦马达的调整移动位置;According to the pre-stored correspondence between the distance from the subject to the lens and the moving distance of the focus motor, and the target distance information, determine the adjusted moving position of the focus motor;
根据所述调整移动位置控制所述对焦马达进行移动,以对所述拍照预览图像进行对焦。The focus motor is controlled to move according to the adjusted moving position, so as to focus on the photo preview image.
进一步的,根据所述目标对焦物体,对所述拍照预览图像进行对焦包括:Further, according to the target focusing object, focusing on the photographing preview image includes:
根据所述目标对焦物体在所述景深图中的图像像素坐标,确定所述目标对焦物体在所述拍照预览界面中的目标屏幕像素坐标;Determine the target screen pixel coordinates of the target focus object in the photo preview interface according to the image pixel coordinates of the target focus object in the depth map;
在所述目标屏幕像素坐标中,获取中心像素点坐标作为对焦点;In the pixel coordinates of the target screen, obtain the coordinates of the center pixel point as the focus point;
根据所述对焦点,对所述拍照预览图像进行对焦。Focusing on the photo preview image according to the focusing point.
第二方面,本发明实施例提供了一种拍照处理装置,包括:In a second aspect, an embodiment of the present invention provides a camera processing device, including:
参考物体识别模块,用于在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应;The reference object recognition module is used to identify at least one reference focus object in the depth of field map generated in the photo preview state, wherein the depth of field map corresponds to the photo preview image displayed in the photo preview interface;
目标获取模块,用于获取选择的目标对焦物体;A target acquisition module, configured to acquire a selected target focus object;
对焦模块,用于根据所述目标对焦物体,对所述拍照预览图像进行对焦。The focusing module is configured to focus on the photo preview image according to the target focusing object.
可选的,所述目标获取模块包括:Optionally, the target acquisition module includes:
标定提示子模块,用于在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示;The calibration prompting sub-module is used to provide a calibration prompt for the identified reference focus object in the photo preview interface;
目标选择子模块,用于获取用户根据所述标定提示选择的目标对焦物体。The target selection sub-module is configured to acquire the target focusing object selected by the user according to the calibration prompt.
进一步的,所述参考物体识别模块包括:Further, the reference object identification module includes:
景深图获取子模块,用于通过双摄像头进行拍照预览,以获取景深图,且在拍照预览界面中呈现拍照预览图像;The depth map acquisition sub-module is used to preview the photo through the dual cameras to obtain the depth map, and present the photo preview image in the photo preview interface;
识别子模块,用于在所述景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应。The identification submodule is used to identify at least one reference focus object in the depth map, wherein the depth map corresponds to the photo preview image displayed in the photo preview interface.
可选的,所述参考物体识别模块包括:Optionally, the reference object recognition module includes:
景深信息获取子模块,用于获取景深图中各图像像素点的景深信息,其中,所述景深信息中包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息;The depth of field information acquisition sub-module is used to obtain the depth of field information of each image pixel in the depth of field map, wherein the depth of field information includes the distance information between the subject associated with the image pixel and the camera lens;
像素分组子模块,用于将距离信息之间的差值满足设定阈值条件的图像像素点归集于同一像素分组中;The pixel grouping sub-module is used for grouping the image pixel points whose difference between the distance information satisfies the set threshold condition into the same pixel grouping;
参考物体识别子模块,用于将各像素分组中图像像素坐标连续的图像像素点识别为参考对焦物体。The reference object identification sub-module is used to identify the image pixel points with continuous image pixel coordinates in each pixel group as the reference focus object.
进一步的,所述标定提示子模块包括:Further, the calibration prompt submodule includes:
身份标识建立单元,用于根据识别出的所述参考对焦物体的数量,为所述参考对焦物体建立身份标识;An identity identification establishing unit, configured to establish an identity identification for the reference focusing object according to the number of identified reference focusing objects;
参考位置确定单元,用于根据所述参考对焦物体在所述景深图中的图像像素坐标,确定所述参考对焦物体在所述拍照预览界面中的位置;A reference position determination unit, configured to determine the position of the reference focus object in the photo preview interface according to the image pixel coordinates of the reference focus object in the depth map;
标定位置确定单元,用于根据所述参考对焦物体在所述拍照预览界面中的位置,确定与所述参考对焦物体对应的标定位置;A calibration position determination unit, configured to determine a calibration position corresponding to the reference focus object according to the position of the reference focus object in the photographing preview interface;
身份标识显示单元,用于在所述拍照预览界面中的所述标定位置处,显示与所述参考对焦物体对应的身份标识。The ID display unit is configured to display the ID corresponding to the reference focus object at the marked position in the photo preview interface.
可选的,所述参考位置确定单元包括:Optionally, the reference position determination unit includes:
坐标确定子单元,用于将所述参考对焦物体在所述景深图中的图像像素坐标作为所述参考对焦物体在所述拍照预览图像中的图像像素坐标;A coordinate determining subunit, configured to use the image pixel coordinates of the reference focus object in the depth map as the image pixel coordinates of the reference focus object in the photo preview image;
位置确定子单元,用于根据拍照预览界面的屏幕分辨率与所述拍照预览图像的图像分辨率之间的对应关系,获取所述拍照预览界面中与所述拍照预览图像中的图像像素坐标对应的屏幕像素坐标,作为所述参考对焦物体在所述拍照预览界面中的位置。The position determination subunit is used to obtain the correspondence between the image pixel coordinates in the photo preview interface and the photo preview image according to the corresponding relationship between the screen resolution of the photo preview interface and the image resolution of the photo preview image The screen pixel coordinates are used as the position of the reference focus object in the photo preview interface.
进一步的,所述目标选择子模块包括:Further, the target selection submodule includes:
语音信息获取单元,用于实时获取用户输入的语音信息;A voice information acquisition unit, configured to acquire voice information input by the user in real time;
目标确定单元,用于如果在语音信息中识别出与标定提示匹配的关键词,则获取与所述标定提示对应的目标对焦物体。A target determining unit, configured to acquire a target focusing object corresponding to the marking prompt if a keyword matching the marking prompt is recognized in the voice information.
可选的,所述对焦模块包括:Optionally, the focusing module includes:
目标距离确定子模块,用于根据所述景深图,确定所述目标对焦物体与摄像头镜头之间的目标距离信息;A target distance determination submodule, configured to determine target distance information between the target focus object and the camera lens according to the depth-of-field map;
移动位置确定子模块,用于根据预存的被摄物体到达镜头的距离与对焦马达移动距离之间的对应关系,以及所述目标距离信息,确定对焦马达的调整移动位置;The moving position determination sub-module is used to determine the adjusted moving position of the focus motor according to the pre-stored correspondence between the distance from the subject to the lens and the movement distance of the focus motor, and the target distance information;
对焦马达移动子模块,用于根据所述调整移动位置控制所述对焦马达进行移动,以对所述拍照预览图像进行对焦。The focus motor moving sub-module is used to control the focus motor to move according to the adjusted moving position, so as to focus on the preview image for taking pictures.
进一步的,所述对焦模块包括:Further, the focusing module includes:
目标屏幕像素坐标确定子模块,用于根据所述目标对焦物体在所述景深图中的图像像素坐标,确定所述目标对焦物体在所述拍照预览界面中的目标屏幕像素坐标;The target screen pixel coordinate determination submodule is used to determine the target screen pixel coordinates of the target focus object in the photo preview interface according to the image pixel coordinates of the target focus object in the depth map;
对焦点确定子模块,用于在所述目标屏幕像素坐标中,获取中心像素点坐标作为对焦点;The focus point determination submodule is used to obtain the coordinates of the central pixel point in the pixel coordinates of the target screen as the focus point;
对焦实现子模块,用于根据所述对焦点,对所述拍照预览图像进行对焦。The focusing realization sub-module is used to focus on the photo preview image according to the focusing point.
本发明实施例提供的拍照处理方法和装置,在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,并根据获取选择的目标对焦物体,对拍照预览图像进行对焦。通过获取选择的目标对焦物体实现对拍照预览图像进行对焦的技术手段,可以实现在至少一个参考对焦物体中,根据用户选择的目标对焦物体,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求的技术效果,优化了现有智能终端拍照技术,提升了用户的使用体验。The photographing processing method and device provided by the embodiments of the present invention identify at least one reference focus object in the depth map generated in the photographing preview state, and focus on the photographing preview image according to the acquired selected target focus object. The technical means of focusing on the photo preview image by acquiring the selected target focus object can achieve precise focusing on the target focus object according to the target focus object selected by the user in at least one reference focus object, so that the final focus result The technical effect that is closer to the user's actual focusing needs optimizes the existing smart terminal camera technology and improves the user experience.
附图说明Description of drawings
图1为本发明实施例一提供的一种拍照处理方法的流程图;FIG. 1 is a flow chart of a photographing processing method provided by Embodiment 1 of the present invention;
图2a为本发明实施例二提供的一种拍照处理方法的流程图;FIG. 2a is a flow chart of a photographing processing method provided in Embodiment 2 of the present invention;
图2b为本发明实施例二提供的一种标定提示方法的流程图;Fig. 2b is a flow chart of a calibration prompt method provided by Embodiment 2 of the present invention;
图2c为本发明实施例二提供的一种参考对焦物体位置确定方法的流程图;FIG. 2c is a flow chart of a method for determining the position of a reference focus object provided by Embodiment 2 of the present invention;
图2d为本发明实施例二提供的一种语音输入方法的流程图;FIG. 2d is a flow chart of a voice input method provided by Embodiment 2 of the present invention;
图2e为本发明实施例二提供的第一拍照预览界面显示示意图;Fig. 2e is a schematic diagram showing the first photo preview interface provided by the second embodiment of the present invention;
图2f为本发明实施例二提供的第二拍照预览界面显示示意图;Fig. 2f is a schematic diagram of displaying a second photo preview interface provided by Embodiment 2 of the present invention;
图3为本发明实施例三提供的一种拍照处理方法的流程图;FIG. 3 is a flow chart of a photographing processing method provided by Embodiment 3 of the present invention;
图4为本发明实施例四提供的一种拍照处理方法的流程图;FIG. 4 is a flow chart of a photographing processing method provided in Embodiment 4 of the present invention;
图5为本发明实施例五提供的一种拍照处理装置的结构示意图。FIG. 5 is a schematic structural diagram of a camera processing device provided in Embodiment 5 of the present invention.
具体实施方式detailed description
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processing, many of the steps may be performed in parallel, concurrently, or simultaneously. Additionally, the order of steps may be rearranged. The process may be terminated when its operations are complete, but may also have additional steps not included in the figure. The processing may correspond to a method, function, procedure, subroutine, subroutine, or the like.
实施例一Embodiment one
图1为本发明实施例一提供的一种拍照处理方法的流程图,该方法可以由拍照处理装置执行,其中该装置可由软件和/或硬件实现,一般可集成在智能终端中。如图1所示,该方法包括:FIG. 1 is a flow chart of a method for processing photos provided by Embodiment 1 of the present invention. The method can be executed by a device for processing photos. The device can be implemented by software and/or hardware, and can generally be integrated into a smart terminal. As shown in Figure 1, the method includes:
步骤110、在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应。Step 110: Identify at least one reference focus object in the depth map generated in the photo preview state, wherein the depth map corresponds to the photo preview image displayed in the photo preview interface.
在本实施例中,可以通过智能终端的摄像头获取景深图。其中,智能终端可以是智能手机、平板电脑或者相机等用户持有的且具有拍摄功能的智能设备。In this embodiment, the depth map can be acquired through the camera of the smart terminal. Wherein, the smart terminal may be a smart device held by a user such as a smart phone, a tablet computer, or a camera and having a shooting function.
具体的,景深是指在摄影机镜头或其他成像器前沿能够取得清晰图像的成像器轴线所测定的物体距离范围。景深图是指具有景深效果的图片。通过景深图不仅能得到被摄物体在景深图中的图像像素坐标,还能得到景深信息,其中景深信息可以包括被摄物体与摄像头镜头之间的距离信息以及对焦的距离范围信息等。Specifically, the depth of field refers to the distance range of an object measured by the axis of the imager that can obtain a clear image at the front of the camera lens or other imager. A depth map refers to a picture with a depth of field effect. Through the depth of field map, not only the image pixel coordinates of the subject in the depth of field map can be obtained, but also the depth of field information can be obtained, where the depth of field information can include the distance information between the subject and the camera lens, and the distance range information of the focus.
更具体的,可以通过摄像头在拍照预览状态下获取的拍摄画面生成景深图。其中,拍照预览状态是开启智能终端的拍照功能后,未接收到用户发出的拍照指令前,可以通过拍照预览界面预览拍摄画面的状态。其中,景深图的具体生成方式本实施例不作限定。拍照预览界面为显示界面中用来显示摄像头获取画面的界面。More specifically, the depth-of-field map may be generated from the shooting images acquired by the camera in the photo preview state. Wherein, the photographing preview state is a state in which the photographing picture can be previewed through the photographing preview interface after the photographing function of the smart terminal is turned on, but before a photographing instruction is received from the user. The specific manner of generating the depth map is not limited in this embodiment. The photo preview interface is an interface used to display images acquired by the camera in the display interface.
进一步的,在获取景深图后,识别景深图中至少一个参考对焦物体。其中,参考对焦物体是景深图中可以进行对焦的物体。Further, after acquiring the depth-of-field image, at least one reference focus object in the depth-of-field image is identified. Wherein, the reference focusing object is an object that can be focused in the depth of field map.
其中,具体的识别方式可以是根据景深图中的图像像素点进行识别,例如,确定各图像像素点关联的被摄物体与摄像头镜头之间的距离信息,将距离信息差值满足设定阈值条件(例如:1cm或者2cm等)且图像像素坐标相近的图像像素点识别为参考对焦物体,再如,获取景深图中的各图像像素点的颜色信息,将各图像像素点中颜色类似且图像像素坐标相近的图像像素点识别为参考对焦物体。Among them, the specific identification method can be based on the image pixels in the depth map, for example, determine the distance information between the subject and the camera lens associated with each image pixel, and make the distance information difference satisfy the set threshold condition (For example: 1cm or 2cm, etc.) and image pixels with similar image pixel coordinates are identified as reference focus objects. Image pixels with similar coordinates are identified as reference focus objects.
可选的,在智能终端的显示界面的拍照预览界面中显示拍照预览图像。其中,拍照预览图像是没有景深效果的图像画面,且实时显示的拍照预览图像与生成的景深图相对应。也可以理解为景深图是在拍照预览图像中加上景深效果生成的图片。Optionally, a photo preview image is displayed in the photo preview interface of the display interface of the smart terminal. Wherein, the photographing preview image is an image frame without a depth of field effect, and the photographing preview image displayed in real time corresponds to the generated depth of field map. It can also be understood that the depth-of-field image is a picture generated by adding a depth-of-field effect to the photo preview image.
可选的,在拍照预览状态下生成的景深图可以优化为:通过双摄像头进行拍照预览,以获取景深图,且在拍照预览界面中呈现拍照预览图像。Optionally, the depth map generated in the photo preview state can be optimized to: perform photo preview through dual cameras to obtain the depth map, and present a photo preview image in the photo preview interface.
具体的,智能终端中配置双摄像头,开启拍照功能后,利用双摄像头进行拍照预览,在拍照预览界面中显示双摄像头获取的没有景深效果的拍照预览图像,并根据双摄像头获取的画面生成景深图。其中,双摄像头的拍摄原理以及具体的生成景深图规则本实施例不作限定。Specifically, the smart terminal is equipped with dual cameras, and after the camera function is turned on, the dual cameras are used to preview photos, and the preview images obtained by the dual cameras without depth of field effects are displayed in the photo preview interface, and a depth map is generated based on the images obtained by the dual cameras . The shooting principle of the dual cameras and the specific rules for generating the depth-of-field map are not limited in this embodiment.
步骤120、获取选择的目标对焦物体。Step 120, acquire the selected target focus object.
具体的,目标对焦物体为拍摄图像时,对焦点所在的物体。Specifically, the target focus object is the object where the focus point is located when the image is captured.
可选的,在景深图中识别至少一个参考对焦物体后,可以在拍照预览界面中标记出相应的至少一个参考对焦物体,以便于用户识别出至少一个参考对焦物体。Optionally, after at least one reference focus object is identified in the depth-of-field map, the corresponding at least one reference focus object can be marked in the photo preview interface, so that the user can identify at least one reference focus object.
示例性的,在至少一个参考对焦物体中选择目标对焦物体。其中,选择目标对焦物体可以是智能终端自动进行选择,也可以是由用户进行选择。Exemplarily, a target focus object is selected from at least one reference focus object. Wherein, the selection of the target focus object may be automatically selected by the smart terminal, or may be selected by the user.
比如,当智能终端自动进行选择时,可以选择距离摄像头镜头最近的参考对焦物体作为目标对焦物体,也可以选择景深图中占画面面积最大的参考对焦物体作为目标对焦物体。For example, when the smart terminal automatically selects, the reference focusing object closest to the camera lens can be selected as the target focusing object, or the reference focusing object occupying the largest screen area in the depth of field map can be selected as the target focusing object.
再比如,当由用户进行选择时,可以将至少一个参考对焦物体在拍照预览界面中标识出来,用户可以根据标识进行选择,具体的标识规则本实施例不作限定。For another example, when the user makes a selection, at least one reference focus object can be marked in the photo preview interface, and the user can make a selection according to the mark, and the specific mark rules are not limited in this embodiment.
可选的,由用户选择目标对焦物体。其中,用户可以通过点击显示界面特定区域、点击特定按键以及语音输入的方式选择目标对焦物体。Optionally, the user selects the target focus object. Among them, the user can select the target focusing object by clicking a specific area of the display interface, clicking a specific button, and voice input.
进一步的,智能终端在开启拍照功能后,可以实时监听是否确认选择目标对焦物体,并在监听到确认选择目标对焦物体时,获取选择的目标对焦物体。Further, after the camera function is turned on, the smart terminal can monitor in real time whether the selection of the target focus object is confirmed, and obtain the selected target focus object when the selection of the target focus object is confirmed.
步骤130、根据所述目标对焦物体,对所述拍照预览图像进行对焦。Step 130 , focus on the preview image for shooting according to the target focus object.
示例性的,根据目标对焦物体,对拍照预览界面中显示的拍照预览图像进行对焦。此时,用户观看的是对焦后的拍照预览图像。Exemplarily, according to the target focusing object, focus on the photo preview image displayed in the photo preview interface. At this point, what the user watches is the preview image of the camera after focusing.
进一步的,在收到拍照指令后,执行拍照操作,并在拍照预览界面中显示拍摄完成的图像。其中,拍摄完成的图像采用上述确定的对焦方式。Further, after receiving the photographing instruction, perform the photographing operation, and display the photographed image in the photographing preview interface. Wherein, the captured image adopts the above-mentioned determined focusing manner.
可选的,在对拍照预览图像进行对焦,并在拍照预览界面中显示对焦后的拍照预览图像后,若用户觉得此时的拍照预览图像与该用户期望拍摄的画面不符合,则可以重新选择目标对焦物体。此时,拍照处理装置可以返回执行获取选择的目标对焦物体的操作,并根据选择的目标对焦物体对拍照预览图像进行对焦。Optionally, after focusing on the photo preview image and displaying the focused photo preview image in the photo preview interface, if the user feels that the photo preview image at this time does not match the picture the user expects to shoot, he can re-select Target focus object. At this point, the photographing processing device may return to the operation of obtaining the selected target focus object, and focus on the photograph preview image according to the selected target focus object.
本发明实施例提供的拍照处理方法,在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,并根据获取选择的目标对焦物体,对拍照预览图像进行对焦。通过获取选择的目标对焦物体实现对拍照预览图像进行对焦的技术手段,可以实现在至少一个参考对焦物体中,根据用户选择的目标对焦物体,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求的技术效果,优化了现有智能终端拍照技术,提升了用户的使用体验。例如,在执行默认的自动对焦方式使得对焦后的拍照预览图像不符合用户的实际需求时,采用本实施例提供的方法,用户不需要调整拍摄角度,就可以获得理想的对焦后拍照预览图像。In the photographing processing method provided by the embodiment of the present invention, at least one reference focus object is identified in the depth map generated in the photograph preview state, and the photograph preview image is focused according to the acquired and selected target focus object. The technical means of focusing on the photo preview image by acquiring the selected target focus object can achieve precise focusing on the target focus object according to the target focus object selected by the user in at least one reference focus object, so that the final focus result The technical effect that is closer to the user's actual focusing needs optimizes the existing smart terminal camera technology and improves the user experience. For example, when the default auto-focus mode is implemented so that the preview image after focusing does not meet the actual needs of the user, the user can obtain an ideal preview image after focusing without adjusting the shooting angle by using the method provided in this embodiment.
实施例二Embodiment two
图2a为本发明实施例二提供的一种拍照处理方法的流程图。本实施例以上述实施例为基础进行具体化。在本实施例中,将获取选择的目标对焦物体具体为:在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示;获取用户根据所述标定提示选择的目标对焦物体。参考图2a,本实施例提供的方法具体包括:FIG. 2a is a flow chart of a method for processing photographs provided by Embodiment 2 of the present invention. This embodiment is embodied on the basis of the above-mentioned embodiments. In this embodiment, obtaining the selected target focus object specifically includes: in the photographing preview interface, providing a calibration prompt for the identified reference focus object; acquiring the target focus object selected by the user according to the calibration prompt. Referring to Figure 2a, the method provided in this embodiment specifically includes:
步骤210、在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应。Step 210: Identify at least one reference focus object in the depth map generated in the photo preview state, wherein the depth map corresponds to the photo preview image displayed in the photo preview interface.
步骤220、在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示。Step 220 , in the photographing preview interface, provide a calibration prompt for the identified reference focus object.
在本实施例中,考虑到用户在选择目标对焦物体时,针对用户发出的选择指令,智能终端可能无法准确地识别出目标对焦物体的情景。为了使得智能终端准备的识别出用户选择的目标对焦物体,可以在拍照预览界面中,对识别出的至少一个参考对焦物体进行标定提示。In this embodiment, considering the selection instruction issued by the user when selecting the target focus object, the smart terminal may not be able to accurately identify the scene of the target focus object. In order to enable the smart terminal to recognize the target focus object selected by the user, a calibration prompt may be given to at least one identified reference focus object in the photo preview interface.
其中,标定提示为可以区分出至少一个参考对焦物体的提示,即每个参考对焦物体都有唯一的标定提示。标定提示的具体内容可以是数字、字母或者文字等。例如,在景深图中识别出三个参考对焦物体,则可以在拍照预览界面中,对三个参考对焦物体进行标定提示,且标定提示的具体内容依次为1、2、3。此时,可以根据用户对1、2或3的选择确定对应的目标对焦物体。Wherein, the calibration prompt is a prompt that can distinguish at least one reference focus object, that is, each reference focus object has a unique calibration prompt. The specific content of the calibration prompt may be numbers, letters, or words. For example, if three reference focus objects are identified in the depth-of-field map, then the three reference focus objects can be calibrated in the photo preview interface, and the specific content of the calibration prompts is 1, 2, and 3 in sequence. At this point, the corresponding target focusing object can be determined according to the user's selection of 1, 2 or 3.
具体的,图2b为本发明实施例二提供的一种标定提示方法的流程图。参考图2b,步骤220具体可以包括:Specifically, FIG. 2b is a flow chart of a calibration prompt method provided by Embodiment 2 of the present invention. Referring to FIG. 2b, step 220 may specifically include:
步骤221、根据识别出的所述参考对焦物体的数量,为所述参考对焦物体建立身份标识。Step 221: Establish an identity for the reference focus object according to the number of the identified reference focus objects.
示例性的,确定在景深图识别出的参考对焦物体的数量,并根据参考对焦物体的数量,为参加对焦物体建立身份标识。其中,身份标识的具体内容形式本实施例不作限定。Exemplarily, the number of reference focusing objects recognized in the depth-of-field map is determined, and an identity mark is established for the participating focusing objects according to the number of reference focusing objects. Wherein, the specific content form of the identity mark is not limited in this embodiment.
例如,识别出参考对焦物体的数量为2个,则对2个参考对焦物体建立的身份标识分别可以是第1物体和第2物体。其中,一个参考对焦物体的身份标识为第1物体时,另一个参考对焦物体的身份标识为第2物体。具体哪一个参考对焦物体的身份标识设定为第1物体,本实施例不作具体限定。For example, if two reference focus objects are identified, the identity marks established for the two reference focus objects may be the first object and the second object respectively. Wherein, when the identity mark of one reference focus object is the first object, the identity mark of the other reference focus object is the second object. The specific identification of which reference focus object is set as the first object is not specifically limited in this embodiment.
再如,识别出参考对焦物体的数量为3个,则对3个参考对焦物体建立的身份标识分别可以是a、b以及c。For another example, if it is recognized that the number of reference focus objects is 3, then the identities established for the 3 reference focus objects may be a, b, and c, respectively.
需要说明的是,本实施例并不限定身份标识的确定规则,但凡可以对参考对焦物体进行区分的身份标识设定规则,均适用于本实施例。It should be noted that this embodiment does not limit the determination rules of the identity mark, but any identity mark setting rule that can distinguish reference focus objects is applicable to this embodiment.
步骤222、根据所述参考对焦物体在所述景深图中的图像像素坐标,确定所述参考对焦物体在所述拍照预览界面中的位置。Step 222: Determine the position of the reference focus object in the photo preview interface according to the image pixel coordinates of the reference focus object in the depth map.
示例性的,由于至少一个参考对焦物体是在景深图中识别出来的,但是需要在拍照预览界面中显示参考对焦物体的身份标识,因此,需要在拍照预览界面中确定参考对焦物体的位置。Exemplarily, since at least one reference focus object is identified in the depth-of-field map, but the identity of the reference focus object needs to be displayed in the photo preview interface, the position of the reference focus object needs to be determined in the photo preview interface.
进一步的,可以是确定参考对焦物体在景深图中的图像像素坐标,并根据景深图的图像像素坐标与拍照预览界面的屏幕像素坐标的对应关系,确定该参考对焦物体在拍照预览界面中的屏幕像素坐标,进而确定参考对焦物体在拍照预览界面中的位置。Further, it may be to determine the image pixel coordinates of the reference focused object in the depth of field map, and determine the screen of the reference focused object in the photo preview interface according to the corresponding relationship between the image pixel coordinates of the depth of field map and the screen pixel coordinates of the photo preview interface. Pixel coordinates, and then determine the position of the reference focus object in the photo preview interface.
具体的,图2c为本发明实施例二提供的一种参考对焦物体位置确定方法的流程图。参考图2c,步骤222具体可以包括:Specifically, FIG. 2c is a flow chart of a method for determining the position of a reference focus object provided by Embodiment 2 of the present invention. Referring to FIG. 2c, step 222 may specifically include:
步骤2221、将所述参考对焦物体在所述景深图中的图像像素坐标作为所述参考对焦物体在所述拍照预览图像中的图像像素坐标。Step 2221: Use the image pixel coordinates of the reference focused object in the depth map as the image pixel coordinates of the reference focused object in the photo preview image.
示例性的,由于景深图与拍照预览图像是相互对应的关系,且景深图与拍照预览图像的图像分辨率相同,因此,景深图的图像像素坐标范围与拍照预览图像的图像像素坐标范围相同,且同一数值的图像像素坐标在景深图中的位置与在拍照预览图像中的位置相同。例如,景深图的图像像素坐标范围为(0,0)至(959,719),则拍照预览图像的图像像素坐标范围同为(0,0)至(959,719),且每一个图像像素坐标点在景深图中的位置与在拍照预览图像中的位置相同。Exemplarily, since the depth map and the photo preview image correspond to each other, and the image resolution of the depth map and the photo preview image is the same, the image pixel coordinate range of the depth map is the same as the image pixel coordinate range of the photo preview image, And the position of the image pixel coordinates with the same value in the depth map is the same as the position in the photo preview image. For example, the image pixel coordinate range of the depth of field map is (0,0) to (959,719), then the image pixel coordinate range of the photo preview image is also (0,0) to (959,719), and each image pixel coordinate point is within the depth of field The positions in the picture are the same as in the photo preview image.
进一步的,识别出参考对焦物体后,确定参考对焦物体在景深图中的图像像素坐标,并将该图像像素坐标作为参考对焦物体在拍照预览图像中的图像像素坐标。Further, after the reference focus object is identified, the image pixel coordinates of the reference focus object in the depth map are determined, and the image pixel coordinates are used as the image pixel coordinates of the reference focus object in the photo preview image.
步骤2222、根据拍照预览界面的屏幕分辨率与所述拍照预览图像的图像分辨率之间的对应关系,获取所述拍照预览界面中与所述拍照预览图像中的图像像素坐标对应的屏幕像素坐标,作为所述参考对焦物体在所述拍照预览界面中的位置。Step 2222, according to the corresponding relationship between the screen resolution of the photo preview interface and the image resolution of the photo preview image, obtain the screen pixel coordinates in the photo preview interface corresponding to the image pixel coordinates in the photo preview image , as the position of the reference focus object in the photo preview interface.
具体的,由于拍照预览界面的屏幕分辨率是预先设定的,并与显示界面的屏幕分辨率有关,例如,拍照预览界面的屏幕分辨率可以是1024×768,还可以是1024×720等,同时,拍照预览图像的图像分辨率也是预先设定的,并与摄像头的分辨率有关,例如,拍照预览图像的图像分辨率可以是1024×768,还可以是1280×960。Specifically, since the screen resolution of the photo preview interface is preset and related to the screen resolution of the display interface, for example, the screen resolution of the photo preview interface may be 1024×768 or 1024×720, etc. At the same time, the image resolution of the photo preview image is also preset and is related to the resolution of the camera. For example, the image resolution of the photo preview image may be 1024×768 or 1280×960.
更具体的,可以根据拍照预览界面的屏幕分辨率与拍照预览图像的图像分辨率确定其之间的对应关系。例如,拍照预览界面的屏幕分辨率为1024×768,拍照预览图像的图像分辨率为1024×768,此时拍照预览图像中的各图像像素坐标与拍照预览界面中的各屏幕像素坐标一一对应。再如,拍照预览界面的屏幕分辨率为1024×720,拍照预览图像的图像分辨率为1280×960,此时,需要确定拍照预览界面的屏幕分辨率与拍照预览图像的图像分辨率之间的对应关系,以保证在屏幕分辨率为1024×720的拍照预览界面中显示图像分辨率为1280×960的拍照预览图像。其中,具体的对应关系确定规则本实施例不作限定。More specifically, the corresponding relationship may be determined according to the screen resolution of the photo preview interface and the image resolution of the photo preview image. For example, the screen resolution of the photo preview interface is 1024×768, and the image resolution of the photo preview image is 1024×768. At this time, the pixel coordinates of each image in the photo preview image correspond to the pixel coordinates of each screen in the photo preview interface. . For another example, the screen resolution of the photo preview interface is 1024×720, and the image resolution of the photo preview image is 1280×960. At this time, it is necessary to determine the screen resolution of the photo preview interface and the image resolution of the photo preview image. Correspondence, so as to ensure that the photo preview image with the image resolution of 1280×960 is displayed in the photo preview interface with the screen resolution of 1024×720. Wherein, the specific correspondence determination rules are not limited in this embodiment.
示例性的,在确定参考对焦物体在拍照预览图像中的图像像素坐标后,根据拍照预览界面的屏幕分辨率与拍照预览图像的图像分辨率之间的对应关系,确定参考对焦物体在拍照预览界面中的屏幕像素坐标,并将屏幕像素坐标作为参考对焦物体在拍照预览界面中的位置。Exemplarily, after determining the image pixel coordinates of the reference focus object in the photo preview image, according to the corresponding relationship between the screen resolution of the photo preview interface and the image resolution of the photo preview image, determine the reference focus object in the photo preview interface. The screen pixel coordinates in , and use the screen pixel coordinates as a reference to the position of the focused object in the photo preview interface.
步骤223、根据所述参考对焦物体在所述拍照预览界面中的位置,确定与所述参考对焦物体对应的标定位置。Step 223 : Determine a calibration position corresponding to the reference focus object according to the position of the reference focus object in the photo preview interface.
具体的,标定位置为在拍照预览界面中标定身份标识的位置。标定位置与参考对焦物体在拍照预览界面中的位置相关。更具体的,标定位置可以是具体的一个屏幕像素坐标值,也可以是具体的一个屏幕像素坐标范围。Specifically, the marked position is the position where the identity mark is marked in the photo preview interface. The calibration position is related to the position of the reference focus object in the photo preview interface. More specifically, the calibration position may be a specific screen pixel coordinate value, or a specific screen pixel coordinate range.
例如,确定参考对焦物体在拍照预览界面中的位置后,设置标定位置位于参考对焦物体位置正上方的一个屏幕像素坐标范围。再如,确定参考对焦物体在拍照预览界面中的位置后,设置标定位置位于参考对焦物体位置右下方的一个屏幕像素坐标范围。又如,确定参考对焦物体在拍照预览界面中的位置后,设置标定位置位于参考对焦物体位置正中央的一个屏幕像素坐标范围。需要说明的是,标定位置的具体设定规则不仅局限于上述举例。For example, after determining the position of the reference focus object in the photo preview interface, set the calibration position to be within a screen pixel coordinate range directly above the position of the reference focus object. For another example, after determining the position of the reference focus object in the photo preview interface, set the calibration position to be within a screen pixel coordinate range at the lower right of the reference focus object position. As another example, after determining the position of the reference focus object in the photo preview interface, set a screen pixel coordinate range where the calibration position is located in the center of the reference focus object position. It should be noted that the specific setting rules of the calibration position are not limited to the above examples.
可选的,同一拍照预览界面中的不同参考对焦物体对应的标定位置可以不同。例如,当前拍照预览界面中包含两个参考对焦物体,设定其中一个参考对焦物体的标定位置位于参考对焦物体位置正上方的一个屏幕像素坐标范围,设定另一个参考对焦物体的标定位置位于参考对焦物体位置正中央的一个屏幕像素坐标范围。Optionally, the calibration positions corresponding to different reference focus objects in the same photo preview interface may be different. For example, the current photo preview interface contains two reference focus objects, set the calibration position of one of the reference focus objects to be within a screen pixel coordinate range directly above the position of the reference focus object, and set the calibration position of the other reference focus object to be within the reference A range of screen pixel coordinates in the center of the focus object position.
步骤224、在所述拍照预览界面中的所述标定位置处,显示与所述参考对焦物体对应的身份标识。Step 224 , display the identity mark corresponding to the reference focus object at the marked position in the photo preview interface.
示例性的,确定参考对焦物体对应的标定位置后,在该标定位置显示与参考对焦物体对应的身份标识。Exemplarily, after the calibration position corresponding to the reference focus object is determined, the identity mark corresponding to the reference focus object is displayed at the calibration position.
步骤230、获取用户根据所述标定提示选择的目标对焦物体。Step 230, acquiring the target focusing object selected by the user according to the calibration prompt.
具体的,在拍照预览界面中对至少一个参考对焦物体进行标定提示后,用户可以根据标定提示结合自身拍照需求选择对应的目标对焦物体。Specifically, after a calibration prompt is given to at least one reference focus object in the photo preview interface, the user can select the corresponding target focus object according to the calibration prompt and in combination with their own photographing needs.
进一步的,可以在开启拍照功能后,监听是否确认用户根据标定提示选择目标对焦物体。也可以是在显示完标定提示后,监听是否确认用户根据标定提示选择目标对焦物体,并在监听到确认用户根据标定提示选择目标对焦物体时,获取该目标对焦物体。Further, after the camera function is turned on, it is possible to monitor whether the user confirms that the user selects the target focus object according to the calibration prompt. Alternatively, after the calibration prompt is displayed, monitor whether the user has selected the target focus object according to the calibration prompt, and obtain the target focus object when the user confirms that the user has selected the target focus object according to the calibration prompt.
可选的,在本实施例中,用户可以通过语音输入的方式选择目标对焦物体。图2d为本发明实施例二提供的一种语音输入方法的流程图。参考图2d,步骤230具体可以包括:Optionally, in this embodiment, the user may select the target focus object through voice input. Fig. 2d is a flow chart of a speech input method provided by Embodiment 2 of the present invention. Referring to FIG. 2d, step 230 may specifically include:
步骤231、实时获取用户输入的语音信息。Step 231, acquiring voice information input by the user in real time.
具体的,通过音频输入装置实时的获取用户输入的语音信息。其中,音频输入装置可以在智能终端中,例如,音频输入装置可以是智能终端的麦克风。音频输入装置还可以在与智能终端关联的其他设备中,例如,音频输入装置可以是与智能终端关联的耳机中的麦克风。Specifically, the voice information input by the user is acquired in real time through the audio input device. Wherein, the audio input device may be in the smart terminal, for example, the audio input device may be a microphone of the smart terminal. The audio input device may also be in other devices associated with the smart terminal, for example, the audio input device may be a microphone in an earphone associated with the smart terminal.
步骤232、判断在语音信息中是否可以识别出与标定提示匹配的关键词。如果在语音信息中识别出与标定提示匹配的关键词,则执行步骤233,否则,返回执行步骤231。Step 232, judging whether a keyword matching the marking prompt can be recognized in the voice information. If a keyword matching the marking prompt is identified in the voice information, then step 233 is executed; otherwise, step 231 is executed.
具体的,预先设定与标定提示匹配的关键词,例如,标定提示为1和2,则设定的关键词分别可以是对焦1和对焦2,或者设定的关键词还分别可以是1和2。其中,关键词具体的设定方式及设定内容可以根据实际情况进行确定。Specifically, pre-set keywords that match the calibration prompt, for example, if the calibration prompt is 1 and 2, then the set keywords can be focus 1 and focus 2 respectively, or the set keywords can also be 1 and 2 respectively. 2. Wherein, the specific setting method and content of the keyword can be determined according to the actual situation.
进一步的,获取用户输入的语音信息后,对语音信息进行识别,得到语音信息的文字内容,并判断该文字内容中是否包含与标定提示匹配的关键词。具体的语音信息识别方法本实施例不作限定。Further, after acquiring the voice information input by the user, the voice information is recognized to obtain the text content of the voice information, and it is judged whether the text content contains keywords matching the calibration prompt. The specific voice information recognition method is not limited in this embodiment.
步骤233、获取与所述标定提示对应的目标对焦物体。Step 233 , acquiring a target focus object corresponding to the calibration prompt.
示例性的,如果在语音信息中识别出与标定提示匹配的关键词,则获取与标定提示对应的目标对焦物体。Exemplarily, if a keyword matching the calibration prompt is recognized in the voice information, the target focus object corresponding to the calibration prompt is acquired.
例如,在语音信息中识别出与标定提示匹配的关键词为对焦1,则确认用户选择的标定提示为1,此时,获取与1对应的目标对焦物体。For example, if it is recognized in the voice information that the keyword matching the marking prompt is focus 1, then it is confirmed that the marking prompt selected by the user is 1, and at this time, the target focus object corresponding to 1 is obtained.
步骤240、根据所述目标对焦物体,对所述拍照预览图像进行对焦。Step 240: Focus on the photo preview image according to the target focus object.
下面示例性的给出本实施例中选择目标对焦物体的具体实现过程。The specific implementation process of selecting the target focus object in this embodiment is given as an example below.
在开启智能终端的拍照功能后,利用双摄像头获取画面并生成景深图,在拍照预览界面中显示与景深图对应的拍照预览图像。设定图2e为本发明实施例二提供的第一拍照预览界面显示示意图,参考图2e,在智能终端的拍照预览界面21中显示拍照预览图像。After the camera function of the smart terminal is turned on, the dual cameras are used to acquire images and generate a depth map, and a photo preview image corresponding to the depth map is displayed in the photo preview interface. It is assumed that FIG. 2e is a schematic diagram of displaying the first photo preview interface provided by Embodiment 2 of the present invention. Referring to FIG. 2e, a photo preview image is displayed on the photo preview interface 21 of the smart terminal.
进一步的,识别景深图中的至少一个参考对焦物体,并确定参考对焦物体的个数为3。相应的,为3个参考对焦物体建立身份标识,其中,建立的身份标识分别为对焦1,对焦2,对焦3。Further, at least one reference focus object in the depth of field map is identified, and the number of reference focus objects is determined to be three. Correspondingly, identity marks are established for the three reference focus objects, wherein the established identity marks are focus 1, focus 2, and focus 3 respectively.
更进一步的,设定拍照预览界面的屏幕分辨率为1024×768,拍照预览图像的图像分辨率为1024×768,景深图的图像分辨率与拍照预览图像的图像分辨率相同。确定3个参考对焦物体在景深图中的图像像素坐标,并将该图像像素坐标作为3个参考对焦物体在拍照预览图像中的图像像素坐标。由于拍照预览界面的屏幕分辨率与拍照预览图像的图像分辨率相同,因此,拍照预览界面的屏幕像素坐标与拍照预览图像的图像像素坐标一一对应。据此,根据3个参考对焦物体在拍照预览图像中的图像像素坐标分别确定3个参考对焦物体在拍照预览界面中的屏幕像素坐标,并将确定的屏幕像素坐标分别作为对应的参考对焦物体在拍照预览界面中的位置。Furthermore, the screen resolution of the photo preview interface is set to 1024×768, the image resolution of the photo preview image is 1024×768, and the image resolution of the depth map is the same as the image resolution of the photo preview image. Determine the image pixel coordinates of the three reference focus objects in the depth-of-field map, and use the image pixel coordinates as the image pixel coordinates of the three reference focus objects in the photo preview image. Since the screen resolution of the photo preview interface is the same as the image resolution of the photo preview image, the screen pixel coordinates of the photo preview interface are in one-to-one correspondence with the image pixel coordinates of the photo preview image. Accordingly, according to the image pixel coordinates of the three reference focus objects in the photo preview image, the screen pixel coordinates of the three reference focus objects in the photo preview interface are respectively determined, and the determined screen pixel coordinates are respectively used as the corresponding reference focus objects in the photo preview interface. The position in the photo preview interface.
具体的,在确定3个参考对焦物体在拍照预览屏幕中的位置后,确定与参考对焦物体对应的标定位置,并在标定位置处,显示对应的身份标识。图2f为本发明实施例二提供的第二拍照预览界面显示示意图。参考图2f,在拍照预览界面21中的第一个标定位置22中显示第一个参考对焦物体的身份标识,即对焦1,且标定位置22位于第一个参考对焦物体的内部,在拍照预览界面21中的第二个标定位置23中显示第二个参考对焦物体的身份标识,即对焦2,且标定位置23位于第二个参考对焦物体的内部,在拍照预览界面21中的第三个标定位置24中显示第三个参考对焦物体的身份标识,即对焦3,且标定位置24位于第三个参考对焦物体的右下方。Specifically, after determining the positions of the three reference focus objects in the photographing preview screen, determine the calibration position corresponding to the reference focus object, and display the corresponding identity mark at the calibration position. Fig. 2f is a schematic diagram of displaying a second photo preview interface provided by Embodiment 2 of the present invention. Referring to Fig. 2f, the identity mark of the first reference focus object is displayed in the first calibration position 22 in the photo preview interface 21, that is, focus 1, and the calibration position 22 is located inside the first reference focus object. In the second calibration position 23 in the interface 21, the identity mark of the second reference focus object is displayed, that is, focus 2, and the calibration position 23 is located inside the second reference focus object, and the third reference focus object in the photo preview interface 21 The identification mark of the third reference focus object, ie focus 3, is displayed in the calibration position 24, and the calibration position 24 is located at the lower right of the third reference focus object.
进一步的,开启麦克风以获取用户输入的语音信息。在获取语音信息后,识别到语音信息中包含关键词对焦2,且该关键词与第二个标定提示的关键词匹配,此时,确定用户选择的目标对焦物体为2,同时,根据目标对焦物体对拍照预览图像进行对焦。Further, the microphone is turned on to obtain voice information input by the user. After acquiring the voice information, it is recognized that the voice information contains the keyword focus 2, and the keyword matches the keyword of the second calibration prompt. At this time, it is determined that the target focus object selected by the user is 2, and at the same time, focus according to the target The object is focused on the photo preview image.
本实施例的技术方案,通过在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,并在拍照预览界面中显示至少一个参考对焦物体的标定提示,获取用户根据标定提示选定的目标对焦物体,进而对拍照预览图像进行对焦,实现了在至少一个参考对焦物体中,根据用户选择的目标对焦物体,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求,同时,优化了现有智能终端拍照技术,提升了用户的使用体验。In the technical solution of this embodiment, by identifying at least one reference focus object in the depth-of-field map generated in the photographing preview state, and displaying a calibration prompt of at least one reference focus object in the photographing preview interface, it is possible to obtain the user selected according to the calibration prompt. The target focus object, and then focus on the photo preview image, realize the precise focus on the target focus object according to the target focus object selected by the user in at least one reference focus object, so that the final focus result is closer to the user's actual focus At the same time, it optimizes the existing smart terminal camera technology and improves the user experience.
实施例三Embodiment three
图3为本发明实施例三提供的一种拍照处理方法的流程图。本实施例以上述实施例为基础进行具体化。在本实施例中,将在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体具体为:获取景深图中各图像像素点的景深信息,其中,所述景深信息中包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息;将距离信息之间的差值满足设定阈值条件的图像像素点归集于同一像素分组中;将各像素分组中图像像素坐标连续的图像像素点识别为参考对焦物体。FIG. 3 is a flow chart of a photographing processing method provided by Embodiment 3 of the present invention. This embodiment is embodied on the basis of the above-mentioned embodiments. In this embodiment, identifying at least one reference focus object in the depth-of-field map generated in the photographing preview state is specifically: acquiring the depth-of-field information of each image pixel in the depth-of-field map, wherein the depth-of-field information includes image pixel points The distance information between the associated subject and the camera lens; the image pixels whose difference between the distance information meets the set threshold condition are grouped into the same pixel group; the images with continuous image pixel coordinates in each pixel group Pixels are identified as reference focus objects.
同时,将根据所述目标对焦物体,对所述拍照预览图像进行对焦具体为:根据所述景深图,确定所述目标对焦物体与摄像头镜头之间的目标距离信息;根据预存的被摄物体到达镜头的距离与对焦马达移动距离之间的对应关系,以及所述目标距离信息,确定对焦马达的调整移动位置;根据所述调整移动位置控制所述对焦马达进行移动,以对所述拍照预览图像进行对焦。参考图3,本实施例的方法具体包括:At the same time, focusing on the photo preview image according to the target focusing object specifically includes: determining the target distance information between the target focusing object and the camera lens according to the depth of field map; The corresponding relationship between the distance of the lens and the moving distance of the focus motor, and the target distance information, determine the adjustment and movement position of the focus motor; control the movement of the focus motor according to the adjustment and movement position, so as to preview the image of the photo to focus. Referring to Figure 3, the method of this embodiment specifically includes:
步骤310、获取景深图中各图像像素点的景深信息,其中,所述景深信息中包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息。Step 310: Obtain depth information of each image pixel in the depth map, wherein the depth information includes distance information between the subject associated with the image pixel and the camera lens.
具体的,在利用摄像头拍摄照片时,同一个被摄物体到摄像头镜头的距离是相同的,因此,可以根据被摄物体到摄像头镜头的距离信息对被摄物体进行识别。Specifically, when a camera is used to take a photo, the distance from the same subject to the camera lens is the same, therefore, the subject can be identified according to the distance information from the subject to the camera lens.
示例性的,在生成景深图后,获取景深图中各图像像素点的景深信息。其中,景深信息可以包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息及图像像素点的对焦距离范围信息。可选的,景深信息为图像像素点关联的被摄物体与摄像头镜头之间的距离信息。Exemplarily, after the depth map is generated, the depth information of each image pixel in the depth map is acquired. Wherein, the depth of field information may include the distance information between the subject and the camera lens associated with the image pixel and the focus distance range information of the image pixel. Optionally, the depth of field information is the distance information between the subject associated with the image pixel and the camera lens.
步骤320、将距离信息之间的差值满足设定阈值条件的图像像素点归集于同一像素分组中。Step 320, grouping the image pixel points whose difference between the distance information satisfies the set threshold condition into the same pixel group.
具体的,将景深图中各图像像素点景深信息中的距离信息进行减法运算,取差值的绝对值。可选的,将景深图中各图像像素点的距离信息与相邻图像像素点的距离信息进行减法运算,取差值的绝对值。Specifically, the distance information in the depth information of each image pixel point in the depth map is subtracted, and the absolute value of the difference is obtained. Optionally, the distance information of each image pixel in the depth map is subtracted from the distance information of adjacent image pixels, and the absolute value of the difference is taken.
进一步的,将差值满足预设阈值条件的图像像素点归为一组,即归为同一像素分组。其中,预设阈值条件可以根据实际情况进行设定。例如,根据各图像像素点的景深信息确定景深图中的各被摄物体距离摄像头镜头较近,此时,预设阈值条件可以为小于或等于1cm,即在各图像像素点中,将距离信息之间的差值小于或等于1cm的图像像素点归集为同一像素分组。又如,根据各图像像素点的景深信息确定景深图中的各被摄物体距离摄像头镜头较远,此时,预设阈值条件可以为小于或等于10cm,即在各图像像素点中,将距离信息之间的差值小于或等于10cm的图像像素点归集为同一像素分组。Further, image pixel points whose difference values satisfy the preset threshold condition are grouped together, that is, grouped into the same pixel group. Wherein, the preset threshold condition can be set according to the actual situation. For example, according to the depth information of each image pixel, it is determined that each subject in the depth map is closer to the camera lens. At this time, the preset threshold condition can be less than or equal to 1cm, that is, in each image pixel, the distance information The image pixels whose difference between them is less than or equal to 1cm are grouped into the same pixel group. As another example, according to the depth information of each image pixel, it is determined that each subject in the depth map is far away from the camera lens. At this time, the preset threshold condition can be less than or equal to 10cm, that is, in each image pixel, the distance Image pixels whose information difference is less than or equal to 10cm are grouped into the same pixel group.
步骤330、将各像素分组中图像像素坐标连续的图像像素点识别为参考对焦物体。Step 330, identifying image pixel points with continuous image pixel coordinates in each pixel group as a reference focus object.
考虑到在同一景深图中,不同的被摄物体距离摄像头镜头的距离信息可能是相同的,但是同一被摄物体在景深图中的图像像素坐标绝对是连续的。因此,根据距离信息的差值对景深图的图像像素点进行分组后,将同一像素分组内的图像像素坐标连续的图像像素点识别为参考对焦物体。Considering that in the same depth map, the distance information of different subjects from the camera lens may be the same, but the image pixel coordinates of the same subject in the depth map are absolutely continuous. Therefore, after the image pixels of the depth of field map are grouped according to the difference of the distance information, the image pixels with continuous image pixel coordinates in the same pixel group are identified as the reference focus object.
进一步的,识别各像素分组中图像像素坐标连续的图像像素点为参考对焦物体。Further, image pixel points with continuous image pixel coordinates in each pixel group are identified as reference focus objects.
步骤340、获取选择的目标对焦物体。Step 340, acquire the selected target focus object.
步骤350、根据所述景深图,确定所述目标对焦物体与摄像头镜头之间的目标距离信息。Step 350 : Determine target distance information between the target focus object and the camera lens according to the depth-of-field map.
具体的,根据景深图中目标对焦物体对应的各图像像素点的景深信息,确定目标对焦物体与摄像头镜头之间的目标距离信息。Specifically, the target distance information between the target focus object and the camera lens is determined according to the depth of field information of each image pixel point corresponding to the target focus object in the depth of field map.
步骤360、根据预存的被摄物体到达镜头的距离与对焦马达移动距离之间的对应关系,以及所述目标距离信息,确定对焦马达的调整移动位置。Step 360 , according to the pre-stored correspondence between the distance from the subject to the lens and the moving distance of the focus motor, and the target distance information, determine the adjustment movement position of the focus motor.
示例性的,在智能终端中设置对焦马达,并预先设定被摄物体到达摄像头镜头的不同距离对应的对焦马达的移动距离。例如,被摄物体到达摄像头镜头的距离为10cm,设定的对焦马达的移动距离为0.5cm。再如,被摄物体到达摄像头镜头的距离为30cm,设定的对焦马达的移动距离为2cm。Exemplarily, a focus motor is provided in the smart terminal, and the movement distance of the focus motor corresponding to different distances from the subject to the camera lens is preset. For example, the distance from the subject to the camera lens is 10cm, and the set moving distance of the focus motor is 0.5cm. For another example, the distance from the subject to the camera lens is 30cm, and the set moving distance of the focus motor is 2cm.
具体的,在确定目标对焦物体距离摄像头镜头的目标距离信息后,根据上述对应关系,确定对焦马达的调整移动位置。Specifically, after determining the target distance information of the target focus object from the camera lens, the adjustment and movement position of the focus motor is determined according to the above correspondence.
例如,根据目标对焦物体与摄像头镜头的目标距离信息及上述对应关系确定对焦马达的移动距离为2cm,则确定对焦马达的调整移动位置为2cm。For example, if it is determined that the moving distance of the focus motor is 2 cm according to the target distance information between the target focus object and the camera lens and the above correspondence, then the adjusted moving position of the focus motor is determined to be 2 cm.
步骤370、根据所述调整移动位置控制所述对焦马达进行移动,以对所述拍照预览图像进行对焦。Step 370 , controlling the focus motor to move according to the adjusted moving position, so as to focus on the preview image for shooting.
具体的,根据对焦马达的调整移动位置控制对焦马达进行移动。将对焦马达移动后,对拍照预览图像进行对焦的对焦方式即为用户实际需求的对焦方式。Specifically, the focus motor is controlled to move according to the adjusted moving position of the focus motor. After the focus motor is moved, the focusing method for focusing on the photo preview image is the focusing method actually required by the user.
本实施例的技术方案,通过景深图中各图像像素点的景深信息识别至少一个参考对焦物体,并获取选定的目标对焦物体,根据目标对焦物体与摄像头镜头的距离信息确定对焦马达的调整移动位置,进而根据调整移动位置控制对焦马达进行移动,已完成对拍照预览图像的对焦,实现了在至少一个参考对焦物体中,根据用户选择的目标对焦物体的景深信息,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求,同时,优化了现有智能终端拍照技术,提升了用户的使用体验。In the technical solution of this embodiment, at least one reference focus object is identified through the depth of field information of each image pixel point in the depth of field map, and the selected target focus object is obtained, and the adjustment movement of the focus motor is determined according to the distance information between the target focus object and the camera lens Position, and then control the focus motor to move according to the adjustment of the moving position. The focus on the preview image of the photo has been completed, and at least one reference focus object has been realized. According to the depth of field information of the target focus object selected by the user, the target focus object is accurately completed. Focusing makes the final focusing result closer to the user's actual focusing needs. At the same time, it optimizes the existing smart terminal camera technology and improves the user experience.
实施例四Embodiment Four
图4为本发明实施例四提供的一种拍照处理方法的流程图。本实施例以上述实施例为基础进行具体化。在本实施例中,将根据所述目标对焦物体,对所述拍照预览图像进行对焦具体为:根据所述目标对焦物体在所述景深图中的图像像素坐标,确定所述目标对焦物体在所述拍照预览界面中的目标屏幕像素坐标;在所述目标屏幕像素坐标中,获取中心像素点坐标作为对焦点;根据所述对焦点,对所述拍照预览图像进行对焦。参考图4,本实施例提供的方法包括:FIG. 4 is a flow chart of a photographing processing method provided by Embodiment 4 of the present invention. This embodiment is embodied on the basis of the above-mentioned embodiments. In this embodiment, focusing on the photographing preview image according to the target focus object specifically includes: according to the image pixel coordinates of the target focus object in the depth-of-field map, determining where the target focus object is The pixel coordinates of the target screen in the photo preview interface; in the pixel coordinates of the target screen, the coordinates of the central pixel point are obtained as the focus point; according to the focus point, the focus is carried out on the preview image of the photo. Referring to Figure 4, the method provided in this embodiment includes:
步骤410、在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应。Step 410: Identify at least one reference focus object in the depth map generated in the photo preview state, wherein the depth map corresponds to the photo preview image displayed in the photo preview interface.
步骤420、获取选择的目标对焦物体。Step 420, acquire the selected target focus object.
步骤430、根据所述目标对焦物体在所述景深图中的图像像素坐标,确定所述目标对焦物体在所述拍照预览界面中的目标屏幕像素坐标。Step 430 : Determine the target screen pixel coordinates of the target focus object in the photo preview interface according to the image pixel coordinates of the target focus object in the depth map.
具体的,获取目标对焦物体在景深图的各图像像素坐标。Specifically, the image pixel coordinates of the target focus object in the depth map are acquired.
进一步的,由于景深图的图像像素坐标与拍照预览图像的图像像素坐标一一对应,因此,根据目标对焦物体在景深图的各图像像素坐标,可以确定目标对焦物体在拍照预览图像中的各图像像素坐标。Further, since the image pixel coordinates of the depth-of-field map correspond to the image pixel coordinates of the photographing preview image, each image of the target focusing object in the photographing preview image can be determined according to the pixel coordinates of each image of the target focusing object in the depth-of-field map. pixel coordinates.
更进一步的,根据拍照预览图像的图像分辨率与拍照预览界面的屏幕分辨率的对应关系,及目标对焦物体在拍照预览图像中的图像像素坐标,确定目标对焦物体在拍照预览界面中的目标屏幕像素坐标。Furthermore, according to the corresponding relationship between the image resolution of the photo preview image and the screen resolution of the photo preview interface, and the image pixel coordinates of the target focus object in the photo preview image, determine the target screen of the target focus object in the photo preview interface pixel coordinates.
步骤440、在所述目标屏幕像素坐标中,获取中心像素点坐标作为对焦点。Step 440, in the pixel coordinates of the target screen, acquire the coordinates of the central pixel point as the focusing point.
具体的,在目标对焦物体对应的各目标屏幕像素坐标中,选取中心像素点坐标。其中,可以是求取目标屏幕像素坐标均值,取均值的整数作为中心像素点坐标。还可以是选取目标对焦物体的各目标屏幕像素坐标中,位于目标对焦物体中心的目标屏幕像素坐标作为中心像素点坐标。Specifically, in the pixel coordinates of each target screen corresponding to the target focus object, the coordinates of the central pixel point are selected. Wherein, it may be to calculate the mean value of the pixel coordinates of the target screen, and take the integer of the mean value as the center pixel point coordinates. It is also possible to select, among the target screen pixel coordinates of the target focus object, the target screen pixel coordinate located at the center of the target focus object as the center pixel point coordinates.
进一步的,将中心像素点作为对焦点。其中,对焦点为进行对焦处理时的中心点。Further, the central pixel is used as the focusing point. Wherein, the focusing point is a central point when performing focusing processing.
步骤450、根据所述对焦点,对所述拍照预览图像进行对焦。Step 450: Focus on the photo preview image according to the focus point.
示例性的,可以以对焦点为中心,对拍照预览图像进行对焦。Exemplarily, the camera preview image may be focused on the focus point.
可选的,将对焦后的拍照预览图像显示在拍照预览界面中。Optionally, the focused photo preview image is displayed in the photo preview interface.
本实施例的技术方案,通过在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,并根据获取选择的目标对焦物体,确定目标对焦物体在拍照预览界面中的目标屏幕像素坐标,并将目标屏幕像素坐标的中心像素点作为对焦点,进而对拍照预览图像进行对焦,实现了在至少一个参考对焦物体中,根据用户选择的目标对焦物体确定对焦点,并基于该对焦点完成对该目标对焦物体的精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求,同时,优化了现有智能终端拍照技术,提升了用户的使用体验。In the technical solution of this embodiment, by identifying at least one reference focus object in the depth-of-field map generated in the photo preview state, and determining the target screen pixel coordinates of the target focus object in the photo preview interface according to the acquired selected target focus object, The central pixel point of the pixel coordinates of the target screen is used as the focus point, and then the camera preview image is focused, so that in at least one reference focus object, the focus point is determined according to the target focus object selected by the user, and the focus is completed based on the focus point. The precise focusing of the target focusing object makes the final focusing result closer to the actual focusing needs of the user. At the same time, it optimizes the existing smart terminal camera technology and improves the user experience.
实施例五Embodiment five
图5为本发明实施例五提供的一种拍照处理装置的结构示意图。如图5所示,所述装置包括:参考物体识别模块51、目标获取模块52以及对焦模块53,其中:FIG. 5 is a schematic structural diagram of a camera processing device provided in Embodiment 5 of the present invention. As shown in Figure 5, the device includes: a reference object recognition module 51, a target acquisition module 52 and a focusing module 53, wherein:
参考物体识别模块51,用于在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应;The reference object recognition module 51 is used to identify at least one reference focus object in the depth of field map generated in the photo preview state, wherein the depth of field map corresponds to the photo preview image displayed in the photo preview interface;
目标获取模块52,用于获取选择的目标对焦物体;A target acquisition module 52, configured to acquire a selected target focus object;
对焦模块53,用于根据所述目标对焦物体,对所述拍照预览图像进行对焦。The focusing module 53 is configured to focus on the photographing preview image according to the target focusing object.
本发明实施例提供的拍照处理装置,在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,并根据获取选择的目标对焦物体,对拍照预览图像进行对焦。通过获取选择的目标对焦物体实现对拍照预览图像进行对焦的技术手段,可以实现在至少一个参考对焦物体中,根据用户选择的目标对焦物体,完成对该目标对焦物体精准对焦,使得最终的对焦结果更加贴近用户的实际对焦需求的技术效果,优化了现有智能终端拍照技术,提升了用户的使用体验。例如,在执行默认的自动对焦方式使得对焦后的拍照预览图像不符合用户的实际需求时,采用本实施例提供的装置,用户不需要调整拍摄角度,就可以获得理想的对焦后拍照预览图像。The photographing processing device provided by the embodiment of the present invention identifies at least one reference focus object in the depth map generated in the photographing preview state, and focuses on the photographing preview image according to the acquired and selected target focus object. The technical means of focusing on the photo preview image by acquiring the selected target focus object can achieve precise focusing on the target focus object according to the target focus object selected by the user in at least one reference focus object, so that the final focus result The technical effect that is closer to the user's actual focusing needs optimizes the existing smart terminal camera technology and improves the user experience. For example, when the default auto-focus mode is implemented so that the preview image after focusing does not meet the actual needs of the user, the device provided by this embodiment can obtain the ideal preview image after focusing without adjusting the shooting angle.
在上述各实施例的基础上,所述目标获取模块52可以包括:On the basis of the above-mentioned embodiments, the target acquisition module 52 may include:
标定提示子模块,用于在所述拍照预览界面中,将识别出的所述参考对焦物体进行标定提示;The calibration prompting sub-module is used to provide a calibration prompt for the identified reference focus object in the photo preview interface;
目标选择子模块,用于获取用户根据所述标定提示选择的目标对焦物体。The target selection sub-module is configured to acquire the target focusing object selected by the user according to the calibration prompt.
在上述各实施例的基础上,所述参考物体识别模块51可以包括:On the basis of the above-mentioned embodiments, the reference object recognition module 51 may include:
景深图获取子模块,用于通过双摄像头进行拍照预览,以获取景深图,且在拍照预览界面中呈现拍照预览图像;The depth map acquisition sub-module is used to preview the photo through the dual cameras to obtain the depth map, and present the photo preview image in the photo preview interface;
识别子模块,用于在所述景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应。The identification submodule is used to identify at least one reference focus object in the depth map, wherein the depth map corresponds to the photo preview image displayed in the photo preview interface.
在上述各实施例的基础上,所述参考物体识别模块51可以包括:On the basis of the above-mentioned embodiments, the reference object recognition module 51 may include:
景深信息获取子模块,用于获取景深图中各图像像素点的景深信息,其中,所述景深信息中包括图像像素点关联的被摄物体与摄像头镜头之间的距离信息;The depth of field information acquisition sub-module is used to obtain the depth of field information of each image pixel in the depth of field map, wherein the depth of field information includes the distance information between the subject associated with the image pixel and the camera lens;
像素分组子模块,用于将距离信息之间的差值满足设定阈值条件的图像像素点归集于同一像素分组中;The pixel grouping sub-module is used for grouping the image pixel points whose difference between the distance information satisfies the set threshold condition into the same pixel grouping;
参考物体识别子模块,用于将各像素分组中图像像素坐标连续的图像像素点识别为参考对焦物体。The reference object identification sub-module is used to identify the image pixel points with continuous image pixel coordinates in each pixel group as the reference focus object.
在上述各实施例的基础上,所述标定提示子模块可以包括:On the basis of the above-mentioned embodiments, the calibration prompt submodule may include:
身份标识建立单元,用于根据识别出的所述参考对焦物体的数量,为所述参考对焦物体建立身份标识;An identity identification establishing unit, configured to establish an identity identification for the reference focusing object according to the number of identified reference focusing objects;
参考位置确定单元,用于根据所述参考对焦物体在所述景深图中的图像像素坐标,确定所述参考对焦物体在所述拍照预览界面中的位置;A reference position determination unit, configured to determine the position of the reference focus object in the photo preview interface according to the image pixel coordinates of the reference focus object in the depth map;
标定位置确定单元,用于根据所述参考对焦物体在所述拍照预览界面中的位置,确定与所述参考对焦物体对应的标定位置;A calibration position determination unit, configured to determine a calibration position corresponding to the reference focus object according to the position of the reference focus object in the photographing preview interface;
身份标识显示单元,用于在所述拍照预览界面中的所述标定位置处,显示与所述参考对焦物体对应的身份标识。The ID display unit is configured to display the ID corresponding to the reference focus object at the marked position in the photo preview interface.
在上述各实施例的基础上,所述参考位置确定单元可以包括:On the basis of the above embodiments, the reference position determining unit may include:
坐标确定子单元,用于将所述参考对焦物体在所述景深图中的图像像素坐标作为所述参考对焦物体在所述拍照预览图像中的图像像素坐标;A coordinate determining subunit, configured to use the image pixel coordinates of the reference focus object in the depth map as the image pixel coordinates of the reference focus object in the photo preview image;
位置确定子单元,用于根据拍照预览界面的屏幕分辨率与所述拍照预览图像的图像分辨率之间的对应关系,获取所述拍照预览界面中与所述拍照预览图像中的图像像素坐标对应的屏幕像素坐标,作为所述参考对焦物体在所述拍照预览界面中的位置。The position determination subunit is used to obtain the correspondence between the image pixel coordinates in the photo preview interface and the photo preview image according to the corresponding relationship between the screen resolution of the photo preview interface and the image resolution of the photo preview image The screen pixel coordinates are used as the position of the reference focus object in the photo preview interface.
在上述各实施例的基础上,所述目标选择子模块可以包括:On the basis of the above-mentioned embodiments, the target selection submodule may include:
语音信息获取单元,用于实时获取用户输入的语音信息;A voice information acquisition unit, configured to acquire voice information input by the user in real time;
目标确定单元,用于如果在语音信息中识别出与标定提示匹配的关键词,则获取与所述标定提示对应的目标对焦物体。A target determining unit, configured to acquire a target focusing object corresponding to the marking prompt if a keyword matching the marking prompt is recognized in the voice information.
在上述各实施例的基础上,所述对焦模块53可以包括:On the basis of the above-mentioned embodiments, the focusing module 53 may include:
目标距离确定子模块,用于根据所述景深图,确定所述目标对焦物体与摄像头镜头之间的目标距离信息;A target distance determination submodule, configured to determine target distance information between the target focus object and the camera lens according to the depth-of-field map;
移动位置确定子模块,用于根据预存的被摄物体到达镜头的距离与对焦马达移动距离之间的对应关系,以及所述目标距离信息,确定对焦马达的调整移动位置;The moving position determination sub-module is used to determine the adjusted moving position of the focus motor according to the pre-stored correspondence between the distance from the subject to the lens and the movement distance of the focus motor, and the target distance information;
对焦马达移动子模块,用于根据所述调整移动位置控制所述对焦马达进行移动,以对所述拍照预览图像进行对焦。The focus motor moving sub-module is used to control the focus motor to move according to the adjusted moving position, so as to focus on the preview image for taking pictures.
在上述各实施例的基础上,所述对焦模块53可以包括:On the basis of the above-mentioned embodiments, the focusing module 53 may include:
目标屏幕像素坐标确定子模块,用于根据所述目标对焦物体在所述景深图中的图像像素坐标,确定所述目标对焦物体在所述拍照预览界面中的目标屏幕像素坐标;The target screen pixel coordinate determination submodule is used to determine the target screen pixel coordinates of the target focus object in the photo preview interface according to the image pixel coordinates of the target focus object in the depth map;
对焦点确定子模块,用于在所述目标屏幕像素坐标中,获取中心像素点坐标作为对焦点;The focus point determination submodule is used to obtain the coordinates of the central pixel point in the pixel coordinates of the target screen as the focus point;
对焦实现子模块,用于根据所述对焦点,对所述拍照预览图像进行对焦。The focusing realization sub-module is used to focus on the photo preview image according to the focusing point.
上述产品可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。The above-mentioned product can execute the method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种拍照处理方法,该方法包括:An embodiment of the present invention also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a photographing processing method when executed by a computer processor, the method comprising:
在拍照预览状态下生成的景深图中,识别至少一个参考对焦物体,其中,所述景深图与拍照预览界面中显示的拍照预览图像相对应;Identifying at least one reference focus object in the depth of field map generated in the photo preview state, wherein the depth of field map corresponds to the photo preview image displayed in the photo preview interface;
获取选择的目标对焦物体;Get the selected target focus object;
根据所述目标对焦物体,对所述拍照预览图像进行对焦。Focusing on the photo preview image according to the target focusing object.
可选的,该计算机可执行指令在由计算机处理器执行时还可以用于执行本发明任意实施例所提供的拍照处理方法的技术方案。Optionally, when the computer-executable instruction is executed by a computer processor, it may also be used to execute the technical solution of the photographing processing method provided in any embodiment of the present invention.
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本发明可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the above description about the implementation mode, those skilled in the art can clearly understand that the present invention can be realized by means of software and necessary general-purpose hardware, and of course it can also be realized by hardware, but in many cases the former is a better implementation mode . Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disc, etc., including several instructions to make a computer device (which can be a personal computer, A server, or a network device, etc.) executes the methods described in various embodiments of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the appended claims.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610626415.9A CN106231189A (en) | 2016-08-02 | 2016-08-02 | Take pictures treating method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610626415.9A CN106231189A (en) | 2016-08-02 | 2016-08-02 | Take pictures treating method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106231189A true CN106231189A (en) | 2016-12-14 |
Family
ID=57536053
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610626415.9A Pending CN106231189A (en) | 2016-08-02 | 2016-08-02 | Take pictures treating method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106231189A (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107959799A (en) * | 2017-12-18 | 2018-04-24 | 信利光电股份有限公司 | A kind of quick focusing method, device, equipment and computer-readable recording medium |
| CN108055458A (en) * | 2017-12-18 | 2018-05-18 | 信利光电股份有限公司 | A kind of focus method for tracing, device, equipment and computer readable storage medium |
| CN108616693A (en) * | 2018-05-22 | 2018-10-02 | 长沙全度影像科技有限公司 | A kind of focusing method and focusing system for the bullet time |
| CN108712613A (en) * | 2018-05-30 | 2018-10-26 | 信利光电股份有限公司 | A kind of method, apparatus and relevant device of control image acquisition device |
| CN109889720A (en) * | 2018-11-15 | 2019-06-14 | 乐蜜有限公司 | A kind of video capture method, apparatus, electronic equipment and storage medium |
| CN110493527A (en) * | 2019-09-24 | 2019-11-22 | Oppo广东移动通信有限公司 | Main body focusing method, device, electronic equipment and storage medium |
| CN110536068A (en) * | 2019-09-29 | 2019-12-03 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
| CN111213362A (en) * | 2017-10-11 | 2020-05-29 | 深圳传音通讯有限公司 | Computer-readable storage medium for focusing and intelligent terminal |
| CN112824933A (en) * | 2019-11-19 | 2021-05-21 | 北京小米移动软件有限公司 | Distance measuring method, distance measuring device and electronic equipment |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5030022B2 (en) * | 2007-12-13 | 2012-09-19 | カシオ計算機株式会社 | Imaging apparatus and program thereof |
| CN103037075A (en) * | 2011-10-07 | 2013-04-10 | Lg电子株式会社 | Mobile terminal and method for generating an out-of-focus image |
| CN103312959A (en) * | 2012-03-15 | 2013-09-18 | 欧姆龙株式会社 | Photographing device and photographing device controlling method |
| CN103577102A (en) * | 2012-08-06 | 2014-02-12 | 三星电子株式会社 | Method and system for tagging information about image, and apparatus thereof |
| CN104641275A (en) * | 2012-09-11 | 2015-05-20 | 索尼公司 | Imaging control device, imaging device, and method for controlling imaging control device |
| CN105657240A (en) * | 2015-06-29 | 2016-06-08 | 宇龙计算机通信科技(深圳)有限公司 | Photographing method and device |
-
2016
- 2016-08-02 CN CN201610626415.9A patent/CN106231189A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5030022B2 (en) * | 2007-12-13 | 2012-09-19 | カシオ計算機株式会社 | Imaging apparatus and program thereof |
| CN103037075A (en) * | 2011-10-07 | 2013-04-10 | Lg电子株式会社 | Mobile terminal and method for generating an out-of-focus image |
| CN103312959A (en) * | 2012-03-15 | 2013-09-18 | 欧姆龙株式会社 | Photographing device and photographing device controlling method |
| CN103577102A (en) * | 2012-08-06 | 2014-02-12 | 三星电子株式会社 | Method and system for tagging information about image, and apparatus thereof |
| CN104641275A (en) * | 2012-09-11 | 2015-05-20 | 索尼公司 | Imaging control device, imaging device, and method for controlling imaging control device |
| CN105657240A (en) * | 2015-06-29 | 2016-06-08 | 宇龙计算机通信科技(深圳)有限公司 | Photographing method and device |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111213362A (en) * | 2017-10-11 | 2020-05-29 | 深圳传音通讯有限公司 | Computer-readable storage medium for focusing and intelligent terminal |
| CN108055458A (en) * | 2017-12-18 | 2018-05-18 | 信利光电股份有限公司 | A kind of focus method for tracing, device, equipment and computer readable storage medium |
| CN107959799A (en) * | 2017-12-18 | 2018-04-24 | 信利光电股份有限公司 | A kind of quick focusing method, device, equipment and computer-readable recording medium |
| CN108616693A (en) * | 2018-05-22 | 2018-10-02 | 长沙全度影像科技有限公司 | A kind of focusing method and focusing system for the bullet time |
| CN108712613A (en) * | 2018-05-30 | 2018-10-26 | 信利光电股份有限公司 | A kind of method, apparatus and relevant device of control image acquisition device |
| CN109889720A (en) * | 2018-11-15 | 2019-06-14 | 乐蜜有限公司 | A kind of video capture method, apparatus, electronic equipment and storage medium |
| CN110493527B (en) * | 2019-09-24 | 2022-11-15 | Oppo广东移动通信有限公司 | Subject focusing method, device, electronic equipment and storage medium |
| CN110493527A (en) * | 2019-09-24 | 2019-11-22 | Oppo广东移动通信有限公司 | Main body focusing method, device, electronic equipment and storage medium |
| WO2021057474A1 (en) * | 2019-09-24 | 2021-04-01 | Oppo广东移动通信有限公司 | Method and apparatus for focusing on subject, and electronic device, and storage medium |
| CN110536068A (en) * | 2019-09-29 | 2019-12-03 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
| CN110536068B (en) * | 2019-09-29 | 2021-09-28 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
| WO2021057652A1 (en) * | 2019-09-29 | 2021-04-01 | Oppo广东移动通信有限公司 | Focusing method and apparatus, electronic device, and computer readable storage medium |
| CN112824933A (en) * | 2019-11-19 | 2021-05-21 | 北京小米移动软件有限公司 | Distance measuring method, distance measuring device and electronic equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106231189A (en) | Take pictures treating method and apparatus | |
| CN105578026B (en) | A kind of image pickup method and user terminal | |
| CN104065859B (en) | A kind of acquisition methods and camera head of full depth image | |
| CN105100620B (en) | Image pickup method and device | |
| US10298841B2 (en) | Device and method for generating a panoramic image | |
| KR101678483B1 (en) | Auto-focusing method, auto-focusing device, program and recording medium | |
| US20140368695A1 (en) | Control device and storage medium | |
| WO2016165488A1 (en) | Photo processing method and device | |
| CN106161945A (en) | Take pictures treating method and apparatus | |
| CN103837129B (en) | Distance-finding method in a kind of terminal, device and terminal | |
| EP3366035B1 (en) | Multiple camera autofocus synchronization | |
| CN104580922A (en) | Control method and device for supplemental lighting during shooting | |
| CN102096898A (en) | Method and device for image processing | |
| CN108124102B (en) | Image processing method, image processing apparatus, and computer-readable storage medium | |
| WO2015192547A1 (en) | Method for taking three-dimensional picture based on mobile terminal, and mobile terminal | |
| CN111586296A (en) | Image capturing method, image capturing device and storage medium | |
| CN111526282A (en) | Method and device for shooting with adjustable depth of field based on flight time | |
| CN114244999A (en) | Automatic focusing method, device, imaging device and storage medium | |
| JP2016220171A (en) | Augmented Reality Object Recognition Device | |
| KR102506363B1 (en) | A device with exactly two cameras and how to create two images using the device | |
| CN104601883B (en) | A kind of method and device of image taking | |
| CN104994282B (en) | A kind of big visual angle camera control method and user terminal | |
| TW201911853A (en) | Dual-camera image pick-up apparatus and image capturing method thereof | |
| CN105306829A (en) | Method and device for taking pictures | |
| CN117408868A (en) | Image processing method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161214 |