[go: up one dir, main page]

CN108712609A - Focusing processing method, device, equipment and storage medium - Google Patents

Focusing processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN108712609A
CN108712609A CN201810473587.6A CN201810473587A CN108712609A CN 108712609 A CN108712609 A CN 108712609A CN 201810473587 A CN201810473587 A CN 201810473587A CN 108712609 A CN108712609 A CN 108712609A
Authority
CN
China
Prior art keywords
subject
target
target subject
camera module
candidate
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
Application number
CN201810473587.6A
Other languages
Chinese (zh)
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 CN201810473587.6A priority Critical patent/CN108712609A/en
Publication of CN108712609A publication Critical patent/CN108712609A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a focusing processing method, a device, equipment and a storage medium, wherein the method comprises the steps of carrying out main body identification on a picture currently acquired by a camera module by using a preset neural network, and determining a target main body and position information of the target main body in the currently acquired picture; determining a current corresponding target shooting mode of the camera module according to the type of the target main body; controlling a camera module to focus the target body according to the position information of the target body, and shooting an image containing the target body in a target shooting mode; the preset neural network is obtained by training by taking various types of shooting subjects as samples. The method realizes that the target main body in the collected picture is identified by utilizing the neural network, and the target main body is automatically focused according to the position of the target main body, thereby not only improving the quality of the shot picture, effectively avoiding the phenomenon of fuzzy shot picture, but also reducing manual operation, facilitating the use of users and improving the user experience.

Description

对焦处理方法、装置、设备及存储介质Focus processing method, device, equipment and storage medium

技术领域technical field

本申请涉及电子技术领域,特别涉及一种对焦处理方法、装置、设备及存储介质。The present application relates to the field of electronic technology, and in particular to a focus processing method, device, equipment and storage medium.

背景技术Background technique

用户利用包含摄像模组的终端设备进行拍摄时,为了获取到清晰度及质量高的图像,一般会根据拍摄画面对摄像模组进行对焦操作。其中,对焦是指通过移动摄像模组中的对焦机构,来调整物距和像距的位置,从而使被拍物体的成像变得清晰的过程。When a user uses a terminal device including a camera module to take pictures, in order to obtain a clear and high-quality image, the user generally performs a focusing operation on the camera module according to the shooting picture. Among them, focusing refers to the process of adjusting the positions of the object distance and the image distance by moving the focusing mechanism in the camera module, so that the imaging of the object to be photographed becomes clear.

目前,对拍摄画面进行对焦操作时,可采用手动对焦和自动对焦两种方式实现。其中,手动对焦方式主要通过人工选择被拍物体,并手工转动对焦环来调节照相机镜头,以使拍摄的图像清晰,而自动对焦方式则是由摄像模组直接接收分析来自景物自身的反光,进行自动对焦的方式。这种自动对焦方式受光线影响较大,在低反差,弱光下的对焦困难,且对细线条的被摄体自动对焦较困难。At present, when performing a focusing operation on a shooting screen, two methods of manual focusing and automatic focusing can be used. Among them, the manual focus method mainly selects the object to be photographed manually, and manually rotates the focus ring to adjust the camera lens to make the captured image clear, while the automatic focus method uses the camera module to directly receive and analyze the reflection from the scene itself, and perform Autofocus method. This autofocus method is greatly affected by light, and it is difficult to focus in low contrast and weak light, and it is difficult to autofocus on subjects with thin lines.

利用手动对焦方式进行对焦时,需要用户频繁参与,比如用户人工选取对焦点,并且当用户点击触摸屏时还会带来终端设备的抖动,影响对焦过程;利用自动对焦方式进行对焦时,容易受到光照条件的制约,当光线较暗或被拍物体与背景明暗差很小时,使得对焦变得困难,甚至失去作用,从而影响用户的正常使用。When using the manual focus method to focus, the user needs to participate frequently. For example, the user manually selects the focus point, and when the user clicks the touch screen, it will cause the terminal device to shake, which affects the focusing process; when using the automatic focus method to focus, it is easy to be affected by light. Due to the restriction of conditions, when the light is dark or the light and shade difference between the object and the background is very small, it makes focusing difficult or even useless, thus affecting the normal use of users.

发明内容Contents of the invention

本申请旨在至少在一定程度上解决上述的技术缺陷之一。The present application aims to solve one of the above-mentioned technical deficiencies at least to a certain extent.

为此,本申请的第一个目的在于提出一种对焦处理方法,该方法实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。For this reason, the first purpose of the present application is to propose a focus processing method, which realizes the target subject in the captured picture by using the neural network recognition, and according to the position of the target subject, the target subject is automatically focused, not only The quality of the shooting picture is improved, the blurred phenomenon of the shooting picture is effectively avoided, and manual operations can be reduced, which is convenient for users to use and improves user experience.

本申请的第二个目的在于提出一种对焦处理装置。The second purpose of the present application is to provide a focus processing device.

本申请的第三个目的在于提出一种终端设备。The third purpose of the present application is to provide a terminal device.

本申请的第四个目的在于提出一种计算机可读存储介质。The fourth object of the present application is to provide a computer-readable storage medium.

为了实现上述目的,本申请第一方面实施例的对焦处理方法,包括:利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定所述当前采集的画面中包括的目标主体及所述目标主体的位置信息;根据所述目标主体所属的类型,确定所述摄像模组当前对应的目标拍摄模式;根据所述目标主体的位置信息,控制所述摄像模组对所述目标主体进行对焦,并以所述目标拍摄模式,拍摄包含所述目标主体的图像;其中,所述预设的神经网络,为以各类型的拍摄主体为样本训练得到的。In order to achieve the above purpose, the focus processing method of the embodiment of the first aspect of the present application includes: using a preset neural network to perform subject recognition on the picture currently collected by the camera module, and determine the target subject and the subject included in the currently collected picture. The position information of the target subject; according to the type of the target subject, determine the target shooting mode currently corresponding to the camera module; according to the position information of the target subject, control the camera module to capture the target subject Focusing, and shooting an image including the target subject in the target shooting mode; wherein, the preset neural network is obtained by training with various types of shooting subjects as samples.

为了实现上述目的,本申请第二方面实施例的对焦处理装置,包括:第一确定模块,用于利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定所述当前采集的画面中包括的目标主体及所述目标主体的位置信息;第二确定模块,用于根据所述目标主体所属的类型,确定所述摄像模组当前对应的目标拍摄模式;控制模块,用于根据所述目标主体的位置信息,控制所述摄像模组对所述目标主体进行对焦,并以所述目标拍摄模式,拍摄包含所述目标主体的图像;其中,所述预设的神经网络,为以各类型的拍摄主体为样本训练得到的。In order to achieve the above purpose, the focusing processing device in the second embodiment of the present application includes: a first determining module, configured to use a preset neural network to identify the subject of the currently captured picture by the camera module, and determine the currently captured The target subject included in the screen and the position information of the target subject; the second determination module is used to determine the target shooting mode currently corresponding to the camera module according to the type of the target subject; the control module is used to determine the target shooting mode according to the type of the target subject The position information of the target subject controls the camera module to focus on the target subject, and shoots an image containing the target subject in the target shooting mode; wherein, the preset neural network is It is obtained by training with various types of subjects as samples.

为了实现上述目的,本申请第三方面实施例的终端设备,包括:存储器、处理器、摄像模组及触摸屏;所述摄像模组,用于采集拍摄画面;所述触摸屏,用于显示当前采集画面及接收用户操作;所述存储器,用于存储可执行程序代码;所述处理器,用于读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于实现第一方面实施例所述的对焦处理方法。In order to achieve the above purpose, the terminal device in the embodiment of the third aspect of the present application includes: a memory, a processor, a camera module, and a touch screen; the camera module is used to capture the shooting picture; the touch screen is used to display the screen and receiving user operations; the memory is used to store executable program code; the processor is used to read the executable program code stored in the memory to run a program corresponding to the executable program code, It is used to implement the focus processing method described in the embodiment of the first aspect.

为了实现上述目的,本申请第四方面实施例的计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现第一方面实施例所述的对焦处理方法。In order to achieve the above object, the computer-readable storage medium of the embodiment of the fourth aspect of the present application has a computer program stored thereon, and when the computer program is executed by a processor, the focus processing method described in the embodiment of the first aspect is implemented.

本申请公开的技术方案,具有如下有益效果:The technical solution disclosed in this application has the following beneficial effects:

通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以确定当前采集的画面中包括的目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,然后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像,其中预设的神经网络,为以各类型的拍摄主体为样本训练得到的。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。By using the preset neural network to perform subject recognition on the picture currently collected by the camera module, the target subject and the location information of the target subject included in the currently collected picture are determined, and according to the type of the target subject, the current subject of the camera module is determined. The corresponding target shooting mode, and then according to the position information of the target subject, control the camera module to focus on the target subject, and shoot images containing the target subject in the target shooting mode, and the preset neural network is used for various types of shooting The subject is obtained by sample training. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience.

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

附图说明Description of drawings

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

图1是根据本申请一个实施例的对焦处理方法的流程图;FIG. 1 is a flowchart of a focus processing method according to an embodiment of the present application;

图2是根据本申请另一个实施例的对焦处理方法的流程图;FIG. 2 is a flowchart of a focus processing method according to another embodiment of the present application;

图3是根据本申请一个实施例的对焦处理装置的结构示意图;FIG. 3 is a schematic structural diagram of a focus processing device according to an embodiment of the present application;

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

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

具体实施方式Detailed ways

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

为了解决相关技术中,利用手动对焦方式进行对焦时,需要用户频繁参与,并且当用户点击触摸屏时还会带来终端设备的抖动,影响对焦过程;或者利用自动对焦方式进行对焦时容易受到光照条件的制约,当光线较暗或者被拍物体与背景明暗差很小时,使得对焦变得困难,甚至失去作用,从而影响用户的正常使用的问题,提出一种对焦处理方法。In order to solve the problem in related technologies, when using manual focus to focus, the user needs to participate frequently, and when the user clicks on the touch screen, it will also cause the terminal device to shake, which affects the focusing process; When the light is dark or the light and shade difference between the object and the background is very small, the focus becomes difficult or even loses its function, which affects the normal use of the user. A focus processing method is proposed.

本申请提供的对焦处理方法,通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以确定当前采集的画面中包括的目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,然后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,以目标拍摄模式,拍摄包含目标主体的图像,其中预设的神经网络,为以各类型的拍摄主体为样本训练得到的。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。The focus processing method provided by this application uses a preset neural network to identify the subject of the currently captured picture by the camera module, so as to determine the target subject and the location information of the target subject included in the currently collected picture, and according to the type, determine the target shooting mode currently corresponding to the camera module, and then control the camera module to focus on the target subject according to the position information of the target subject, and shoot an image containing the target subject in the target shooting mode, in which the preset neural network , which is obtained by training with various types of subjects as samples. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience.

下面参考附图描述本申请实施例的对焦处理方法、装置、设备及存储介质进行详细说明。The focus processing method, device, device, and storage medium in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

首先,结合图1对本申请中对焦处理方法进行具体说明。Firstly, the focus processing method in this application will be specifically described with reference to FIG. 1 .

图1是根据本申请一个实施例的对焦处理方法的流程图。Fig. 1 is a flowchart of a focus processing method according to an embodiment of the present application.

如图1所示,本申请的对焦处理方法可以包括以下步骤:As shown in Figure 1, the focus processing method of the present application may include the following steps:

步骤101,利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定当前采集的画面中包括的目标主体及目标主体的位置信息。Step 101, using a preset neural network to perform subject recognition on the picture currently captured by the camera module, and determine the target subject and the location information of the target subject included in the currently captured picture.

可选的,预设的神经网络可以为以各类型的拍摄主体为样本训练得到的。Optionally, the preset neural network can be trained by taking various types of subjects as samples.

其中,预设的神经网络可以是由厂商在出厂时预先设置在终端设备中的,以实现对摄像模组采集的画面进行主体识别。Wherein, the preset neural network may be preset in the terminal device by the manufacturer before leaving the factory, so as to realize subject recognition on the pictures collected by the camera module.

通常,不同终端设备中设置的预设的神经网络可以是相同的,也可以是不同的,本实施例对此不作具体限定。Generally, the preset neural networks set in different terminal devices may be the same or different, which is not specifically limited in this embodiment.

另外,神经网络的类型,可以根据需要选择,例如,可以为普通卷积神经网络(CNN)、或者,可以为Fast-R-CNN卷积神经网络、或者,还可以为Faster R-CNN卷积神经网络。In addition, the type of neural network can be selected according to needs, for example, it can be an ordinary convolutional neural network (CNN), or it can be a Fast-R-CNN convolutional neural network, or it can also be a Faster R-CNN convolution Neural Networks.

在实际应用中,为了方便后续确定目标主体的位置信息,预设的神经网络在对摄像模组采集的画面进行主体识别时,可以先为采集画面定义一个坐标系,比如采集画面的左上角为坐标系原点,由原点出发向右为X轴正方向,向下为y轴正方向,以实现在对采集画面中的主体进行识别,不仅能够识别主体的类型,还能识别主体对应的位置信息。In practical applications, in order to facilitate subsequent determination of the location information of the target subject, the preset neural network can first define a coordinate system for the captured picture when performing subject recognition on the picture captured by the camera module. For example, the upper left corner of the captured picture is The origin of the coordinate system, from the origin to the right is the positive direction of the X-axis, and downwards is the positive direction of the y-axis, so as to realize the identification of the subject in the captured picture, not only the type of the subject can be identified, but also the corresponding position information of the subject can be identified .

需要说明,本申请实施例提供的对焦处理方法,可以由本申请提供的对焦处理装置执行,上述装置被配置于终端设备中,以实现对目标主体的确定过程进行控制。It should be noted that the focus processing method provided in the embodiment of the present application can be executed by the focus processing device provided in the present application, and the above device is configured in a terminal device to control the process of determining the target subject.

其中,终端设备可以是任意具有摄像模组的硬件设备,比如智能手机、个人数字助理(Personal Digital Assistant,简称为PDA)、平板电脑等等,本申请对此不作具体限定。Wherein, the terminal device may be any hardware device with a camera module, such as a smart phone, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet computer, etc., which is not specifically limited in this application.

具体实现时,对焦处理装置可先对摄像模组当前是否采集到画面进行检测,若检测到摄像模组当前采集到画面时,则利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以将当前采集的画面中包括的所有主体及所有主体对应的位置信息识别出来。During specific implementation, the focus processing device can first detect whether the camera module currently captures a picture, and if it detects that the camera module currently captures a picture, it uses a preset neural network to perform main processing on the picture currently captured by the camera module. Identify, so as to identify all subjects included in the currently captured frame and the corresponding position information of all subjects.

需要说明的是,若当前采集的画面中仅包括一个主体,则该主体即为目标主体,而若当前采集的画面中包括多个主体,则利用预先设定的选取规则,从识别的所有主体中确定出当前采集画面中包括的目标主体及目标主体的位置信息。It should be noted that if only one subject is included in the currently collected picture, then the subject is the target subject, and if the currently collected picture includes multiple subjects, the pre-set selection rules are used to select from all identified subjects Determine the target subject and the position information of the target subject included in the current acquisition frame.

其中,预先设定的选取规则可以是设备默认的,也可以是用户人为设置的,本申请对此不作具体限定。Wherein, the preset selection rule may be defaulted by the device, or manually set by the user, which is not specifically limited in this application.

例如,预先设定的选取规则可以默认为将最靠近采集画面中间位置的主体识别为目标主体。For example, the preset selection rule may default to identifying the subject closest to the middle of the captured image as the target subject.

需要说明的是,在本实施例中,利用预设的神经网络对摄像模组当前采集的画面进行主体识别时,所识别的主体类型可以是人物、动物、植物、建筑等等。对应的,确定的目标主体的类型也可以是人物、动物、植物、建筑等等,本实施例对此不作具体限定。It should be noted that, in this embodiment, when the preset neural network is used to perform subject recognition on the picture currently captured by the camera module, the recognized subject types may be people, animals, plants, buildings and so on. Correspondingly, the determined type of the target subject may also be a person, an animal, a plant, a building, etc., which is not specifically limited in this embodiment.

步骤102,根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式。Step 102, according to the type of the target subject, determine the target shooting mode currently corresponding to the camera module.

在实际应用时,为了满足用户在不同场景下的拍照需求,生产厂商会为摄像模组配置了多种拍摄模式,比如风景模式、人像模式、夜景模式、动态模式(运动模式)、微距模式、全景模式等等。也就是说,当用户在拍摄不同场景画面时,可根据拍摄主体调整摄像模组的拍摄模式,从而能够获取到质量好的图像。In practical applications, in order to meet users’ needs for taking pictures in different scenarios, manufacturers will configure various shooting modes for the camera module, such as landscape mode, portrait mode, night scene mode, dynamic mode (sports mode), macro mode , panorama mode, and more. That is to say, when the user is taking pictures of different scenes, he can adjust the shooting mode of the camera module according to the subject of the shooting, so as to obtain images with good quality.

例如,当拍摄人物图像时,可将摄像模组的拍摄模式设置为人像模式,从而使得摄像模组根据人像模式调整色调、对比度或者柔化效果,以使得拍摄的图像画面突出人像主体。For example, when taking pictures of people, the shooting mode of the camera module can be set to portrait mode, so that the camera module can adjust the tone, contrast or softening effect according to the portrait mode, so that the captured image highlights the portrait subject.

又如,当拍摄夜景时,可将摄像模组的拍摄模式设置为夜景模式,以使摄像模组使用较慢的快门曝光时间、较小的光圈同时关闭闪光灯,拍摄出画面比较亮的图像。For another example, when shooting a night scene, the shooting mode of the camera module can be set to night scene mode, so that the camera module uses a slower shutter exposure time, a smaller aperture and closes the flashlight at the same time to take a brighter image.

一种可选的实现形式,当确定出当前采集画面中包括的目标主体及目标主体的位置信息之后,对焦处理装置可根据目标主体所属的类型,确定出摄像模组当前对应的目标拍摄模式,从而使得后续可以根据确定的目标拍摄模式进行拍摄。An optional implementation form, after determining the target subject and the position information of the target subject included in the current captured image, the focus processing device can determine the current target shooting mode corresponding to the camera module according to the type of the target subject, Therefore, subsequent shooting can be performed according to the determined target shooting mode.

举例来说,若确定目标主体所属的类型为“动物”,而“动物”通常一般比较好动,即处于运动状态,此时对焦处理装置即可根据“动物”的特性,确定出摄像模组当前对应的目标拍摄模式为:动态模式。For example, if it is determined that the type of the target subject belongs to "animal", and "animal" is usually more active, that is, in a state of motion, then the focus processing device can determine the camera module according to the characteristics of the "animal". The current corresponding target shooting mode is: dynamic mode.

又如,当确定目标主体所属的类型为“风景”,此时对焦处理装置即可根据“风景”,确定出摄像模组当前对应的目标拍摄模式为:风景模式。For another example, when it is determined that the type of the target subject is "landscape", the focusing processing device can determine that the current target shooting mode corresponding to the camera module is: landscape mode according to "landscape".

又如,当确定目标主体所属的类型为“花卉”,此时为了可以拍摄出“花卉”的细节,对焦处理装置即可确定出摄像模组当前对应的目标拍摄模式为:微距模式等等。For another example, when it is determined that the type of the target subject belongs to "flower", in order to capture the details of "flower", the focus processing device can determine that the current target shooting mode corresponding to the camera module is: macro mode, etc. .

步骤103,根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像。Step 103, according to the location information of the target subject, control the camera module to focus on the target subject, and capture an image including the target subject in the target shooting mode.

具体的,当确定出摄像模组当前采集画面中包括的目标主体及目标主体的位置信息,以及对应的目标拍摄模式之后,对焦处理装置可控制摄像模组根据目标主体的位置信息,对目标主体进行对焦操作,并以目标拍摄模式,拍摄包含目标主体的图像。Specifically, after determining the target subject and the position information of the target subject included in the image currently captured by the camera module, and the corresponding target shooting mode, the focus processing device can control the camera module to focus on the target subject according to the position information of the target subject. Perform a focusing operation, and capture an image including the target subject in target shooting mode.

举例来说,若确定的目标主体为“小狗”,且小狗的位置信息为(3,5),那么对焦处理装置可确定目标主体所属的类型为“动物”,相应的,根据“动物”确定出摄像模组对应的拍摄模式为“动态模式”,进而通过控制摄像模组移动,以将焦点调整位置至(3,5)指定的位置处,实现对小狗实现对焦,之后即可以动态模式拍摄包含“小狗”的图像。For example, if the determined target subject is "dog", and the position information of the puppy is (3, 5), then the focusing processing device may determine that the type of the target subject is "animal", and correspondingly, according to "animal "Determine that the shooting mode corresponding to the camera module is "dynamic mode", and then control the movement of the camera module to adjust the focus position to the position specified by (3, 5) to achieve focus on the puppy, and then you can Dynamic mode captures images containing "puppy".

可以理解的是,本实施例中的对焦处理装置通过利用预设的神经网络对摄像模组采集的画面进行主体识别,并确定出目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组对应的拍摄模式,然后通过控制摄像模组移动至目标主体所在位置,以实现对目标主体的自动对焦,并以确定的拍摄模式,拍摄包含目标主体的图像的目的,不仅提高了拍摄画面质量,还能有效解决了传统摄像模组受光照条件的制约,而导致自动对焦效果不佳的问题,有效提高了用户满意度。It can be understood that the focus processing device in this embodiment uses a preset neural network to identify the subject of the picture captured by the camera module, and determines the target subject and the position information of the target subject, and according to the type of the target subject , determine the shooting mode corresponding to the camera module, and then control the camera module to move to the position of the target subject to achieve automatic focus on the target subject, and use the determined shooting mode to capture images containing the target subject, which not only improves It not only improves the quality of shooting pictures, but also effectively solves the problem of poor auto-focus effect caused by traditional camera modules being restricted by lighting conditions, and effectively improves user satisfaction.

本申请提供的对焦处理方法,通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以确定当前采集的画面中包括的目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,然后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像,其中预设的神经网络,为以各类型的拍摄主体为样本训练得到的。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。The focus processing method provided by this application uses a preset neural network to identify the subject of the currently captured picture by the camera module, so as to determine the target subject and the location information of the target subject included in the currently collected picture, and according to the type, determine the target shooting mode currently corresponding to the camera module, and then control the camera module to focus on the target subject according to the position information of the target subject, and capture an image containing the target subject in the target shooting mode, in which the preset nerve The network is obtained by training with various types of subjects as samples. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience.

通过上述分析可知,本申请实施例中,摄像模组在拍照时,可以利用预设的神经网络对当前采集的画面进行主体识别,以确定出当前采集画面中包括的目标主体及目标主体的位置信息,进而根据目标主体的位置信息,控制摄像模组对目标主体进行对焦。From the above analysis, it can be seen that in the embodiment of the present application, when taking pictures, the camera module can use the preset neural network to perform subject recognition on the currently captured picture, so as to determine the target subject and the position of the target subject included in the current captured picture information, and then control the camera module to focus on the target subject according to the position information of the target subject.

在具体实现时,由于利用预设的神经网络,识别的是摄像模组当前采集的画面中包括的所有主体及所有主体的位置信息,而在画面中包括多个主体时,则需要根据预先设定的规则来确定目标主体及目标主体的位置。下面结合图2,对从识别的所有主体中确定目标主体及目标主体的位置信息的过程进行具体描述。In the actual implementation, due to the use of the preset neural network, all the subjects and the position information of all subjects included in the picture currently collected by the camera module are recognized, and when there are multiple subjects in the picture, it is necessary to Defined rules to determine the target subject and the location of the target subject. The process of determining the target subject and the location information of the target subject from all identified subjects will be specifically described below in conjunction with FIG. 2 .

图2是本申请的另一个对焦处理方法的流程图。FIG. 2 is a flow chart of another focus processing method of the present application.

如图2所示,本申请的对焦处理方法可以包括以下步骤:As shown in Figure 2, the focus processing method of the present application may include the following steps:

步骤201,利用预设的神经网络对摄像模组当前采集的画面进行主体识别。Step 201, using a preset neural network to perform subject recognition on the picture currently captured by the camera module.

其中,上述步骤201的具体实现过程及原理,可以参照上述实施例的详细描述,此处不再赘述。Wherein, for the specific implementation process and principle of the above step 201, reference may be made to the detailed description of the above embodiment, which will not be repeated here.

步骤202,确定当前采集的画面中包括的候选主体集,及候选主体集中各候选主体的位置信息。Step 202, determine the candidate subject set included in the currently captured frame, and the position information of each candidate subject in the candidate subject set.

其中,在本实施例中,候选主体集,具体是指当前采集画面中包括的所有主体的集合。Wherein, in this embodiment, the set of candidate subjects specifically refers to a set of all subjects included in the currently captured image.

具体的,当利用预设的神经网络,对摄像模组当前采集的画面进行主体识别之后,对焦处理装置即可将识别的所有主体构成候选主体集。Specifically, after using the preset neural network to perform subject recognition on the picture currently captured by the camera module, the focusing processing device can form all identified subjects into a candidate subject set.

对应的,当利用预设的神经网络,对摄像模组当前采集的画面中包括的所有主体进行识别时,可以同时确定所有主体对应的位置信息。Correspondingly, when using the preset neural network to identify all the subjects included in the picture currently captured by the camera module, the position information corresponding to all the subjects can be determined at the same time.

在本实施例中,当确定出候选主体集和候选主体集中各候选主体的位置信息之后,为了方便后续操作,可将各主体对应的位置信息与主体进行对应存储;或者,还可以将所有主体对应的位置信息分别显示在预览画面中各个主体的旁边。In this embodiment, after determining the candidate subject set and the location information of each candidate subject in the candidate subject set, in order to facilitate subsequent operations, the corresponding location information of each subject can be stored correspondingly with the subject; or, all subjects can also be The corresponding location information is displayed next to each subject in the preview screen.

步骤203,从候选主体集中选取目标主体。Step 203, selecting a target subject from the candidate subject set.

具体实现时,本实施例可通过以下几种方式,实现从候选主体集中选取目标主体,举例说明如下:During specific implementation, this embodiment can implement the selection of the target subject from the candidate subject set in the following ways, as illustrated below:

第一种实现方式:The first implementation method:

根据用户的操作,从候选主体集中选取目标主体;According to the user's operation, select the target subject from the candidate subject set;

其中,用户的操作可以是手动点击,也可以是语音选择等等。Wherein, the user's operation may be a manual click, or a voice selection or the like.

在一种可能的实现形式中,当确定出摄像模组当前采集的画面中包括的候选主体集之后,终端设备的触摸屏上可以将候选主体集中的各个主体进行特殊显示。比如,可以用不同颜色的选择框,将各个主体分别框在各选择框内,此时用户可根据自身需求从多个选择框中选择一个或多个框,之后摄像模组即可将用户选中的选择框中的主体作为目标主体。In a possible implementation form, after the candidate subject set included in the picture currently captured by the camera module is determined, each subject in the candidate subject set can be specially displayed on the touch screen of the terminal device. For example, you can use selection boxes of different colors to frame each subject in each selection box. At this time, the user can select one or more boxes from multiple selection boxes according to his own needs, and then the camera module can select the user The principals in the selection box of are used as the target principals.

举例来说,若终端设备的触摸屏上显示的候选主体集中包括三个候选主体,分别为人物A、人物B及建筑C,那么用户可从上述三个候选主体中选择人物A,作为目标主体;或者,选择人物B作为目标主体。For example, if the set of candidate subjects displayed on the touch screen of the terminal device includes three candidate subjects, namely character A, character B and building C, then the user can select character A from the above three candidate subjects as the target subject; Alternatively, select person B as the target subject.

第二种实现方式:The second implementation method:

根据各候选主体的位置信息与预设的主体位置范围的匹配度,从候选主体集中选取目标主体;Select the target subject from the candidate subject set according to the matching degree between the position information of each candidate subject and the preset subject position range;

其中,预设的主体位置范围,可以是设备默认设置的,也可以是用户自定义设置的,此处不作具体限定。例如,预设的主体位置范围,为最靠近中间位置等等。Wherein, the preset subject position range may be a default setting of the device, or may be a user-defined setting, which is not specifically limited here. For example, the preset subject position range is the closest to the middle position and so on.

可选的,由于本申请中对焦处理装置可以对摄像模组当前采集画面中包括的各候选主体及各候选主体的位置进行确定,因此本实施例可以通过将确定的各候选主体的位置信息与预设的主体位置范围进行匹配,确定当前采集画面对应的目标主体。Optionally, since the focus processing device in this application can determine each candidate subject and the position of each candidate subject included in the currently captured image of the camera module, this embodiment can combine the determined position information of each candidate subject with Match the preset subject position range to determine the target subject corresponding to the current captured image.

例如,若预设的主体位置范围是将最靠近采集画面中间位置的候选主体作为目标主体。那么,在实际使用过程中,若对焦处理装置确定的候选主体集中包括植物D、植物C、动物E,且植物D位于采集画面右下角位置处、植物C位于采集画面的左上角位置处、动物E位于采集画面的中间位置处,此时可以确定出动物E的位置信息与预设的主体位置范围的匹配度最高,那么可选择动物E作为目标主体。For example, if the preset subject position range is to use the candidate subject closest to the middle position of the captured image as the target subject. Then, in actual use, if the candidate subject set determined by the focus processing device includes plant D, plant C, and animal E, and plant D is located at the lower right corner of the captured image, plant C is located at the upper left corner of the captured image, and animal E is located in the middle of the captured image. At this time, it can be determined that the position information of animal E has the highest matching degree with the preset subject position range, so animal E can be selected as the target subject.

或者,预设的主体位置范围,也可以根据用户的拍摄习惯确定。比如,对焦处理装置,可以通过对用户已拍摄的画面进行分析,来确定用户在拍摄时,拍摄主体通常在画面中的位置,进而根据用户拍摄时主体在画面中的位置,确定上述预设的主体位置范围。Alternatively, the preset subject position range may also be determined according to the shooting habits of the user. For example, the focus processing device can determine the position of the subject in the picture when the user is shooting by analyzing the pictures taken by the user, and then determine the above preset position according to the position of the subject in the picture when the user is shooting. Subject location range.

第三种实现方式:The third implementation method:

根据各候选主体所属的类型及用户的拍摄习惯,从各候选主体中选取目标主体。A target subject is selected from each candidate subject according to the type to which each candidate subject belongs and the shooting habit of the user.

其中,候选主体所属类型可以包括多种,比如:人物、植物、动物、建筑等等。Wherein, the types of candidate subjects may include various types, such as: people, plants, animals, buildings and so on.

用户的拍摄习惯,可以是指用户在一段时间内经常拍摄主体的类型,或者,拍照方式等等。其中,一段时间可以是一个月,半年,一年等等,此处不作具体限定。The shooting habits of the user may refer to the types of subjects that the user often shoots in a period of time, or the way of taking pictures, and the like. Wherein, the period of time may be one month, half a year, one year, etc., which is not specifically limited here.

具体的,当确定出候选主体集之后,对焦处理装置即可根据各候选主体所属的类型及用户的拍摄习惯,从各候选主体中选择出目标主体。Specifically, after the set of candidate subjects is determined, the focusing processing device can select a target subject from each candidate subject according to the type of each candidate subject and the shooting habit of the user.

由于每个用户在不同时间段所对应的拍摄习惯可能有所不同,因此在根据各候选主体所属的类型及用户的拍摄习惯,从各候选主体中选择出目标主体之前,需要先对用户的拍摄习惯进行确定。Since the shooting habits of each user may be different in different time periods, before selecting the target subject from the candidate subjects according to the type of each candidate subject and the user’s shooting habits, it is necessary to first analyze the user’s shooting habits. Habits are determined.

具体实现时,对焦处理装置可通过对用户已拍摄的历史画面集进行解析,以确定历史画面集对应的主体信息,其中,主体信息可以包括:各类型主体在历史画面集中的比例;然后根据各类型主体在历史画面集中的比例,确定用户的拍摄习惯。其中,各类型主体在历史画面集中的比例,可以是指各类型主体被拍摄的频率等。During specific implementation, the focusing processing device can analyze the historical picture collections taken by the user to determine the subject information corresponding to the historical picture collections, wherein the subject information can include: the proportions of various types of subjects in the historical picture collections; and then according to each The proportion of type subjects in the historical picture set determines the user's shooting habits. Wherein, the proportions of various types of subjects in the historical picture set may refer to the frequency of shooting of various types of subjects, and the like.

也就是说,通过对用户在过去一段时间拍摄的画面进行解析,以确定用户过去一段时间所拍摄各类型主体在历史画面集中的比例,从而使得对焦处理装置可根据用户历史拍摄的各类型主体在历史画面集中的比例,结合候选主体所属类型,选择出目标主体,从而满足了用户在不同时间段的目标主体选择需求,避免了用户人工操作选择目标主体,节省了操作时间。That is to say, by analyzing the pictures taken by the user in the past period of time, to determine the proportion of various types of subjects photographed by the user in the past period of time in the historical picture collection, so that the focus processing device can be based on the historical pictures of various types of subjects photographed by the user. The proportion of the historical screen concentration, combined with the type of the candidate subject, selects the target subject, thereby meeting the user's target subject selection needs in different time periods, avoiding the user's manual operation to select the target subject, and saving operation time.

例如,若对用户最近一个月的拍摄画面进行解析,确定出用户在最近一个月经常拍摄动物类型的画面,且当前采集的画面中候选主体类型包括:动物、人物,那么对焦处理装置可根据上述用户拍摄习惯“拍摄类型为动物”,从候选主体集中选择类型为动物的主体,作为目标主体。For example, if the user’s pictures taken in the last month are analyzed, and it is determined that the user has often taken pictures of animal types in the last month, and the candidate subject types in the currently collected pictures include: animals and people, then the focus processing device can be based on the above The user's shooting habit is "the shooting type is animal", and the subject whose type is animal is selected from the candidate subject set as the target subject.

进一步的,由于用户的拍摄习惯还可以包括拍摄方式,所述拍摄方式,可以是指用户在一段时间内比较常用的拍摄角度等等。Further, since the user's shooting habit may also include a shooting method, the shooting method may refer to a user's relatively common shooting angle within a period of time, and the like.

因此,本实施例在根据各候选主体所属的类型及用户的拍摄习惯,从各候选主体中选取目标主体时,还可以先对用户的拍摄方式进行确定。然后根据确定的拍摄方式,结合各候选主体所属的类型,从候选主体集中选取目标主体。Therefore, in this embodiment, when selecting a target subject from each candidate subject according to the type to which each candidate subject belongs and the user's shooting habit, the user's shooting method may also be determined first. Then, the target subject is selected from the candidate subject set according to the determined shooting method and in combination with the type to which each candidate subject belongs.

举例说明,若用户最近一个月拍摄画面的拍摄方式,是将处于采集画面下边角位置的候选主体作为目标主体,且最近一个月的拍摄主体类型为人物,那么对焦处理装置则可根据用户拍摄习惯,从采集画面中选择候选主体所属类型为人物,且人物处于采集画面下边角位置的候选主体,作为目标主体。For example, if the shooting method of the user's shooting pictures in the last month is to use the candidate subject at the lower corner of the captured picture as the target subject, and the type of the shooting subject in the last month is a person, then the focus processing device can according to the user's shooting habits , selecting a candidate subject whose type is a person from the capture screen, and whose character is at a lower corner of the capture screen, as the target subject.

可以理解的是,上述几种从候选主体集中选取目标主体的方式,可以是单独实施,也可以是两两结合实施,当然还可以是三者结合实施,本实施例对此不作具体限定。It can be understood that the above methods of selecting a target subject from the candidate subject set can be implemented individually, or in combination of two or two, and of course, can also be implemented in combination of the three, which is not specifically limited in this embodiment.

需要说明的是,上述实现方式仅为对本实施例的示例性说明,不作为本申请的具体限定。It should be noted that the above implementation manner is only an exemplary description of this embodiment, and is not intended as a specific limitation of this application.

步骤204,根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式。Step 204, according to the type of the target subject, determine the target shooting mode currently corresponding to the camera module.

步骤205,根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像。Step 205, according to the location information of the target subject, control the camera module to focus on the target subject, and capture an image including the target subject in the target shooting mode.

在本申请的一个实施例中,为了减轻设备处理器的处理负担,以及提高用户的满意度,本申请还可对用户在一段时间内拍摄的画面进行解析,以确定用户在一段时间内的拍照喜好,比如,最近一个月比较喜欢拍建筑类的主体等。然后根据用户在一段时间的拍照喜好,对预设的神经网络进行精简,以将与用户在一段时间经常拍摄的主体类型不相关的其它类型的主体识别去除,并根据用户在一段时间内的拍摄画面,对剩余的主体类型进行修正。In one embodiment of the present application, in order to reduce the processing burden of the device processor and improve user satisfaction, the present application can also analyze the pictures taken by the user during a period of time to determine the pictures taken by the user within a period of time Preferences, for example, in the past month, I prefer to shoot architectural subjects. Then, according to the user's photo preferences during a period of time, the preset neural network is simplified to identify and remove other types of subjects that are not related to the types of subjects that the user often shoots during a period of time, and according to the user's shooting preferences over a period of time screen, correct the remaining subject types.

具体实现时,对焦处理装置可先获取参考样本集,并对参考样本集中的各样本进行解析,以获取各样本中的拍摄主体,然后利用各样本中的拍摄主体,对预设的神经网络进行修正,生成摄像模组所属用户对应的神经网络。During specific implementation, the focus processing device can first obtain a reference sample set, and analyze each sample in the reference sample set to obtain the subject in each sample, and then use the subject in each sample to perform a neural network pre-set Corrected to generate a neural network corresponding to the user to which the camera module belongs.

在本实施例中,获取参考样本集可通过以下方式实现,举例说明:In this embodiment, obtaining a reference sample set can be achieved in the following ways, for example:

方式一:method one:

对摄像模组所在的终端进行扫描,获取参考样本集;Scan the terminal where the camera module is located to obtain a reference sample set;

也就是说,通过从终端设备本地图片集中获取大量图片,以将上述大量图片作为参考样本集。That is to say, by acquiring a large number of pictures from the local picture collection of the terminal device, the above large number of pictures are used as a reference sample set.

方式二:Method 2:

接收用户输入的参考样本集。A reference sample set input by the user is received.

具体实现时,用户可根据需求通过互联网从服务端实时获取参考样本集。During specific implementation, users can obtain reference sample sets from the server in real time through the Internet according to their needs.

当然除了上述几种获取参考样本集方式之外,还可以通过其它方式获取,本实施例对此不作具体限定。Of course, in addition to the above-mentioned several methods of obtaining the reference sample set, other methods may also be used to obtain the reference sample set, which is not specifically limited in this embodiment.

需要说明的是,在利用样本集中各样本对预设的神经网络进行修正时,可以由预设的神经网络对各样本集中的样本进行解析,来获取各样本中的拍摄主体,进而根据各拍摄主体,对模型进行修剪,即在模型的重新训练过程中完成模型的修剪;或者,对焦处理装置,也可以在获取到样本集后,首先对样本集进行筛选,仅将与用户在一段时间内经常拍摄的主体类型相同的样本,输入预设的神经网络模型,以对神经网络模型进行修正。It should be noted that when using each sample in the sample set to correct the preset neural network, the preset neural network can analyze the samples in each sample set to obtain the subject in each sample, and then according to each shot The main body prunes the model, that is, the pruning of the model is completed during the retraining process of the model; or, after the focus processing device obtains the sample set, it can first filter the sample set, and only connect with the user within a period of time Samples of the same subject type that are often taken are input into the preset neural network model to correct the neural network model.

比如,用户在最近两周内,经常拍摄的主体类型为建筑,那么对焦处理装置,可以从获取的参考样本集中,选取主体类型均为建筑的样本,输入至预设的神经网络模型。或者,也可以将全部的参考样本集均输入至神经网络模型,之后由神经网络模型根据识别到的主体类型及数量等,对模型进行修正。For example, if the subject type that the user has frequently photographed in the last two weeks is a building, then the focus processing device may select a sample whose subject type is a building from the obtained reference sample set, and input it to the preset neural network model. Alternatively, all reference sample sets can also be input into the neural network model, and then the neural network model corrects the model according to the identified subject type and quantity.

本申请实施例的对焦处理方法,通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,并确定当前采集的画面中包括的候选主体集,及候选主体集中各候选主体的位置信息,然后根据预设的规则,从候选主体集中选取目标主体,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,最后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。并且,还可根据用户在一段时间内的拍摄习惯,对预设的神经网络进行修正,以使修正后的神经网络更符合用户需求,从而使得用户可根据修正后的神经网络更快速准确的识别出喜爱的目标主体。The focus processing method of the embodiment of the present application uses the preset neural network to perform subject recognition on the picture currently captured by the camera module, and determines the set of candidate subjects included in the currently captured picture, and the position of each candidate subject in the set of candidate subjects information, and then according to the preset rules, select the target subject from the candidate subject set, and determine the current target shooting mode corresponding to the camera module according to the type of the target subject, and finally control the camera module according to the position information of the target subject. The subject is focused, and in the target shooting mode, an image including the target subject is captured. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience. In addition, according to the user's shooting habits over a period of time, the preset neural network can be corrected to make the corrected neural network more in line with the user's needs, so that the user can more quickly and accurately identify images based on the corrected neural network. out the favorite target subjects.

为了实现上述实施例,本申请还提出了一种对焦处理装置。In order to realize the above embodiments, the present application also proposes a focusing processing device.

图3是本申请一个实施例的对焦处理装置的结构示意图。Fig. 3 is a schematic structural diagram of a focusing processing device according to an embodiment of the present application.

如图3所示,本申请的对焦处理装置包括:第一确定模块11、第二确定模块12以及控制模块13。As shown in FIG. 3 , the focus processing device of the present application includes: a first determination module 11 , a second determination module 12 and a control module 13 .

其中,第一确定模块11用于利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定所述当前采集的画面中包括的目标主体及所述目标主体的位置信息;Wherein, the first determining module 11 is configured to use a preset neural network to perform subject identification on the picture currently collected by the camera module, and determine the target subject included in the currently collected picture and the position information of the target subject;

所述预设的神经网络,为以各类型的拍摄主体为样本训练得到的。The preset neural network is obtained through training with various types of shooting subjects as samples.

第二确定模块12用于根据所述目标主体所属的类型,确定所述摄像模组当前对应的目标拍摄模式;The second determination module 12 is used to determine the target shooting mode currently corresponding to the camera module according to the type of the target subject;

控制模块13用于根据所述目标主体的位置信息,控制所述摄像模组对所述目标主体进行对焦,并以所述目标拍摄模式,拍摄包含所述目标主体的图像。The control module 13 is configured to control the camera module to focus on the target subject according to the position information of the target subject, and capture an image including the target subject in the target shooting mode.

在本申请的一个实施例中,所述第一确定模块11包括:确定子单元111和选取子单元112。In an embodiment of the present application, the first determination module 11 includes: a determination subunit 111 and a selection subunit 112 .

其中,确定子单元111用于确定所述当前采集的画面中包括的候选主体集,及所述候选主体集中各候选主体的位置信息;Wherein, the determining subunit 111 is configured to determine the set of candidate subjects included in the currently collected picture, and the position information of each candidate subject in the set of candidate subjects;

选取子单元112用于从所述候选主体集中选取目标主体。The selection subunit 112 is used for selecting a target subject from the candidate subject set.

需要说明的是,前述对对焦处理方法实施例的解释说明也适用于该实施例的对焦处理装置,其实现原理类似,此处不再赘述。It should be noted that the foregoing explanations of the embodiment of the focus processing method are also applicable to the focus processing device of this embodiment, and its implementation principles are similar, so details are not repeated here.

本实施例提供的对焦处理装置,通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以确定当前采集的画面中包括的目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,然后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像,其中预设的神经网络,为以各类型的拍摄主体为样本训练得到的。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。The focus processing device provided in this embodiment uses a preset neural network to perform subject recognition on the picture currently captured by the camera module, so as to determine the target subject and the position information of the target subject included in the currently captured picture, and according to the target subject The type to which the camera module belongs determines the target shooting mode currently corresponding to the camera module, and then controls the camera module to focus on the target subject according to the position information of the target subject, and shoots an image containing the target subject in the target shooting mode, wherein the preset The neural network is trained by taking various types of shooting subjects as samples. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience.

为了实现上述实施例,本申请还提出一种终端设备。In order to implement the foregoing embodiments, the present application further proposes a terminal device.

图4是本申请一个实施例的终端设备的结构示意图。Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.

参见图4,本申请实施例以终端设备为手机为例进行说明显示,本申请终端设备100包括:存储器21、处理器22、摄像模组23及触摸屏24;Referring to FIG. 4 , the embodiment of the present application takes a mobile phone as an example for illustration and display. The terminal device 100 of the present application includes: a memory 21 , a processor 22 , a camera module 23 and a touch screen 24 ;

所述摄像模组23用于采集拍摄画面;The camera module 23 is used to collect the shooting picture;

所述触摸屏24用于显示当前采集画面及接收用户操作;The touch screen 24 is used to display the current acquisition picture and receive user operations;

所述存储器21用于存储可执行程序代码;The memory 21 is used to store executable program codes;

所述处理器22用于读取所述存储器21中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于实现第一方面实施例所述的对焦处理方法。The processor 22 is configured to read the executable program code stored in the memory 21 to run a program corresponding to the executable program code, so as to realize the focus processing method described in the embodiment of the first aspect.

在一种可选的实现形式中,如图5所示,该计算机设备200还可以包括:存储器210及处理器220,连接不同组件(包括存储器210和处理器220)的总线230,存储器210存储有计算机程序,当处理器220执行所述程序时实现本发明实施例所述的对焦处理方法。In an optional implementation form, as shown in FIG. 5 , the computer device 200 may further include: a memory 210 and a processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), and the memory 210 stores There is a computer program, and when the processor 220 executes the program, the focus processing method described in the embodiment of the present invention is realized.

总线230表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. These architectures include, by way of example, but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.

计算机设备200典型地包括多种计算机设备可读介质。这些介质可以是任何能够被计算机设备200访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Computer device 200 typically includes a variety of computer device readable media. These media can be any available media that can be accessed by computer device 200 and include both volatile and nonvolatile media, removable and non-removable media.

存储器210还可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)240和/或高速缓存存储器250。计算机设备200可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统260可以用于读写不可移动的、非易失性磁介质(图5未显示,通常称为“硬盘驱动器”)。尽管图5中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线230相连。存储器210可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。Memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and/or cache memory 250 . The computer device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a disk drive for reading and writing to removable nonvolatile disks (e.g., "floppy disks") may be provided, as well as for removable nonvolatile optical disks (e.g., CD-ROM, DVD-ROM or other optical media) CD-ROM drive. In these cases, each drive may be connected to bus 230 through one or more data media interfaces. Memory 210 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present invention.

具有一组(至少一个)程序模块270的程序/实用工具280,可以存储在例如存储器210中,这样的程序模块270包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块270通常执行本发明所描述的实施例中的功能和/或方法。Program/utility 280 having a set (at least one) of program modules 270, such as may be stored in memory 210, such program modules 270 including - but not limited to - an operating system, one or more application programs, other program Modules and program data, each or some combination of these examples may include the implementation of the network environment. The program modules 270 generally perform the functions and/or methods of the described embodiments of the invention.

计算机设备200也可以与一个或多个外部设备290(例如键盘、指向设备、显示器291等)通信,还可与一个或者多个使得用户能与该计算机设备200交互的设备通信,和/或与使得该计算机设备200能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口292进行。并且,计算机设备200还可以通过网络适配器293与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器293通过总线230与计算机设备200的其它模块通信。应当明白,尽管图中未示出,可以结合计算机设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computer device 200 may also communicate with one or more external devices 290 (e.g., a keyboard, pointing device, display 291, etc.), and may also communicate with one or more devices that enable a user to interact with the computer device 200, and/or communicate with Any device (eg, network card, modem, etc.) that enables the computing device 200 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 292 . Also, the computer device 200 can also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN) and/or a public network, such as the Internet) through the network adapter 293 . As shown, network adapter 293 communicates with other modules of computer device 200 via bus 230 . It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with computer device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.

处理器220通过运行存储在存储器210中的程序,从而执行各种功能应用以及数据处理。The processor 220 executes various functional applications and data processing by executing programs stored in the memory 210 .

需要说明的是,前述对对焦处理方法实施例的解释说明也适用于该实施例的终端设备,其实现原理类似,此处不再赘述。It should be noted that the foregoing explanations of the embodiment of the focus processing method are also applicable to the terminal device of this embodiment, and the implementation principles thereof are similar, and details are not repeated here.

本实施例提供的终端设备,通过利用预设的神经网络对摄像模组当前采集的画面进行主体识别,以确定当前采集的画面中包括的目标主体及目标主体的位置信息,并根据目标主体所属的类型,确定摄像模组当前对应的目标拍摄模式,然后根据目标主体的位置信息,控制摄像模组对目标主体进行对焦,并以目标拍摄模式,拍摄包含目标主体的图像,其中预设的神经网络,为以各类型的拍摄主体为样本训练得到的。由此,实现了通过利用神经网络识别采集的画面中的目标主体,并根据目标主体的位置,对目标主体进行自动对焦,不仅提高了拍摄画面的质量,有效避免了拍摄画面模糊不清的现象,并且还能减少人工操作,方便了用户使用,提高了用户体验。The terminal device provided in this embodiment uses a preset neural network to perform subject recognition on the picture currently collected by the camera module, so as to determine the target subject and the location information of the target subject included in the currently collected picture, and according to the type, determine the target shooting mode currently corresponding to the camera module, and then control the camera module to focus on the target subject according to the position information of the target subject, and capture an image containing the target subject in the target shooting mode, in which the preset nerve The network is obtained by training with various types of subjects as samples. As a result, the neural network is used to identify the target subject in the captured picture, and according to the position of the target subject, the target subject is automatically focused, which not only improves the quality of the shooting picture, but also effectively avoids the blurred phenomenon of the shooting picture , and can also reduce manual operations, which is convenient for users and improves user experience.

为了实现上述实施例,本申请还提出了一种计算机可读存储介质。In order to implement the above embodiments, the present application also proposes a computer-readable storage medium.

该计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第一方面实施例的对焦处理方法。The computer-readable storage medium stores a computer program thereon, and when the program is executed by a processor, the focus processing method of the embodiment of the first aspect is implemented.

一种可选实现形式中,本实施例可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。In an optional implementation form, this embodiment may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including - but not limited to - wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present invention may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural programming language—such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).

在本申请中,除非另有明确的规定和限定,术语“设置”、“连接”等术语应做广义理解,例如,可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系,除非另有明确的限定。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。In this application, unless otherwise clearly specified and limited, the terms "arrangement", "connection" and other terms should be understood in a broad sense, for example, it can be mechanical connection or electrical connection; it can be direct connection or through An indirect connection through an intermediary may be an internal communication between two elements or an interaction relationship between two elements, unless otherwise clearly defined. Those of ordinary skill in the art can understand the specific meanings of the above terms in this application according to specific situations.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present application.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features.

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

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

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

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on the present application, and those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (10)

1.一种对焦处理方法,其特征在于,包括:1. A focus processing method, characterized in that, comprising: 利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定所述当前采集的画面中包括的目标主体及所述目标主体的位置信息;Using the preset neural network to perform subject recognition on the picture currently collected by the camera module, and determine the target subject included in the currently collected picture and the position information of the target subject; 根据所述目标主体所属的类型,确定所述摄像模组当前对应的目标拍摄模式;Determine the target shooting mode currently corresponding to the camera module according to the type of the target subject; 根据所述目标主体的位置信息,控制所述摄像模组对所述目标主体进行对焦,并以所述目标拍摄模式,拍摄包含所述目标主体的图像;controlling the camera module to focus on the target subject according to the position information of the target subject, and capturing an image including the target subject in the target shooting mode; 其中,所述预设的神经网络,为以各类型的拍摄主体为样本训练得到的。Wherein, the preset neural network is obtained through training with various types of shooting subjects as samples. 2.如权利要求1所述的方法,其特征在于,所述确定所述当前采集的画面中包括的目标主体,包括:2. The method according to claim 1, wherein the determining the target subject included in the currently captured picture comprises: 确定所述当前采集的画面中包括的候选主体集,及所述候选主体集中各候选主体的位置信息;determining a set of candidate subjects included in the currently collected picture, and position information of each candidate subject in the set of candidate subjects; 从所述候选主体集中选取目标主体。A target subject is selected from the candidate subject set. 3.如权利要求1所述的方法,其特征在于,所述从所述候选主体集中选取目标主体,包括:3. The method according to claim 1, wherein said selecting a target subject from said candidate subject set comprises: 根据用户的操作,从所述候选主体集中选取目标主体;selecting a target subject from the candidate subject set according to the user's operation; 和/或,and / or, 根据所述各候选主体的位置信息与预设的主体位置范围的匹配度,从所述候选主体集中选取目标主体;selecting a target subject from the set of candidate subjects according to the matching degree between the position information of each candidate subject and the preset subject position range; 和/或,and / or, 根据所述各候选主体所属的类型及所述用户的拍摄习惯,从所述各候选主体中选取目标主体。A target subject is selected from the candidate subjects according to the type to which the candidate subjects belong and the shooting habit of the user. 4.如权利要求3所述的方法,其特征在于,所述根据所述各候选主体所属的类型及所述用户的拍摄习惯,从所述各候选主体中选取目标主体之前,还包括:4. The method according to claim 3, wherein, before selecting the target subject from the candidate subjects according to the type of the candidate subjects and the shooting habits of the user, further comprising: 对所述用户已拍摄的历史画面集进行解析,确定所述历史画面集对应的主体信息,所述主体信息,包括各类型主体在所述历史画面集中的比例;Analyzing the set of historical pictures taken by the user, and determining subject information corresponding to the set of historical pictures, the subject information includes the proportion of various types of subjects in the set of historical pictures; 根据所述各类型主体在所述历史画面集中的比例,确定所述用户的拍摄习惯。According to the proportions of the subjects of various types in the set of historical pictures, the photographing habit of the user is determined. 5.如权利要求1所述的方法,其特征在于,所述方法,还包括:5. The method of claim 1, wherein the method further comprises: 获取参考样本集;Obtain a reference sample set; 对所述参考样本集中的各样本进行解析,获取各样本中的拍摄主体;Analyzing each sample in the reference sample set to obtain the subject in each sample; 利用所述各样本中的拍摄主体,对所述预设的神经网络进行修正,生成所述摄像模组所属用户对应的神经网络。Using the shooting subjects in the samples, the preset neural network is corrected to generate a neural network corresponding to the user to which the camera module belongs. 6.如权利要求5所述的方法,其特征在于,所述获取参考样本集,包括:6. The method according to claim 5, wherein said obtaining a reference sample set comprises: 对所述摄像模组所在的终端进行扫描,获取参考样本集;Scanning the terminal where the camera module is located to obtain a reference sample set; 或者,or, 接收所述用户输入的参考样本集。A reference sample set input by the user is received. 7.一种对焦处理装置,其特征在于,包括:7. A focus processing device, comprising: 第一确定模块,用于利用预设的神经网络对摄像模组当前采集的画面进行主体识别,确定所述当前采集的画面中包括的目标主体及所述目标主体的位置信息;The first determination module is configured to use a preset neural network to perform subject identification on the picture currently collected by the camera module, and determine the target subject included in the currently collected picture and the position information of the target subject; 第二确定模块,用于根据所述目标主体所属的类型,确定所述摄像模组当前对应的目标拍摄模式;The second determination module is used to determine the target shooting mode currently corresponding to the camera module according to the type of the target subject; 控制模块,用于根据所述目标主体的位置信息,控制所述摄像模组对所述目标主体进行对焦,并以所述目标拍摄模式,拍摄包含所述目标主体的图像;A control module, configured to control the camera module to focus on the target subject according to the position information of the target subject, and capture an image containing the target subject in the target shooting mode; 其中,所述预设的神经网络,为以各类型的拍摄主体为样本训练得到的。Wherein, the preset neural network is obtained through training with various types of shooting subjects as samples. 8.如权利要求7所述的装置,其特征在于,所述第一确定模块,包括:8. The device according to claim 7, wherein the first determining module comprises: 确定子单元,用于确定所述当前采集的画面中包括的候选主体集,及所述候选主体集中各候选主体的位置信息;A determining subunit, configured to determine a set of candidate subjects included in the currently captured picture, and position information of each candidate subject in the set of candidate subjects; 选取子单元,用于从所述候选主体集中选取目标主体。The selection subunit is used to select a target subject from the candidate subject set. 9.一种终端设备,其特征在于,包括:存储器、处理器、摄像模组及触摸屏;9. A terminal device, characterized in that it comprises: a memory, a processor, a camera module and a touch screen; 所述摄像模组,用于采集拍摄画面;The camera module is used to collect and shoot pictures; 所述触摸屏,用于显示当前采集画面及接收用户操作;The touch screen is used to display the current acquisition screen and receive user operations; 所述存储器,用于存储可执行程序代码;The memory is used to store executable program codes; 所述处理器,用于读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于实现如权利要求1-6任一所述的对焦处理方法。The processor is configured to read the executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the focus processing method according to any one of claims 1-6 . 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时,以实现如权利要求1-6任一所述的对焦处理方法。10. A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the focus processing method according to any one of claims 1-6 is implemented.
CN201810473587.6A 2018-05-17 2018-05-17 Focusing processing method, device, equipment and storage medium Pending CN108712609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810473587.6A CN108712609A (en) 2018-05-17 2018-05-17 Focusing processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810473587.6A CN108712609A (en) 2018-05-17 2018-05-17 Focusing processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108712609A true CN108712609A (en) 2018-10-26

Family

ID=63869105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810473587.6A Pending CN108712609A (en) 2018-05-17 2018-05-17 Focusing processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108712609A (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109803090A (en) * 2019-01-25 2019-05-24 睿魔智能科技(深圳)有限公司 Unmanned shooting automatic zooming method and system, unmanned cameras and storage medium
CN110248097A (en) * 2019-06-28 2019-09-17 Oppo广东移动通信有限公司 Focus tracking method and device, terminal equipment and computer readable storage medium
CN110378934A (en) * 2019-07-22 2019-10-25 Oppo广东移动通信有限公司 Subject detection method, apparatus, electronic device, and computer-readable storage medium
CN110392211A (en) * 2019-07-22 2019-10-29 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN110460773A (en) * 2019-08-16 2019-11-15 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device, computer-readable storage medium
CN110545376A (en) * 2019-08-29 2019-12-06 上海商汤智能科技有限公司 Communication method and apparatus, electronic device, and storage medium
CN111083364A (en) * 2019-12-18 2020-04-28 华为技术有限公司 A control method, electronic device, computer-readable storage medium, and chip
CN111368698A (en) * 2020-02-28 2020-07-03 Oppo广东移动通信有限公司 Subject recognition method, subject recognition device, electronic device, and medium
CN112019738A (en) * 2020-07-31 2020-12-01 广东小天才科技有限公司 A photographing method and terminal device
CN112312005A (en) * 2020-02-12 2021-02-02 北京字节跳动网络技术有限公司 Image acquisition method and device
CN112565586A (en) * 2019-09-26 2021-03-26 北京安云世纪科技有限公司 Automatic focusing method and device
CN113221713A (en) * 2021-05-06 2021-08-06 新疆爱华盈通信息技术有限公司 Intelligent rotation method and device of multimedia playing equipment and computer equipment
CN113302907A (en) * 2020-08-24 2021-08-24 深圳市大疆创新科技有限公司 Photographing method, photographing device, photographing apparatus, and computer-readable storage medium
CN114143594A (en) * 2021-12-06 2022-03-04 百度在线网络技术(北京)有限公司 Video picture processing method, device and equipment and readable storage medium
WO2022231869A1 (en) * 2021-04-30 2022-11-03 Apple Inc. User interfaces for altering visual media
CN115474002A (en) * 2021-04-30 2022-12-13 苹果公司 User interface for altering visual media
US11539876B2 (en) 2021-04-30 2022-12-27 Apple Inc. User interfaces for altering visual media
US11617022B2 (en) 2020-06-01 2023-03-28 Apple Inc. User interfaces for managing media
US11641517B2 (en) 2016-06-12 2023-05-02 Apple Inc. User interface for camera effects
US11669985B2 (en) 2018-09-28 2023-06-06 Apple Inc. Displaying and editing images with depth information
US11687224B2 (en) 2017-06-04 2023-06-27 Apple Inc. User interface camera effects
US11706521B2 (en) 2019-05-06 2023-07-18 Apple Inc. User interfaces for capturing and managing visual media
US11722764B2 (en) 2018-05-07 2023-08-08 Apple Inc. Creative camera
US11770601B2 (en) 2019-05-06 2023-09-26 Apple Inc. User interfaces for capturing and managing visual media
US11778339B2 (en) 2021-04-30 2023-10-03 Apple Inc. User interfaces for altering visual media
US11895391B2 (en) 2018-09-28 2024-02-06 Apple Inc. Capturing and displaying images with multiple focal planes
US12112024B2 (en) 2021-06-01 2024-10-08 Apple Inc. User interfaces for managing media styles
US12155925B2 (en) 2020-09-25 2024-11-26 Apple Inc. User interfaces for media capture and management
US12301979B2 (en) 2021-01-31 2025-05-13 Apple Inc. User interfaces for wide angle video conference

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013135459A (en) * 2011-12-27 2013-07-08 Canon Marketing Japan Inc Imaging apparatus and control method and program thereof
CN105007426A (en) * 2015-07-27 2015-10-28 厦门美图之家科技有限公司 Focusing method and focusing system based on face recognition
CN105549300A (en) * 2016-02-29 2016-05-04 北京小米移动软件有限公司 Automatic focusing method and device
CN105791674A (en) * 2016-02-05 2016-07-20 联想(北京)有限公司 Electronic device and focusing method
US20170064191A1 (en) * 2015-08-31 2017-03-02 Canon Kabushiki Kaisha Calculation device and image pickup device using calculation device and calculation method
CN107959795A (en) * 2017-11-30 2018-04-24 努比亚技术有限公司 A kind of information collecting method, equipment and computer-readable recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013135459A (en) * 2011-12-27 2013-07-08 Canon Marketing Japan Inc Imaging apparatus and control method and program thereof
CN105007426A (en) * 2015-07-27 2015-10-28 厦门美图之家科技有限公司 Focusing method and focusing system based on face recognition
US20170064191A1 (en) * 2015-08-31 2017-03-02 Canon Kabushiki Kaisha Calculation device and image pickup device using calculation device and calculation method
CN105791674A (en) * 2016-02-05 2016-07-20 联想(北京)有限公司 Electronic device and focusing method
CN105549300A (en) * 2016-02-29 2016-05-04 北京小米移动软件有限公司 Automatic focusing method and device
CN107959795A (en) * 2017-11-30 2018-04-24 努比亚技术有限公司 A kind of information collecting method, equipment and computer-readable recording medium

Cited By (47)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11641517B2 (en) 2016-06-12 2023-05-02 Apple Inc. User interface for camera effects
US11962889B2 (en) 2016-06-12 2024-04-16 Apple Inc. User interface for camera effects
US12132981B2 (en) 2016-06-12 2024-10-29 Apple Inc. User interface for camera effects
US12314553B2 (en) 2017-06-04 2025-05-27 Apple Inc. User interface camera effects
US11687224B2 (en) 2017-06-04 2023-06-27 Apple Inc. User interface camera effects
US11722764B2 (en) 2018-05-07 2023-08-08 Apple Inc. Creative camera
US12170834B2 (en) 2018-05-07 2024-12-17 Apple Inc. Creative camera
US11895391B2 (en) 2018-09-28 2024-02-06 Apple Inc. Capturing and displaying images with multiple focal planes
US11669985B2 (en) 2018-09-28 2023-06-06 Apple Inc. Displaying and editing images with depth information
CN109803090A (en) * 2019-01-25 2019-05-24 睿魔智能科技(深圳)有限公司 Unmanned shooting automatic zooming method and system, unmanned cameras and storage medium
US12192617B2 (en) 2019-05-06 2025-01-07 Apple Inc. User interfaces for capturing and managing visual media
US11770601B2 (en) 2019-05-06 2023-09-26 Apple Inc. User interfaces for capturing and managing visual media
US11706521B2 (en) 2019-05-06 2023-07-18 Apple Inc. User interfaces for capturing and managing visual media
WO2020259474A1 (en) * 2019-06-28 2020-12-30 Oppo广东移动通信有限公司 Focus tracking method and apparatus, terminal device, and computer-readable storage medium
CN110248097A (en) * 2019-06-28 2019-09-17 Oppo广东移动通信有限公司 Focus tracking method and device, terminal equipment and computer readable storage medium
CN110378934B (en) * 2019-07-22 2021-09-07 Oppo广东移动通信有限公司 Subject detection method, apparatus, electronic device, and computer-readable storage medium
CN110392211B (en) * 2019-07-22 2021-04-23 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device, computer-readable storage medium
CN110392211A (en) * 2019-07-22 2019-10-29 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN110378934A (en) * 2019-07-22 2019-10-25 Oppo广东移动通信有限公司 Subject detection method, apparatus, electronic device, and computer-readable storage medium
CN110460773A (en) * 2019-08-16 2019-11-15 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device, computer-readable storage medium
CN110460773B (en) * 2019-08-16 2021-05-11 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
TWI737460B (en) * 2019-08-29 2021-08-21 大陸商上海商湯智能科技有限公司 Communication method, electronic device and storage medium
CN110545376A (en) * 2019-08-29 2019-12-06 上海商汤智能科技有限公司 Communication method and apparatus, electronic device, and storage medium
CN110545376B (en) * 2019-08-29 2021-06-25 上海商汤智能科技有限公司 Communication method and apparatus, electronic device, and storage medium
CN112565586A (en) * 2019-09-26 2021-03-26 北京安云世纪科技有限公司 Automatic focusing method and device
CN111083364A (en) * 2019-12-18 2020-04-28 华为技术有限公司 A control method, electronic device, computer-readable storage medium, and chip
US11991441B2 (en) 2019-12-18 2024-05-21 Honor Device Co., Ltd. Control method, electronic device, computer-readable storage medium, and chip
CN112312005A (en) * 2020-02-12 2021-02-02 北京字节跳动网络技术有限公司 Image acquisition method and device
CN111368698B (en) * 2020-02-28 2024-01-12 Oppo广东移动通信有限公司 Subject identification methods, devices, electronic equipment and media
CN111368698A (en) * 2020-02-28 2020-07-03 Oppo广东移动通信有限公司 Subject recognition method, subject recognition device, electronic device, and medium
US11617022B2 (en) 2020-06-01 2023-03-28 Apple Inc. User interfaces for managing media
US12081862B2 (en) 2020-06-01 2024-09-03 Apple Inc. User interfaces for managing media
CN112019738B (en) * 2020-07-31 2022-03-01 广东小天才科技有限公司 Photographing method and terminal equipment
CN112019738A (en) * 2020-07-31 2020-12-01 广东小天才科技有限公司 A photographing method and terminal device
CN113302907B (en) * 2020-08-24 2023-10-10 深圳市大疆创新科技有限公司 Shooting method, shooting device, shooting equipment and computer readable storage medium
CN113302907A (en) * 2020-08-24 2021-08-24 深圳市大疆创新科技有限公司 Photographing method, photographing device, photographing apparatus, and computer-readable storage medium
US12155925B2 (en) 2020-09-25 2024-11-26 Apple Inc. User interfaces for media capture and management
US12301979B2 (en) 2021-01-31 2025-05-13 Apple Inc. User interfaces for wide angle video conference
US12101567B2 (en) 2021-04-30 2024-09-24 Apple Inc. User interfaces for altering visual media
WO2022231869A1 (en) * 2021-04-30 2022-11-03 Apple Inc. User interfaces for altering visual media
CN115474002A (en) * 2021-04-30 2022-12-13 苹果公司 User interface for altering visual media
US11778339B2 (en) 2021-04-30 2023-10-03 Apple Inc. User interfaces for altering visual media
US11539876B2 (en) 2021-04-30 2022-12-27 Apple Inc. User interfaces for altering visual media
CN113221713A (en) * 2021-05-06 2021-08-06 新疆爱华盈通信息技术有限公司 Intelligent rotation method and device of multimedia playing equipment and computer equipment
US12112024B2 (en) 2021-06-01 2024-10-08 Apple Inc. User interfaces for managing media styles
CN114143594A (en) * 2021-12-06 2022-03-04 百度在线网络技术(北京)有限公司 Video picture processing method, device and equipment and readable storage medium
CN114143594B (en) * 2021-12-06 2024-12-31 百度在线网络技术(北京)有限公司 Video image processing method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN108712609A (en) Focusing processing method, device, equipment and storage medium
US11995530B2 (en) Systems and methods for providing feedback for artificial intelligence-based image capture devices
CN108933899B (en) Panorama shooting method, device, terminal and computer readable storage medium
WO2022028184A1 (en) Photography control method and apparatus, electronic device, and storage medium
WO2020057198A1 (en) Image processing method and device, electronic device and storage medium
CN106375674B (en) Method and apparatus for finding and using video portions associated with adjacent still images
CN109005366A (en) Camera module night scene image pickup processing method, device, electronic equipment and storage medium
WO2020038087A1 (en) Method and apparatus for photographic control in super night scene mode and electronic device
US9195880B1 (en) Interactive viewer for image stacks
CN108419023A (en) A method for generating high dynamic range images and related equipment
CN109495686B (en) Shooting method and equipment
WO2017096857A1 (en) Method and device for adjusting photographing parameter of camera
WO2021169686A1 (en) Photo capture control method and apparatus and computer readable storage medium
WO2019214574A1 (en) Image capturing method and apparatus, and electronic terminal
CN103155533A (en) Camera system and method for taking photographs that correspond to user preferences
CN109618102B (en) Focusing processing method, device, electronic device and storage medium
US10769416B2 (en) Image processing method, electronic device and storage medium
CN118803356A (en) Method and electronic device for enhancing video quality
WO2019084756A1 (en) Image processing method and device, and aerial vehicle
CN112258380A (en) Image processing method, device, device and storage medium
CN104994288B (en) A kind of photographic method and user terminal
CN113347352B (en) Shooting parameter adjusting method and device, electronic equipment and computer storage medium
WO2023236209A1 (en) Image processing method and apparatus, electronic device, and storage medium
JP2023078061A (en) Imaging exposure control method and apparatus, device and storage medium
US10887525B2 (en) Delivery of notifications for feedback over visual quality of images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181026

RJ01 Rejection of invention patent application after publication