[go: up one dir, main page]

CN104363377B - Display methods, device and the terminal of focus frame - Google Patents

Display methods, device and the terminal of focus frame Download PDF

Info

Publication number
CN104363377B
CN104363377B CN201410715279.1A CN201410715279A CN104363377B CN 104363377 B CN104363377 B CN 104363377B CN 201410715279 A CN201410715279 A CN 201410715279A CN 104363377 B CN104363377 B CN 104363377B
Authority
CN
China
Prior art keywords
area
depth information
image
main object
searched
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.)
Expired - Fee Related
Application number
CN201410715279.1A
Other languages
Chinese (zh)
Other versions
CN104363377A (en
Inventor
孙剑波
蓝和
张弓
张学勇
韦怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410715279.1A priority Critical patent/CN104363377B/en
Publication of CN104363377A publication Critical patent/CN104363377A/en
Application granted granted Critical
Publication of CN104363377B publication Critical patent/CN104363377B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The invention provides a kind of display methods of focus frame, device and terminal, this method include:Obtain the focusing area selected on camera image;According to the depth information of the camera image, the region where the corresponding agent object of the focusing area is determined;The profile in the region where the region calculating agent object according to where the agent object, is shown using the profile as focus frame.Instant invention overcomes the defect of existing focus frame shape fixed single, give user more intuitive focusing area from display.

Description

对焦框的显示方法、装置及终端Focus frame display method, device and terminal

技术领域technical field

本发明属于成像领域,尤其涉及对焦框的显示方法、装置及终端。The invention belongs to the field of imaging, and in particular relates to a display method, device and terminal of a focusing frame.

背景技术Background technique

在相机进行拍照时,为获取清晰的拍摄图像,需要对相机进行对焦,比如通过改变镜头的焦距、或者改变镜头光心到底片平面的距离,使得相机聚焦于用户所希望拍摄的画面对象。When the camera is taking pictures, in order to obtain a clear image, the camera needs to be focused, for example, by changing the focal length of the lens, or changing the distance between the optical center of the lens and the film plane, so that the camera can focus on the picture object that the user wants to shoot.

现有的对焦框的显示方法中,一般通过一个矩形对焦框选中需要对焦的区域,从而可以有效的完成对焦或者曝光等操作。In the existing method for displaying a focus frame, generally a rectangular focus frame is used to select an area to be focused, so that operations such as focus or exposure can be effectively completed.

在实现本发明过程中,发明人发现现有技术中至少存在如下问题:由于矩形对焦框的形状固定,而目标对象的形状和大小却常常发生变化,固定的矩形对焦框不能准确有效的显示选择的目标对象,使得对焦框显示不够直观明确。In the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art: because the shape of the rectangular focus frame is fixed, but the shape and size of the target object often change, the fixed rectangular focus frame cannot be displayed accurately and effectively The target object makes the focus frame display not intuitive and clear.

发明内容Contents of the invention

有鉴于此,本发明实施例提供一种相机对焦框的显示方法、装置及终端,以解决现有技术中由于矩形对焦框的形状固定,而目标对象的形状和大小却常常发生变化,固定的矩形对焦框不能准确有效的显示选择的目标对象,使得对焦框显示不够直观明确的问题。In view of this, the embodiments of the present invention provide a method, device and terminal for displaying the focus frame of a camera to solve the problem in the prior art that the shape and size of the target object often change due to the fixed shape of the rectangular focus frame. The rectangular focus frame cannot accurately and effectively display the selected target object, which makes the display of the focus frame not intuitive and clear enough.

第一方面,本发明实施例提供了一种对焦框的显示方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for displaying a focus frame, the method comprising:

获取在相机图像上选择的对焦区域;Get the focus area selected on the camera image;

根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;According to the depth information of the camera image, determine the area where the subject object corresponding to the focus area is located;

根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。The outline of the area where the main object is located is calculated according to the area where the main object is located, and the outline is displayed as a focus frame.

结合第一方面,在本发明实施例第一方面的第一种可能实现方式中,所述根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域具体包括:With reference to the first aspect, in the first possible implementation manner of the first aspect of the embodiments of the present invention, the determining the area where the subject object corresponding to the focus area is located according to the depth information of the camera image specifically includes:

获取相机图像中每个像素点的深度信息;Obtain the depth information of each pixel in the camera image;

根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点;Searching for pixels in the image whose depth information satisfies the threshold range according to the preset threshold range and the focus area;

根据所查找的像素点构成主体对象所在的区域。Construct the area where the main object is located according to the searched pixel points.

结合第一方面的第一种可能实现方式,在本发明实施例第一方面的第二种可能实现方式中,所述对焦区域为相机自动查找的对焦区域,所述根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点具体包括:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect of the embodiment of the present invention, the focus area is the focus area automatically searched by the camera, and the preset threshold range and the focus area, searching for pixels in the image whose depth information satisfies the threshold range specifically includes:

计算所述相机图像中的平均深度信息;calculating average depth information in said camera image;

设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。The threshold range is set as a range smaller than the average depth information, and pixels smaller than the average depth information are searched for.

结合第一方面的第一种可能实现方式,在本发明实施例第一方面的第三种可能实现方式中,所述对焦区域为相机自动查找的对焦区域,所述根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点具体包括:With reference to the first possible implementation of the first aspect, in the third possible implementation of the first aspect of the embodiment of the present invention, the focus area is the focus area automatically searched by the camera, and the preset threshold range and the focus area, searching for pixels in the image whose depth information satisfies the threshold range specifically includes:

接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image.

结合第一方面的第一种可能实现方式,在本发明实施例第一方面的第三种可能实现方式中,所述获取相机图像中每个像素点的深度信息步骤包括:With reference to the first possible implementation of the first aspect, in the third possible implementation of the first aspect of the embodiment of the present invention, the step of acquiring the depth information of each pixel in the camera image includes:

根据双摄像头获取第一图像和第二图像;Acquiring the first image and the second image according to the dual camera;

根据所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。According to the disparity information of the same object in the first image and the second image and the position information of the dual cameras, the depth information of the pixels in the image is obtained.

结合第一方面的第一种可能实现方式,在本发明实施例第一方面的第三种可能实现方式中,所述根据所查找的像素点构成主体对象所在的区域步骤包括:With reference to the first possible implementation of the first aspect, in the third possible implementation of the first aspect of the embodiment of the present invention, the step of forming the area where the main object is located according to the searched pixel points includes:

判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;Judging whether the area formed by the searched pixels is greater than a preset area area value;

如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is larger than the preset area area value, the area where the main object is located is formed according to the searched pixel points.

结合第一方面的第一种可能实现方式,在本发明实施例第一方面的第三种可能实现方式中,所述根据所查找的像素点构成主体对象所在的区域步骤包括:With reference to the first possible implementation of the first aspect, in the third possible implementation of the first aspect of the embodiment of the present invention, the step of forming the area where the main object is located according to the searched pixel points includes:

判断所述查找的像素点构成的区域是否为连续的区域;Judging whether the area formed by the searched pixels is a continuous area;

如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is a continuous area, the area where the subject object is located is formed according to the searched pixel points.

第二方面,本发明实施例提供了一种对焦框的显示装置,所述装置包括:In a second aspect, an embodiment of the present invention provides a display device for a focusing frame, the device comprising:

对焦区域获取单元,用于获取在相机图像上选择的对焦区域;a focus area acquisition unit, configured to acquire a focus area selected on the camera image;

主体对象所在的区域确定单元,用于根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;The area where the main object is located is determined by a unit configured to determine the area where the main object is located corresponding to the focus area according to the depth information of the camera image;

轮廓计算显示单元,用于根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。The outline calculation and display unit is configured to calculate the outline of the area where the main object is located according to the area where the main object is located, and display the outline as a focus frame.

结合第二方面,在第二方面的第一种可能实现方式中,所述对焦区域为相机自动查找的对焦区域,所述主体对象所在的区域确定单元具体包括:With reference to the second aspect, in the first possible implementation manner of the second aspect, the focus area is the focus area automatically searched by the camera, and the unit for determining the area where the subject object is located specifically includes:

深度信息获取子单元,用于获取相机图像中每个像素点的深度信息;The depth information acquisition subunit is used to acquire the depth information of each pixel in the camera image;

像素点查找子单元,用于根据所述深度信息获取子单元获取的每个像素点的深度信息,以及设定的阈值范围,在图像中查找深度信息满足所述阈值范围的像素点;A pixel search subunit, configured to search for pixels whose depth information satisfies the threshold range in the image according to the depth information of each pixel acquired by the depth information acquisition subunit and the set threshold range;

主体对象获取子单元,用于根据所查找的像素点构成主体对象所在的区域。The subject object acquisition subunit is configured to form the region where the subject object is located according to the searched pixel points.

结合第二方面的第一种可能实现方式,在第二方面的第二种可能实现方式中,所述对焦区域为用户指定的对焦区域,所述像素点查找子单元包括:With reference to the first possible implementation of the second aspect, in the second possible implementation of the second aspect, the focus area is a focus area specified by a user, and the pixel point search subunit includes:

计算模块,用于计算所述相机图像中的平均深度信息;Calculation module, for calculating the average depth information in the camera image;

像素点查找模块,用于根据所述计算模块计算的平均深度信息,设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。A pixel point search module, configured to set the threshold range as a range smaller than the average depth information according to the average depth information calculated by the calculation module, and search for pixels smaller than the average depth information.

结合第二方面的第一种可能实现方式,在第二方面的第三种可能实现方式中,所述像素点查找子单元用于:With reference to the first possible implementation of the second aspect, in a third possible implementation of the second aspect, the pixel point search subunit is configured to:

接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image.

结合第二方面的第一种可能实现方式,在第二方面的第四种可能实现方式中,所述深度信息获取子单元包括:With reference to the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the depth information acquiring subunit includes:

图像获取模块,用于根据双摄像头获取第一图像和第二图像;An image acquisition module, configured to acquire the first image and the second image according to the dual cameras;

深度信息获取模块,用于根据所述图像获取模块获取的所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。The depth information acquisition module is configured to obtain the depth information of the pixels in the image according to the disparity information of the same object in the first image and the second image acquired by the image acquisition module and the position information of the dual cameras.

结合第二方面的第一种可能实现方式,在第二方面的第五种可能实现方式中,所述主体对象获取子单元包括:With reference to the first possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the subject object acquisition subunit includes:

第一判断模块,用于判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;The first judging module is used to judge whether the area formed by the searched pixels is greater than a preset area area value;

第一主体对象所在区域确定模块,用于根据第一判断模块判断的如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。The module for determining the area where the first subject object is located is configured to form the area where the subject object is located according to the searched pixel points if the area of the area formed by the searched pixels is greater than the preset area area value judged by the first judging module .

结合第二方面的第一种可能实现方式,在第二方面的第六种可能实现方式中,所述主体对象获取子单元包括:With reference to the first possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the subject object obtaining subunit includes:

第二判断模块,用于判断所述查找的像素点构成的区域是否为连续的区域;The second judging module is used to judge whether the region formed by the searched pixels is a continuous region;

第二主体对象所在区域确定模块,用于根据第二判断模块判断的如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。The second determination module of the area where the main object is located is configured to form the area where the main object is located according to the searched pixel points if the area formed by the searched pixel points judged by the second judging module is a continuous area.

第三方面,本发明实施例提供了一种终端,所述终端包括第二方面任一种可能实现方式中的相机对焦框的显示装置。In a third aspect, an embodiment of the present invention provides a terminal, where the terminal includes the apparatus for displaying a camera focusing frame in any possible implementation manner of the second aspect.

结合第三方面,在第三方面的第一种可能实现方式中,所述终端为智能手机或者平板电脑。With reference to the third aspect, in a first possible implementation manner of the third aspect, the terminal is a smart phone or a tablet computer.

在本发明实施例中,通过查找相机图像中的主体对象的区域,根据所述主体对象的区域确定并显示所述主体对象的轮廓。从而克服了现有技术由于矩形对焦框的形状固定,而目标对象的形状和大小却常常发生变化,固定的矩形对焦框不能准确有效的显示选择的目标对象,使得对焦框显示不够直观明确的问题,进而可以使得目标对象的选择更为准确,能有效提高对目标对象的选择效率。In the embodiment of the present invention, by searching the area of the main object in the camera image, the outline of the main object is determined and displayed according to the area of the main object. Thereby overcoming the prior art because the shape of the rectangular focus frame is fixed, but the shape and size of the target object often change, the fixed rectangular focus frame cannot accurately and effectively display the selected target object, making the display of the focus frame not intuitive and clear enough , which in turn can make the selection of the target object more accurate, and can effectively improve the efficiency of the selection of the target object.

附图说明Description of drawings

图1是本发明第一实施例提供的对焦框的显示方法的实现流程图;FIG. 1 is a flow chart of the implementation of the method for displaying the focus frame provided by the first embodiment of the present invention;

图2是本发明第二实施例提供的对焦框的显示方法的实现流程图;Fig. 2 is a flow chart of the implementation of the display method of the focus frame provided by the second embodiment of the present invention;

图3是本发明第三实施例提供的根据预先设定的阈值范围,在图像中查找深度信息满足所述阈值范围的像素点的实现流程图;Fig. 3 is an implementation flow chart of searching for pixels whose depth information satisfies the threshold range in an image according to a preset threshold range provided by the third embodiment of the present invention;

图4示出了本发明第五实施例提供的获取相机图像中每个像素点的深度信息的实现流程;Fig. 4 shows the implementation process of obtaining the depth information of each pixel in the camera image provided by the fifth embodiment of the present invention;

图5示出了本发明第六实施例提供的对焦框的显示装置的结构示意图。FIG. 5 shows a schematic structural diagram of a display device for a focus frame provided by a sixth embodiment of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, 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, not to limit the present invention.

在本发明实施例可应用于相机或者摄像机在拍摄图像时对图像的自动对焦。其主要目的在于克服现有技术中由于矩形对焦框的形状固定,而目标对象的形状和大小却常常发生变化,固定的矩形对焦框不能准确有效的显示选择的目标对象,使得对焦框显示不够直观明确的问题。为克服上述问题,本发明所述对焦框的显示方法,包括:The embodiment of the present invention can be applied to the automatic focusing of an image when a camera or video camera captures an image. Its main purpose is to overcome the existing technology because the shape of the rectangular focus frame is fixed, but the shape and size of the target object often change. The fixed rectangular focus frame cannot accurately and effectively display the selected target object, making the display of the focus frame not intuitive enough. clear question. In order to overcome the above problems, the display method of the focus frame in the present invention includes:

获取在相机图像上选择的对焦区域;根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。下面结合实施例作进一步说明。Acquire the focus area selected on the camera image; determine the area where the main object is located corresponding to the focus area according to the depth information of the camera image; calculate the outline of the area where the main object is located according to the area where the main object is located to display the outline as a focus frame. Below in conjunction with embodiment for further explanation.

实施例一:Embodiment one:

图1示出了本发明第一实施例提供的对焦框的显示方法的实现流程图,详述如下:Fig. 1 shows a flow chart of the implementation of the method for displaying the focus frame provided by the first embodiment of the present invention, which is described in detail as follows:

在步骤S101中,获取在相机图像上选择的对焦区域。In step S101, the focus area selected on the camera image is acquired.

具体的,所述相机,包括但不局限于智能手机相机、笔记本相机或者专门的照相机或者摄像机,相机获取图像的方式,包括但不限于CCD(英文全称为Charge-coupledDevice,中文全称为电荷耦合器件)的感光原件进行感光获取或者CMOS(英文全称为Complementary Metal-Oxide Semiconductor,中文全称为)感光原件感光获取。Specifically, the camera includes but is not limited to a smart phone camera, a notebook camera or a special camera or video camera, and the way the camera acquires images includes but not limited to a CCD (Charge-coupled Device in English, and a charge-coupled device in Chinese). ) photosensitive original for photosensitive acquisition or CMOS (English full name is Complementary Metal-Oxide Semiconductor, Chinese full name) photosensitive original photosensitive acquisition.

所述相机图像,是指相机在拍摄照片或者拍摄视频时获取的图像。The camera image refers to an image acquired by the camera when taking photos or videos.

所述相机图像上选择的对焦区域,可以通过接收用户输入的触摸指令所确定的对焦区域,或者也可以为其它输入方式输入的对焦区域。The focus area selected on the camera image may be a focus area determined by receiving a touch instruction input by a user, or may be a focus area input by other input methods.

在步骤S102中,根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域。In step S102, according to the depth information of the camera image, the area where the main object corresponding to the focus area is located is determined.

具体的,获取相机图像中每个像素点的深度信息的方式,可以包括使用双摄像头获取的图像确定每个像素点的深度信息,当然也可以使用其它深度信息的获取方法,比如使用红外测距获取深度信息。Specifically, the method of obtaining the depth information of each pixel in the camera image may include using images obtained by dual cameras to determine the depth information of each pixel. Of course, other depth information acquisition methods may also be used, such as using infrared ranging Get depth information.

根据所述对焦区域确定主体对象所在的区域,可以查找所述对焦区域的深度信息,根据该深度信息确定所查找的主体对象所在的区域。进一步的说明将在实施例二至实施四具体说明。The area where the main object is located is determined according to the focus area, the depth information of the focus area may be searched, and the area where the searched main object is located is determined according to the depth information. Further description will be specifically described in Embodiment 2 to Embodiment 4.

所述相机图像中的主体对象,是指位于所述相机图像中的特征较为显著的对象,比如可以定义一些主体对象的特征,如可以为人物脸部、人物肢体动作等较为显著特征。除了定义一些主要的主体对象的特征外,还可以根据常用的主体对象的提取方法,比如对于网页中的图像,可以通过图像的标注信息确定图像中的主体对象,通过查找与标注对应的信息,从而确定图像中的主体对象。The main object in the camera image refers to an object with relatively prominent features in the camera image. For example, some characteristics of the main object can be defined, such as a person's face and body movements. In addition to defining the characteristics of some main subject objects, it can also be based on commonly used subject object extraction methods. For example, for images in web pages, the subject objects in the image can be determined through the annotation information of the image, and by searching for information corresponding to the annotation, Thereby determining the subject object in the image.

当然,不应局限于此,本发明实施例还包括根据图像中的像素点的深度信息,确定图像的主体对象,将在后续实施例中具体说明。Of course, it should not be limited thereto, and the embodiment of the present invention also includes determining the main object of the image according to the depth information of the pixels in the image, which will be specifically described in the following embodiments.

本发明实施例中所述主体对象所在的区域,即通过上述的各种方法确定主体对象后,并记录所述主体对象在相机图像中的位置,所述位置可以用坐标表示。可以通过记录所述主体对象的形状,并相应的记录主体对象的形状的关键位置点,比如对于三角形,则只需要记录三个顶点的位置坐标,而对于多边形,则需要记录多个边界位置的顶点坐标,以及顶点的连接方式,比如哪个顶点与哪个顶点相连,相连的线是直线还是弧线,如果是弧线,包括弧线的曲率半径、弧度等信息。In the embodiment of the present invention, the area where the main object is located means that after the main object is determined by the above-mentioned various methods, the position of the main object in the camera image is recorded, and the position can be represented by coordinates. It is possible to record the shape of the subject object, and correspondingly record the key position points of the shape of the subject object. For example, for a triangle, it is only necessary to record the position coordinates of three vertices, and for a polygon, it is necessary to record the position coordinates of multiple boundary positions. Vertex coordinates, and the connection method of vertices, such as which vertex is connected to which vertex, whether the connected line is a straight line or an arc, and if it is an arc, it includes information such as the radius of curvature and radian of the arc.

在步骤S103中,根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。In step S103, the outline of the area where the main object is located is calculated according to the area where the main object is located, and the outline is displayed as a focus frame.

具体的,所述主体对象的轮廓,是指所述主体对象与图像中的背景,即非主体对象的边界线。Specifically, the outline of the main object refers to the boundary line between the main object and the background in the image, that is, the non-main object.

所述主体对象的轮廓的计算,可以根据主体对象中的每个像素点与周围相邻的像素点的状态信息进行确定。The calculation of the outline of the main object may be determined according to the state information of each pixel in the main object and surrounding adjacent pixel points.

比如,假设图像中每个像素点的形状为正方形,那么,对于每个像素点有四个相邻的像素点与其邻近。在确定所述像素点是否为主体对象的轮廓时,可以查找所述像素点为中心,查找该中心像素点相邻的四个像素点是否均为主体对象的像素点,如果有一个或者一个以上的相邻像素点不属于所述主体对象,则所述中心像素点为主体对象的轮廓的像素点。相反,如果所述与所述中心像素点相邻的四个像素点均为主体对象,则该中心像素点不是主体对象的轮廓的像素点。For example, assuming that the shape of each pixel in the image is a square, then there are four adjacent pixels adjacent to each pixel. When determining whether the pixel point is the outline of the main object, it can be found that the pixel point is the center, and whether the four adjacent pixel points of the center pixel point are all pixels of the main object, if there is one or more than one The adjacent pixel points do not belong to the main object, then the central pixel point is the pixel point of the outline of the main object. On the contrary, if the four pixel points adjacent to the central pixel point are all subject objects, then the central pixel point is not a pixel point of the outline of the subject object.

根据同样的道理,当所述像素点的形状为其它形状时,也只需要查找以该像素点为中心像素点,与所述中心像素点相邻的其它像素点是否为主本对象,如果有一个或一个以上的像素点不是主体对象,则所述中心像素点为主体对象的轮廓。According to the same principle, when the shape of the pixel point is other shapes, it is only necessary to search for the pixel point as the center pixel point, whether other pixels adjacent to the center pixel point are the main objects, and if there is If one or more pixel points are not the main object, then the central pixel point is the outline of the main object.

由于本发明实施例通过查找相机图像中的主体对象的区域,根据所述主体对象的区域确定并显示所述主体对象的轮廓。使得目标对象的选择更为准确,能有效提高对目标对象的选择效率。Since the embodiment of the present invention finds the area of the main object in the camera image, the outline of the main object is determined and displayed according to the area of the main object. The selection of the target object is made more accurate, and the efficiency of selecting the target object can be effectively improved.

实施例二:Embodiment two:

图2示出了本发明第二实施例提供的对焦框的显示方法的实现流程,详述如下:FIG. 2 shows the implementation process of the method for displaying the focus frame provided by the second embodiment of the present invention, which is described in detail as follows:

在步骤S201中,获取在相机图像上选择的对焦区域。In step S201, the focus area selected on the camera image is acquired.

在步骤S202中,获取相机图像中每个像素点的深度信息。In step S202, the depth information of each pixel in the camera image is acquired.

具体的,所述相机图像的深度信息,即场景中对象的各个像素点相对于成像终端的距离,所述对象可以为人、树、汽车、房子等可以通过光线反射而在拍摄相机中成像,可观察到的对象。所述图像的深度信息,可以通过目前各种计算图像的深度信息的方法获取,比如可以通过激光雷达测距获取对象中各点的深度信息,也可以通过变焦测距,或者多基线立体成像的方式,获取图像中各点的深度信息。当然,还可以根据本发明实施例三中所述的双摄像头测距的方式,获取图像的深度信息,将在本发明实施例三具体介绍。Specifically, the depth information of the camera image, that is, the distance of each pixel point of the object in the scene relative to the imaging terminal, the object can be a person, tree, car, house, etc. can be imaged in the shooting camera through light reflection, and can be observed object. The depth information of the image can be obtained through various current methods for calculating the depth information of the image, for example, the depth information of each point in the object can be obtained through laser radar ranging, or through zoom ranging, or multi-baseline stereoscopic imaging way to obtain the depth information of each point in the image. Of course, the depth information of the image can also be acquired according to the dual-camera ranging method described in the third embodiment of the present invention, which will be specifically introduced in the third embodiment of the present invention.

在步骤S203中,根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点。In step S203, according to the preset threshold range and the focus area, a pixel point whose depth information satisfies the threshold range is searched in the image.

所述设定的阈值范围,可以接收用户指定的中心点,并根据所述中心点以及阈值半径得到一个深度信息的阈值半径,或者也可以设定两个阈值边界值,通过两个阈值边界值确定阈值范围,当然还可以通过设定一个阈值边界,将大于或者小于所述阈值边界作为所设定的阈值范围。具体设定阈值范围的方式,将在后续实施例进行说明。The set threshold range can receive the center point specified by the user, and obtain a threshold radius of depth information according to the center point and the threshold radius, or can also set two threshold boundary values, and pass the two threshold boundary values To determine the threshold range, of course, a threshold boundary can also be set, and the threshold range greater than or smaller than the threshold boundary can be taken as the set threshold range. The specific manner of setting the threshold range will be described in subsequent embodiments.

在步骤S204中,根据所查找的像素点构成主体对象所在的区域。In step S204, the area where the main object is located is constructed according to the searched pixel points.

当相机图像中的像素点的深度信息满足步骤S202所设定的阈值范围时,则可以认为其满足所设置阈值范围要求。When the depth information of a pixel point in the camera image satisfies the threshold range set in step S202, it can be considered that it satisfies the set threshold range requirement.

当然,作为本发明实施例进一步优化的实施方式中,还可以包括对查找的主体对象所在的区域进行过滤步骤,具体中以包括如下两种方式之一,或者包括两种方式同时进行过滤。Of course, as a further optimized implementation of the embodiment of the present invention, the step of filtering the area where the searched subject object is located may also be included, specifically including one of the following two ways, or including two ways to filter at the same time.

方式一:method one:

判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;Judging whether the area formed by the searched pixels is greater than a preset area area value;

如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is larger than the preset area area value, the area where the main object is located is formed according to the searched pixel points.

其中,预设的区域面积值,可以通过像素点来描述,比如可以设定预设的区域面积值为N个像素点。所述预设的区域面积值,与相机图像的分辨率有关,当相机图像分辨率越大,则可以相应的提高预设的区域面积值。Wherein, the preset area value can be described by pixels, for example, N pixels can be set as the preset area value. The preset area value is related to the resolution of the camera image. When the resolution of the camera image is larger, the preset area value can be correspondingly increased.

方式一中对得到的图像的区域面积进行过滤的目的在于,可以减小其它非主体的噪声图像对主体信息的干扰,比如与主体图像深度信息相同或者相近的对象对主体图像的干扰,或者由于深度信息计算误差所带来的干扰,从而进一步提高主体对象获取的准确性。The purpose of filtering the area of the obtained image in method 1 is to reduce the interference of other non-subject noise images on the subject information, such as the interference of objects with the same or similar depth information as the subject image on the subject image, or due to The interference caused by the depth information calculation error can further improve the accuracy of the main object acquisition.

方式二:Method 2:

判断所述查找的像素点构成的区域是否为连续的区域;Judging whether the area formed by the searched pixels is a continuous area;

如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is a continuous area, the area where the subject object is located is formed according to the searched pixel points.

同样,对于相机图像中存在的噪声图像中,也可以通过图像区域的连续性来排队噪声图像对主体对象的干扰,比如与主体图像的深度信息相同或者相近的对象、或者深度信息计算误差带来的小块区域的干扰。Similarly, for the noise image in the camera image, the continuity of the image area can also be used to queue the interference of the noise image to the main object, such as objects with the same or similar depth information as the main image, or depth information calculation errors. Interference in small areas.

通过对像素点构成的区域的主体信息的判断,可以选择符合要求的、面积最大的区域作为主体对象所在的区域。By judging the subject information of the region composed of pixels, the region that meets the requirements and has the largest area can be selected as the region where the subject object is located.

作为本发明一种更为优化的实施方式中,还可以将方式一和方式二相结合,以更好的对噪声图像进行过滤,得到更为准确的主体对象。As a more optimized implementation of the present invention, the first method and the second method can also be combined to better filter the noise image and obtain a more accurate main object.

在步骤S205中,根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。In step S205, the outline of the area where the main object is located is calculated according to the area where the main object is located, and the outline is displayed as a focus frame.

步骤S201、S205与实施例一中的步骤S101、S103相同,在此不作重复赘述。Steps S201 and S205 are the same as steps S101 and S103 in Embodiment 1, and will not be repeated here.

本发明实施例通过获取相机图像中每个像素点的深度信息,通过深度信息与预设的阈值范围比较,得到满足要求的像素点构成主体对象所在的区域,根据所述主体对象所在的区域计算所述主体对象的轮廓,并将所述轮廓作为对焦框进行显示。本发明还进一步介绍了两种优化主体对象的方式,从而进一步提高主体对象查找的准确性。In the embodiment of the present invention, by obtaining the depth information of each pixel in the camera image, and comparing the depth information with the preset threshold range, the pixel points that meet the requirements are obtained to form the area where the main object is located, and the calculation is based on the area where the main object is located. The outline of the subject object is displayed as a focus frame. The present invention further introduces two ways of optimizing the subject object, so as to further improve the accuracy of subject object search.

实施例三:Embodiment three:

在实施例二的基础上,图3示出了本发明第三实施例提供的所述对焦区域为相机自动查找的对焦区域时,根据预先设定的阈值范围,在图像中查找深度信息满足所述阈值范围的像素点的实现流程,详述如下:On the basis of Embodiment 2, FIG. 3 shows that when the focus area provided by the third embodiment of the present invention is the focus area automatically searched by the camera, according to the preset threshold range, the search for depth information in the image meets the requirements. The implementation process of the pixels in the threshold range is described in detail as follows:

在步骤S301中,计算所述相机图像中的平均深度信息。In step S301, average depth information in the camera images is calculated.

具体的,所述相机图像的平均深度信息,可以根据相机图像中每个像素点的深度信息取平均值计算得到。Specifically, the average depth information of the camera image may be calculated by averaging the depth information of each pixel in the camera image.

在步骤S302中,设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。In step S302, the threshold range is set as a range smaller than the average depth information, and pixels smaller than the average depth information are searched for.

根据步骤S301计算的平均深度信息,将其与相机图像中的每个像素点进行比较,可以将图像划分为两部分,一部分为大于平均深度信息的像素点构成的区域,一部分为小于或者等于平均深度信息像素点构成的区域。考虑到主体对象一般靠近拍摄终端,因此可以通过选择小于或者等于平均深度信息像素点构成的区域为主体对象。通过这种过滤方式,尤其可适用于主体对象与背景距离较远的场景。According to the average depth information calculated in step S301, it is compared with each pixel in the camera image, and the image can be divided into two parts, one part is an area composed of pixels greater than the average depth information, and the other part is less than or equal to the average depth information. The area composed of depth information pixels. Considering that the main object is generally close to the shooting terminal, it is possible to select an area formed by pixels less than or equal to the average depth information as the main object. This filtering method is especially suitable for scenes where the distance between the main object and the background is relatively long.

当然,当选择大于平均深度信息的像素点构成的区域时,可以将该部分区域作为图像的背景对象。Of course, when an area composed of pixels larger than the average depth information is selected, this part of the area can be used as the background object of the image.

当得到的主体对象包括多个时,可以根据用户的选择指令,选择其中一个或者几个作为主体对象。When there are multiple main objects obtained, one or several of them may be selected as the main object according to the user's selection instruction.

本发明实施例在实施例二的基础上,具体介绍了通过计算相机图像的平均深度信息,根据像素点的深度信息与平均深度信息的比较,筛选得到主体对象,操作简单,而且获取主体对象的准确率较高。On the basis of Embodiment 2, the embodiment of the present invention specifically introduces that by calculating the average depth information of the camera image, according to the comparison between the depth information of the pixel point and the average depth information, the main object is obtained by screening, the operation is simple, and the information of the main object is obtained. Higher accuracy.

实施例四:Embodiment four:

作为本发明实施例三中可替代的实施方式,在本发明实施例四中,提供了一种基于本发明实施例二的、所述对焦区域为用户指定的对焦区域,所述根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点的实施方式,具体为:As an alternative implementation in Embodiment 3 of the present invention, in Embodiment 4 of the present invention, a focus area based on Embodiment 2 of the present invention is provided, the focus area is a focus area specified by the user, and the preset The threshold range and the focus area, the embodiment of searching for pixels whose depth information satisfies the threshold range in the image is specifically:

接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image.

所述用户指定的深度信息,可以为通过触摸指令得到触摸区域对应的深度信息,也可以为用户输入的具体数值,当然还可以通过滑动条调节的深度信息值。The depth information specified by the user may be the depth information corresponding to the touch area obtained through a touch command, or may be a specific numerical value input by the user, and of course the depth information value may be adjusted through a slide bar.

所述深度半径,可以根据不同的场景而设定一个或者多个常用值,并自动侦测场景信息而相应的调用对应的深度半径,也可以用户根据实际情况进行调整。For the depth radius, one or more commonly used values can be set according to different scenes, and the scene information can be automatically detected to call the corresponding depth radius, or the user can adjust it according to the actual situation.

另外,作为本发明更为优化的实施方式中,所述深度半径可以优化为以中心向前和向后分别延伸不同的距离,从而更好的适应不同主体对象的选择要求。In addition, as a more optimized implementation of the present invention, the depth radius can be optimized to extend different distances forward and backward from the center, so as to better adapt to the selection requirements of different main objects.

与实施例三类似的,本发明实施例在实施例二的基础上,具体介绍了通过设定中心值和以深度半径,获取相机图像中的主体对象,选择方式更为灵活。Similar to the third embodiment, on the basis of the second embodiment, the embodiment of the present invention specifically introduces that the main object in the camera image is obtained by setting the center value and the depth radius, and the selection method is more flexible.

实施例五:Embodiment five:

在实施例二的基础上,图4示出了本发明第五实施例提供的获取相机图像中每个像素点的深度信息的实现流程,详述如下:On the basis of the second embodiment, Fig. 4 shows the implementation process of obtaining the depth information of each pixel in the camera image provided by the fifth embodiment of the present invention, which is described in detail as follows:

在步骤S401中,根据双摄像头获取第一图像和第二图像。In step S401, a first image and a second image are acquired according to the dual cameras.

具体的,所述双摄像头,可以为两个中心线平等的摄像头,并且两个摄像头的距离预先设定。所述摄像头可以为模拟摄像头,也可以为数字摄像头,为便于两个摄像头获取的图像的比较,一般选用同种类型的摄像头,以便于后续的比较计算。Specifically, the dual cameras may be two cameras with equal centerlines, and the distance between the two cameras is preset. The camera can be an analog camera or a digital camera. In order to facilitate the comparison of images acquired by the two cameras, generally the same type of camera is selected to facilitate subsequent comparison calculations.

当两个摄像头的分辨率不同时,比如第一图像的分辨率高,则可以将分辨率高的第一图像的分辨率调低,使得调整后的第一图像的分辨率与第二图像的分辨率相同。When the resolutions of the two cameras are different, for example, the resolution of the first image is high, the resolution of the first image with high resolution can be lowered so that the adjusted resolution of the first image is the same as that of the second image. The resolution is the same.

对于第一图像中包含有,但在第二图像中不包含的图像,由于其不能直接计算其对应的深度信息,则可以将该部分图像不作为待选择图像的一部分。For images contained in the first image but not contained in the second image, since the corresponding depth information cannot be directly calculated, this part of the image may not be regarded as a part of the image to be selected.

在步骤S402中,根据所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。In step S402, according to the disparity information of the same object in the first image and the second image and the position information of the dual cameras, the depth information of the pixels in the image is obtained.

由于两个摄像头的位置不同,因此,类似于人的双眼,通过两个摄像头获取的第一图像和第二图像,可以确定两个图像的视差信息,根据所得到的视差信息以及两个摄像头的距离信息,根据距离摄像机距离近,视差大,距离摄像机距离远时视差小的原理,通过对第一图像和第二图像进行匹配,可计算每个像素点的深度信息。Since the positions of the two cameras are different, similar to the human eyes, the disparity information of the two images can be determined through the first image and the second image acquired by the two cameras. Distance information, according to the principle that the distance from the camera is short, the parallax is large, and the parallax is small when the distance from the camera is long, by matching the first image and the second image, the depth information of each pixel can be calculated.

本发明实施例通过双摄像头获取相机图像中的深度信息,相比较于其它获取深度信息的方式,本发明实施例方式需要的成本较低,实现更为方便。In the embodiment of the present invention, the depth information in the camera image is obtained by dual cameras. Compared with other methods for obtaining the depth information, the cost of the embodiment of the present invention is lower and the implementation is more convenient.

应理解,在本发明实施例一至实施例五中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that in Embodiments 1 to 5 of the present invention, the serial numbers of the processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, rather than by the embodiment of the present invention. The implementation process constitutes any limitation.

实施例六:Embodiment six:

图5示出了本发明第六实施例提供的相机对焦框的显示装置的结构示意图,详述如下:Fig. 5 shows a schematic structural diagram of a display device for a camera focus frame provided by a sixth embodiment of the present invention, which is described in detail as follows:

本发明实施例所述的相机对焦框的显示装置,包括:The display device for the focus frame of the camera described in the embodiment of the present invention includes:

对焦区域获取单元501,用于获取在相机图像上选择的对焦区域;A focus area acquiring unit 501, configured to acquire a focus area selected on the camera image;

主体对象所在的区域确定单元502,用于根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;The area where the main object is located determining unit 502, configured to determine the area where the main object corresponding to the focus area is located according to the depth information of the camera image;

轮廓计算显示单元503,用于根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示。The outline calculation and display unit 503 is configured to calculate the outline of the area where the main object is located according to the area where the main object is located, and display the outline as a focus frame.

优选的,所述对焦区域为相机自动查找的对焦区域,所述主体对象所在的区域确定单元具体包括:Preferably, the focus area is a focus area automatically searched by the camera, and the area determination unit where the subject object is located specifically includes:

深度信息获取子单元,用于获取相机图像中每个像素点的深度信息;The depth information acquisition subunit is used to acquire the depth information of each pixel in the camera image;

像素点查找子单元,用于根据所述深度信息获取子单元获取的每个像素点的深度信息,以及设定的阈值范围,在图像中查找深度信息满足所述阈值范围的像素点;A pixel search subunit, configured to search for pixels whose depth information satisfies the threshold range in the image according to the depth information of each pixel acquired by the depth information acquisition subunit and the set threshold range;

主体对象获取子单元,用于根据所查找的像素点构成主体对象所在的区域。The subject object acquisition subunit is configured to form the region where the subject object is located according to the searched pixel points.

优选的,所述对焦区域为用户指定的对焦区域,所述像素点查找子单元包括:Preferably, the focus area is a focus area specified by the user, and the pixel point search subunit includes:

计算模块,用于计算所述相机图像中的平均深度信息;Calculation module, for calculating the average depth information in the camera image;

像素点查找模块,用于根据所述计算模块计算的平均深度信息,设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。A pixel point search module, configured to set the threshold range as a range smaller than the average depth information according to the average depth information calculated by the calculation module, and search for pixels smaller than the average depth information.

优选的,所述像素点查找子单元用于:Preferably, the pixel point search subunit is used for:

接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image.

优选的,所述深度信息获取子单元包括:Preferably, the depth information acquisition subunit includes:

图像获取模块,用于根据双摄像头获取第一图像和第二图像;An image acquisition module, configured to acquire the first image and the second image according to the dual cameras;

深度信息获取模块,用于根据所述图像获取模块获取的所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。The depth information acquisition module is configured to obtain the depth information of the pixels in the image according to the disparity information of the same object in the first image and the second image acquired by the image acquisition module and the position information of the dual cameras.

优选的,所述主体对象获取子单元包括:Preferably, the subject object acquisition subunit includes:

第一判断模块,用于判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;The first judging module is used to judge whether the area formed by the searched pixels is greater than a preset area area value;

第一主体对象所在区域确定模块,用于根据第一判断模块判断的如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。The module for determining the area where the first subject object is located is configured to form the area where the subject object is located based on the searched pixels if the area of the area formed by the searched pixels is greater than the preset area area value judged by the first judging module .

优选的,所述主体对象获取子单元包括:Preferably, the subject object acquisition subunit includes:

第二判断模块,用于判断所述查找的像素点构成的区域是否为连续的区域;The second judging module is used to judge whether the region formed by the searched pixels is a continuous region;

第二主体对象所在区域确定模块,用于根据第二判断模块判断的如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。The second determination module of the area where the main object is located is configured to form the area where the main object is located according to the searched pixel points if the area formed by the searched pixel points judged by the second judging module is a continuous area.

本发明实施例所述相机曝光装置与实施例一、二、三、四、五所述相机对焦框的显示方法相对应,在此不作重复赘述。The camera exposure device in the embodiment of the present invention corresponds to the display method of the camera focus frame in the first, second, third, fourth, and fifth embodiments, and will not be repeated here.

另外,本发明实施例提供了一种终端,所述终端包括上述任一项所述的相机对焦框的显示装置。优选的实施方式中,所述终端为智能手机或者平板电脑。In addition, an embodiment of the present invention provides a terminal, where the terminal includes the device for displaying the focus frame of a camera according to any one of the above items. In a preferred embodiment, the terminal is a smart phone or a tablet computer.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。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.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, 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 this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。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,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。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: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。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 (14)

1.一种对焦框的显示方法,其特征在于,所述方法包括:1. A method for displaying a focus frame, characterized in that the method comprises: 获取在相机图像上选择的对焦区域;Get the focus area selected on the camera image; 根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;According to the depth information of the camera image, determine the area where the subject object corresponding to the focus area is located; 根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示;calculating the outline of the area where the main object is located according to the area where the main object is located, and displaying the outline as a focus frame; 所述根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域具体包括:The determining the area where the subject object corresponding to the focus area is located according to the depth information of the camera image specifically includes: 获取相机图像中每个像素点的深度信息;Obtain the depth information of each pixel in the camera image; 根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点;Searching for pixels in the image whose depth information satisfies the threshold range according to the preset threshold range and the focus area; 根据所查找的像素点构成主体对象所在的区域;Construct the area where the main object is located according to the searched pixel points; 所述主体对象所在的区域包括所述主体对象与图像中的背景,所述主体对象所在的区域的轮廓并非主体对象的边界线。The area where the main object is located includes the main object and the background in the image, and the outline of the area where the main object is located is not the boundary line of the main object. 2.根据权利要求1所述方法,其特征在于,所述对焦区域为相机自动查找的对焦区域,所述根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点具体包括:2. The method according to claim 1, wherein the focus area is the focus area automatically searched by the camera, and according to the preset threshold range and the focus area, searching for depth information in the image satisfies the The pixels in the threshold range specifically include: 计算所述相机图像中的平均深度信息;calculating average depth information in said camera image; 设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。The threshold range is set as a range smaller than the average depth information, and pixels smaller than the average depth information are searched for. 3.根据权利要求1所述方法,其特征在于,所述对焦区域为用户指定的对焦区域,所述根据预先设定的阈值范围和所述对焦区域,在图像中查找深度信息满足所述阈值范围的像素点具体包括:3. The method according to claim 1, wherein the focus area is a focus area specified by the user, and searching for depth information in the image according to the preset threshold range and the focus area satisfies the threshold The range of pixels specifically includes: 接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image. 4.根据权利要求1所述方法,其特征在于,所述获取相机图像中每个像素点的深度信息步骤包括:4. The method according to claim 1, wherein the step of obtaining the depth information of each pixel in the camera image comprises: 根据双摄像头获取第一图像和第二图像;Acquiring the first image and the second image according to the dual camera; 根据所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。According to the disparity information of the same object in the first image and the second image and the position information of the dual cameras, the depth information of the pixels in the image is obtained. 5.根据权利要求1所述方法,其特征在于,所述根据所查找的像素点构成主体对象所在的区域步骤包括:5. The method according to claim 1, wherein the step of forming the region where the subject object is located according to the searched pixels comprises: 判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;Judging whether the area formed by the searched pixels is greater than a preset area area value; 如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is larger than the preset area area value, the area where the main object is located is formed according to the searched pixel points. 6.根据权利要求1所述方法,其特征在于,所述根据所查找的像素点构成主体对象所在的区域步骤包括:6. The method according to claim 1, wherein the step of forming the region where the subject object is located according to the searched pixels comprises: 判断所述查找的像素点构成的区域是否为连续的区域;Judging whether the area formed by the searched pixels is a continuous area; 如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。If the area formed by the searched pixel points is a continuous area, the area where the subject object is located is formed according to the searched pixel points. 7.一种对焦框的显示装置,其特征在于,所述装置包括:7. A display device for a focus frame, characterized in that the device comprises: 对焦区域获取单元,用于获取在相机图像上选择的对焦区域;a focus area acquisition unit, configured to acquire a focus area selected on the camera image; 主体对象所在的区域确定单元,用于根据所述相机图像的深度信息,确定所述对焦区域对应的主体对象所在的区域;The area where the main object is located is determined by a unit configured to determine the area where the main object is located corresponding to the focus area according to the depth information of the camera image; 轮廓计算显示单元,用于根据所述主体对象所在的区域计算所述主体对象所在的区域的轮廓,以所述轮廓作为对焦框进行显示;an outline calculation and display unit, configured to calculate the outline of the area where the main object is located according to the area where the main object is located, and display the outline as a focus frame; 所述对焦区域为相机自动查找的对焦区域,所述主体对象所在的区域确定单元具体包括:The focus area is the focus area automatically searched by the camera, and the area determination unit where the subject object is located specifically includes: 深度信息获取子单元,用于获取相机图像中每个像素点的深度信息;The depth information acquisition subunit is used to acquire the depth information of each pixel in the camera image; 像素点查找子单元,用于根据所述深度信息获取子单元获取的每个像素点的深度信息,以及设定的阈值范围,在图像中查找深度信息满足所述阈值范围的像素点;A pixel search subunit, configured to search for pixels whose depth information satisfies the threshold range in the image according to the depth information of each pixel acquired by the depth information acquisition subunit and the set threshold range; 主体对象获取子单元,用于根据所查找的像素点构成主体对象所在的区域;The main object acquisition subunit is used to form the area where the main object is located according to the searched pixel points; 所述主体对象所在的区域包括所述主体对象与图像中的背景,所述主体对象所在的区域的轮廓并非主体对象的边界线。The area where the main object is located includes the main object and the background in the image, and the outline of the area where the main object is located is not the boundary line of the main object. 8.根据权利要求7所述装置,其特征在于,所述对焦区域为用户指定的对焦区域,所述像素点查找子单元包括:8. The device according to claim 7, wherein the focus area is a focus area specified by the user, and the pixel point search subunit comprises: 计算模块,用于计算所述相机图像中的平均深度信息;Calculation module, for calculating the average depth information in the camera image; 像素点查找模块,用于根据所述计算模块计算的平均深度信息,设定所述阈值范围为小于所述平均深度信息的范围,查找小于所述平均深度信息的像素点。A pixel point search module, configured to set the threshold range as a range smaller than the average depth information according to the average depth information calculated by the calculation module, and search for pixels smaller than the average depth information. 9.根据权利要求7所述装置,其特征在于,所述像素点查找子单元用于:9. The device according to claim 7, wherein the pixel point search subunit is used for: 接收用户输入的深度信息以及深度半径,以所述用户指定的深度信息为中心,根据所述深度半径确定所述阈值范围,在图像中查找深度信息满足所述阈值范围的像素点。Receiving the depth information and depth radius input by the user, centering on the depth information specified by the user, determining the threshold range according to the depth radius, and searching for pixels whose depth information satisfies the threshold range in the image. 10.根据权利要求7所述装置,其特征在于,所述深度信息获取子单元包括:10. The device according to claim 7, wherein the depth information acquisition subunit comprises: 图像获取模块,用于根据双摄像头获取第一图像和第二图像;An image acquisition module, configured to acquire the first image and the second image according to the dual cameras; 深度信息获取模块,用于根据所述图像获取模块获取的所述第一图像和第二图像中相同对象的视差信息以及双摄像头的位置信息,得到图像中像素点的深度信息。The depth information acquisition module is configured to obtain the depth information of the pixels in the image according to the disparity information of the same object in the first image and the second image acquired by the image acquisition module and the position information of the dual cameras. 11.根据权利要求7所述方法,其特征在于,所述主体对象获取子单元包括:11. The method according to claim 7, wherein the subject object acquiring subunit comprises: 第一判断模块,用于判断所述查找的像素点构成的区域面积是否大于预设的区域面积值;The first judging module is used to judge whether the area formed by the searched pixels is greater than a preset area area value; 第一主体对象所在区域确定模块,用于根据第一判断模块判断的如果所述查找的像素点构成的区域面积大于预设的区域面积值,则根据所查找的像素点构成主体对象所在的区域。The module for determining the area where the first subject object is located is configured to form the area where the subject object is located according to the searched pixel points if the area of the area formed by the searched pixels is greater than the preset area area value judged by the first judging module . 12.根据权利要求7所述装置,其特征在于,所述主体对象获取子单元包括:12. The device according to claim 7, wherein the subject object obtaining subunit comprises: 第二判断模块,用于判断所述查找的像素点构成的区域是否为连续的区域;The second judging module is used to judge whether the region formed by the searched pixels is a continuous region; 第二主体对象所在区域确定模块,用于根据第二判断模块判断的如果所述查找的像素点构成的区域为连续的区域,则根据所查找的像素点构成主体对象所在的区域。The second determination module of the area where the main object is located is configured to form the area where the main object is located according to the searched pixel points if the area formed by the searched pixel points judged by the second judging module is a continuous area. 13.一种终端,其特征在于,所述终端包括权利要求7-12任一项所述相机对焦框的显示装置。13. A terminal, characterized in that the terminal comprises a display device for the focus frame of the camera according to any one of claims 7-12. 14.根据权利要求13所述终端,其特征在于,所述终端为智能手机或者平板电脑。14. The terminal according to claim 13, wherein the terminal is a smart phone or a tablet computer.
CN201410715279.1A 2014-11-28 2014-11-28 Display methods, device and the terminal of focus frame Expired - Fee Related CN104363377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410715279.1A CN104363377B (en) 2014-11-28 2014-11-28 Display methods, device and the terminal of focus frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410715279.1A CN104363377B (en) 2014-11-28 2014-11-28 Display methods, device and the terminal of focus frame

Publications (2)

Publication Number Publication Date
CN104363377A CN104363377A (en) 2015-02-18
CN104363377B true CN104363377B (en) 2017-08-29

Family

ID=52530600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410715279.1A Expired - Fee Related CN104363377B (en) 2014-11-28 2014-11-28 Display methods, device and the terminal of focus frame

Country Status (1)

Country Link
CN (1) CN104363377B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100620B (en) * 2015-07-30 2018-05-25 深圳市永兴元科技股份有限公司 Image pickup method and device
CN105827952B (en) * 2016-02-01 2019-05-17 维沃移动通信有限公司 A kind of photographic method and mobile terminal removing specified object
CN106991696B (en) 2017-03-09 2020-01-24 Oppo广东移动通信有限公司 Backlight image processing method, backlight image processing device and electronic device
CN106973227A (en) * 2017-03-31 2017-07-21 努比亚技术有限公司 Intelligent photographing method and device based on dual camera
CN107566731A (en) * 2017-09-28 2018-01-09 努比亚技术有限公司 A kind of focusing method and terminal, computer-readable storage medium
CN107613208B (en) * 2017-09-29 2020-11-06 努比亚技术有限公司 Focusing area adjusting method, terminal and computer storage medium
CN108322726A (en) * 2018-05-04 2018-07-24 浙江大学 A kind of Atomatic focusing method based on dual camera
CN111669492A (en) * 2019-03-06 2020-09-15 青岛海信移动通信技术股份有限公司 Method for processing shot digital image by terminal and terminal
WO2021026848A1 (en) * 2019-08-14 2021-02-18 深圳市大疆创新科技有限公司 Image processing method and device, and photographing apparatus, movable platform and storage medium
CN110996003B (en) * 2019-12-16 2022-03-25 Tcl移动通信科技(宁波)有限公司 Photographing positioning method and device and mobile terminal
CN115037880A (en) * 2022-07-13 2022-09-09 山西工程职业学院 Quick focusing method for airborne camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070117338A (en) * 2006-06-08 2007-12-12 엘지전자 주식회사 Mobile communication terminal having focus area setting function and method using the same
CN104092946A (en) * 2014-07-24 2014-10-08 北京智谷睿拓技术服务有限公司 Image collection method and device
CN104102068A (en) * 2013-04-11 2014-10-15 聚晶半导体股份有限公司 Automatic focusing method and automatic focusing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070117338A (en) * 2006-06-08 2007-12-12 엘지전자 주식회사 Mobile communication terminal having focus area setting function and method using the same
CN104102068A (en) * 2013-04-11 2014-10-15 聚晶半导体股份有限公司 Automatic focusing method and automatic focusing device
CN104092946A (en) * 2014-07-24 2014-10-08 北京智谷睿拓技术服务有限公司 Image collection method and device

Also Published As

Publication number Publication date
CN104363377A (en) 2015-02-18

Similar Documents

Publication Publication Date Title
CN104363378B (en) camera focusing method, device and terminal
CN104363377B (en) Display methods, device and the terminal of focus frame
CN104333748A (en) Method, device and terminal for acquiring image subject object
CN104363379B (en) The method and terminal taken pictures using different focal camera
US9973672B2 (en) Photographing for dual-lens device using photographing environment determined using depth estimation
US9918065B2 (en) Depth-assisted focus in multi-camera systems
US9325899B1 (en) Image capturing device and digital zooming method thereof
KR101657039B1 (en) Image processing apparatus, image processing method, and imaging system
US9154697B2 (en) Camera selection based on occlusion of field of view
CN107277360B (en) Method for zooming through switching of double cameras, mobile terminal and storage device
CN108076278B (en) A kind of automatic focusing method, device and electronic equipment
WO2021136078A1 (en) Image processing method, image processing system, computer readable medium, and electronic apparatus
CN104333710A (en) Camera exposure method, device and equipment
TWI640199B (en) Image capturing apparatus and photo composition method thereof
US20220245839A1 (en) Image registration, fusion and shielding detection methods and apparatuses, and electronic device
CN108513057B (en) Image processing method and device
CN111210506A (en) Three-dimensional reduction method, system, terminal equipment and storage medium
US8908012B2 (en) Electronic device and method for creating three-dimensional image
JP6305232B2 (en) Information processing apparatus, imaging apparatus, imaging system, information processing method, and program.
TWI549478B (en) Method for generating 3d image and electronic apparatus using the same
CN104935815B (en) Method, device and the camera and mobile terminal taken pictures
JP6645711B2 (en) Image processing apparatus, image processing method, and program
CN107622192A (en) Video picture processing method, device and mobile terminal
CN104506768A (en) Image selection method, device and terminal
CN106556961A (en) Image pickup apparatus and method of operating the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170829

CF01 Termination of patent right due to non-payment of annual fee