[go: up one dir, main page]

CN110677592A - Subject focusing method and device, computer equipment and storage medium - Google Patents

Subject focusing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110677592A
CN110677592A CN201911054454.6A CN201911054454A CN110677592A CN 110677592 A CN110677592 A CN 110677592A CN 201911054454 A CN201911054454 A CN 201911054454A CN 110677592 A CN110677592 A CN 110677592A
Authority
CN
China
Prior art keywords
subject
view
posture
focusing
degree
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.)
Granted
Application number
CN201911054454.6A
Other languages
Chinese (zh)
Other versions
CN110677592B (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 CN201911054454.6A priority Critical patent/CN110677592B/en
Publication of CN110677592A publication Critical patent/CN110677592A/en
Application granted granted Critical
Publication of CN110677592B publication Critical patent/CN110677592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/67Focus control based on electronic image sensor signals
    • 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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a main body focusing method, a main body focusing device, computer equipment and a storage medium, wherein attitude information of each main body is acquired from a focusing visual field, special attitude identification or motion degree identification made by each main body can be estimated through the attitude information of the main body, and a target main body is determined based on a preset screening rule, so that the target main body can be effectively focused when a picture is taken or a video is recorded, the method can be used for automatically focusing on a person of the target main body instead of manually focusing, the focusing flexibility and accuracy are improved, and the use experience is improved. In addition, the method can improve the capture of the posture and the motion of the main body by the focusing function of the camera, so that the focusing can understand the behavior of people more intelligently, and the use interestingness is improved.

Description

主体对焦方法、装置、计算机设备和存储介质Subject focusing method, apparatus, computer equipment and storage medium

技术领域technical field

本申请涉及图像处理技术领域,特别是涉及一种主体对焦方法、装置、计算机设备和存储介质。The present application relates to the technical field of image processing, and in particular, to a subject focusing method, apparatus, computer equipment and storage medium.

背景技术Background technique

随着智能手机的普及,通过手机进行拍照和视频录像已经成为常态。With the popularity of smartphones, taking photos and video recordings through mobile phones has become the norm.

当前手机拍照和视频录像的对焦方法包括:通过用户手动touch屏幕进行对焦和按照默认的画面中心区域进行对焦。现有手机拍照和视频录像的对焦功能存在灵活性较差、且对焦不准确的问题。The current focusing methods for taking pictures and video recordings of mobile phones include: focusing by manually touching the screen by the user and focusing according to the default center area of the screen. The focusing functions of existing mobile phones for taking pictures and video recordings have the problems of poor flexibility and inaccurate focusing.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述技术问题,提供一种主体对焦方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a subject focusing method, device, computer device and storage medium in response to the above technical problems.

第一方面,本申请实施例提供一种主体对焦方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for focusing a subject, the method comprising:

获取对焦视野中主体的主体姿态信息;Obtain the subject posture information of the subject in the focused field of view;

根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则;According to the subject posture information and the preset screening rules, the target subject is determined from the focused field of view; the screening rules are rules determined according to the gesture action and/or the degree of movement;

对目标主体进行追焦。Focus on the target subject.

在其中一个实施例中,上述筛选规则包括姿态动作规则和/或运动程度规则;In one of the embodiments, the above-mentioned screening rules include gesture action rules and/or motion degree rules;

姿态动作规则用于指示各姿态动作的优先级;Gesture action rules are used to indicate the priority of each gesture action;

运动程度规则用于指示各运动程度的优先级。The motion level rules are used to indicate the priority of each motion level.

在其中一个实施例中,上述根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体,包括:In one embodiment, the above-mentioned determination of the target subject from the focused field of view according to the subject posture information and the preset screening rules includes:

根据主体姿态信息,确定对焦视野中各主体的姿态动作;According to the subject posture information, determine the posture action of each subject in the focused field of view;

根据姿态动作规则,将各姿态动作中优先级最高的主体确定为目标主体。According to the gesture action rules, the subject with the highest priority in each gesture action is determined as the target subject.

在其中一个实施例中,上述根据主体姿态信息,确定对焦视野中各主体的姿态动作,包括:In one embodiment, the above-mentioned determination of the posture actions of each subject in the focused field of view according to the subject posture information includes:

根据主体姿态信息,获取各主体肢体之间的角度;According to the subject's posture information, the angle between each subject's limbs is obtained;

从预设的姿态动作信息表中,确定各主体肢体对应的姿态动作;姿态动作信息表中包括多个主体肢体之间的角度与姿态动作的对应关系。From the preset posture action information table, the posture action corresponding to each main body limb is determined; the posture action information table includes the correspondence between the angles between the plurality of main body limbs and the posture action.

在其中一个实施例中,上述根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体,包括:In one embodiment, the above-mentioned determination of the target subject from the focused field of view according to the subject posture information and the preset screening rules includes:

根据主体姿态信息,获取连续N帧内对焦视野中各主体的运动程度;According to the subject posture information, obtain the movement degree of each subject in the focus field of view in consecutive N frames;

根据运动程度规则,将各运动程度中优先级最高的主体确定为目标主体。According to the motion degree rules, the subject with the highest priority in each motion degree is determined as the target subject.

在其中一个实施例中,上述根据主体姿态信息,获取连续N帧内对焦视野中各主体的运动程度,包括:In one of the embodiments, the above-mentioned acquisition of the motion degree of each subject in the focused field of view in consecutive N frames according to the subject posture information includes:

根据主体姿态信息,获取连续N帧内各主体肢体关键点的角度变化量;According to the subject's posture information, obtain the angle change of each subject's limb key points in consecutive N frames;

从预设的运动程度信息表中,确定各主体肢体关键点的角度变化量对应的运动程度;运动程度信息表中包括多个主体肢体关键点的角度变化量与运动程度的对应关系。From the preset motion degree information table, determine the motion degree corresponding to the angle change of each subject's limb key point; the motion degree information table includes the corresponding relationship between the angle change of the main body's limb key point and the motion degree.

在其中一个实施例中,该方法包括:若对焦视野中不存在目标主体,或者,目标主体的追焦持续时长达到预设时长,重新从对焦视野中确定出新的目标主体。In one embodiment, the method includes: if the target subject does not exist in the focused field of view, or if the focus tracking duration of the target subject reaches a preset time period, re-determining a new target subject from the focused field of view.

在其中一个实施例中,上述获取对焦视野中主体的主体姿态信息,包括:In one embodiment, the above-mentioned acquisition of subject posture information of the subject in the focused field of view includes:

检测对焦视野中各主体的骨骼关键信息;Detect the key bone information of each subject in the focused field of view;

根据骨骼关键信息,确定各主体姿态信息。According to the key information of the skeleton, the posture information of each subject is determined.

在其中一个实施例中,该方法还包括:In one embodiment, the method further includes:

若从对焦视野中没有确定出目标主体,则根据对焦视野的中心区域进行主体对焦。If the target subject is not determined from the focus field of view, the subject is focused according to the central area of the focus field of view.

第二方面,本申请实施例提供一种主体对焦装置,该装置包括:In a second aspect, an embodiment of the present application provides a main body focusing device, the device comprising:

获取模块,用于获取对焦视野中主体的主体姿态信息;an acquisition module, used to acquire the subject posture information of the subject in the focused field of view;

确定模块,用于根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则;a determination module, used for determining the target subject from the focus field of view according to the subject posture information and preset screening rules; the screening rules are rules determined according to the gesture action and/or the degree of movement;

追焦模块,用于对目标主体进行追焦。The focus tracking module is used to track the target subject.

第三方面,本申请实施例提供一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现上述第一方面实施例提供的任一项方法的步骤。In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of any one of the methods provided in the first embodiment of the first aspect when the processor executes the computer program.

第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述第一方面实施例提供的任一项方法的步骤。In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any one of the methods provided in the embodiments of the first aspect.

本申请实施例提供的一种主体对焦方法、装置、计算机设备和存储介质,从对焦视野中获取了主体的姿态信息,通过主体姿态信息可预估各主体所做出的特殊姿态识别或者运动程度的识别,并基于预设的筛选规则,确定出目标主体,使得拍照或录视频时可以有效的对目标主体进行对焦,通过该方法自动对焦到目标主体的人身上,而非手动对焦,提高了对焦的灵活性和准确性,同时提升了使用的体验感。另外,该方法可以提升相机对焦功能对主体的姿态和运动捕获,使得对焦更智能化地理解人的行为,提升使用趣味性。In a subject focusing method, device, computer equipment, and storage medium provided by the embodiments of the present application, the subject's posture information is obtained from the focusing field of view, and the special posture recognition or movement degree made by each subject can be estimated through the subject's posture information. and based on the preset screening rules, the target subject is determined, so that the target subject can be effectively focused when taking pictures or videos. This method is used to automatically focus on the person of the target subject instead of manual focus, which improves the The flexibility and accuracy of focusing improves the user experience. In addition, this method can improve the camera's focus function to capture the subject's posture and motion, so that the focus can more intelligently understand human behavior and improve the fun of use.

附图说明Description of drawings

图1为一个实施例提供的一种图像处理电路的示意图;1 is a schematic diagram of an image processing circuit provided by an embodiment;

图2为一个实施例提供的一种主体对焦方法的流程示意图;2 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图3为一个实施例提供的一种主体对焦方法的流程示意图;3 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图3a为一个实施例提供的一种人体姿态动作示意图;3a is a schematic diagram of a human body posture action provided by an embodiment;

图4为一个实施例提供的一种主体对焦方法的流程示意图;4 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图5为一个实施例提供的一种主体对焦方法的流程示意图;5 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图6为一个实施例提供的一种主体对焦方法的流程示意图;6 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图7为一个实施例提供的一种主体对焦方法的流程示意图;7 is a schematic flowchart of a method for focusing a subject provided by an embodiment;

图7a为一个实施例提供的一种骨骼关键信息示意图;Fig. 7a is a schematic diagram of key bone information provided by an embodiment;

图8为一个实施例提供的一种主体对焦方法的完整示意图;8 is a complete schematic diagram of a subject focusing method provided by an embodiment;

图9为一个实施例提供的一种主体对焦方法的完整示意图;9 is a complete schematic diagram of a subject focusing method provided by an embodiment;

图10为一个实施例提供的一种主体对焦装置的结构框图;10 is a structural block diagram of a main body focusing device provided by an embodiment;

图11为一个实施例提供的一种主体对焦装置的结构框图;11 is a structural block diagram of a main body focusing device provided by an embodiment;

图12为一个实施例提供的一种主体对焦装置的结构框图;12 is a structural block diagram of a main body focusing device provided by an embodiment;

图13为一个实施例中计算机设备的内部结构图。Figure 13 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本申请提供的一种主体对焦方法,可以应用于电子设备。该电子设备可为带有摄像头的计算机设备、个人数字助理、平板电脑、智能手机、穿戴式设备等。电子设备中的摄像头在拍摄图像时,会进行自动对焦,以保证拍摄的图像清晰。The subject focusing method provided by the present application can be applied to electronic equipment. The electronic device may be a computer device with a camera, a personal digital assistant, a tablet computer, a smart phone, a wearable device, or the like. When a camera in an electronic device captures an image, it will automatically focus to ensure that the captured image is clear.

在一个实施例中,上述电子设备中可包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图1为一个实施例中图像处理电路的示意图。如图1所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。In one embodiment, the above electronic device may include an image processing circuit, which may be implemented by hardware and/or software components, and may include various processing units that define an ISP (Image Signal Processing, image signal processing) pipeline. FIG. 1 is a schematic diagram of an image processing circuit in one embodiment. As shown in FIG. 1 , for the convenience of description, only various aspects of the image processing technology related to the embodiments of the present application are shown.

如图1所示,图像处理电路包括第一ISP处理器130、第二ISP处理器140和控制逻辑器150。第一摄像头110包括一个或多个第一透镜112和第一图像传感器114。第一图像传感器114可包括色彩滤镜阵列(如Bayer滤镜),第一图像传感器114可获取用第一图像传感器114的每个成像像素捕捉的光强度和波长信息,并提供可由第一ISP处理器130处理的一组图像数据。第二摄像头120包括一个或多个第二透镜122和第二图像传感器124。第二图像传感器124可包括色彩滤镜阵列(如Bayer滤镜),第二图像传感器124可获取用第二图像传感器124的每个成像像素捕捉的光强度和波长信息,并提供可由第二ISP处理器140处理的一组图像数据。As shown in FIG. 1 , the image processing circuit includes a first ISP processor 130 , a second ISP processor 140 and a control logic 150 . The first camera 110 includes one or more first lenses 112 and a first image sensor 114 . The first image sensor 114 may include a color filter array (eg, a Bayer filter), the first image sensor 114 may acquire light intensity and wavelength information captured with each imaging pixel of the first image sensor 114, and provide information that can be accessed by the first ISP A set of image data processed by processor 130 . The second camera 120 includes one or more second lenses 122 and a second image sensor 124 . The second image sensor 124 may include a color filter array (eg, a Bayer filter), the second image sensor 124 may obtain light intensity and wavelength information captured with each imaging pixel of the second image sensor 124, and provide information that can be accessed by the second ISP A set of image data processed by processor 140 .

第一摄像头110采集的第一图像传输给第一ISP处理器130进行处理,第一ISP处理器130处理第一图像后,可将第一图像的统计数据(如图像的亮度、图像的反差值、图像的颜色等)发送给控制逻辑器150,控制逻辑器150可根据统计数据确定第一摄像头110的控制参数,从而第一摄像头110可根据控制参数进行自动对焦、自动曝光等操作。第一图像经过第一ISP处理器130进行处理后可存储至图像存储器160中,第一ISP处理器130也可以读取图像存储器160中存储的图像以对进行处理。另外,第一图像经过ISP处理器130进行处理后可直接发送至显示器170进行显示,显示器170也可以读取图像存储器160中的图像以进行显示。The first image collected by the first camera 110 is transmitted to the first ISP processor 130 for processing. After the first ISP processor 130 processes the first image, the statistical data of the first image (such as the brightness of the image, the contrast value of the image, etc.) , image color, etc.) to the control logic 150, and the control logic 150 can determine the control parameters of the first camera 110 according to the statistical data, so that the first camera 110 can perform auto-focus, auto-exposure and other operations according to the control parameters. After being processed by the first ISP processor 130, the first image may be stored in the image memory 160, and the first ISP processor 130 may also read the image stored in the image memory 160 for processing. In addition, after being processed by the ISP processor 130, the first image can be directly sent to the display 170 for display, and the display 170 can also read the image in the image memory 160 for display.

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

图像存储器160可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。The image memory 160 may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include a DMA (Direct Memory Access, direct memory access) feature.

当接收到来自第一图像传感器114接口时,第一ISP处理器130可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器160,以便在被显示之前进行另外的处理。第一ISP处理器130从图像存储器160接收处理数据,并对所述处理数据进行RGB和YCbCr颜色空间中的图像数据处理。第一ISP处理器130处理后的图像数据可输出给显示器170,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,第一ISP处理器130的输出还可发送给图像存储器160,且显示器170可从图像存储器160读取图像数据。在一个实施例中,图像存储器160可被配置为实现一个或多个帧缓冲器。Upon receiving the interface from the first image sensor 114, the first ISP processor 130 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 160 for additional processing before being displayed. The first ISP processor 130 receives processing data from the image memory 160 and performs image data processing in RGB and YCbCr color spaces on the processed data. The image data processed by the first ISP processor 130 may be output to the display 170 for viewing by the user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit, graphics processor). In addition, the output of the first ISP processor 130 may also be sent to the image memory 160 , and the display 170 may read image data from the image memory 160 . In one embodiment, image memory 160 may be configured to implement one or more frame buffers.

第一ISP处理器130确定的统计数据可发送给控制逻辑器150。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、第一透镜112阴影校正等第一图像传感器114统计信息。控制逻辑器150可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定第一摄像头110的控制参数及第一ISP处理器130的控制参数。例如,第一摄像头110的控制参数可包括增益、曝光控制的积分时间、防抖参数、闪光控制参数、第一透镜112控制参数(例如聚焦或变焦用焦距)、或这些参数的组合等。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及第一透镜112阴影校正参数。Statistics determined by the first ISP processor 130 may be sent to the control logic 150 . For example, the statistics may include first image sensor 114 statistics such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, first lens 112 shading correction, and the like. The control logic 150 may include a processor and/or a microcontroller executing one or more routines (eg, firmware) that may determine the control parameters and the first camera 110 based on the received statistics. A control parameter of the ISP processor 130. For example, the control parameters of the first camera 110 may include gain, integration time for exposure control, anti-shake parameters, flash control parameters, first lens 112 control parameters (eg, focal length for focusing or zooming), or a combination of these parameters. ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), and first lens 112 shading correction parameters.

同样地,第二摄像头120采集的第二图像传输给第二ISP处理器140进行处理,第二ISP处理器140处理第一图像后,可将第二图像的统计数据(如图像的亮度、图像的反差值、图像的颜色等)发送给控制逻辑器150,控制逻辑器150可根据统计数据确定第二摄像头120的控制参数,从而第二摄像头120可根据控制参数进行自动对焦、自动曝光等操作。第二图像经过第二ISP处理器140进行处理后可存储至图像存储器160中,第二ISP处理器140也可以读取图像存储器160中存储的图像以对进行处理。另外,第二图像经过ISP处理器140进行处理后可直接发送至显示器170进行显示,显示器170也可以读取图像存储器160中的图像以进行显示。第二摄像头120和第二ISP处理器140也可以实现如第一摄像头110和第一ISP处理器130所描述的处理过程。Similarly, the second image captured by the second camera 120 is transmitted to the second ISP processor 140 for processing. After the second ISP processor 140 processes the first image, the statistical data of the second image (such as the brightness of the image, the The contrast value, the color of the image, etc.) are sent to the control logic 150, and the control logic 150 can determine the control parameters of the second camera 120 according to the statistical data, so that the second camera 120 can perform automatic focusing, automatic exposure and other operations according to the control parameters. . After being processed by the second ISP processor 140, the second image can be stored in the image memory 160, and the second ISP processor 140 can also read the image stored in the image memory 160 for processing. In addition, after being processed by the ISP processor 140, the second image can be directly sent to the display 170 for display, and the display 170 can also read the image in the image memory 160 for display. The second camera 120 and the second ISP processor 140 can also implement the processing procedures as described for the first camera 110 and the first ISP processor 130 .

在一个实施例中,第一摄像头110可为彩色摄像头,第二摄像头120可为TOF(TimeOf Flight,飞行时间)摄像头或结构光摄像头。TOF摄像头可获取TOF深度图,结构光摄像头可获取结构光深度图。第一摄像头110和第二摄像头120可均为彩色摄像头。通过两个彩色摄像头获取双目深度图。第一ISP处理器130和第二ISP处理器140可为同一ISP处理器。In one embodiment, the first camera 110 may be a color camera, and the second camera 120 may be a TOF (Time Of Flight) camera or a structured light camera. The TOF camera can obtain the TOF depth map, and the structured light camera can obtain the structured light depth map. The first camera 110 and the second camera 120 may both be color cameras. The binocular depth map is acquired by two color cameras. The first ISP processor 130 and the second ISP processor 140 may be the same ISP processor.

第一摄像头110和第二摄像头120拍摄同一场景分别得到可见光图和深度图,将可见光图和深度图发送给ISP处理器。ISP处理器可根据相机标定参数对可见光图和深度图进行配准,保持视野完全一致;然后再生成与可见光图对应的中心权重图,其中,该中心权重图所表示的权重值从中心到边缘逐渐减小;将可见光图和中心权重图输入到训练好的主体检测模型中,得到主体区域置信度图,再根据主体区域置信度图确定可见光图中的目标主体;也可将可见光图、深度图和中心权重图输入到训练好的主体检测模型中,得到主体区域置信度图,再根据主体区域置信度图确定可见光图中的目标主体。利用中心权重图可以让位于图像中心的对象更容易被检测,利用深度图可以让距离摄像头更近的对象容易被检测,提高了主体检测的准确性。The first camera 110 and the second camera 120 capture the same scene to obtain a visible light image and a depth image, respectively, and send the visible light image and the depth image to the ISP processor. The ISP processor can register the visible light map and the depth map according to the camera calibration parameters to keep the field of view completely consistent; and then generate a center weight map corresponding to the visible light map, wherein the weight value represented by the center weight map is from the center to the edge. Gradually decrease; input the visible light map and the center weight map into the trained subject detection model to obtain the confidence map of the subject area, and then determine the target subject in the visible light map according to the confidence map of the subject area; you can also use the visible light map, depth The image and the center weight map are input into the trained subject detection model, and the confidence map of the subject area is obtained, and then the target subject in the visible light image is determined according to the confidence map of the subject area. Using the center weight map can make objects located in the center of the image easier to detect, and using the depth map can make objects closer to the camera easier to detect, improving the accuracy of subject detection.

下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是,本申请提供的一种主体对焦方法,图2-图9的执行主体为带有摄像头的电子设备,其中,其执行主体还可以是主体对焦装置,其中该装置可以通过软件、硬件或者软硬件结合的方式实现成为电子设备的部分或者全部。The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be specifically described in detail below with reference to the accompanying drawings. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in a subject focusing method provided by the present application, the execution subject of FIG. 2 to FIG. 9 is an electronic device with a camera, wherein, the execution subject may also be a subject focusing device, wherein the device can use software, Hardware or a combination of software and hardware is implemented as part or all of an electronic device.

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments.

图2为一个实施例中主体对焦方法的流程图,如图2所示,提供一种主体对焦方法,可应用于图1中的电子设备中,包括:FIG. 2 is a flowchart of a method for focusing on a subject in an embodiment. As shown in FIG. 2, a method for focusing on a subject is provided, which can be applied to the electronic device in FIG. 1, including:

S101,获取对焦视野中主体的主体姿态信息。S101, acquiring subject posture information of a subject in a focused field of view.

其中,对焦视野表示拍照或者录视频时,电子设备的屏幕上显示的视野画面。其中,主体表示对焦视野中的主要部分,如人、物体、植物、动物等。一般地对焦视野可能包括一个主体,也可能包括多个主体,每个主体的姿态信息尽不相同。其中,主体姿态信息可包括各主体肢体的位置信息等,本实施例对姿态信息不作限定。The focus field of view refers to a field of view image displayed on the screen of the electronic device when taking a picture or recording a video. Among them, the subject represents the main part in the focused field of view, such as people, objects, plants, animals, etc. Generally, the focus field may include one subject, or may include multiple subjects, and the posture information of each subject is different. Wherein, the main body posture information may include position information of each main body limb, etc., and the present embodiment does not limit the posture information.

具体的,以主体是人为例,电子设备获取对焦视野中所有人的人体姿态信息,可以是在电子设备开启相机后,按下拍照按钮/录像按钮之前,获取电子设备对焦视野中的所有人的人体姿态信息。Specifically, taking the subject as a person as an example, the electronic device obtains the human body posture information of all people in the focused field of view, which may be obtained after the electronic device turns on the camera and before pressing the camera button/recording button. Human body posture information.

S102,根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则。S102, according to the subject posture information and a preset screening rule, determine the target subject from the focused field of view; the screening rule is a rule determined according to the gesture action and/or the degree of movement.

当电子设备检测到对焦视野中包括多个主体时,可以从多个主体中选择一个目标主体进行对焦。具体地,电子设备根据获取的各主体的姿态信息和预设的筛选规则,从多个主体中确定出目标主体。When the electronic device detects that the focus field includes multiple subjects, a target subject can be selected from the multiple subjects for focusing. Specifically, the electronic device determines a target subject from a plurality of subjects according to the acquired posture information of each subject and a preset screening rule.

其中,筛选规则是根据各主体的姿态动作或者是各主体的运动程度确定的规则,通常,姿态动作可根据姿态信息中各肢体的位置确定,例如,主体A的两支胳膊都打开,则主体A的姿态动作可以是张开双臂,又例如,主体B的两条腿之间为90角度,且其中一条腿与地面平行,则主体B的姿态动作为单腿翘起。基于主体的姿态动作,在定义姿态动作的筛选规则时,可以是以姿态动作的优先级来进行筛选,例如,张开双臂的优先级大于单腿翘起,则筛选时就选出张开双臂的主体A作为目标主体。Among them, the screening rule is a rule determined according to the posture action of each subject or the degree of movement of each subject. Generally, the posture action can be determined according to the position of each limb in the posture information. For example, if both arms of subject A are open, then the subject The posture action of A can be to open his arms. For another example, if the two legs of the subject B are at a 90-degree angle, and one of the legs is parallel to the ground, the posture action of the subject B is that one leg is raised. Based on the posture action of the subject, when defining the screening rules of the posture action, the priority of the posture action can be used for screening. For example, if the priority of opening the arms is higher than that of raising the single leg, the subject with the arms open is selected during the screening. A as the target subject.

其中,运动程度可根据连续帧内主体肢体位置变化的幅度确定,即运动程度表示在连续帧内主体肢体位置变化的幅度值,变化幅度值越大,运动程度越剧烈,例如,在前一帧中主体A的胳膊和腿之间的夹角为30度,到下一帧时,主体A的胳膊和腿之间的夹角变化为150度,则连续两帧之间的角度变化幅值为120度,同时也确定了主体B连续两帧之间的角度变化幅值为90度,由于角度变化幅值表示运动程度值,角度变化幅值越大,表示运动程度越剧烈,所以主体A的运动程度大于主体B,在筛选时就将主体A作为目标主体。Among them, the degree of movement can be determined according to the range of changes in the position of the subject's limbs in consecutive frames, that is, the degree of movement represents the magnitude of the changes in the position of the subject's limbs in consecutive frames. In the middle, the angle between the arm and the leg of subject A is 30 degrees. In the next frame, the angle between the arm and the leg of subject A changes to 150 degrees, and the angle change amplitude between two consecutive frames is 120 degrees, and it is also determined that the angle change amplitude between two consecutive frames of subject B is 90 degrees. Since the angle change amplitude represents the degree of movement, the larger the angle change, the more intense the movement. The degree of exercise is greater than that of subject B, and subject A is used as the target subject during screening.

当然,在该筛选规则时还可以根据其他信息设定,例如,可预先给不同类别的主体设置不同的权值,取多个主体中权重最高的主体作为目标主体,或者,也可以是检测到多个主体时,提醒用户选择其中一个特定主体作为目标主体。Of course, the screening rule can also be set according to other information. For example, different weights can be set for different categories of subjects in advance, and the subject with the highest weight among multiple subjects is taken as the target subject, or it can also be detected. When there are multiple subjects, prompt the user to select one of the specific subjects as the target subject.

S103,对目标主体进行追焦。S103, focus tracking on the target subject.

确定了目标主体后,拍照或视频时,以该目标主体作为对焦目标,持续对目标主体进行追焦。可选地,若从对焦视野中没有确定出目标主体,则根据对焦视野的中心区域进行主体对焦。After the target subject is determined, when taking pictures or videos, the target subject is used as the focus target, and the focus of the target subject is continuously tracked. Optionally, if the target subject is not determined from the focused field of view, the subject is focused according to the central area of the focused field of view.

没有确定出目标主体表示对焦视野里所有人都没有鲜明的动作,例如,大家都端端正正站着拍照,这种情况下,根据对焦视野的中心区域进行主体对焦即可,无需针对某个主体进行专门对焦。If the target subject is not determined, it means that no one in the focus field has a clear movement. For example, everyone is standing upright and taking pictures. In this case, the subject can be focused according to the central area of the focus field, and there is no need to target a subject. special focus.

本实施例提供的主体对焦方法,从对焦视野中获取了各主体的姿态信息,通过主体姿态信息可预估各主体所做出的特殊姿态识别或者运动程度的识别,并基于预设的筛选规则,确定出目标主体,使得拍照或录视频时可以有效的对目标主体进行对焦,通过该方法自动对焦到目标主体的人身上,而非手动对焦,提高了对焦的灵活性和准确性,同时提升了使用的体验感。另外,该方法可以提升相机对焦功能对主体的姿态和运动捕获,使得对焦更智能化地理解人的行为,满足用户需求。In the subject focusing method provided in this embodiment, the posture information of each subject is obtained from the focusing field of view, and the special posture recognition or motion degree recognition made by each subject can be estimated through the subject posture information, and based on preset screening rules , to determine the target subject, so that the target subject can be effectively focused when taking pictures or recording videos. This method automatically focuses on the target subject instead of manual focus, which improves the flexibility and accuracy of focusing, while improving the experience of use. In addition, this method can improve the camera's focus function to capture the subject's posture and motion, so that the focus can more intelligently understand human behavior and meet user needs.

一般在拍照和录视频中均需使用到相机的对焦功能,对于拍照和录视频两种情况下从对焦视野中确定出目标主体,下面提供对应实施例进行具体说明。Generally, the focusing function of the camera needs to be used in both taking pictures and recording videos. For the two cases of taking pictures and recording videos, the target subject is determined from the focusing field of view. The corresponding embodiments are provided below for specific description.

在一个实施例中,上述筛选规则包括姿态动作规则和/或运动程度规则;姿态动作规则用于指示各姿态动作的优先级;运动程度规则用于指示各运动程度的优先级。In one embodiment, the above-mentioned screening rules include gesture action rules and/or exercise degree rules; the gesture action rules are used to indicate the priority of each gesture action; the movement degree rules are used to indicate the priority of each movement degree.

其中,姿态动作规则中包括了多个姿态动作的优先级,该姿态动作规则为拍照时确定目标主体的规则,而运动程度中包括各运动程度的优先级,用于录视频时确定目标主体的规则,运动程度与优先级之间的对应关系可根据实际情况而定,例如,可以对不同的运动程度评分,评分高的优先级高,当然也可以评分低的优先级高,本实施例对此不作限定。由于拍照捕捉属于静态画面,录视频属于捕捉动态画面,这样分两种规则确定对应情况下的目标主体,可以使目标主体的确定结果更加准确,确定方式更加灵活。Among them, the gesture action rule includes the priority of a plurality of gesture actions, the gesture action rule is the rule for determining the target subject when taking pictures, and the movement degree includes the priority of each movement degree, which is used to determine the target subject when recording video. Rules, the correspondence between the degree of exercise and the priority can be determined according to the actual situation. For example, different degrees of exercise can be scored, and the higher the score is higher. Of course, the priority of the lower score can also be higher. This is not limited. Since photographing and capturing belong to static images, and video recording belongs to capturing dynamic images, two rules are used to determine the target subject in the corresponding situation, which can make the determination result of the target subject more accurate and the determination method more flexible.

如图3所示,提供的一种实施例,该实施例为电子设备根据主体姿态信息和姿态动作规则,从对焦视野中确定出目标主体的过程,即拍照时确定对焦目标的过程。则S102步骤包括:As shown in FIG. 3 , an embodiment is provided. This embodiment is the process of determining the target subject from the focus field of view by the electronic device according to the subject posture information and the posture action rules, that is, the process of determining the focus target when taking pictures. Then step S102 includes:

S201,根据主体姿态信息,确定对焦视野中各主体的姿态动作。S201 , according to the subject posture information, determine the posture action of each subject in the focused field of view.

一开始已经获取了对焦视野中各主体的姿态信息,根据该主体的姿态信息,可确定出各主体的姿态动作。例如,通过对焦视野中各主体的肢体位置识别主体的特定姿势或者动作,如图3a所示,姿态动作包括双手手臂张开,单腿翘起来等。At the beginning, the posture information of each subject in the focused field of view has been obtained, and according to the posture information of the subject, the posture action of each subject can be determined. For example, the specific posture or action of the subject is identified by focusing on the limb position of each subject in the field of view. As shown in Figure 3a, the posture action includes open arms with both hands, and tilted one leg.

S202,根据姿态动作规则,将各姿态动作中优先级最高的主体确定为目标主体。S202, according to the gesture action rules, determine the subject with the highest priority in each gesture action as the target subject.

姿态动作规则中包括了多个姿态动作的优先级,即不同的姿态动作对应不同的优先级,则本步骤中,根据姿态动作规则,筛选出优先级最高的姿态动作的主体作为目标主体,例如,若单腿翘起的优先级大于双手手臂张开的优先级,则可以确定图3a中,女舞蹈演员的为目标主体。The gesture action rules include the priorities of multiple gesture actions, that is, different gesture actions correspond to different priorities. In this step, according to the gesture action rules, the subject of the gesture action with the highest priority is selected as the target subject, for example , if the priority of raising one leg is higher than the priority of opening both arms, it can be determined that in Figure 3a, the female dancer is the target subject.

本实施例根据姿态动作规则,将优先级高的姿态动作的主体确定为目标主体,姿态动作规则可以是根据实际用户想法设定的规则,这样确定的目标主体比较贴近用户的需求,在多人场景的拍照过程中对该目标主体进行对焦,提高了对焦的准确性。In this embodiment, the subject of the gesture action with a high priority is determined as the target subject according to the gesture action rule. The gesture action rule may be a rule set according to the actual user's idea. The target subject determined in this way is relatively close to the user's needs. The target subject is focused during the photographing process of the scene, which improves the accuracy of focusing.

可选地,提供一种确定对焦视野中各主体的姿态动作的实施方式,如图4所示,该实施方式包括:Optionally, an implementation manner of determining the gesture actions of each subject in the focused field of view is provided, as shown in FIG. 4 , the implementation manner includes:

S301,根据主体姿态信息,获取各主体肢体之间的角度。S301, according to the subject posture information, obtain the angle between each subject's limbs.

主体的姿态信息中包括各主体肢体的位置信息,这样就可以根据各主体肢体的位置信息确定出各主体肢体之间的角度。继续参考图3a,通过识别图中女舞蹈者和男舞蹈者的肢体的位置,可获得女舞蹈者和男舞蹈者的手臂、双腿与躯干的夹角。The posture information of the subject includes the position information of the limbs of the subject, so that the angle between the limbs of the subject can be determined according to the position information of the limbs of the subject. Continuing to refer to FIG. 3a, by identifying the positions of the limbs of the female dancer and the male dancer in the figure, the included angles of the arms, legs and torso of the female dancer and the male dancer can be obtained.

S302,从预设的姿态动作信息表中,确定各主体肢体对应的姿态动作;姿态动作信息表中包括多个主体肢体之间的角度与姿态动作的对应关系。S302, from the preset posture action information table, determine the posture action corresponding to each main body limb; the posture action information table includes the correspondence between the angles between the plurality of main body limbs and the posture action.

根据获取的各主体肢体之前的角度,从姿态动作信息表中,确定各主体肢体对应的姿态动作。其中,姿态动作信息表为预先设定了多个主体肢体之间的角度与姿态动作的对应关系,各肢体之前的不同的角度组合后,可对应不同的姿态动作,例如图3a中,女舞蹈者的双腿之前的角度,双腿与躯干之间的角度,可确定出女舞蹈者此时的一只腿是翘起状态,即其对应的姿态动作为单腿翘起。According to the acquired angle of each main body limb, the posture action corresponding to each main body limb is determined from the posture action information table. Among them, the posture action information table pre-sets the correspondence between the angles between the multiple main limbs and the posture actions. After the different angles before each limb are combined, they can correspond to different posture actions. For example, in Figure 3a, the female dance The angle before the dancer's legs and the angle between the legs and the torso can determine that the female dancer's one leg is in a tilted state at this time, that is, the corresponding posture action is a single-leg tilt.

不同的角度值可定义不同的姿态动作,例如,男舞蹈者双臂张开的角度大于女舞蹈者双臂张开的角度,这种情况下,可根据角度的范围,设定双臂张开的角度大的姿态动作为双臂张开,双臂张开的角度大的姿态动作为双臂微张等。当然,姿态动作还可以结合全部肢体的角度确定特定姿态,例如金鸡独立、双手托举等,本实施例对姿态动作的设定不作限定。Different angle values can define different posture actions. For example, the angle of the male dancer’s arms is larger than that of the female dancer. In this case, the arms can be set according to the range of the angle. The posture action with a large angle is to open the arms, and the posture action of the large angle of the arms open is to open the arms slightly. Certainly, the posture action can also be combined with the angles of all limbs to determine a specific posture, for example, the golden rooster is independent, the hands are raised, etc., and the setting of the posture action is not limited in this embodiment.

本实施例中,对于不同的肢体之间的角度对应一种姿态动作,电子设备根据肢体角度确定姿态动作,提高了姿态动作确定的精确性,同时,在实际应用中,可根据不同的角度设定不同姿态动作的名称,使得应用时更加灵活、趣味,满足不同用户的需求。In this embodiment, for the angles between different limbs corresponding to a gesture action, the electronic device determines the gesture action according to the limb angle, which improves the accuracy of the determination of the gesture action. Determining the names of different gestures and actions makes the application more flexible and interesting to meet the needs of different users.

如图5所示,提供的一种实施例,该实施例为电子设备根据主体姿态信息和运动程度规则,从对焦视野中确定出目标主体的过程,即录视频时确定对焦目标的过程。则S102步骤包括:As shown in FIG. 5, an embodiment is provided. This embodiment is the process of determining the target subject from the focus field of view by the electronic device according to the subject posture information and motion degree rules, that is, the process of determining the focus target when recording video. Then step S102 includes:

S401,根据主体姿态信息,获取连续N帧内对焦视野中各主体的运动程度。S401 , according to the subject posture information, acquire the motion degree of each subject in the focused field of view in consecutive N frames.

获取连续N帧内各主体的运动程度,可根据各帧内主体的姿态信息的变化确定各主体肢体位置的变化幅度,变化幅度越大,表示运动程度就越大。To obtain the movement degree of each subject in consecutive N frames, the variation range of the position of each subject's limb can be determined according to the change of the posture information of the subject in each frame. The larger the variation range, the greater the movement degree.

S401,根据运动程度规则,将各运动程度中优先级最高的主体确定为目标主体。S401 , according to the exercise degree rule, determine the subject with the highest priority in each exercise degree as the target subject.

其中,运动程度规则中包括了多个运动程度的优先级,即不同的运动程度对应不同的优先级。The exercise degree rule includes priorities of multiple exercise degrees, that is, different exercise degrees correspond to different priorities.

本步骤中,根据运动程度,将优先级最高运动程度对应的主体确定为目标主体。这样,根据运动程度规则,将优先级高的姿态动作的主体确定为目标主体,在多人场景的录视频过程中对该目标主体进行对焦,可以自动持续对焦用户需要的目标主体上,提高了用户体验。In this step, according to the exercise degree, the subject corresponding to the exercise degree with the highest priority is determined as the target subject. In this way, according to the rules of the degree of motion, the subject of the gesture action with high priority is determined as the target subject, and the target subject is focused during the video recording process of the multi-person scene, which can automatically and continuously focus on the target subject required by the user. user experience.

在一个实施例中,提供一种确定对焦视野中各主体的运动程度的实施方式,如图6所示,该实施方式包括:In one embodiment, an implementation manner of determining the degree of movement of each subject in the focused field of view is provided, as shown in FIG. 6 , the implementation manner includes:

S501,根据主体姿态信息,获取连续N帧内各主体肢体关键点的角度变化量。S501 , according to the main body posture information, obtain the angle change of each main body limb key point in N consecutive frames.

主体姿态信息中包括各主体肢体的位置信息,则可以确定出各主体肢体上的关键点,获取连续N帧内各关键点的角度变化量,例如,对多帧中的同一个人的姿态进行计算,获取两帧间(任意连续两帧间)同一个人的关键点角度变化量。The subject posture information includes the position information of each subject limb, then the key points on each subject limb can be determined, and the angle change of each key point in consecutive N frames can be obtained, for example, the posture of the same person in multiple frames can be calculated. , to obtain the angle change of the key point of the same person between two frames (between any two consecutive frames).

S502,从预设的运动程度信息表中,确定各主体肢体关键点的角度变化量对应的运动程度;运动程度信息表中包括多个主体肢体关键点的角度变化量与运动程度的对应关系。S502 , from the preset motion degree information table, determine the motion degree corresponding to the angle change of each main body limb key point; the motion degree information table includes the corresponding relationship between the angle change amount and the motion degree of a plurality of main body limb key points.

根据主体肢体关键点的角度变化量,从运动程度信息表中,确定对应的运动程度。关键点的不同角度变化量对应不同的运动程度,运动程度是用数值量化表示,角度变化值越大,运动程度越高。According to the angle change of the key points of the subject's limbs, the corresponding motion degree is determined from the motion degree information table. Different angular changes of key points correspond to different degrees of motion. The degree of motion is represented by numerical quantification. The larger the angle change value, the higher the degree of motion.

预先对运动程度信息表中设定多个主体肢体关键点的角度变化量与运动程度的对应关系,电子设备就可以从该信息表中获取到对焦视野中各主体的运动程度,保证了运动程度获取的准确性。The corresponding relationship between the angle changes of multiple key points of the subject's limbs and the degree of movement is set in advance in the movement degree information table, and the electronic device can obtain the movement degree of each subject in the focused field of view from the information table, ensuring the movement degree. Accuracy of acquisition.

通常,用户在拍照应用和录视频应用中,对焦的目标主体都是人本身,上述根据姿态动作确定目标主体和根据运动程度确定目标主体两种方法,其涉及的优先级规则表和预设信息表都可根据用户需求进行设定,设定出符合需求的规则以确定出目标主体,这样在对焦过程,可以更加智能化地理解人的行为,从而提升用户使用趣味性。Usually, in the photo application and video recording application, the target subject that the user focuses on is the person himself. The above two methods of determining the target subject according to the gesture action and determining the target subject according to the degree of movement involve the priority rule table and preset information. Tables can be set according to user needs, and rules that meet the needs can be set to determine the target subject. In this way, during the focusing process, people's behavior can be more intelligently understood, thereby enhancing the interest of users.

在选定目标主体后,对目标主体进行持续追焦,但考虑到目标主体更换的场景,提供一种更换目标主体的实施例,在一个实施例中,若对焦视野中不存在目标主体,或者,目标主体的追焦持续时长达到预设时长,重新从对焦视野中确定出新的目标主体。After the target subject is selected, the target subject is continuously tracked, but considering the scene of target subject replacement, an embodiment of replacing the target subject is provided. In one embodiment, if the target subject does not exist in the focused field of view, or , the duration of the focus tracking of the target subject reaches the preset duration, and a new target subject is re-determined from the focus field of view.

例如,录视频时挑选出运动程度最高优先级的主体进行追焦,追焦是指:一旦对焦上主体A,当出现主体A的运动程度优先级切换为非第一时,在接下来k帧内保持对主体A的对焦,然后看第k帧时主体A是否恢复第一位,若是,则继续对焦,若否再进行对焦切换。也可以设定一个预设时长,在预设时长内持续对主体A进行对焦,到达预设时长后,切换对焦目标;还可以是若主体A消失在对焦视野中,则进行对焦切换。For example, when recording a video, the subject with the highest priority of motion is selected for focus tracking. Focus tracking means: once subject A is in focus, when the priority of subject A’s motion level is switched to non-first, the next k frames Keep the focus on subject A, and then see whether subject A returns to the first position at the kth frame. If so, continue to focus, and if not, perform focus switching. It is also possible to set a preset duration, to continuously focus on subject A within the preset duration, and to switch the focus target when the preset duration is reached; it is also possible to switch the focus if subject A disappears from the focus field of view.

另外,上述获取对焦视野中各主体的主体姿态信息的过程,提供一种实施例,如图7所示,“获取对焦视野中各主体的主体姿态信息”的过程包括:In addition, the above-mentioned process of acquiring the subject posture information of each subject in the focused field of view provides an embodiment. As shown in FIG. 7 , the process of "obtaining the subject posture information of each subject in the focused field of view" includes:

S601,检测对焦视野中各主体的骨骼关键信息。S601: Detect key bone information of each subject in the focused field of view.

电子设备从对焦视野中检测各主体的骨骼关键信息,以主体是人为例,可以利用目前效果比较好的深度学习的算法进行多人骨骼关键点检测,例如openPose或open_pifpaf等算法,得到如图7a所示的人体骨骼关键点信息。The electronic device detects the key bone information of each subject from the focused field of view. Taking the subject as a human as an example, the current deep learning algorithm with better effect can be used to detect the key points of multiple skeletons, such as openPose or open_pifpaf and other algorithms, as shown in Figure 7a Human skeleton keypoint information shown.

S602,根据骨骼关键信息,确定各主体姿态信息。S602: Determine the posture information of each subject according to the key bone information.

本实施例中,根据该骨骼关键信息,确定出各主体姿态信息。例如,通过利用深度学习方法检测单人或多人的人体关键点信息,可以有效,准确的获取对焦视野中各主体的姿态信息。In this embodiment, the posture information of each subject is determined according to the key bone information. For example, by using the deep learning method to detect the key point information of the human body of a single person or multiple people, the posture information of each subject in the focused field of view can be obtained effectively and accurately.

示例地,以主体为人示例,提供一种拍照对应的主体对焦方法的实施例(可参见图8)和一种录视频对应的主体对焦方法的实施例(可参见图9),Illustratively, taking the subject as a human example, an embodiment of a subject focusing method corresponding to photographing (see FIG. 8 ) and an embodiment of a subject focusing method corresponding to video recording (see FIG. 9 ) are provided,

其中,拍照对焦步骤包括:Wherein, the photographing and focusing steps include:

S11,相机启动;S11, the camera is activated;

S12,从对焦视野中检测人体关键点;S12, detect the key points of the human body from the focused field of view;

S13,根据人体关键点输出n个人体姿态信息;S13, output n human body posture information according to the key points of the human body;

S14,根据人体姿态信息,进行人体姿态动作估计;S14, according to the human body posture information, perform human body posture action estimation;

S15,是否存在姿态动作优先级最高的人体b;若是,执行S16,若否,执行S17;S15, whether there is a human body b with the highest posture action priority; if so, go to S16, if not, go to S17;

本步骤中,若判断结果为不存在姿态动作优先级最高的人体,表示对焦视野中所有人的姿态动作优先级一致,例如所有人都保持一个姿势站着。In this step, if the judgment result is that there is no human body with the highest posture action priority, it means that the posture action priorities of all the people in the focus field are the same, for example, everyone is standing in one posture.

S16,相机正常进行对焦;S16, the camera focuses normally;

S17,对焦人体b,并开始追焦;S17, focus on human body b, and start to focus;

S18,对人体b进行追焦:K帧内持续对焦人体b;S18, follow the focus on the human body b: continue to focus on the human body b in the K frame;

S19,K帧后或者人体b消失后重新检测主体。S19, the subject is re-detected after K frames or after the disappearance of the human body b.

其中,录视频对焦步骤包括:Wherein, the video recording and focusing steps include:

S21,相机启动;S21, the camera is activated;

S22,从对焦视野中检测人体关键点;S22, detect the key points of the human body from the focused field of view;

S23,根据人体关键点输出n个人体姿态信息;S23, output n human body posture information according to the key points of the human body;

S24,根据人体姿态信息,累计N帧计算人体运动程度,并进行优先级排序;S24, according to the human body posture information, accumulate N frames to calculate the human body motion degree, and perform priority sorting;

S25,是否存在运动程度优先级最高的人体b,若是,执行S26,若否,执行S27;S25, whether there is a human body b with the highest exercise degree priority, if so, go to S26, if not, go to S27;

本步骤中,若判断结果为不存在运动程度优先级最高的人体,表示对焦视野中所有人的运动程度优先级一致,例如所有人都保持一个姿势站着。In this step, if the judgment result is that there is no human body with the highest priority of motion degree, it means that the priority of motion degree of all people in the focus field is the same, for example, everyone is standing in one posture.

S26,相机正常进行对焦;S26, the camera focuses normally;

S27,对焦人体b,并开始追焦;S27, focus on the human body b, and start to follow the focus;

S28,对人体b进行追焦:K帧内持续对焦人体b;S28, follow the focus on the human body b: continuously focus on the human body b in the K frame;

S29,K帧后或者人体b消失后重新检测主体。S29, the subject is detected again after K frames or after the human body b disappears.

上述图8和图9实施例中过程与前面实施例中涉及的过程一致,在此不再赘述。图8和图9实施例中结合人体骨骼估计来解决人像尤其在多人像的场景下,关注到发生特定运动的人,利用深度学习方法检测单人或多人的人体关键点信息,通过关键点信息预估人所做出的特殊姿态识别或者运动程度的识别,从而指导拍照或视频的对焦功能,提升相机对焦功能对人的姿态和运动捕获,使得对焦更智能化地理解人的行为,提升用户使用体验,The processes in the above-mentioned embodiments of FIG. 8 and FIG. 9 are the same as those involved in the previous embodiments, and are not repeated here. In the embodiments of Fig. 8 and Fig. 9, the human skeleton estimation is combined to solve the problem of portraits, especially in the scene of multiple portraits, paying attention to the person who has a specific movement, using the deep learning method to detect the human body key point information of a single person or multiple people, through the key point information The information predicts the recognition of special gestures or the degree of movement made by people, so as to guide the focusing function of photos or videos, and improve the camera focusing function to capture human posture and motion, so that the focusing can more intelligently understand human behavior and improve user experience,

需要说明的是,在本方案一开始执行,获取对焦视野中各主体的姿态信息前,需要先从对焦视野中检测到各主体,在实际应用了,可通过主体检测模型进行检测。其中,主体检测模型是预先采集大量的训练数据,将训练数据输入到包含有初始网络权重的主体检测模型进行训练得到的。It should be noted that, at the beginning of the implementation of this solution, before acquiring the posture information of each subject in the focused field of view, each subject needs to be detected from the focused field of view. In practical application, the subject detection model can be used for detection. Among them, the subject detection model is obtained by collecting a large amount of training data in advance, and inputting the training data into the subject detection model including the initial network weights for training.

应该理解的是,虽然图2-9的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-9中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-9 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-9 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. These sub-steps or stages are not necessarily completed at the same time. The order of execution of the steps is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.

在一个实施例中,如图10所示,提供了一种主体对焦装置,该装置包括:获取模块10、确定模块11和追焦模块12,其中,In one embodiment, as shown in FIG. 10, a main body focusing device is provided, and the device includes: an acquisition module 10, a determination module 11 and a focus tracking module 12, wherein,

获取模块10,用于获取对焦视野中主体的主体姿态信息;an acquisition module 10, configured to acquire subject posture information of the subject in the focused field of view;

确定模块11,用于根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则;The determination module 11 is used to determine the target subject from the focus field of view according to the subject posture information and preset screening rules; the screening rules are rules determined according to the gesture action and/or the degree of movement;

追焦模块12,用于对目标主体进行追焦。The focus tracking module 12 is used for tracking focus on the target subject.

在一个实施例中,上述筛选规则包括姿态动作规则和/或运动程度规则;In one embodiment, the above-mentioned screening rules include gesture action rules and/or motion degree rules;

姿态动作规则用于指示各姿态动作的优先级;Gesture action rules are used to indicate the priority of each gesture action;

运动程度规则用于指示各运动程度的优先级。The motion level rules are used to indicate the priority of each motion level.

在一个实施例中,如图11所示,提供了一种主体对焦装置,上述确定模块11包括:第一确定单元111和第二确定单元112,其中,In one embodiment, as shown in FIG. 11, a main body focusing device is provided, and the above determination module 11 includes: a first determination unit 111 and a second determination unit 112, wherein,

第一确定单元111,用于根据主体姿态信息,确定对焦视野中各主体的姿态动作;The first determining unit 111 is configured to determine the gesture action of each subject in the focused field of view according to the subject gesture information;

第二确定单元112,用于根据姿态动作规则,将各姿态动作中优先级最高的主体确定为目标主体。The second determining unit 112 is configured to determine the subject with the highest priority in each gesture action as the target subject according to the gesture action rule.

在一个实施例中,上述第一确定单元111,具体用于根据主体姿态信息,获取各主体肢体之间的角度;从预设的姿态动作信息表中,确定各主体肢体对应的姿态动作;姿态动作信息表中包括多个主体肢体之间的角度与姿态动作的对应关系。In one embodiment, the above-mentioned first determining unit 111 is specifically configured to obtain the angle between the limbs of each subject according to the posture information of the subject; from the preset posture action information table, determine the posture action corresponding to each limb of the subject; the posture The action information table includes the correspondence between the angles between the limbs of a plurality of subjects and the posture actions.

在一个实施例中,上述第一确定单元111,还用于根据主体姿态信息,获取连续N帧内对焦视野中各主体的运动程度;In one embodiment, the above-mentioned first determining unit 111 is further configured to obtain the motion degree of each subject in the focused field of view in consecutive N frames according to the subject posture information;

上述第二确定单元112,还用于根据运动程度规则,将各运动程度中优先级最高的主体确定为目标主体。The above-mentioned second determining unit 112 is further configured to determine the subject with the highest priority in each exercise degree as the target subject according to the exercise degree rule.

在一个实施例中,上述第一确定单元111,具体用于根据主体姿态信息,获取连续N帧内各主体肢体关键点的角度变化量;从预设的运动程度信息表中,确定各主体肢体关键点的角度变化量对应的运动程度;运动程度信息表中包括多个主体肢体关键点的角度变化量与运动程度的对应关系。In one embodiment, the above-mentioned first determining unit 111 is specifically configured to acquire, according to the main body posture information, the angular change amount of each main body limb key point in consecutive N frames; from the preset motion degree information table, determine each main body limb The motion degree corresponding to the angular change of the key point; the motion degree information table includes the correspondence between the angular change of the key points of the main body and the motion degree.

在一个实施例中,该装置包括检测模块,用于若对焦视野中不存在目标主体,或者,目标主体的追焦持续时长达到预设时长,重新从对焦视野中确定出新的目标主体。In one embodiment, the device includes a detection module for re-determining a new target subject from the focused field of view if the target subject does not exist in the focused field of view, or if the target subject's focus tracking duration reaches a preset duration.

在一个实施例中,如图12所示,提供了一种主体对焦装置,上述获取模块10包括:检测单元101和姿态单元102,In one embodiment, as shown in FIG. 12, a main body focusing device is provided, and the above-mentioned acquisition module 10 includes: a detection unit 101 and a posture unit 102,

检测单元101,用于检测对焦视野中各主体的骨骼关键信息;A detection unit 101, configured to detect key bone information of each subject in the focused field of view;

姿态单元102,用于根据骨骼关键信息,确定各主体姿态信息。The posture unit 102 is configured to determine the posture information of each subject according to the key bone information.

在一个实施例中,追焦模块12还用于若从对焦视野中没有确定出目标主体,则根据对焦视野的中心区域进行主体对焦。In one embodiment, the focus tracking module 12 is further configured to focus on the subject according to the center area of the focus field if the target subject is not determined from the focus field of view.

上述所有主体对焦装置实施例,其实现原理和技术效果与上述主体对焦方法实施例类似,在此不再赘述。The implementation principles and technical effects of all the above-mentioned embodiments of the main body focusing apparatus are similar to those of the above-mentioned embodiments of the main body focusing method, which will not be repeated here.

关于主体对焦装置的具体限定可以参见上文中对于主体对焦方法的限定,在此不再赘述。上述主体对焦装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the main body focusing device, reference may be made to the above definition of the main body focusing method, which will not be repeated here. Each module in the above-mentioned main body focusing device can be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图13所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种主体对焦方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 13 . The computer equipment includes a processor, memory, a network interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a subject focusing method. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.

本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 13 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:

获取对焦视野中主体的主体姿态信息;Obtain the subject posture information of the subject in the focused field of view;

根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则;According to the subject posture information and the preset screening rules, the target subject is determined from the focused field of view; the screening rules are rules determined according to the gesture action and/or the degree of movement;

对目标主体进行追焦。Focus on the target subject.

上述实施例提供的一种计算机设备,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of the computer device provided by the above-mentioned embodiment are similar to those of the above-mentioned method embodiment, which will not be repeated here.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

获取对焦视野中主体的主体姿态信息;Obtain the subject posture information of the subject in the focused field of view;

根据主体姿态信息和预设的筛选规则,从对焦视野中确定出目标主体;筛选规则为根据姿态动作和/或运动程度确定的规则;According to the subject posture information and the preset screening rules, the target subject is determined from the focused field of view; the screening rules are rules determined according to the gesture action and/or the degree of movement;

对目标主体进行追焦。Focus on the target subject.

上述实施例提供的一种计算机可读存储介质,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of the computer-readable storage medium provided by the above-mentioned embodiments are similar to those of the above-mentioned method embodiments, and details are not described herein again.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (12)

1.一种主体对焦方法,其特征在于,所述方法包括:1. A subject focusing method, wherein the method comprises: 获取对焦视野中主体的主体姿态信息;Obtain the subject posture information of the subject in the focused field of view; 根据所述主体姿态信息和预设的筛选规则,从所述对焦视野中确定目标主体;所述筛选规则为根据姿态动作和/或运动程度确定的规则;Determine the target subject from the focused field of view according to the subject posture information and a preset screening rule; the screening rule is a rule determined according to the gesture action and/or the degree of movement; 对所述目标主体进行追焦。Focusing is performed on the target subject. 2.根据权利要求1所述的方法,其特征在于,所述筛选规则包括姿态动作规则和/或运动程度规则;2. The method according to claim 1, wherein the screening rules comprise gesture action rules and/or motion degree rules; 所述姿态动作规则用于指示各姿态动作的优先级;The gesture action rule is used to indicate the priority of each gesture action; 所述运动程度规则用于指示各运动程度的优先级。The exercise degree rule is used to indicate the priority of each exercise degree. 3.根据权利要求2所述的方法,其特征在于,所述根据所述主体姿态信息和预设的筛选规则,从所述对焦视野中确定出目标主体,包括:3. The method according to claim 2, wherein determining the target subject from the focused field of view according to the subject posture information and a preset screening rule, comprising: 根据所述主体姿态信息,确定所述对焦视野中各主体的姿态动作;According to the subject posture information, determine the posture action of each subject in the focused field of view; 根据所述姿态动作规则,将各所述姿态动作中优先级最高的主体确定为所述目标主体。According to the gesture action rules, the subject with the highest priority in each gesture action is determined as the target subject. 4.根据权利要求3所述的方法,其特征在于,所述根据所述主体姿态信息,确定所述对焦视野中各主体的姿态动作,包括:4 . The method according to claim 3 , wherein determining the posture actions of each subject in the focused field of view according to the subject posture information comprises: 5 . 根据所述主体姿态信息,获取各主体肢体之间的角度;According to the subject posture information, obtain the angle between each subject's limbs; 从预设的姿态动作信息表中,确定所述各主体肢体对应的姿态动作;所述姿态动作信息表中包括多个主体肢体之间的角度与姿态动作的对应关系。From the preset posture action information table, determine the posture action corresponding to each main body limb; the posture action information table includes the correspondence between the angles between the plurality of main body limbs and the posture action. 5.根据权利要求2所述的方法,其特征在于,所述根据所述主体姿态信息和预设的筛选规则,从所述对焦视野中确定出目标主体,包括:5 . The method according to claim 2 , wherein determining the target subject from the focused field of view according to the subject posture information and preset screening rules, comprising: 6 . 根据所述主体姿态信息,获取连续N帧内所述对焦视野中各主体的运动程度;According to the subject posture information, obtain the motion degree of each subject in the focus field of view in consecutive N frames; 根据所述运动程度规则,将各所述运动程度中优先级最高的主体确定为所述目标主体。According to the exercise degree rule, the subject with the highest priority in each exercise degree is determined as the target subject. 6.根据权利要求5所述的方法,其特征在于,所述根据所述主体姿态信息,获取连续N帧内所述对焦视野中各主体的运动程度,包括:6 . The method according to claim 5 , wherein the acquiring, according to the subject posture information, the degree of movement of each subject in the focused field of view in consecutive N frames comprises: 6 . 根据所述主体姿态信息,获取所述连续N帧内各主体肢体关键点的角度变化量;According to the subject posture information, obtain the angle change of each subject limb key point in the continuous N frames; 从预设的运动程度信息表中,确定所述各主体肢体关键点的角度变化量对应的运动程度;所述运动程度信息表中包括多个主体肢体关键点的角度变化量与运动程度的对应关系。From the preset motion degree information table, determine the motion degree corresponding to the angular variation of the key points of each subject's limbs; the motion degree information table includes the correspondence between the angular variation of the key points of the subject's limbs and the degree of motion relation. 7.根据权利要求1-6任一项所述的方法,其特征在于,所述方法包括:若所述对焦视野中不存在所述目标主体,或者,所述目标主体的追焦持续时长达到预设时长,重新从所述对焦视野中确定出新的目标主体。7. The method according to any one of claims 1-6, wherein the method comprises: if the target subject does not exist in the focus field of view, or, if the target subject's focus tracking duration reaches For a preset time period, a new target subject is re-determined from the focusing field of view. 8.根据权利要求1-6任一项所述的方法,其特征在于,所述获取对焦视野中主体的主体姿态信息,包括:8. The method according to any one of claims 1-6, wherein the acquiring the subject posture information of the subject in the focused field of view comprises: 检测所述对焦视野中各主体的骨骼关键信息;Detecting key bone information of each subject in the focused field of view; 根据所述骨骼关键信息,确定各所述主体姿态信息。According to the skeleton key information, each of the subject posture information is determined. 9.根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:9. The method according to any one of claims 1-6, wherein the method further comprises: 若从所述对焦视野中没有确定出所述目标主体,则根据所述对焦视野的中心区域进行主体对焦。If the target subject is not determined from the focus field of view, subject focusing is performed according to the central area of the focus field of view. 10.一种主体对焦装置,其特征在于,所述装置包括:10. A main body focusing device, wherein the device comprises: 获取模块,用于获取对焦视野中主体的主体姿态信息;an acquisition module, used to acquire the subject posture information of the subject in the focused field of view; 确定模块,用于根据所述主体姿态信息和预设的筛选规则,从所述对焦视野中确定出目标主体;所述筛选规则为根据姿态动作和/或运动程度确定的规则;a determination module, configured to determine a target subject from the focus field of view according to the subject posture information and a preset screening rule; the screening rule is a rule determined according to the gesture action and/or the degree of movement; 追焦模块,用于对所述目标主体进行追焦。A focus tracking module, configured to perform focus tracking on the target subject. 11.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至9中任一项所述方法的步骤。11. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when the processor executes the computer program . 12.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。12. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
CN201911054454.6A 2019-10-31 2019-10-31 Subject focusing method, apparatus, computer equipment and storage medium Active CN110677592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911054454.6A CN110677592B (en) 2019-10-31 2019-10-31 Subject focusing method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911054454.6A CN110677592B (en) 2019-10-31 2019-10-31 Subject focusing method, apparatus, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110677592A true CN110677592A (en) 2020-01-10
CN110677592B CN110677592B (en) 2022-06-10

Family

ID=69085399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911054454.6A Active CN110677592B (en) 2019-10-31 2019-10-31 Subject focusing method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110677592B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184722A (en) * 2020-09-15 2021-01-05 上海传英信息技术有限公司 Image processing method, terminal and computer storage medium
CN112714253A (en) * 2020-12-28 2021-04-27 维沃移动通信有限公司 Video recording method and device, electronic equipment and readable storage medium
WO2022095788A1 (en) * 2020-11-09 2022-05-12 华为技术有限公司 Panning photography method for target user, electronic device, and storage medium
CN116095477A (en) * 2022-08-16 2023-05-09 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium
CN118524284A (en) * 2023-02-17 2024-08-20 荣耀终端有限公司 Method and device for tracking focus, terminal equipment and computer readable storage medium
WO2024169363A1 (en) * 2023-02-17 2024-08-22 荣耀终端有限公司 Focus tracking method, focusing method, photographing method, and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954667A (en) * 2014-03-24 2015-09-30 奥林巴斯映像株式会社 Display apparatus and display method
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN108307116A (en) * 2018-02-07 2018-07-20 腾讯科技(深圳)有限公司 Image capturing method, device, computer equipment and storage medium
CN109922250A (en) * 2017-12-12 2019-06-21 杭州海康威视数字技术股份有限公司 A kind of target object grasp shoot method, device and video monitoring equipment
CN110337806A (en) * 2018-05-30 2019-10-15 深圳市大疆创新科技有限公司 Group picture image pickup method and device
CN110378216A (en) * 2019-06-13 2019-10-25 浙江大华技术股份有限公司 Object detection method, device, picture pick-up device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954667A (en) * 2014-03-24 2015-09-30 奥林巴斯映像株式会社 Display apparatus and display method
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN109922250A (en) * 2017-12-12 2019-06-21 杭州海康威视数字技术股份有限公司 A kind of target object grasp shoot method, device and video monitoring equipment
CN108307116A (en) * 2018-02-07 2018-07-20 腾讯科技(深圳)有限公司 Image capturing method, device, computer equipment and storage medium
CN110337806A (en) * 2018-05-30 2019-10-15 深圳市大疆创新科技有限公司 Group picture image pickup method and device
CN110378216A (en) * 2019-06-13 2019-10-25 浙江大华技术股份有限公司 Object detection method, device, picture pick-up device and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184722A (en) * 2020-09-15 2021-01-05 上海传英信息技术有限公司 Image processing method, terminal and computer storage medium
CN112184722B (en) * 2020-09-15 2024-05-03 上海传英信息技术有限公司 Image processing method, terminal and computer storage medium
WO2022095788A1 (en) * 2020-11-09 2022-05-12 华为技术有限公司 Panning photography method for target user, electronic device, and storage medium
EP4221184A4 (en) * 2020-11-09 2024-04-03 Huawei Technologies Co., Ltd. PANORAMIC PHOTOGRAPHY METHOD FOR TARGET USER, ELECTRONIC DEVICE AND STORAGE MEDIUM
CN112714253A (en) * 2020-12-28 2021-04-27 维沃移动通信有限公司 Video recording method and device, electronic equipment and readable storage medium
CN116095477A (en) * 2022-08-16 2023-05-09 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium
CN116095477B (en) * 2022-08-16 2023-10-20 荣耀终端有限公司 Focus processing system, method, equipment and storage medium
CN118524284A (en) * 2023-02-17 2024-08-20 荣耀终端有限公司 Method and device for tracking focus, terminal equipment and computer readable storage medium
WO2024169363A1 (en) * 2023-02-17 2024-08-22 荣耀终端有限公司 Focus tracking method, focusing method, photographing method, and electronic device

Also Published As

Publication number Publication date
CN110677592B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN110677592B (en) Subject focusing method, apparatus, computer equipment and storage medium
JP5136669B2 (en) Image processing apparatus, image processing method, and program
CN110072052B (en) Image processing method and device based on multi-frame image and electronic equipment
EP3326360B1 (en) Image capturing apparatus and method of operating the same
JP5409189B2 (en) Imaging apparatus and control method thereof
US9300858B2 (en) Control device and storage medium for controlling capture of images
CN112087580B (en) Image acquisition method and device, electronic equipment and computer readable storage medium
US8934040B2 (en) Imaging device capable of setting a focus detection region and imaging method for imaging device
CN110191291B (en) Image processing method and device based on multi-frame images
US8570429B2 (en) Image processing method and apparatus and digital photographing apparatus using the same
US10546185B2 (en) Image processing apparatus for performing image processing according to privacy level
JP6024728B2 (en) Detection apparatus, detection method, and program
CN103297696A (en) Photographing method, photographing device and photographing terminal
CN108111768B (en) Method, apparatus, electronic device, and computer-readable storage medium for controlling focus
CN107424117B (en) Image beautifying method and device, computer readable storage medium and computer equipment
CN118396863A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN111277751A (en) Photographing method, device, storage medium and electronic device
KR20090064247A (en) Digital video recording method and recording device
CN111277752B (en) Prompting method, device, storage medium and electronic device
JP2015186210A (en) Imaging apparatus, control method of imaging apparatus, and program
JP5370555B2 (en) Imaging apparatus, imaging method, and program
JP2013183185A (en) Imaging apparatus, and imaging control method and program
KR101094648B1 (en) Photographer's robot for composition determination and its control method
CN108462831B (en) Image processing method, device, storage medium and electronic device
US9143684B2 (en) Digital photographing apparatus, method of controlling the same, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant