WO2020259264A1 - Subject tracking method, electronic apparatus, and computer-readable storage medium - Google Patents

Subject tracking method, electronic apparatus, and computer-readable storage medium Download PDF

Info

Publication number
WO2020259264A1
WO2020259264A1 PCT/CN2020/094848 CN2020094848W WO2020259264A1 WO 2020259264 A1 WO2020259264 A1 WO 2020259264A1 CN 2020094848 W CN2020094848 W CN 2020094848W WO 2020259264 A1 WO2020259264 A1 WO 2020259264A1
Authority
WO
WIPO (PCT)
Prior art keywords
subject
image
area
reference image
frame
Prior art date
Application number
PCT/CN2020/094848
Other languages
French (fr)
Chinese (zh)
Inventor
康健
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020259264A1 publication Critical patent/WO2020259264A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • G06V20/42Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items of sport video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • a subject tracking method includes:
  • FIG. 10 is a flowchart of a process of obtaining the subject area where the subject is located according to the subject area confidence map in one or more embodiments;
  • the subject area contains the feature information corresponding to the subject and the location information of the subject in the reference image.
  • the feature information includes the subject's color feature, texture feature, shape feature, and spatial relationship feature.
  • the position information can be represented by the coordinate position of the subject in the reference image.
  • sampling through the rotation matrix can increase training samples, improve the accuracy of the classifier, and thereby improve the accuracy of subject tracking.
  • the KCF tracking algorithm uses Fourier transform when sampling the circulant matrix, which can avoid matrix inversion operations and increase the speed of subject tracking.
  • the electronic device uses the first frame of image in the video stream as a reference image and detects the subject area in which the subject contained in the reference image is located, the electronic device can sequentially acquire the images after the first frame of image Each frame of image is tracked until the number of tracked image frames is greater than or equal to the frame number threshold.
  • the electronic device can The next frame that is acquired, that is, the sixth frame image is used as the reference image.
  • the electronic device can obtain the area of the subject in the multi-frame image before the previous image, analyze the movement speed of the subject according to the area of the subject in the multi-frame image, and increase the preset size when the movement speed is greater than or equal to the preset speed , When the moving speed is less than the preset speed, the preset size is reduced.
  • the moving speed of the subject can be calculated according to the position of the subject area in the multi-frame image and the frame rate of the video stream.
  • the range of increase and decrease of the preset size can be set according to actual application requirements, and is not limited here.
  • the greater the moving speed the greater the increase in the preset size; the smaller the moving speed, the smaller the decrease in the preset size.
  • the preset size may be an optimal adjustment size determined when the moving speed of the main body is the preset speed.
  • Operation 602 Acquire a subject region and category corresponding to each subject in the reference image.
  • the tracking order of each subject is based on the score value The order of subjects sorted from high to low.
  • the object of interest is often imaged in the center of the image, or the object between the camera and the object of interest is zoomed in to make the area of the object of interest in the image Bigger.
  • the electronic device determines the tracking order of each subject according to at least one of the priority level of the subject's corresponding category, the size of the subject area, and the location of the subject area, and tracking the images according to the tracking order can improve the effect of subject tracking and satisfy users Individual needs.
  • the electronic device can input the reference image and the center weight map into the subject detection model, and perform the detection to obtain the subject area confidence map.
  • the subject area confidence map contains the confidence values of each pixel for different subject categories. For example, the confidence that a certain pixel belongs to a person is 0.8, the confidence of a flower is 0.1, and the confidence of a dog is 0.1.
  • the subject in the reference image is determined according to the subject region confidence map, and the subject region where the subject is located is obtained.
  • the electronic device may perform difference calculation or logical sum calculation between the highlight area in the reference image and the subject mask map to obtain the subject area corresponding to the subject whose highlight is eliminated in the reference image.
  • the electronic device performs difference processing on the highlight area in the reference image and the subject mask image, that is, the reference image and the corresponding pixel values in the subject mask image are subtracted to obtain the subject area where the subject in the reference image is located.
  • the area where the target object is located is taken as the main body area where the main body is located.
  • the second acquisition module 1106 is configured to sequentially acquire each frame of image after the reference image in the video stream;
  • the ISP processor 1240 processes the original image data pixel by pixel in multiple formats.
  • each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1240 may perform one or more image processing operations on the original image data and collect statistical information about the image data. Among them, the image processing operations can be performed with the same or different bit depth accuracy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)

Abstract

A subject tracking method comprises: obtaining, from a video stream, an image frame to serve as a reference image; performing subject detection on the reference image so as to obtain from the reference image a subject region in which a subject is present; sequentially obtaining each image frame following the reference image in the video stream; tracking, on the basis of the subject region, each image frame following the reference image by means of a tracking algorithm, so as to obtain a region of the subject in each image frame; and when the number of the tracked image frames is greater than or equal to a frame number threshold, using the next obtained image frame as a reference image, and returning to the operation of performing subject detection on the reference image so as to obtain from the reference image a subject region in which the subject is present.

Description

主体追踪方法、电子设备和计算机可读存储介质Subject tracking method, electronic equipment and computer readable storage medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年06月28日提交中国专利局、申请号为2019105724125、发明名称为“主体追踪方法、装置、电子设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 2019105724125, and the invention title is "Subject tracking method, device, electronic equipment and computer-readable storage medium" on June 28, 2019, and its entire content Incorporated in this application by reference.
技术领域Technical field
本申请涉影像技术领域,特别是涉及一种主体追踪方法、电子设备和计算机可读存储介质。This application relates to the field of imaging technology, in particular to a subject tracking method, electronic equipment and computer-readable storage medium.
背景技术Background technique
随着影像技术的发展,主体追踪技术的应用越来越广泛。目前,主体追踪技术通常依靠用户手动选取图像中的主体,进而根据该主体对后续图像进行主体追踪。然而,由于在视频流的拍摄过程中,视频流中的主体、主体的大小、主体的位置等都可能发生变化,传统的主体追踪方法往往无法准确地追踪到主体,存在主体追踪的准确性较低的问题。With the development of imaging technology, the application of subject tracking technology has become more and more widespread. At present, subject tracking technology usually relies on the user to manually select the subject in the image, and then subject the subsequent image to subject tracking based on the subject. However, since the subject, the size of the subject, and the position of the subject in the video stream may change during the shooting of the video stream, traditional subject tracking methods often cannot track the subject accurately, and the accuracy of subject tracking is relatively high. Low problem.
发明内容Summary of the invention
根据本申请的各种实施例,提供一种主体追踪方法、电子设备和计算机可读存储介质。According to various embodiments of the present application, a subject tracking method, an electronic device, and a computer-readable storage medium are provided.
一种主体追踪方法,包括:A subject tracking method includes:
在视频流中获取一帧图像作为参考图像;Obtain a frame of image in the video stream as a reference image;
对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域;Subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
依次获取所述视频流中所述参考图像之后的每一帧图像;Sequentially acquiring each frame of image after the reference image in the video stream;
基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域;及Based on the subject area, track each frame of image after the reference image by a tracking algorithm to obtain the subject area in each frame of image; and
当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像,返回执行对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域的操作。When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is returned to obtain the subject area of the subject in the reference image. operating.
操作一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:To operate an electronic device, including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
在视频流中获取一帧图像作为参考图像;Obtain a frame of image in the video stream as a reference image;
对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域;Subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
依次获取所述视频流中所述参考图像之后的每一帧图像;Sequentially acquiring each frame of image after the reference image in the video stream;
基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域;及Based on the subject area, track each frame of image after the reference image by a tracking algorithm to obtain the subject area in each frame of image; and
当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像,返回执行对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域的操作。When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is returned to obtain the subject area of the subject in the reference image. operating.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下操作:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following operations are realized:
在视频流中获取一帧图像作为参考图像;Obtain a frame of image in the video stream as a reference image;
对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域;Subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
依次获取所述视频流中所述参考图像之后的每一帧图像;Sequentially acquiring each frame of image after the reference image in the video stream;
基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域;及Based on the subject area, track each frame of image after the reference image by a tracking algorithm to obtain the subject area in each frame of image; and
当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像,返回执行对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域的操作。When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is returned to obtain the subject area of the subject in the reference image. operating.
上述主体追踪方法、电子设备和计算机可读存储介质,通过对视频流中的参考图像进行主体检测得到主体所在的主体区域,依次获取参考图像之后的每一帧图像进行主体追踪,得到主体在每一帧图像中的区域,当追踪的图像帧数大于或等于帧数阈值时,则将获取的下一帧图像作为参考图像,并返回对参考图像进行主体检测的操作,即可以更新图像的主体区域,避免视频流中主体发生变化时导致的主体追踪失败的问题,可以提高主体追踪的准确性。The subject tracking method, electronic equipment, and computer-readable storage medium described above obtain the subject area where the subject is located by subject detection on the reference image in the video stream. The area in a frame of image, when the number of image frames to be tracked is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the operation of subject detection on the reference image is returned, that is, the subject of the image can be updated Area, to avoid the problem of subject tracking failure when the subject changes in the video stream, which can improve the accuracy of subject tracking.
本发明的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the present invention are set forth in the following drawings and description. Other features, objects and advantages of the present invention will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为一个或多个实施例中电子设备的内部结构示意图;FIG. 1 is a schematic diagram of the internal structure of an electronic device in one or more embodiments;
图2为一个或多个实施例中主体追踪方法的流程图;Figure 2 is a flowchart of a subject tracking method in one or more embodiments;
图3为一个或多个实施例中对图像进行主体追踪的流程图;FIG. 3 is a flowchart of subject tracking on an image in one or more embodiments;
图4(a)为一个或多个实施例中上一帧图像的示意图;Figure 4(a) is a schematic diagram of the previous frame of image in one or more embodiments;
图4(b)为一个或多个实施例中图(a)对应的当前帧图像的示意图;Figure 4(b) is a schematic diagram of the current frame image corresponding to Figure (a) in one or more embodiments;
图5为一个或多个实施例中设定帧数阈值的流程图;FIG. 5 is a flowchart of setting a frame number threshold in one or more embodiments;
图6为一个或多个实施例中对图像进行主体追踪的流程图;FIG. 6 is a flowchart of subject tracking on an image in one or more embodiments;
图7为一个或多个实施例中对图像进行主体检测的流程图;FIG. 7 is a flowchart of subject detection of an image in one or more embodiments;
图8为一个或多个实施例中主体区域置信度图进行处理的流程图;8 is a flowchart of processing the confidence map of the subject region in one or more embodiments;
图9为一个或多个实施例图像检测效果的示意图;FIG. 9 is a schematic diagram of image detection effects of one or more embodiments;
图10为一个或多个实施例中根据主体区域置信度图得到主体所在的主体区域的流程的流程图;FIG. 10 is a flowchart of a process of obtaining the subject area where the subject is located according to the subject area confidence map in one or more embodiments;
图11为一个或多个实施例中主体追踪装置的结构框图;FIG. 11 is a structural block diagram of a subject tracking device in one or more embodiments;
图12为一个或多个实施例中图像处理电路的示意图。Fig. 12 is a schematic diagram of an image processing circuit in one or more embodiments.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一获取模块称为第二获取模块,且类似地,可将第二获取模块称为第一获取模块。第一获取模块和第二获取模块两者都是获取模块,但其不是同一获取模块。It can be understood that the terms "first", "second", etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first acquisition module may be referred to as the second acquisition module, and similarly, the second acquisition module may be referred to as the first acquisition module. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.
图1为一个实施例中电子设备的内部结构示意图。如图1所示,该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个 电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种主体追踪方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。在一些实施例中,该电子设备也可以是服务器。其中,服务器可以是独立的服务器,也可以是由多个服务器组成的服务器集群来实现。Fig. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. As shown in Figure 1, the electronic device includes a processor and a memory connected via a system bus. Among them, the processor is used to provide calculation and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor to implement a subject tracking method provided in the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be a mobile phone, a tablet computer or a personal digital assistant or a wearable device. In some embodiments, the electronic device may also be a server. Among them, the server may be an independent server or a server cluster composed of multiple servers.
图2为一个实施例中主体追踪方法的流程图。本实施例中的主体追踪方法,以运行于图1中的电子设备上为例进行描述。如图2所示,主体追踪方法包括操作202至操作210,其中:Fig. 2 is a flowchart of a subject tracking method in an embodiment. The subject tracking method in this embodiment is described by taking an example of running on the electronic device in FIG. 1. As shown in FIG. 2, the subject tracking method includes operations 202 to 210, where:
操作202,在视频流中获取一帧图像作为参考图像。In operation 202, a frame of image is obtained as a reference image in the video stream.
视频流是由多帧图像的视频。视频流可以是电子设备通过摄像头录制的视频,也可以存储在电子设备本地的视频或从网络下载的视频。视频流还可以是电子设备通过摄像头实时捕捉当前场景的画面生成的,即电子设备通过摄像头实时采集多帧预览图像,预览图像可以展示在电子设备的显示屏上,视频流则由多帧预览图像组成的。A video stream is a video consisting of multiple frames of images. The video stream can be a video recorded by an electronic device through a camera, or a video stored locally in the electronic device or a video downloaded from the network. The video stream can also be generated by the electronic device using the camera to capture the picture of the current scene in real time, that is, the electronic device collects multiple frames of preview images through the camera in real time. The preview images can be displayed on the display of the electronic device, and the video stream consists of multiple frames of preview images. consist of.
参考图像为视频流中的一帧图像。电子设备可以在视频流中获取一帧图像作为参考图像。具体地,电子设备可以获取视频流中第一帧图像作为参考图像。可选地,电子设备可以获取用户选中的视频流中的一帧图像作为参考图像;也可以在接收到主体追踪指令后获取的第一帧图像作为参考图像。当然,参考图像可以是视频流中任意一帧图像,在此不做限定。The reference image is a frame of image in the video stream. The electronic device can obtain a frame of image in the video stream as a reference image. Specifically, the electronic device may obtain the first frame image in the video stream as the reference image. Optionally, the electronic device may obtain a frame of image in the video stream selected by the user as the reference image; or the first frame of image obtained after receiving the subject tracking instruction as the reference image. Of course, the reference image can be any frame of image in the video stream, which is not limited here.
操作204,对参考图像进行主体检测,获得参考图像中主体所在的主体区域。In operation 204, subject detection is performed on the reference image to obtain the subject area where the subject is located in the reference image.
电子设备对参考图像进行主体检测,获得参考图像中主体所在的主体区域。具体地,电子设备可以通过深度学习的神经网络算法训练主体检测模型,以对参考图像进行主体检测。通过将标识有主体区域和类别的图像的输入至神经网络中,通过神经网络根据检测的预测区域和预测类别对神经网络的参数进行调整,以获得可以准确识别主体区域和类别的主体检测模型。电子设备可以将参考图像输入至主体检测模型,通过主体检测模型对该参考图像进行主体检测,并根据识别的主体对参考图像进行分割,得到主体所在的主体区域。主体所在的主体区域是参考图像中包含主体对应的像素点的最小区域。具体地,当主体检测模型采用矩形框输出主体所在的主体区域时,主体区域包含的像素点与主体对应的像素点关联度高于该参考图像中其他矩形区域包含的像素点与主体对应的像素点的关联度;当主体检测模型采用主体轮廓的方式输出主体所在的主体区域,则主体区域的边缘像素点即为主体的轮廓的边缘像素点,此时主体区域包含的像素点与主体对应的像素点的关联度最高。可选地,主体识别网络可通过深度学习算法如CNN(Convolutional Neural Network,卷积神经网络)、DNN(Deep Neural Network,深度神经网络)、或RNN(Recurrent Neural Network,循环神经网络)等来实现。可选地,在一些实施例中,电子设备也可以获取用户选中的主体区域。The electronic device performs subject detection on the reference image to obtain the subject area where the subject is located in the reference image. Specifically, the electronic device may train the subject detection model through a neural network algorithm of deep learning to perform subject detection on the reference image. By inputting the image with the subject area and category into the neural network, the neural network adjusts the parameters of the neural network according to the detected predicted area and predicted category to obtain a subject detection model that can accurately identify the subject area and category. The electronic device can input the reference image to the subject detection model, perform subject detection on the reference image through the subject detection model, and segment the reference image according to the identified subject to obtain the subject area where the subject is located. The subject area where the subject is located is the smallest area in the reference image that contains the pixels corresponding to the subject. Specifically, when the subject detection model uses a rectangular frame to output the subject area where the subject is located, the pixels contained in the subject area have a higher correlation with the pixels corresponding to the subject than pixels contained in other rectangular areas in the reference image and the pixels corresponding to the subject. The degree of relevance of points; when the subject detection model uses the subject outline to output the subject area where the subject is located, the edge pixels of the subject area are the edge pixels of the outline of the subject, and the pixels contained in the subject area correspond to the subject The pixels have the highest degree of association. Optionally, the subject recognition network can be implemented by deep learning algorithms such as CNN (Convolutional Neural Network), DNN (Deep Neural Network, Deep Neural Network), or RNN (Recurrent Neural Network, Recurrent Neural Network), etc. . Optionally, in some embodiments, the electronic device may also obtain the main body area selected by the user.
操作206,依次获取视频流中参考图像之后的每一帧图像。In operation 206, each frame of image after the reference image in the video stream is sequentially acquired.
电子设备获取参考图像及参考图像中主体所在的区域之后,可以依次获取视频流中参考图像之后的每一帧图像,以对视频流中的图像进行主体追踪。可以理解的是,主体追踪的过程通常为逐帧进行的,即对一帧图像进行主体追踪,完成后再对下一帧图像进行主体追踪。After the electronic device obtains the reference image and the area where the subject is located in the reference image, it can sequentially obtain each frame of the image after the reference image in the video stream to track the subject of the image in the video stream. It is understandable that the process of subject tracking is usually carried out frame by frame, that is, subject tracking is performed on one frame of image, and subject tracking is performed on the next frame of image after completion.
操作208,基于主体区域,通过追踪算法对参考图像之后的每一帧图像进行追踪,得到主体在每一帧图像中的区域。 Operation 208, based on the subject area, track each frame of the image after the reference image by the tracking algorithm to obtain the subject area in each frame of the image.
主体区域包含有主体对应的特征信息及主体在参考图像中的位置信息。特征信息包括主体的颜色特征、纹理特征、形状特征和空间关系特征等。位置信息可以采用主体在参考图像中的坐标位置来表示。The subject area contains the feature information corresponding to the subject and the location information of the subject in the reference image. The feature information includes the subject's color feature, texture feature, shape feature, and spatial relationship feature. The position information can be represented by the coordinate position of the subject in the reference image.
电子设备可以基于主体区域,通过追踪算法对参考图像之后的每一帧图像进行追踪,得到主体在每一帧图像中的区域。具体地,电子设备可以获取参考图像中主体区域包含的主体的特征信息,从而通过追踪算法在参考图像之后的每一帧图像中查找与该主体的特征信息相匹配的区域,即该图像中主体所在的区域;电子设备还可以根据主体在参考图像中的位置信息在参考图像之后的每一帧图像中对应的位置周围查找与该主体的特征信息相匹配的区域。其中,电子设备可采用的追踪算法可以但不限于是帧差法、光流法、特征点匹配、KCF(High-Speed Tracking with Kernelized Correlation Filters,基于核相关滤波器的高速跟踪算法)等。The electronic device can track each frame of the image after the reference image based on the subject area through a tracking algorithm to obtain the subject area in each frame of the image. Specifically, the electronic device can obtain the feature information of the subject contained in the subject area in the reference image, so as to find an area that matches the feature information of the subject in each frame of the image after the reference image through a tracking algorithm, that is, the subject in the image The area where the electronic device is located; the electronic device can also search for an area that matches the feature information of the subject around the corresponding location in each frame of the image after the reference image according to the subject's position information in the reference image. Among them, the tracking algorithms that can be used by the electronic device can be, but are not limited to, frame difference method, optical flow method, feature point matching, KCF (High-Speed Tracking with Kernelized Correlation Filters, high-speed tracking algorithm based on nuclear-related filters), etc.
可选地,在一个实施例中,电子设备采用KCF追踪算法对参考图像之后的每一帧图像中的主体进行追踪,具体地,在追踪过程中电子设备以上一帧图像中主体所在的区域追踪当前帧图像主体所在的区域,本实施例以上一帧图像为参考图像进行说明,电子设备可以采用的循环矩阵在参考图像的主体区域周围进行采样,使用核相关滤波器根据采样的样本训练分类器,进而在当前帧图像中采用训练的分类器采样,得到每一个样本区域的相关值,将相关值最大的样本区域作为当前帧图像中主体所在的区域。采用KCF进行图像追踪时,通过轮转矩阵进行采样,可以增加训练样本,提高分类器的精准度,进而提高主体追踪的准确性。并且,KCF追踪算法中在采用循环矩阵采样时进行了傅里叶变换,可以避免矩阵求逆操作,可以提高主体追踪的速度。Optionally, in one embodiment, the electronic device uses the KCF tracking algorithm to track the subject in each frame of the image after the reference image. Specifically, during the tracking process, the electronic device tracks the area where the subject is in the previous frame of the image. The area where the main body of the current frame image is located. In this embodiment, the previous image is the reference image. The circulant matrix that the electronic device can use is used to sample around the main area of the reference image, and the kernel correlation filter is used to train the classifier based on the sample , And then adopt the trained classifier sampling in the current frame image to obtain the correlation value of each sample area, and use the sample area with the largest correlation value as the area where the subject is located in the current frame image. When using KCF for image tracking, sampling through the rotation matrix can increase training samples, improve the accuracy of the classifier, and thereby improve the accuracy of subject tracking. In addition, the KCF tracking algorithm uses Fourier transform when sampling the circulant matrix, which can avoid matrix inversion operations and increase the speed of subject tracking.
操作210,当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为参考图像,返回执行对参考图像进行主体检测,获得参考图像中主体所在的主体区域的操作。In operation 210, when the number of tracked image frames is greater than or equal to the frame number threshold, the acquired next frame of image is used as a reference image, and the operation of performing subject detection on the reference image to obtain the subject area of the subject in the reference image is returned.
帧数阈值可以根据实际应该应用需求设定,在此不做限定。例如,帧数阈值可以是3帧、5帧、8帧、10帧等。电子设备在依次获取参考图像之后的每一帧图像进行追踪时,可以统计追踪的图像帧数,当追踪的图像帧数大于或等于帧数阈值时,则将获取的下一帧图像作为参考图像。例如,当帧数阈值为4帧,若电子设备将视频流中的第一帧图像作为参考图像并检测到参考图像中包含的主体所在的主体区域,电子设备可以依次获取第一帧图像之后的每一帧图像进行追踪,直至追踪的图像帧数大于或等于帧数阈值,在该例子中,当对第五帧图像进行追踪后,则追踪的图像帧数等于帧数阈值,则电子设备可以将获取的下一帧即第六帧图像作为参考图像。The frame number threshold can be set according to actual application requirements, and is not limited here. For example, the frame number threshold may be 3 frames, 5 frames, 8 frames, 10 frames, and so on. When the electronic device sequentially acquires the reference image for tracking each frame, it can count the number of image frames that are tracked. When the number of image frames to be tracked is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image . For example, when the frame number threshold is 4 frames, if the electronic device uses the first frame of image in the video stream as a reference image and detects the subject area in which the subject contained in the reference image is located, the electronic device can sequentially acquire the images after the first frame of image Each frame of image is tracked until the number of tracked image frames is greater than or equal to the frame number threshold. In this example, when the fifth frame of image is tracked, the tracked image frame number is equal to the frame number threshold, and the electronic device can The next frame that is acquired, that is, the sixth frame image is used as the reference image.
电子设备也可以在当连续的追踪的时间大于或等于时间阈值时,将获取的下一帧图像作为参考图像,并返回执行对参考图像进行主体检测,获取参考图像中主体所在的主体区域的操作。可以理解的是,在视频流中,追踪的图像帧数和追踪的时间可以转换。如当视频流的帧率为60帧每秒时,则帧数阈值为3帧相当于时间阈值为3s,帧数阈值为5帧相当于时间阈值为5s,帧数阈值为10帧相当于时间阈值为10s等。例如,当视频流的帧率为30帧每秒,若帧数阈值为5帧,则电子设备可以在连续追踪的图像帧数大于或等于5帧时,将获取的下一帧图像作为参考图像,相当于电子设备在连续追踪的时间大于或等于10s时,将获取的下一帧图像作为参考图像。电子设备将获取的下一帧图像作为参考图像后,则返回执行对参考图像进行主体检测,获得参考图像中主体所在的主体区域,即在视频流的主体追踪过程中,可以在追踪了帧数阈值的图像后,重新进行主体检测,以更新图像的主体区域再继续追踪。The electronic device can also use the next frame of image acquired as the reference image when the continuous tracking time is greater than or equal to the time threshold, and return to perform subject detection on the reference image to obtain the subject area of the subject in the reference image . It is understandable that in the video stream, the number of tracked image frames and the tracking time can be converted. For example, when the frame rate of the video stream is 60 frames per second, the frame number threshold is 3 frames equivalent to the time threshold of 3s, the frame number threshold is 5 frames is equivalent to the time threshold of 5s, and the frame number threshold is 10 frames is equivalent to time The threshold is 10s and so on. For example, when the frame rate of the video stream is 30 frames per second, if the frame number threshold is 5 frames, the electronic device can use the next frame of image acquired as the reference image when the number of continuously tracked image frames is greater than or equal to 5 frames , Which is equivalent to the electronic device taking the next frame of image acquired as the reference image when the continuous tracking time is greater than or equal to 10s. After the electronic device uses the acquired next frame of image as a reference image, it returns to perform subject detection on the reference image to obtain the subject area of the subject in the reference image, that is, in the subject tracking process of the video stream, the number of frames can be tracked After the threshold image, the subject detection is performed again to update the subject area of the image and continue tracking.
本申请实施例中,通过对视频流中的参考图像进行主体检测得到主体所在的主体区域,依次获取参考图像之后的每一帧图像进行主体追踪,得到主体在每一帧图像中的区域,当追踪的图像帧数大于或等于帧数阈值时,则将获取的下一帧图像作为参考图像,并返回对参考图像进行主体检测的操作,即可以更新图像的主体区域,避免视频流中主体发生变化时导致的主体追踪失败的问题,可以提高主体追踪的准确性。并且,本申请中采用深度学习的方式对图像进行主体检测,而采用图像追踪算法进行主体追踪,可以避免采用神经网络识别主体并追踪而导致功耗大、实时性差的问题,不会出现采用传统图像处理方法进 行检测图像中的主体而导致追踪效果差的问题,即本申请实施例所提供的技术方案可以在降低功耗的同时,提高主体检测的实时性和准确性。In the embodiment of the present application, the subject area of the subject is obtained by subject detection on the reference image in the video stream, and each frame of the image after the reference image is obtained in turn for subject tracking to obtain the subject area in each frame of image. When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the operation of subject detection on the reference image is returned, that is, the subject area of the image can be updated to avoid subject occurrence in the video stream The problem of subject tracking failure caused by changes can improve the accuracy of subject tracking. Moreover, in this application, the deep learning method is used to detect the subject of the image, and the image tracking algorithm is used to track the subject, which can avoid the use of neural networks to identify and track the subject, which leads to high power consumption and poor real-time performance. The traditional The image processing method detects the subject in the image and causes the problem of poor tracking effect, that is, the technical solution provided by the embodiment of the present application can reduce power consumption while improving the real-time performance and accuracy of subject detection.
如图3所示,在一个实施例中,提供的主体追踪方法中基于主体区域,通过追踪算法对参考图像之后的每一帧图像进行追踪,得到主体在每一帧图像中的区域的过程,包括:As shown in FIG. 3, in one embodiment, the subject tracking method provided is based on the subject area, and the process of tracking each frame of image after the reference image through the tracking algorithm to obtain the subject area in each frame of image, include:
操作302,获取主体在上一帧图像中的区域。In operation 302, an area of the subject in the previous frame of image is obtained.
上一帧图像为视频流中即将要进行追踪的当前帧图像的上一帧图像。当前帧图像为将要进行追踪的图像。电子设备可以获取当前帧图像的上一帧图像中主体所在的区域。可选地,若当前帧图像为参考图像之后的第一帧图像,则上一帧图像即为参考图像。The last frame image is the previous frame image of the current frame image to be tracked in the video stream. The current frame image is the image to be tracked. The electronic device can obtain the area where the subject is located in the previous frame of the current frame of image. Optionally, if the current frame image is the first frame image after the reference image, the previous frame image is the reference image.
操作304,将主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域。In operation 304, the area of the subject in the previous frame of image is increased by a preset size to obtain a first prediction area.
预设尺寸可以根据实际应用需求设定,在此不做限定。预设尺寸包括不同方向的尺寸大小。例如,当主体在上一帧图像中的区域为圆形,预设尺寸可以是要增大的半径大小;当主体在上一帧图像中的区域为四方形时,预设尺寸可以包括四个边长要增长的大小。具体地,预设尺寸可以是固定的数值,也可以根据不同的拍摄场景采用的不同的预设尺寸。例如,电子设备可以预设不同的主体类别对应的尺寸,从而根据参考图像的主体识别结果获取相对应的预设尺寸。可以理解的是,预设尺寸也可以基于主体在上一帧图像中的区域的大小来确定。例如,电子设备可以预设增大的幅度为原区域大小的0.1、0.2、0.3等,由此,电子设备可以根据主体在上一帧图像中的区域的大小和预设的幅度确定该预设尺寸。The preset size can be set according to actual application requirements and is not limited here. The preset size includes sizes in different directions. For example, when the area of the subject in the last frame of image is a circle, the preset size may be the radius to be increased; when the area of the subject in the last frame of image is a square, the preset size may include four The size of the side length to grow. Specifically, the preset size may be a fixed value, or different preset sizes may be adopted according to different shooting scenes. For example, the electronic device may preset sizes corresponding to different subject categories, so as to obtain the corresponding preset sizes according to the subject recognition result of the reference image. It is understandable that the preset size can also be determined based on the size of the area of the subject in the previous frame of image. For example, the electronic device may preset the increment to be 0.1, 0.2, 0.3, etc., of the original area size. Therefore, the electronic device may determine the preset according to the size of the subject's area in the previous frame of image and the preset amplitude. size.
操作306,从当前帧图像中获取与第一预测区域的位置相对应的第二预测区域。Operation 306: Acquire a second prediction area corresponding to the position of the first prediction area from the current frame image.
第一预测区域为上一帧图像中的区域。第二预测区域在当前帧图像中的位置与第一预测区域在上一帧图像中的位置相同。电子设备可以将主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域,进而根据第一预测区域在上一帧图像中的位置从当前帧图像中获取位置相对应的第二预测区域。具体地,电子设备可以根据第一预测区域在上一帧图像中的位置将第一预测区域映射到当前帧图像,得到第二预测区域;也可以获取第一预测区域在上一帧图像中的坐标位置,根据该坐标位置从当前帧图像获取对应的第二预测区域。The first prediction area is the area in the previous frame of image. The position of the second prediction area in the current frame of image is the same as the position of the first prediction area in the previous frame of image. The electronic device can increase the area of the subject in the last frame of image by a preset size to obtain the first prediction area, and then obtain the first prediction area corresponding to the position in the current frame according to the position of the first prediction area in the previous frame of image. 2. Forecast area. Specifically, the electronic device can map the first prediction area to the current frame image according to the position of the first prediction area in the previous frame of image to obtain the second prediction area; it can also obtain the position of the first prediction area in the previous frame of image. The coordinate position, and the corresponding second prediction area is obtained from the current frame image according to the coordinate position.
操作308,对第二预测区域进行追踪,得到主体在当前帧图像中的区域。In operation 308, the second prediction region is tracked to obtain the region of the subject in the current frame image.
电子设备可以对当前帧图像的第二预测区域进行追踪,得到主体在当前帧图像中的区域。即电子设备在对当前帧图像进行主体追踪时,可以不用对整帧图像进行追踪,可以减少图像追踪时的计算量,提高主体追踪的实时性和效率。The electronic device can track the second prediction area of the current frame image to obtain the area of the subject in the current frame image. That is, when the electronic device performs subject tracking of the current frame of image, it does not need to track the entire frame of image, which can reduce the amount of calculation during image tracking and improve the real-time performance and efficiency of subject tracking.
图4(a)为一个实施例中上一帧图像的示意图。图4(b)为一个实施例中与图4(a)对应的当前帧图像的示意图。如图4(a)、4(b)所示,上一帧图像中402中主体所在的区域404,电子设备将主体在上一帧图像中的区域404增大预设尺寸可以得到第一预测区域406;进而从当前帧图像412中获取与第一预测区域406位置相对应的第二预测区域416,根据主体在上一帧图像中的区域404对第二预测区域416进行主体追踪,得到主体在当前帧图像中的区域414。Fig. 4(a) is a schematic diagram of the previous frame of image in an embodiment. Fig. 4(b) is a schematic diagram of the current frame image corresponding to Fig. 4(a) in an embodiment. As shown in Figures 4(a) and 4(b), the area 404 where the subject is located in 402 in the previous frame, the electronic device increases the area 404 of the subject in the previous frame by a preset size to obtain the first prediction Region 406; and then obtain the second prediction region 416 corresponding to the position of the first prediction region 406 from the current frame image 412, and perform subject tracking on the second prediction region 416 according to the region 404 of the subject in the previous frame image to obtain the subject The area 414 in the current frame image.
在一个实施例中,将主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域之前,还包括:获取主体在上一帧图像之前的多帧图像中的区域;根据主体在多帧图像中的区域分析主体的移动速度;当移动速度大于或等于预设速度时,增大预设尺寸;当移动速度小于预设速度时,减小预设尺寸。In an embodiment, increasing the area of the subject in the previous frame of image by a preset size, and before obtaining the first prediction area, further includes: acquiring the area of the subject in multiple frames of images before the previous frame of image; Analyze the moving speed of the subject in the area in the multi-frame image; when the moving speed is greater than or equal to the preset speed, increase the preset size; when the moving speed is less than the preset speed, reduce the preset size.
电子设备在对图像进行追踪时,可以得到并输出主体在图像的区域。在上一帧图像之前的多帧图像通常为视频流中参考图像与当前帧图像之间的图像。可选地,若当前帧图像之前的至少两帧参考图像中的主体相同或相似时,则电子设备获取的多帧图像的数量可以大于帧数阈值;若当前帧图像之前的至少两帧参考图像中的主体不相同时,则获取的多帧图像的数量可以小于或等于帧数阈值。When the electronic device tracks the image, it can obtain and output the area where the subject is in the image. The multi-frame images before the previous image are usually the images between the reference image and the current frame image in the video stream. Optionally, if the subjects in at least two reference images before the current frame image are the same or similar, the number of multi-frame images acquired by the electronic device may be greater than the frame number threshold; if at least two reference images before the current frame image When the subjects in are not the same, the number of acquired multi-frame images may be less than or equal to the frame number threshold.
电子设备可以获取主体在上一帧图像之前的多帧图像中的区域,根据主体在多帧图像中的区域分析主体的移动速度,当移动速度大于或等于预设速度时,增大预设尺寸,当移动速度小于预设速度时,则减小预设尺寸。主体的移动速度可以根据主体所在区域在多帧图像中位置及视频流的帧率来计算。预设尺寸增大和减小的幅度可以根据实际应用需求设定,在此不做限定。可选地,移动速度越大,则预设尺寸增大的幅度可以越大;移动速度越小,则预设尺寸减小的幅度可以越小。其中,预设尺寸可以是主体的移动速度为预设速度时,确定的最佳调整尺寸。The electronic device can obtain the area of the subject in the multi-frame image before the previous image, analyze the movement speed of the subject according to the area of the subject in the multi-frame image, and increase the preset size when the movement speed is greater than or equal to the preset speed , When the moving speed is less than the preset speed, the preset size is reduced. The moving speed of the subject can be calculated according to the position of the subject area in the multi-frame image and the frame rate of the video stream. The range of increase and decrease of the preset size can be set according to actual application requirements, and is not limited here. Optionally, the greater the moving speed, the greater the increase in the preset size; the smaller the moving speed, the smaller the decrease in the preset size. The preset size may be an optimal adjustment size determined when the moving speed of the main body is the preset speed.
通过根据主体在上一帧图像之前多帧图像中的区域分析主体的移动速度,根据主体的移动速度对预设尺寸进行调整,在移动速度较大时,则增大预设尺寸,可以避免主体在当前帧图像的区域超出未调整的预设尺寸设定的第二预测区域而导致追踪失败的问题,在移动速度较小时,则减小预设尺寸,可以进一步减少图像追踪时的计算量,即可以在保证主体追踪成功的同时提高主体追踪效率。By analyzing the movement speed of the subject according to the region in the multiple frames before the previous image, the preset size is adjusted according to the movement speed of the subject. When the movement speed is high, the preset size is increased to avoid the subject When the area of the current frame image exceeds the second prediction area set by the unadjusted preset size, the problem of tracking failure is caused. When the moving speed is small, reducing the preset size can further reduce the amount of calculation during image tracking. That is, the efficiency of subject tracking can be improved while ensuring the success of subject tracking.
在一个实施例中,提供的主体追踪方法中在追踪的图像帧数大于或等于帧数阈值之前,还可以包括:In an embodiment, before the number of image frames to be tracked is greater than or equal to the frame number threshold, the provided subject tracking method may further include:
操作502,获取主体在已追踪的多帧图像中的区域。In operation 502, an area of the subject in the tracked multi-frame image is obtained.
通常,已追踪的多帧图像的数量小于或等于帧数阈值。在一些实施例中,已追踪的多帧图像可以包括参考图像,当至少两帧参考图像中的主体相同或相似时,则已追踪的多帧图像的数量可以大于该帧数阈值。电子设备可以获取主体在已追踪的多帧图像中的区域。Generally, the number of tracked multi-frame images is less than or equal to the frame number threshold. In some embodiments, the tracked multi-frame images may include reference images. When the subjects in at least two frames of reference images are the same or similar, the number of the tracked multi-frame images may be greater than the frame number threshold. The electronic device can obtain the area of the subject in the tracked multiple frames of images.
操作504,基于主体在已追踪的多帧图像中的区域分析主体的位置变化量,位置变化量表示主体在图像中的位置变化幅度。In operation 504, the position change amount of the subject is analyzed based on the area of the subject in the tracked multi-frame image, and the position change amount represents the change magnitude of the position of the subject in the image.
主体的位置变化量表示主体在图像中的位置变化幅度。主体的位置变化量可以包括视频流中主体的面积的变化量和主体移动产生的变化量中的至少一种。电子设备基于主体在已追踪的多帧图像中的区域分析主体的位置变化量,即分析主体在视频流中的变化幅度。位置变化量越大,则主体的变化幅度越大;反之位置变化量越小,则主体的变化幅度越小。The change in the position of the subject represents the change in the position of the subject in the image. The position change amount of the main body may include at least one of the change amount of the area of the main body in the video stream and the change amount caused by the movement of the main body. The electronic device analyzes the position change of the subject based on the area of the subject in the tracked multi-frame image, that is, analyzes the change range of the subject in the video stream. The greater the position change, the greater the subject's change range; conversely, the smaller the position change, the smaller the subject's change range.
操作506,当位置变化量大于或等于变化量阈值时,将帧数阈值设为第一数值。In operation 506, when the position change amount is greater than or equal to the change amount threshold, the frame number threshold is set to the first value.
操作508,当位置变化量小于变化量阈值时,将帧数阈值设为第二数值,其中,第二数值大于第一数值。In operation 508, when the position change amount is less than the change amount threshold, the frame number threshold is set to a second value, where the second value is greater than the first value.
变化量阈值可以根据实际应用需求设定,在此不做限定。在电子设备根据位置变化量设定帧数阈值之前,电子设备可以根据默认的帧数阈值判断追踪的图像帧数是否大于或等于帧数阈值。可选地,默认的帧数阈值可以根据实验数据确定的主体的位置变化量为变化量阈值时,用于更新参考图像的最佳帧数阈值。第一数值和第二数值可以根据实际应用需要设定,在此不做设定。具体地,第二数值大于第一数值,电子设备默认的帧数阈值大于或等于第一数值,且小于或等于第二数值。例如,第一数值为3,第二数值可以为5;第一数值为5,第二数值可以为10;第一数值为4,第二数值可以为8等,在此不做限定。The change threshold can be set according to actual application requirements and is not limited here. Before the electronic device sets the frame number threshold according to the position change, the electronic device can determine whether the number of tracked image frames is greater than or equal to the frame number threshold according to the default frame number threshold. Optionally, the default frame number threshold may be used to update the optimal frame number threshold of the reference image when the change in the position of the subject determined according to experimental data is the change threshold. The first value and the second value can be set according to actual application needs, and do not set here. Specifically, the second value is greater than the first value, and the default frame number threshold of the electronic device is greater than or equal to the first value and less than or equal to the second value. For example, the first value is 3, the second value may be 5; the first value is 5, and the second value may be 10; the first value is 4, the second value may be 8, etc., which are not limited here.
电子设备可以在位置变化量大于或等于变化量阈值时,将帧数阈值设为第一数值,当位置变化量小于变化量阈值时,将帧数阈值设为大于第一数值的第二数值。即在主体的变化幅度较大时,可以及时对参考图像进行更新,以重新确定参考图像主体所在的区域,则主体的变化幅度较小时,可以延迟参考图像的更新,可以减少频繁对参考图像进行主体检测而导致的功耗较大的问题。The electronic device may set the frame number threshold to a first value when the position change is greater than or equal to the change threshold, and set the frame number threshold to a second value greater than the first value when the position change is less than the change threshold. That is, when the change of the subject is large, the reference image can be updated in time to re-determine the area where the subject of the reference image is located. When the change of the subject is small, the update of the reference image can be delayed, which can reduce frequent reference images. The problem of high power consumption caused by subject detection.
在一个实施例中,电子设备包含有陀螺仪,该主体追踪方法还包括:获取陀螺仪输出的角速度数据;根据角速度数据分析电子设备的抖动信息;根据抖动信息对帧数阈值进行调整。In one embodiment, the electronic device includes a gyroscope, and the subject tracking method further includes: obtaining angular velocity data output by the gyroscope; analyzing jitter information of the electronic device according to the angular velocity data; and adjusting the frame number threshold according to the jitter information.
陀螺仪是用于检测角速度的角运动检测装置。电子设备可以视频流的采集过程中获 取陀螺仪输出的角速度数据。电子设备可以根据角速度数据可以分析电子设备的抖动幅度,进而根据抖动幅度对帧数阈值进行调整。电子设备的抖动幅度越大,则视频流中的主体产生变化的可能性越高,则电子设备可以预设有幅度阈值,当抖动幅度超过幅度阈值时,则将帧数阈值调低;电子设备的抖动幅度越小,则视频流中主体产生变化的可能性相对较低,电子设备可以在抖动幅度小于幅度阈值时,将帧数阈值调高。可选地,电子设备也可以预先划分多个幅度区间及每一个幅度区间对应的帧数,从而可以根据陀螺仪输出的角速度数据分析抖动幅度,将帧数阈值调整为该抖动幅度所处的幅度区间对应的帧数。A gyroscope is an angular motion detection device for detecting angular velocity. Electronic equipment can obtain the angular velocity data output by the gyroscope during the video stream collection process. The electronic device can analyze the jitter amplitude of the electronic device according to the angular velocity data, and then adjust the frame number threshold according to the jitter amplitude. The greater the jitter amplitude of the electronic device, the higher the possibility that the main body in the video stream will change. The electronic device may be preset with an amplitude threshold. When the jitter amplitude exceeds the amplitude threshold, the frame number threshold is lowered; electronic equipment The smaller the jitter amplitude of the video stream is, the lower the possibility of changes in the main body of the video stream. The electronic device can increase the frame number threshold when the jitter amplitude is less than the amplitude threshold. Optionally, the electronic device can also pre-divide multiple amplitude intervals and the number of frames corresponding to each amplitude interval, so that the jitter amplitude can be analyzed according to the angular velocity data output by the gyroscope, and the frame number threshold can be adjusted to the amplitude of the jitter amplitude. The number of frames corresponding to the interval.
在一个实施例中,提供的主体追踪方法中基于主体区域,通过追踪算法对参考图像之后的每一帧图像进行追踪,得到主体在每一帧图像中的区域的过程,包括:In one embodiment, the subject tracking method provided is based on the subject area, using a tracking algorithm to track each frame of image after the reference image to obtain the subject area in each frame of image, including:
操作602,获取参考图像中每一个主体对应的主体区域和类别。Operation 602: Acquire a subject region and category corresponding to each subject in the reference image.
参考图像可以包括一个或多个主体。电子设备对参考图像进行主体检测时,可以输出参考图像中每一个主体对应的主体区域和类别。主体区域的类别包括人物、动物、植物、书籍、家具等,在此不做限定。The reference image may include one or more subjects. When the electronic device detects the subject of the reference image, it can output the subject area and category corresponding to each subject in the reference image. The categories of the main area include people, animals, plants, books, furniture, etc., which are not limited here.
操作604,根据每一个主体对应的类别的优先等级、主体区域的大小和主体区域的位置中的至少一种确定每一个主体的追踪顺序。In operation 604, the tracking order of each subject is determined according to at least one of the priority of the category corresponding to each subject, the size of the subject area, and the location of the subject area.
具体地,电子设备还可以预设不同类别的优先等级、不同区域大小、以及区域在图像中的不同位置的得分值,从而可以根据每一个主体对应的类别的优先等级、区域的大小、区域在图像中的位置计算每一个主体的分数值,根据每一个主体的分数值确定每一个主体的追踪顺序。通常,主体的类别的优先等级越高、主体区域越大、主体区域距离图像的中心越近,则该主体的追踪顺序越靠前。以优先等级越高,得分值越大,主体区域越大,得分值越大,主体区域距离图像中心越近,得分值越大为例,则每一个主体的追踪顺序即按照分数值从高到低排序的主体的顺序。Specifically, the electronic device can also preset priority levels of different categories, different area sizes, and score values of different locations of the areas in the image, so that the priority levels of the categories corresponding to each subject, the size of the area, and the area Calculate the score value of each subject at the position in the image, and determine the tracking order of each subject according to the score value of each subject. Generally, the higher the priority of the subject category, the larger the subject area, and the closer the subject area to the center of the image, the higher the tracking order of the subject. Taking the higher the priority level, the greater the score value, the larger the subject area, the greater the score value, the closer the subject area to the image center, the greater the score value, for example, the tracking order of each subject is based on the score value The order of subjects sorted from high to low.
操作606,基于追踪顺序对参考图像之后的每一帧图像进行追踪,得到每一帧图像中每一个主体所在的区域。In operation 606, each frame of image after the reference image is tracked based on the tracking sequence to obtain the area where each subject is located in each frame of image.
电子设备基于追踪顺序对每一帧图像进行追踪,得到每一帧图像中每一个主体所在的区域,即在对一帧图像进行追踪时,可以按照追踪顺序依次对图像中的每一个主体进行追踪,输出该图像中每一个主体所在的区域。The electronic device tracks each frame of the image based on the tracking sequence to obtain the area where each subject in each frame of the image is located, that is, when tracking a frame of image, each subject in the image can be tracked in sequence in the tracking sequence , Output the area where each subject in the image is located.
在图像或视频的拍摄过程中,往往会使感兴趣的拍摄物体成像于图像的中心,或者拉近摄像头与感兴趣的拍摄物体之间的物体,使得感兴趣的拍摄物体在图像中成像的面积越大。电子设备根据主体对应的类别的优先等级、主体区域的大小、主体区域的位置中的至少一种确定每一个主体的追踪顺序,根据追踪顺序对图像进行追踪,可以提高主体追踪的效果,满足用户的个性化需求。In the process of image or video shooting, the object of interest is often imaged in the center of the image, or the object between the camera and the object of interest is zoomed in to make the area of the object of interest in the image Bigger. The electronic device determines the tracking order of each subject according to at least one of the priority level of the subject's corresponding category, the size of the subject area, and the location of the subject area, and tracking the images according to the tracking order can improve the effect of subject tracking and satisfy users Individual needs.
在一个实施例中,提供的主体追踪方法中对参考图像进行主体检测,获得参考图像中主体所在的主体区域的过程,包括:In one embodiment, in the subject tracking method provided, subject detection is performed on the reference image to obtain the subject area in the reference image, including:
操作702,生成与参考图像对应的中心权重图,其中,中心权重图所表示的权重值从中心到边缘逐渐减小。In operation 702, a center weight map corresponding to the reference image is generated, wherein the weight value represented by the center weight map gradually decreases from the center to the edge.
其中,中心权重图是指用于记录参考图像中各个像素点的权重值的图。中心权重图中记录的权重值从中心向四边逐渐减小,即中心权重最大,向四边权重逐渐减小。通过中心权重图表征参考图像的图像中心像素点到图像边缘像素点的权重值逐渐减小。The central weight map refers to a map used to record the weight value of each pixel in the reference image. The weight value recorded in the center weight map gradually decreases from the center to the four sides, that is, the center weight is the largest, and the weight gradually decreases toward the four sides. The weight value from the center pixel of the reference image to the edge pixel of the image is gradually reduced through the center weight graph.
电子设备可以根据参考图像的大小生成对应的中心权重图。该中心权重图所表示的权重值从中心向四边逐渐减小。中心权重图可采用高斯函数、或采用一阶方程、或二阶方程生成。该高斯函数可为二维高斯函数。The electronic device can generate a corresponding center weight map according to the size of the reference image. The weight value represented by the center weight map gradually decreases from the center to the four sides. The center weight map can be generated using a Gaussian function, a first-order equation, or a second-order equation. The Gaussian function may be a two-dimensional Gaussian function.
操作704,将参考图像和中心权重图输入至主体检测模型中,得到主体区域置信度图。In operation 704, the reference image and the center weight map are input into the subject detection model to obtain the subject region confidence map.
其中,主体检测模型是预先根据同一场景的样本图、中心权重图及对应的已标注的主体掩膜图进行训练得到的模型。具体地,电子设备可以预先采集大量的训练数据,将训 练数据输入到包含有初始网络权重的主体检测模型进行训练,得到该主体检测模型。每组训练数据包括同一场景对应的样本图、中心权重图及已标注的主体掩膜图。其中,样本图和中心权重图作为训练的主体检测模型的输入,已标注的主体掩膜(mask)图作为训练的主体检测模型期望输出得到的真实值(ground truth)。主体掩膜图是用于识别图像中主体的图像滤镜模板,可以遮挡图像的其他部分,筛选出图像中的主体。主体检测模型可训练能够识别检测各种主体,如人、花、猫、狗等。Among them, the subject detection model is a model obtained by training in advance according to the sample map, the center weight map and the corresponding labeled subject mask map of the same scene. Specifically, the electronic device may collect a large amount of training data in advance, and input the training data into the subject detection model including the initial network weight for training, and obtain the subject detection model. Each set of training data includes a sample map corresponding to the same scene, a center weight map, and a labeled subject mask map. Among them, the sample map and the center weight map are used as the input of the trained subject detection model, and the labeled subject mask map is used as the ground truth that the trained subject detection model expects to output. The subject mask map is an image filter template used to identify the subject in the image, which can block other parts of the image and filter out the subject in the image. The subject detection model can be trained to recognize and detect various subjects, such as people, flowers, cats, dogs, etc.
具体地,电子设备可将该参考图像和中心权重图输入到主体检测模型中,进行检测可以得到主体区域置信度图。主体区域置信度图包含各个像素点为不同主体类别的置信度值,例如某个像素点属于人的置信度是0.8,花的置信度是0.1,狗的置信度是0.1。Specifically, the electronic device can input the reference image and the center weight map into the subject detection model, and perform the detection to obtain the subject area confidence map. The subject area confidence map contains the confidence values of each pixel for different subject categories. For example, the confidence that a certain pixel belongs to a person is 0.8, the confidence of a flower is 0.1, and the confidence of a dog is 0.1.
操作706,根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域。In operation 706, the subject in the reference image is determined according to the subject region confidence map, and the subject region where the subject is located is obtained.
主体可以是各种对象,如人、花、猫、狗、牛、白云等。电子设备根据主体区域置信度图中各个像素点为不同主体类别的置信度值的大小可以确定参考图像包含的各个主体及主体所在的主体区域。The subject can be various objects, such as people, flowers, cats, dogs, cows, white clouds, etc. The electronic device can determine each subject included in the reference image and the subject area where the subject is located according to the size of the confidence value of each pixel in the subject area confidence map for different subject categories.
具体地,电子设备可以对主体区域置信度图进行自适应阈值过滤,可以剔除主体区域置信度图中置信度值较低,和/或零散的像素点;电子设备还可以对主体区域置信度图进行滤波、膨胀、腐蚀中的一种或多个处理,可以得到边缘精细的主体区域置信度图;从而电子设备可以根据处理后的主体区域置信度图输出参考图像中包含的多个主体所在的主体区域,可以提高主体检测的准确性。Specifically, the electronic device can perform adaptive threshold filtering on the confidence map of the subject area, and can eliminate pixels with low confidence values and/or scattered pixels in the confidence map of the subject area; the electronic device can also perform the confidence map of the subject area. One or more of filtering, dilation, and corrosion can be performed to obtain a confidence map of the subject area with fine edges; thus, the electronic device can output the location of multiple subjects contained in the reference image according to the processed subject area confidence map The subject area can improve the accuracy of subject detection.
通过生成与参考图像对应的中心权重图,将参考图像和中心权重图输入到对应的主体检测模型中,可以得到主体区域置信度图,根据主体区域置信度图可以确定参考图像中的主体及所在的主体区域,利用中心权重图可以让图像中心的对象更容易被检测,可以更加准确的识别出参考图像中的主体。By generating the center weight map corresponding to the reference image, and inputting the reference image and center weight map into the corresponding subject detection model, the confidence map of the subject area can be obtained. According to the confidence map of the subject area, the subject and the location in the reference image can be determined Using the center weight map to make the object in the center of the image easier to detect, and to more accurately identify the subject in the reference image.
在一个实施例中,提供的主体追踪方法还可以获取与参考图像对应深度图像,对参考图像和深度图像进行配准处理,得到配准后的参考图像和深度图像,从而将配准后的参考图像、深度图像、中心权重图输入至主体检测模型中,得到主体区域置信度图,根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域。In one embodiment, the subject tracking method provided can also obtain the depth image corresponding to the reference image, perform registration processing on the reference image and the depth image, and obtain the registered reference image and the depth image, thereby combining the registered reference The image, depth image, and center weight map are input into the subject detection model to obtain a confidence map of the subject area, the subject in the reference image is determined according to the confidence map of the subject area, and the subject area where the subject is located is obtained.
深度图像是指包含深度信息的图像。深度图像可以是通过双摄像头拍摄同一场景计算得到的深度图;也可以是由结构光摄像头或TOF(Time of flight,飞行时间)摄像头采集的深度图等。具体地,电子设备可通过摄像头拍摄同一场景得到参考图像和对应的深度图像,然后采用相机标定参数对参考图像和深度图像进行配准,得到配准后的可见光图和深度图。可选地,电子设备对参考图像和深度图像进行配准之后,还可以对该参考图像中像素点的像素值和该深度图像中像素点的像素值分别进行归一化处理。具体地,对参考图像中像素点的像素值从0到255的整型归一化处理为-1到+1的浮点型数值,对深度图像中像素点的像素值归一化处理为0到1的浮点型数值。当无法拍摄得到深度图像时,可自动生成深度值为预设值的仿真深度图。该预设值可为0至1的浮点型数值。A depth image refers to an image containing depth information. The depth image can be a depth map calculated by shooting the same scene with dual cameras; it can also be a depth map collected by a structured light camera or a TOF (Time of Flight) camera. Specifically, the electronic device can obtain the reference image and the corresponding depth image by shooting the same scene through the camera, and then use the camera calibration parameters to register the reference image and the depth image to obtain the registered visible light image and the depth image. Optionally, after the electronic device registers the reference image and the depth image, the pixel value of the pixel in the reference image and the pixel value of the pixel in the depth image may be normalized respectively. Specifically, the integer normalization of the pixel value of the reference image from 0 to 255 is a floating-point value from -1 to +1, and the normalization of the pixel value of the pixel in the depth image is 0 Floating point value up to 1. When a depth image cannot be captured, a simulated depth map with a preset depth value can be automatically generated. The preset value can be a floating point value from 0 to 1.
在该实施例中,主体检测模型是预先根据同一场景的可见光图、深度图、中心权重图及对应的已标注的主体掩膜图进行训练得到的模型。主体检测模型是预先采集大量的训练数据,将训练数据输入到包含有初始网络权重的主体检测模型进行训练得到的。每组训练数据包括同一场景对应的可见光图、深度图、中心权重图及已标注的主体掩膜图。In this embodiment, the subject detection model is a model obtained by training in advance according to the visible light map, the depth map, the center weight map and the corresponding labeled subject mask map of the same scene. The subject detection model is obtained by pre-collecting a large amount of training data, and inputting the training data to the subject detection model containing the initial network weights for training. Each set of training data includes the visible light map, the depth map, the center weight map and the labeled subject mask map corresponding to the same scene.
本实施例中,将深度图像和中心权重图作为主体检测模型的输入,可以利用深度图像的深度信息让距离摄像头更近的对象更容易被检测,利用中心权重图中中心权重大,四边权重小的中心注意力机制,让图像中心的对象更容易被检测,引入深度图像实现对主体做深度特征增强,引入中心权重图对主体做中心注意力特征增强,不仅可以准确识别简单场景下的目标主体,更大大提高了复杂场景下的主体识别准确度,引入深度图像可以解决 传统目标检测方法对自然图像千变万化的目标鲁棒性较差的问题。简单场景是指主体单一,背景区域对比度不高的场景。In this embodiment, the depth image and the center weight map are used as the input of the subject detection model. The depth information of the depth image can be used to make objects closer to the camera easier to be detected. The center weight map is used to have a large center weight and a small weight on the four sides. The central attention mechanism makes it easier to detect objects in the center of the image. The introduction of depth images can enhance the depth features of the subject, and the central weight map can be used to enhance the central attention features of the subject, which can not only accurately identify the target subject in simple scenes. , To greatly improve the accuracy of subject recognition in complex scenes. The introduction of depth images can solve the problem of poor robustness of traditional target detection methods to the ever-changing targets of natural images. A simple scene refers to a scene with a single subject and low contrast in the background area.
在一个实施例中,提供的图像编码方法中根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域的过程,包括:In one embodiment, in the image coding method provided, the process of determining the subject in the reference image according to the subject region confidence map and obtaining the subject region where the subject is located includes:
操作802,对主体区域置信度图进行处理,得到主体掩膜图。In operation 802, the subject region confidence map is processed to obtain a subject mask map.
具体地,主体区域置信度图中存在一些置信度较低、零散的点,电子设备可以对主体区域置信度图进行过滤处理,得到主体掩膜图。该过滤处理可采用配置置信度阈值,将主体区域置信度图中置信度值低于置信度阈值的像素点过滤。该置信度阈值可采用自适应置信度阈值,也可以采用固定阈值,也可以采用分区域配置对应的阈值。其中,自适应置信度阈值可为局部自适应置信度阈值。该局部自适应置信度阈值是根据像素点的领域块的像素值分布来确定该像素点位置上的二值化置信度阈值。亮度较高的图像区域的二值化置信度阈值配置的较高,亮度较低的图像区域的二值化阈值置信度配置的较低。Specifically, there are some low-confidence and scattered points in the confidence map of the subject area, and the electronic device can filter the confidence map of the subject area to obtain the subject mask map. The filtering process can be configured to configure a confidence threshold to filter pixels with a confidence value lower than the confidence threshold in the confidence map of the subject area. The confidence threshold may be an adaptive confidence threshold, a fixed threshold, or a corresponding threshold configured by region. Wherein, the adaptive confidence threshold may be a local adaptive confidence threshold. The local adaptive confidence threshold is to determine the binarization confidence threshold at the position of the pixel according to the pixel value distribution of the domain block of the pixel. The image area with higher brightness has a higher binarization confidence threshold configuration, and the image area with lower brightness has a lower binarization threshold confidence configuration.
可选地,电子设备还可以对该主体区域置信度图进行自适应置信度阈值过滤处理,得到二值化掩膜图;对该二值化掩膜图进行形态学处理和引导滤波处理,得到主体掩膜图。具体地,电子设备将主体区域置信度图按照自适应置信度阈值过滤处理后,将保留的像素点的置信度值采用1表示,去掉的像素点的置信度值采用0表示,得到二值化掩膜图。形态学处理可包括腐蚀和膨胀。可先对二值化掩膜图进行腐蚀操作,再进行膨胀操作,去除噪声;再对形态学处理后的二值化掩膜图进行引导滤波处理,实现边缘滤波操作,得到边缘提取的主体掩膜图。通过形态学处理和引导滤波处理可以保证得到的主体掩膜图的噪点少或没有噪点,边缘更加柔和。Optionally, the electronic device can also perform adaptive confidence threshold filtering processing on the subject region confidence map to obtain a binarized mask map; perform morphological processing and guided filtering processing on the binarized mask map to obtain Main mask map. Specifically, after the electronic device filters the confidence map of the subject area according to the adaptive confidence threshold, the confidence value of the retained pixel is represented by 1, and the confidence value of the removed pixel is represented by 0, to obtain the binarization Mask map. Morphological treatments can include corrosion and expansion. You can perform the erosion operation on the binarized mask first, and then perform the expansion operation to remove the noise; and then conduct the guided filtering process on the binarized mask after morphological processing to realize the edge filtering operation and obtain the main mask for edge extraction. Membrane diagram. Through morphological processing and guided filtering processing, it can be ensured that the resulting subject mask has less or no noise and the edges are softer.
操作804,检测参考图像,确定参考图像中的高光区域。In operation 804, the reference image is detected, and the highlight area in the reference image is determined.
其中,高光区域是指亮度值大于亮度阈值的区域。Among them, the highlight area refers to an area where the brightness value is greater than the brightness threshold.
具体地,电子设备对参考图像进行高光检测,筛选得到亮度值大于亮度阈值的目标像素点,对目标像素点采用连通域处理得到高光区域。Specifically, the electronic device performs highlight detection on the reference image, filters to obtain target pixels with a brightness value greater than a brightness threshold, and applies connected domain processing to the target pixels to obtain a highlight area.
操作806,根据参考图像中的高光区域与主体掩膜图,确定参考图像中的主体,并获取主体所在的主体区域。In operation 806, the subject in the reference image is determined according to the highlight area in the reference image and the subject mask map, and the subject area where the subject is located is obtained.
具体地,电子设备可以将参考图像中的高光区域与该主体掩膜图做差分计算或逻辑与计算得到参考图像中消除高光的主体对应的主体区域。其中,电子设备将该参考图像中的高光区域与该主体掩膜图做差分处理,即参考图像和主体掩膜图中对应的像素值相减,得到该参考图像中的主体所在的主体区域。Specifically, the electronic device may perform difference calculation or logical sum calculation between the highlight area in the reference image and the subject mask map to obtain the subject area corresponding to the subject whose highlight is eliminated in the reference image. Wherein, the electronic device performs difference processing on the highlight area in the reference image and the subject mask image, that is, the reference image and the corresponding pixel values in the subject mask image are subtracted to obtain the subject area where the subject in the reference image is located.
通过对主体区域置信度图做过滤处理得到主体掩膜图,提高了主体区域置信度图的可靠性,对参考图像进行检测得到高光区域,然后与主体掩膜图进行处理,可得到消除了高光的主体所在的主体区域,针对影响主体识别精度的高光、高亮区域单独采用滤波器进行处理,提高了主体识别的精度和准确性。The main body mask image is obtained by filtering the main body region confidence map, which improves the reliability of the main body region confidence map. The reference image is detected to obtain the highlight area, and then processed with the main body mask image to eliminate the highlight The main body area where the main body is located is processed by a filter separately for the highlights and highlight areas that affect the accuracy of the main body recognition, which improves the accuracy and accuracy of the main body recognition.
图9为一个实施例中图像处理效果示意图。如9所示,参考图像902中存在一只蝴蝶,将参考图像902输入到主体检测模型后得到主体区域置信度图904,然后对主体区域置信度图904进行滤波和二值化得到二值化掩膜图906,再对二值化掩膜图906进行形态学处理和引导滤波实现边缘增强,得到主体掩膜图908。Fig. 9 is a schematic diagram of image processing effects in an embodiment. As shown in 9, there is a butterfly in the reference image 902. After inputting the reference image 902 into the subject detection model, the subject region confidence map 904 is obtained, and then the subject region confidence map 904 is filtered and binarized to obtain the binarization For the mask image 906, morphological processing and guided filtering are performed on the binary mask image 906 to achieve edge enhancement, and the main mask image 908 is obtained.
在一个实施例中,提供的图像编码方法中根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域的过程,包括:In one embodiment, in the image coding method provided, the process of determining the subject in the reference image according to the subject region confidence map and obtaining the subject region where the subject is located includes:
操作1002,根据主体区域置信度图得到参考图像包含的多个物体所在的区域及对应的类别。In operation 1002, the regions and corresponding categories of multiple objects included in the reference image are obtained according to the subject region confidence map.
具体地,电子设备可以通过主体识别网络对参考图像进行主体检测,得到参考图像包含的多个物体所在的区域及对应的类别。Specifically, the electronic device can perform subject detection on the reference image through the subject recognition network to obtain the regions and corresponding categories of multiple objects contained in the reference image.
操作1004,基于每一个物体对应的类别的优先等级、区域的大小和区域的位置中至 少一种确定作为主体的目标物体。In operation 1004, the target object as the subject is determined based on at least one of the priority of the category corresponding to each object, the size of the area, and the location of the area.
电子设备可以预设不同类别对应的优先等级。例如,类别的优先等级可以是人、花、猫、狗、牛、白云依次降低。电子设备基于每一个物体对应的类别的优先等级、区域的大小和区域的位置中的至少一种确定作为主体的目标物体。具体地,当参考图像中存在属于相同类别的多个物体时,电子设备可以根据多个物体对应的区域大小将区域最大的物体确定为目标物体,也可以将距离图像的中心最接近的物体确定目标物体。当参考图像中存在属于不同了类别的多个物体时,电子设备可以将优先等级最高的类别对应的物体作为目标物体,若参考图像中存在优先等级最高的多个物体,则可以进一步根据多个物体所在区域的大小确定目标区域;电子设备还可以结合每一个物体所在区域在图像中的位置确定主体的目标物体。例如,电子设备还可以预设不同类别的优先等级、不同区域大小、以及区域在图像中的不同位置的得分值,以根据每一个物体对应的类别的优先等级、区域的大小、区域在图像中的位置计算每一个物体的分数值,将分数值最高的物体作为目标物体。The electronic device can preset priority levels corresponding to different categories. For example, the priority of the category may be lowered in order of human, flower, cat, dog, cow, and white cloud. The electronic device determines the target object as the subject based on at least one of the priority of the category corresponding to each object, the size of the area, and the location of the area. Specifically, when there are multiple objects belonging to the same category in the reference image, the electronic device can determine the object with the largest area as the target object according to the size of the area corresponding to the multiple objects, or the object closest to the center of the image Target object. When there are multiple objects belonging to different categories in the reference image, the electronic device can use the object corresponding to the category with the highest priority as the target object. If there are multiple objects with the highest priority in the reference image, it can be further based on multiple objects. The size of the area where the object is located determines the target area; the electronic device can also determine the target object of the subject based on the position of each object in the image. For example, the electronic device can also preset the priority levels of different categories, the size of different regions, and the score values of different locations of the regions in the image, so as to determine the priority of each object, the size of the region, and the size of the region in the image. Calculate the score value of each object in the position in, and take the object with the highest score value as the target object.
操作1006,将目标物体所在的区域作为主体所在的主体区域。In operation 1006, the area where the target object is located is taken as the main body area where the main body is located.
电子设备确定作为主体的目标物体后,则将目标物体所在的区域作为主体所在的主体区域。After the electronic device determines the target object as the main body, it uses the area where the target object is located as the main body area where the main body is located.
通过基于每一个物体对应的类别的优先等级、区域的大小和区域的位置中至少一种确定作为主体的目标物体,将目标物体所在的区域作为主体所在的主体,可以提高主体识别的准确性。By determining the target object as the subject based on at least one of the priority of the category corresponding to each object, the size of the area, and the location of the area, the area where the target object is located is the subject where the subject is located, which can improve the accuracy of subject recognition.
应该理解的是,虽然图2、3、5-7的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2、3、5-7中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various operations in the flowcharts of FIGS. 2, 3, and 5-7 are sequentially displayed as indicated by the arrows, these operations are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly stated in this article, there is no strict order for the execution of these operations, and these operations can be executed in other orders. Moreover, at least part of the operations in Figures 2, 3, and 5-7 may include multiple sub-operations or multiple stages. These sub-operations or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of the sub-operations or stages is not necessarily performed sequentially, but may be executed alternately or alternately with other operations or at least a part of the sub-operations or stages of other operations.
图11为一个实施例的主体追踪装置的结构框图。如图11所示,该主体追踪装置包括第一获取模块1102、主体检测模块1104、第二获取模块1106、主体追踪模块1108、图像确定模块1110。其中:Fig. 11 is a structural block diagram of a subject tracking device according to an embodiment. As shown in FIG. 11, the subject tracking device includes a first acquisition module 1102, a subject detection module 1104, a second acquisition module 1106, a subject tracking module 1108, and an image determination module 1110. among them:
第一获取模块1102,用于在视频流中获取一帧图像作为参考图像;The first acquisition module 1102 is configured to acquire a frame of image in the video stream as a reference image;
主体检测模块1104,用于对参考图像进行主体检测,获得参考图像中主体所在的主体区域;The subject detection module 1104 is used to perform subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
第二获取模块1106,用于依次获取视频流中参考图像之后的每一帧图像;The second acquisition module 1106 is configured to sequentially acquire each frame of image after the reference image in the video stream;
主体追踪模块1108,用于基于主体区域,通过追踪算法对参考图像之后的每一帧图像进行追踪,得到主体在每一帧图像中的区域;The subject tracking module 1108 is used to track each frame of the image after the reference image based on the subject area through a tracking algorithm to obtain the subject area in each frame of the image;
图像确定模块1110,用于当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为参考图像,返回执行对参考图像进行主体检测,获得参考图像中主体所在的主体区域的操作。The image determination module 1110 is used for when the number of image frames to be tracked is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is performed back to obtain the subject area of the subject in the reference image Operation.
本申请实施例提供的主体追踪装置,通过对视频流中的参考图像进行主体检测得到主体所在的主体区域,依次获取参考图像之后的每一帧图像进行主体追踪,得到主体在每一帧图像中的区域,当追踪的图像帧数大于或等于帧数阈值时,则将获取的下一帧图像作为参考图像,并返回对参考图像进行主体检测的操作,即可以更新图像的主体区域,避免视频流中主体发生变化时导致的主体追踪失败的问题,可以提高主体追踪的准确性。The subject tracking device provided by the embodiments of the present application obtains the subject area where the subject is located by subject detection on the reference image in the video stream, acquires each frame of the reference image in turn for subject tracking, and obtains the subject in each frame of image When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the operation of subject detection on the reference image is returned, that is, the subject area of the image can be updated to avoid video The problem of subject tracking failure caused by changes in the subject in the stream can improve the accuracy of subject tracking.
在一个实施例中,主体追踪模块1108还可以用于获取主体在上一帧图像中的区域;将主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域;从当前帧图像中获取与 第一预测区域的位置相对应的第二预测区域;对第二预测区域进行追踪,得到主体在当前帧图像中的区域。In one embodiment, the subject tracking module 1108 can also be used to obtain the subject area in the previous frame of image; increase the subject area in the previous frame of image by a preset size to obtain the first prediction area; The second prediction area corresponding to the position of the first prediction area is acquired from the image; the second prediction area is tracked to obtain the area of the subject in the current frame image.
在一个实施例中,提供的主体追踪装置还包括尺寸调整模块812,尺寸调整模块812用于获取主体在上一帧图像之前的多帧图像中的区域;根据主体在多帧图像中的区域分析主体的移动速度;当移动速度大于或等于预设速度时,增大预设尺寸;当移动速度小于预设速度时,减小预设尺寸。In one embodiment, the provided subject tracking device further includes a size adjustment module 812, which is used to obtain the subject area in the multi-frame image before the previous frame image; analyze the subject area in the multi-frame image The movement speed of the subject; when the movement speed is greater than or equal to the preset speed, increase the preset size; when the movement speed is less than the preset speed, decrease the preset size.
在一个实施例中,提供的主体追踪装置还包括帧数阈值设定模块814,帧数阈值设定模块814用于获取主体在已追踪的多帧图像中的区域;基于主体在已追踪的多帧图像中的区域分析主体的位置变化量;当位置变化量大于或等于变化量阈值时,将帧数阈值设为第一数值;当位置变化量小于变化量阈值时,将帧数阈值设为第二数值,其中,第二数值大于第一数值。In one embodiment, the subject tracking device provided further includes a frame number threshold setting module 814. The frame number threshold setting module 814 is used to obtain the area of the subject in the tracked multi-frame image; The area in the frame image analyzes the subject’s position change; when the position change is greater than or equal to the change threshold, the frame number threshold is set to the first value; when the position change is less than the change threshold, the frame number threshold is set The second value, wherein the second value is greater than the first value.
在一个实施例中,帧数阈值设定模块814还可以用于获取陀螺仪输出的角速度数据;根据角速度数据分析电子设备的抖动幅度;根据抖动幅度对帧数阈值进行调整。In an embodiment, the frame number threshold setting module 814 can also be used to obtain angular velocity data output by the gyroscope; analyze the jitter amplitude of the electronic device according to the angular velocity data; and adjust the frame number threshold according to the jitter amplitude.
在一个实施例中,主体追踪模块808还可以用于获取参考图像中每一个主体对应的主体区域和类别;根据每一个主体对应的类别的优先等级、主体区域的大小和主体区域的位置中的至少一种确定每一个主体的追踪顺序;基于追踪顺序对参考图像之后的每一帧图像进行追踪,得到每一帧图像中每一个主体所在的区域。In an embodiment, the subject tracking module 808 can also be used to obtain the subject area and category corresponding to each subject in the reference image; according to the priority of each subject’s category, the size of the subject area and the location of the subject area. At least one determines the tracking order of each subject; based on the tracking order, each frame of image after the reference image is tracked to obtain the area where each subject is located in each frame of image.
在一个实施例中,主体检测模块1104还可以用于生成与参考图像对应的中心权重图,其中,中心权重图所表示的权重值从中心到边缘逐渐减小;将参考图像和中心权重图输入至主体检测模型中,得到主体区域置信度图;根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域。In an embodiment, the subject detection module 1104 can also be used to generate a center weight map corresponding to the reference image, wherein the weight value represented by the center weight map gradually decreases from center to edge; input the reference image and the center weight map In the subject detection model, the subject region confidence map is obtained; the subject in the reference image is determined according to the subject region confidence map, and the subject region where the subject is located is obtained.
在一个实施例中,主体检测模块1104还可以用于对主体区域置信度图进行处理,得到主体掩膜图;检测参考图像,确定参考图像中的高光区域;根据参考图像中的高光区域与主体掩膜图,确定参考图像中的主体,并获取主体所在的主体区域。In an embodiment, the subject detection module 1104 can also be used to process the confidence map of the subject area to obtain the subject mask map; detect the reference image and determine the highlight area in the reference image; according to the highlight area in the reference image and the subject Mask map, determine the subject in the reference image, and obtain the subject area where the subject is located.
在一个实施例中,主体检测模块1104还可以用于获取与参考图像对应的深度图像;对参考图像和深度图像进行配准处理,得到配准后的参考图像和深度图像;将配准后的参考图像、深度图像和所述中心权重图输入到主体检测模型中,得到主体区域置信度图;根据主体区域置信度图确定参考图像中的主体,并获取主体所在的主体区域。In an embodiment, the subject detection module 1104 may also be used to obtain a depth image corresponding to the reference image; perform registration processing on the reference image and the depth image to obtain the registered reference image and the depth image; The reference image, the depth image, and the center weight map are input into the subject detection model to obtain the subject region confidence map; the subject in the reference image is determined according to the subject region confidence map, and the subject region where the subject is located is obtained.
在一个实施例中,主体检测模块1104还可以用于根据主体区域置信度图参考图像包含多个物体所在的区域及对应的类别;基于每一个物体对应的类别的优先等级、区域的大小和区域的位置中至少一种确定作为主体的目标物体;将目标物体所在的区域作为主体所在的主体区域。In one embodiment, the subject detection module 1104 can also be used to reference the image containing the regions and corresponding categories of multiple objects according to the subject region confidence map; based on the priority level of the category corresponding to each object, the size of the region, and the region. At least one of the positions determines the target object as the subject; the area where the target object is located is the subject area where the subject is located.
上述主体追踪装置中各个模块的划分仅用于举例说明,在其他实施例中,可将主体追踪装置按照需要划分为不同的模块,以完成上述主体追踪装置的全部或部分功能。The division of each module in the subject tracking device is only for illustration. In other embodiments, the subject tracking device can be divided into different modules as needed to complete all or part of the functions of the subject tracking device.
本申请实施例中提供的主体追踪装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。The implementation of each module in the subject tracking device provided in the embodiment of the present application may be in the form of a computer program. The computer program can be run on a terminal or server. The program module composed of the computer program can be stored in the memory of the terminal or server. When the computer program is executed by the processor, the operation of the method described in the embodiment of the present application is realized.
本申请实施例还提供一种电子设备。上述电子设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图12为一个实施例中图像处理电路的示意图。如图12所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。The embodiment of the application also provides an electronic device. The above-mentioned electronic equipment includes an image processing circuit. The image processing circuit 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. 12 is a schematic diagram of an image processing circuit in an embodiment. As shown in FIG. 12, for ease of description, only various aspects of the image processing technology related to the embodiments of the present application are shown.
如图12所示,图像处理电路包括ISP处理器1240和控制逻辑器1250。成像设备1210捕捉的图像数据首先由ISP处理器1240处理,ISP处理器1240对图像数据进行分析以捕捉可用于确定和/或成像设备1210的一个或多个控制参数的图像统计信息。成像设备1210可包括具有一个或多个透镜1212和图像传感器1214的照相机。图像传感器1214可包括 色彩滤镜阵列(如Bayer滤镜),图像传感器1214可获取用图像传感器1214的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1240处理的一组原始图像数据。传感器1220(如陀螺仪)可基于传感器1220接口类型把采集的图像处理的参数(如防抖参数)提供给ISP处理器1240。传感器1220接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。As shown in FIG. 12, the image processing circuit includes an ISP processor 1240 and a control logic 1250. The image data captured by the imaging device 1210 is first processed by an ISP processor 1240, and the ISP processor 1240 analyzes the image data to capture image statistics that can be used to determine and/or one or more control parameters of the imaging device 1210. The imaging device 1210 may include a camera having one or more lenses 1212 and an image sensor 1214. The image sensor 1214 may include a color filter array (such as a Bayer filter). The image sensor 1214 may obtain the light intensity and wavelength information captured by each imaging pixel of the image sensor 1214, and provide a set of raw materials that can be processed by the ISP processor 1240. Image data. The sensor 1220 (such as a gyroscope) can provide the collected image processing parameters (such as anti-shake parameters) to the ISP processor 1240 based on the interface type of the sensor 1220. The sensor 1220 interface may utilize SMIA (Standard Mobile Imaging Architecture) interfaces, other serial or parallel camera interfaces, or a combination of the above interfaces.
此外,图像传感器1214也可将原始图像数据发送给传感器1220,传感器1220可基于传感器1220接口类型把原始图像数据提供给ISP处理器1240,或者传感器1220将原始图像数据存储到图像存储器1230中。In addition, the image sensor 1214 may also send raw image data to the sensor 1220, and the sensor 1220 may provide the raw image data to the ISP processor 1240 based on the sensor 1220 interface type, or the sensor 1220 may store the raw image data in the image memory 1230.
ISP处理器1240按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器1240可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 1240 processes the original image data pixel by pixel in multiple formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1240 may perform one or more image processing operations on the original image data and collect statistical information about the image data. Among them, the image processing operations can be performed with the same or different bit depth accuracy.
ISP处理器1240还可从图像存储器1230接收图像数据。例如,传感器1220接口将原始图像数据发送给图像存储器1230,图像存储器1230中的原始图像数据再提供给ISP处理器1240以供处理。图像存储器1230可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。The ISP processor 1240 may also receive image data from the image memory 1230. For example, the sensor 1220 interface sends the original image data to the image memory 1230, and the original image data in the image memory 1230 is then provided to the ISP processor 1240 for processing. The image memory 1230 may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include DMA (Direct Memory Access, direct memory access) features.
当接收到来自图像传感器1214接口或来自传感器1220接口或来自图像存储器1230的原始图像数据时,ISP处理器1240可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器1230,以便在被显示之前进行另外的处理。ISP处理器1240从图像存储器1230接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。ISP处理器1240处理后的图像数据可输出给显示器1270,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1240的输出还可发送给图像存储器1230,且显示器1270可从图像存储器1230读取图像数据。在一个实施例中,图像存储器1230可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1240的输出可发送给编码器/解码器1260,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1270设备上之前解压缩。编码器/解码器1260可由CPU或GPU或协处理器实现。When receiving raw image data from the image sensor 1214 interface or from the sensor 1220 interface or from the image memory 1230, the ISP processor 1240 may perform one or more image processing operations, such as temporal filtering. The processed image data can be sent to the image memory 1230 for additional processing before being displayed. The ISP processor 1240 receives the processed data from the image memory 1230, and performs image data processing in the original domain and in the RGB and YCbCr color spaces on the processed data. The image data processed by the ISP processor 1240 may be output to the display 1270 for viewing by the user and/or further processed by a graphics engine or GPU (Graphics Processing Unit, graphics processor). In addition, the output of the ISP processor 1240 can also be sent to the image memory 1230, and the display 1270 can read image data from the image memory 1230. In one embodiment, the image memory 1230 may be configured to implement one or more frame buffers. In addition, the output of the ISP processor 1240 may be sent to the encoder/decoder 1260 in order to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 1270 device. The encoder/decoder 1260 may be implemented by a CPU or GPU or a coprocessor.
ISP处理器1240确定的统计数据可发送给控制逻辑器1250单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜1212阴影校正等图像传感器1214统计信息。控制逻辑器1250可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备1210的控制参数及ISP处理器1240的控制参数。例如,成像设备1210的控制参数可包括传感器1220控制参数(例如增益、曝光控制的积分时间、防抖参数等)、照相机闪光控制参数、透镜1212控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜1212阴影校正参数。The statistical data determined by the ISP processor 1240 may be sent to the control logic 1250 unit. For example, the statistical data may include image sensor 1214 statistical information such as automatic exposure, automatic white balance, automatic focus, flicker detection, black level compensation, and lens 1212 shadow correction. The control logic 1250 may include a processor and/or a microcontroller that executes one or more routines (such as firmware). One or more routines can determine the control parameters and ISP processing of the imaging device 1210 based on the received statistical data. The control parameters of the device 1240. For example, the control parameters of the imaging device 1210 may include sensor 1220 control parameters (such as gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 1212 control parameters (such as focal length for focusing or zooming), or these The combination of parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (for example, during RGB processing), and lens 1212 shading correction parameters.
在本申请提供的实施例中,成像设备1210可以用于采集视频流中的每一帧图像;图像存储器1230用于存储成像设备1210采集的图像;ISP处理器1240可以获取对成像设备1210采集的视频流中的一帧图像进行主体检测,以得到参考图像中主体所在的主体区域,并根据主体区域对参考图像之后的每一帧图像进行主体追踪,当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为参考图像,返回执行对参考图像进行主体检测,获得参考图像中主体所在的主体区域的操作,直至视频流追踪完成。电子设备通过上述图像处理电路可以实现上述实施例所提供的主体追踪方法,在此不再赘述。In the embodiment provided in this application, the imaging device 1210 can be used to capture each frame of image in the video stream; the image memory 1230 is used to store the images collected by the imaging device 1210; the ISP processor 1240 can obtain the images collected by the imaging device 1210 Perform subject detection on a frame of image in the video stream to obtain the subject area of the subject in the reference image, and perform subject tracking on each frame after the reference image according to the subject area. When the number of tracked image frames is greater than or equal to the number of frames When the threshold is used, the next frame of image acquired is used as the reference image, and the operation of performing subject detection on the reference image to obtain the subject area of the subject in the reference image is performed until the video stream tracking is completed. The electronic device can implement the subject tracking method provided in the foregoing embodiment through the foregoing image processing circuit, and details are not described herein again.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令 的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行主体追踪方法的操作。The embodiment of the present application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to perform the operations of the subject tracking method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行主体追踪方法。A computer program product containing instructions that, when run on a computer, causes the computer to execute the subject tracking method.
本申请实施例所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to memory, storage, database, or other media used in the embodiments of the present application may include non-volatile and/or volatile memory. Suitable non-volatile 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), which acts as external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be understood as a limitation on the patent scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种主体追踪方法,其特征在于,包括:A subject tracking method, characterized by comprising:
    在视频流中获取一帧图像作为参考图像;Obtain a frame of image in the video stream as a reference image;
    对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域;Subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
    依次获取所述视频流中所述参考图像之后的每一帧图像;Sequentially acquiring each frame of image after the reference image in the video stream;
    基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域;及Based on the subject area, track each frame of image after the reference image by a tracking algorithm to obtain the subject area in each frame of image; and
    当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像,返回执行对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域的操作。When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is returned to obtain the subject area of the subject in the reference image. operating.
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域,包括:The method according to claim 1, wherein the tracking algorithm is used to track each frame of image after the reference image based on the subject area to obtain the area of the subject in each frame of image ,include:
    获取所述主体在上一帧图像中的区域;Acquiring the area of the subject in the previous frame of image;
    将所述主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域;Increasing the area of the subject in the previous frame of image by a preset size to obtain the first prediction area;
    从当前帧图像中获取与所述第一预测区域的位置相对应的第二预测区域;及Obtaining a second prediction area corresponding to the position of the first prediction area from the current frame image; and
    对所述第二预测区域进行追踪,得到所述主体在所述当前帧图像中的区域。Tracking the second prediction area to obtain the area of the subject in the current frame image.
  3. 根据权利要求2所述的方法,其特征在于,所述从当前帧图像中获取与所述第一预测区域的位置相对应的第二预测区域,包括:The method according to claim 2, wherein the obtaining the second prediction area corresponding to the position of the first prediction area from the current frame image comprises:
    根据所述第一预测区域在所述上一帧图像中的位置将所述第一预测区域映射至所述当前帧图像,得到所述第二预测区域;或者Mapping the first prediction area to the current frame image according to the position of the first prediction area in the previous frame image to obtain the second prediction area; or
    获取所述第一预测区域在所述上一帧图像中的坐标位置,根据所述坐标位置从所述当前帧图像中获取对应的所述第二预测区域。Acquire the coordinate position of the first prediction area in the previous frame image, and obtain the corresponding second prediction area from the current frame image according to the coordinate position.
  4. 根据权利要求2所述的方法,其特征在于,所述将所述主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域之前,还包括:The method according to claim 2, wherein the step of increasing the area of the subject in the previous frame of image by a preset size to obtain the first prediction area further comprises:
    获取所述主体在所述上一帧图像之前的多帧图像中的区域;Acquiring an area of the subject in multiple frames of images before the last frame of image;
    根据所述主体在多帧所述图像中的区域分析所述主体的移动速度;Analyzing the moving speed of the subject according to the region of the subject in the multiple frames of the image;
    当所述移动速度大于或等于预设速度时,增大所述预设尺寸;及When the moving speed is greater than or equal to the preset speed, increase the preset size; and
    当所述移动速度小于所述预设速度时,减小所述预设尺寸。When the moving speed is less than the preset speed, reduce the preset size.
  5. 根据权利要求1所述的方法,其特征在于,所述当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像之前,还包括:The method according to claim 1, characterized in that, when the number of tracked image frames is greater than or equal to the frame number threshold, before using the acquired next frame of image as the reference image, the method further comprises:
    获取所述主体在已追踪的多帧图像中的区域;Acquiring the subject area in the tracked multiple frames of images;
    基于所述主体在已追踪的多帧图像中的区域分析所述主体的位置变化量,其中,所述位置变化量表示所述主体在图像中的位置变化幅度;Analyzing the position change of the subject based on the area of the subject in the tracked multi-frame images, wherein the position change represents the magnitude of the change in the position of the subject in the image;
    当所述位置变化量大于或等于变化量阈值时,将所述帧数阈值设为第一数值;及When the position change is greater than or equal to the change threshold, the frame number threshold is set to the first value; and
    当所述位置变化量小于所述变化量阈值时,将所述帧数阈值设为第二数值,其中,所述第二数值大于所述第一数值。When the position change amount is less than the change amount threshold, the frame number threshold is set to a second value, where the second value is greater than the first value.
  6. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    获取陀螺仪输出的角速度数据;Obtain the angular velocity data output by the gyroscope;
    根据所述角速度数据分析电子设备的抖动幅度;及Analyzing the jitter amplitude of the electronic device according to the angular velocity data; and
    根据所述抖动幅度对所述帧数阈值进行调整。The frame number threshold is adjusted according to the jitter amplitude.
  7. 根据权利要求1所述的方法,其特征在于,所述基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域,包括:The method according to claim 1, wherein the tracking algorithm is used to track each frame of image after the reference image based on the subject area to obtain the area of the subject in each frame of image ,include:
    获取所述参考图像中每一个所述主体对应的主体区域和类别;Acquiring the subject area and category corresponding to each subject in the reference image;
    根据每一个所述主体对应的类别的优先等级、主体区域的大小和主体区域的位置中的至少一种确定每一个所述主体的追踪顺序;及Determining the tracking order of each subject according to at least one of the priority of the category corresponding to each subject, the size of the subject area, and the location of the subject area; and
    基于所述追踪顺序对所述参考图像之后的每一帧图像进行追踪,得到每一帧图像中每一个所述主体所在的区域。Tracking each frame of image after the reference image based on the tracking sequence to obtain the area where each subject is located in each frame of image.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域,包括:The method according to any one of claims 1 to 7, wherein the subject detection of the reference image to obtain the subject area where the subject is located in the reference image comprises:
    生成与所述参考图像对应的中心权重图,其中,所述中心权重图所表示的权重值从中心到边缘逐渐减小;Generating a center weight map corresponding to the reference image, wherein the weight value represented by the center weight map gradually decreases from center to edge;
    将所述参考图像和所述中心权重图输入至主体检测模型中,得到主体区域置信度图;及Input the reference image and the center weight map into the subject detection model to obtain the subject region confidence map; and
    根据所述主体区域置信度图确定所述参考图像中的主体,并获取所述主体所在的主体区域。Determine the subject in the reference image according to the subject region confidence map, and obtain the subject region where the subject is located.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述主体区域置信度图确定所述参考图像中主体,并获取所述主体所在的主体区域,包括:The method according to claim 8, wherein the determining the subject in the reference image according to the subject region confidence map, and obtaining the subject region where the subject is located, comprises:
    对所述主体区域置信度图进行处理,得到主体掩膜图;Processing the confidence map of the subject area to obtain a subject mask map;
    检测所述参考图像,确定所述参考图像中的高光区域;及Detecting the reference image and determining the highlight area in the reference image; and
    根据所述参考图像中的高光区域与所述主体掩膜图,确定所述参考图像中的主体,并获取所述主体所在的主体区域。Determine the subject in the reference image according to the highlight area in the reference image and the subject mask map, and obtain the subject area where the subject is located.
  10. 根据权利要求9所述的方法,其特征在于,所述对所述主体区域置信度图进行处理,得到主体掩膜图,包括:The method according to claim 9, wherein the processing the confidence map of the subject area to obtain a subject mask map comprises:
    对所述主体区域置信度图进行自适应置信度阈值过滤处理,得到二值化掩膜图;及Performing adaptive confidence threshold filtering processing on the confidence map of the subject area to obtain a binarized mask map; and
    对所述二值化掩膜图进行形态学处理和引导滤波处理,得到主体掩膜图。Morphological processing and guided filtering processing are performed on the binarized mask image to obtain a main body mask image.
  11. 根据权利要求8所述的方法,其特征在于,还包括:The method according to claim 8, further comprising:
    获取与所述参考图像对应的深度图像;及Acquiring a depth image corresponding to the reference image; and
    对所述参考图像和所述深度图像进行配准处理,得到配准后的参考图像和深度图像;Performing registration processing on the reference image and the depth image to obtain a registered reference image and a depth image;
    所述将所述参考图像和所述中心权重图输入至主体检测模型中,得到主体区域置信度图,包括:The inputting the reference image and the center weight map into the subject detection model to obtain the subject region confidence map includes:
    将所述配准后的参考图像、所述深度图像和所述中心权重图输入到主体检测模型中,得到主体区域置信度图。The registered reference image, the depth image, and the center weight map are input into the subject detection model to obtain the subject region confidence map.
  12. 根据权利要求8所述的方法,其特征在于,所述根据所述主体区域置信度图确定所述参考图像中的主体,并获取所述主体所在的主体区域,包括:The method according to claim 8, wherein the determining the subject in the reference image according to the subject region confidence map, and acquiring the subject region where the subject is located, comprises:
    根据所述主体区域置信度图得到所述参考图像包含多个物体所在的区域及对应的类别;Obtaining, according to the subject area confidence map, the reference image including the area where multiple objects are located and the corresponding category;
    基于每一个所述物体对应的类别的优先等级、所述区域的大小和所述区域的位置中至少一种确定作为所述主体的目标物体;及Determine the target object as the subject based on at least one of the priority of the category corresponding to each of the objects, the size of the area, and the location of the area; and
    将所述目标物体所在的区域作为所述主体所在的主体区域。The area where the target object is located is taken as the main body area where the main body is located.
  13. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:An electronic device includes a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the processor performs the following operations:
    在视频流中获取一帧图像作为参考图像;Obtain a frame of image in the video stream as a reference image;
    对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域;Subject detection on the reference image to obtain the subject area where the subject is located in the reference image;
    依次获取所述视频流中所述参考图像之后的每一帧图像;Sequentially acquiring each frame of image after the reference image in the video stream;
    基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域;及Based on the subject area, track each frame of image after the reference image by a tracking algorithm to obtain the subject area in each frame of image; and
    当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像, 返回执行对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域的操作。When the number of tracked image frames is greater than or equal to the frame number threshold, the next frame of image acquired is used as the reference image, and the subject detection of the reference image is returned to obtain the subject area of the reference image. operating.
  14. 根据权利要求13所述的电子设备,其特征在于,所述处理器执行所述基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域时,还执行如下操作:The electronic device according to claim 13, wherein the processor executes the tracking algorithm for each frame of the image after the reference image based on the subject area to obtain the subject in each frame When the area in a frame of image, also perform the following operations:
    获取所述主体在上一帧图像中的区域;Acquiring the area of the subject in the previous frame of image;
    将所述主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域;Increasing the area of the subject in the previous frame of image by a preset size to obtain the first prediction area;
    从当前帧图像中获取与所述第一预测区域的位置相对应的第二预测区域;及Obtaining a second prediction area corresponding to the position of the first prediction area from the current frame image; and
    对所述第二预测区域进行追踪,得到所述主体在所述当前帧图像中的区域。Tracking the second prediction area to obtain the area of the subject in the current frame image.
  15. 根据权利要求14所述的电子设备,其特征在于,所述处理器执行所述将所述主体在上一帧图像中的区域增大预设尺寸,得到第一预测区域之前,还执行如下操作:The electronic device according to claim 14, wherein the processor executes said increasing the area of the subject in the previous frame of image by a preset size, and before obtaining the first prediction area, further performs the following operations :
    获取所述主体在所述上一帧图像之前的多帧图像中的区域;Acquiring an area of the subject in multiple frames of images before the last frame of image;
    根据所述主体在多帧所述图像中的区域分析所述主体的移动速度;Analyzing the moving speed of the subject according to the region of the subject in the multiple frames of the image;
    当所述移动速度大于或等于预设速度时,增大所述预设尺寸;及When the moving speed is greater than or equal to the preset speed, increase the preset size; and
    当所述移动速度小于所述预设速度时,减小所述预设尺寸。When the moving speed is less than the preset speed, reduce the preset size.
  16. 根据权利要求13所述的电子设备,其特征在于,所述处理器执行所述当追踪的图像帧数大于或等于帧数阈值时,将获取的下一帧图像作为所述参考图像之前,还执行如下操作:The electronic device according to claim 13, wherein the processor executes when the number of image frames to be tracked is greater than or equal to the frame number threshold, before taking the next frame of image acquired as the reference image, Do the following:
    获取所述主体在已追踪的多帧图像中的区域;Acquiring the subject area in the tracked multiple frames of images;
    基于所述主体在已追踪的多帧图像中的区域分析所述主体的位置变化量,其中,所述位置变化量表示所述主体在图像中的位置变化幅度;Analyzing the amount of change in the position of the subject based on the area of the subject in the tracked multi-frame images, wherein the amount of position change represents the amplitude of the change in the position of the subject in the image;
    当所述位置变化量大于或等于变化量阈值时,将所述帧数阈值设为第一数值;及When the position change is greater than or equal to the change threshold, the frame number threshold is set to a first value; and
    当所述位置变化量小于所述变化量阈值时,将所述帧数阈值设为第二数值,其中,所述第二数值大于所述第一数值。When the position change amount is less than the change amount threshold, the frame number threshold is set to a second value, where the second value is greater than the first value.
  17. 根据权利要求13所述的电子设备,其特征在于,所述处理器执行所述基于所述主体区域,通过追踪算法对所述参考图像之后的每一帧图像进行追踪,得到所述主体在每一帧图像中的区域时,还执行如下操作:The electronic device according to claim 13, wherein the processor executes the tracking algorithm for each frame of the image after the reference image based on the subject area to obtain the subject in each frame When the area in a frame of image, also perform the following operations:
    获取所述参考图像中每一个所述主体对应的主体区域和类别;Acquiring the subject area and category corresponding to each subject in the reference image;
    根据每一个所述主体对应的类别的优先等级、主体区域的大小和主体区域的位置中的至少一种确定每一个所述主体的追踪顺序;及Determining the tracking order of each subject according to at least one of the priority of the category corresponding to each subject, the size of the subject area, and the location of the subject area; and
    基于所述追踪顺序对所述参考图像之后的每一帧图像进行追踪,得到每一帧图像中每一个所述主体所在的区域。Tracking each frame of image after the reference image based on the tracking sequence to obtain the area where each subject is located in each frame of image.
  18. 根据权利要求13至17中任一项所述的电子设备,其特征在于,所述处理器执行所述对所述参考图像进行主体检测,获得所述参考图像中主体所在的主体区域时,还执行如下操作:The electronic device according to any one of claims 13 to 17, wherein when the processor executes the subject detection of the reference image to obtain the subject area where the subject is located in the reference image, further Do the following:
    生成与所述参考图像对应的中心权重图,其中,所述中心权重图所表示的权重值从中心到边缘逐渐减小;Generating a center weight map corresponding to the reference image, wherein the weight value represented by the center weight map gradually decreases from center to edge;
    将所述参考图像和所述中心权重图输入至主体检测模型中,得到主体区域置信度图;及Inputting the reference image and the center weight map into the subject detection model to obtain the subject region confidence map; and
    根据所述主体区域置信度图确定所述参考图像中的主体,并获取所述主体所在的主体区域。Determine the subject in the reference image according to the subject region confidence map, and obtain the subject region where the subject is located.
  19. 根据权利要求18所述的电子设备,其特征在于,所述处理器执行所述根据所述主体区域置信度图确定所述参考图像中主体,并获取所述主体所在的主体区域时,还执行如下操作:The electronic device according to claim 18, wherein when the processor executes the determination of the subject in the reference image according to the subject area confidence map, and obtains the subject area where the subject is located, it also executes Do as follows:
    对所述主体区域置信度图进行处理,得到主体掩膜图;Processing the confidence map of the subject area to obtain a subject mask map;
    检测所述参考图像,确定所述参考图像中的高光区域;及Detecting the reference image and determining the highlight area in the reference image; and
    根据所述参考图像中的高光区域与所述主体掩膜图,确定所述参考图像中的主体,并获取所述主体所在的主体区域。According to the highlight area in the reference image and the subject mask map, the subject in the reference image is determined, and the subject area where the subject is located is acquired.
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至12中任一项所述的方法的操作。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the operation of the method according to any one of claims 1 to 12 when the computer program is executed by a processor.
PCT/CN2020/094848 2019-06-28 2020-06-08 Subject tracking method, electronic apparatus, and computer-readable storage medium WO2020259264A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910572412.5 2019-06-28
CN201910572412.5A CN110334635B (en) 2019-06-28 2019-06-28 Subject tracking method, apparatus, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2020259264A1 true WO2020259264A1 (en) 2020-12-30

Family

ID=68143572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/094848 WO2020259264A1 (en) 2019-06-28 2020-06-08 Subject tracking method, electronic apparatus, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110334635B (en)
WO (1) WO2020259264A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643420A (en) * 2021-07-02 2021-11-12 北京三快在线科技有限公司 Three-dimensional reconstruction method and device
CN116058814A (en) * 2021-11-01 2023-05-05 北京荣耀终端有限公司 Heart rate detection method and electronic equipment
CN116543330A (en) * 2023-04-13 2023-08-04 北京京东乾石科技有限公司 Crop information storage method, device, electronic equipment and computer readable medium
CN116863249A (en) * 2023-09-01 2023-10-10 山东拓新电气有限公司 Coal mine conveyor belt deviation recognition method based on artificial intelligence
CN117615255A (en) * 2024-01-19 2024-02-27 深圳市浩瀚卓越科技有限公司 Shooting tracking method, device, equipment and storage medium based on cradle head

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334635B (en) * 2019-06-28 2021-08-31 Oppo广东移动通信有限公司 Subject tracking method, apparatus, electronic device and computer-readable storage medium
CN110650291B (en) * 2019-10-23 2021-06-08 Oppo广东移动通信有限公司 Target focus tracking method and device, electronic equipment and computer readable storage medium
CN112800811B (en) * 2019-11-13 2023-10-13 深圳市优必选科技股份有限公司 Color block tracking method and device and terminal equipment
CN111093077A (en) * 2019-12-31 2020-05-01 深圳云天励飞技术有限公司 Video coding method and device, electronic equipment and storage medium
CN111238829A (en) * 2020-02-12 2020-06-05 上海眼控科技股份有限公司 Method and device for determining moving state, computer equipment and storage medium
CN111263187B (en) * 2020-02-13 2021-07-13 腾讯科技(深圳)有限公司 Video clipping method and device, computer equipment and computer-readable storage medium
CN112528786B (en) * 2020-11-30 2023-10-31 北京百度网讯科技有限公司 Vehicle tracking method and device and electronic equipment
CN113139998A (en) * 2021-04-23 2021-07-20 北京华捷艾米科技有限公司 Depth image generation method and device, electronic equipment and computer storage medium
CN113438471A (en) * 2021-06-18 2021-09-24 京东科技控股股份有限公司 Video processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120070075A1 (en) * 2010-09-17 2012-03-22 Honeywell International Inc. Image processing based on visual attention and reduced search based generated regions of interest
CN108062761A (en) * 2017-12-25 2018-05-22 北京奇虎科技有限公司 Image partition method, device and computing device based on adaptive tracing frame
CN108960290A (en) * 2018-06-08 2018-12-07 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109118510A (en) * 2018-08-10 2019-01-01 平安科技(深圳)有限公司 A kind of monitor video processing method, device and computer-readable medium
CN109685826A (en) * 2018-11-27 2019-04-26 哈尔滨工业大学(深圳) Target tracking method, system and the storage medium of adaptive features select
CN109767467A (en) * 2019-01-22 2019-05-17 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN110334635A (en) * 2019-06-28 2019-10-15 Oppo广东移动通信有限公司 Main body method for tracing, device, electronic equipment and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361700B2 (en) * 2014-05-08 2016-06-07 Tandent Vision Science, Inc. Constraint relationship for use in an image segregation
CN106303044B (en) * 2016-08-18 2019-08-16 努比亚技术有限公司 A kind of mobile terminal and obtain the method to coke number
CN106875425A (en) * 2017-01-22 2017-06-20 北京飞搜科技有限公司 A kind of multi-target tracking system and implementation method based on deep learning
CN107066990B (en) * 2017-05-04 2019-10-11 厦门美图之家科技有限公司 A kind of method for tracking target and mobile device
CN108062525B (en) * 2017-12-14 2021-04-23 中国科学技术大学 Deep learning hand detection method based on hand region prediction
CN108229425A (en) * 2018-01-29 2018-06-29 浙江大学 A kind of identifying water boy method based on high-resolution remote sensing image
CN108347563B (en) * 2018-02-07 2020-12-22 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and computer readable storage medium
CN109272016B (en) * 2018-08-08 2021-03-23 广州视源电子科技股份有限公司 Target detection method, device, terminal equipment and computer readable storage medium
CN109858436B (en) * 2019-01-29 2020-11-27 中国科学院自动化研究所 Target class correction method and detection method based on video dynamic foreground mask

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120070075A1 (en) * 2010-09-17 2012-03-22 Honeywell International Inc. Image processing based on visual attention and reduced search based generated regions of interest
CN108062761A (en) * 2017-12-25 2018-05-22 北京奇虎科技有限公司 Image partition method, device and computing device based on adaptive tracing frame
CN108960290A (en) * 2018-06-08 2018-12-07 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109118510A (en) * 2018-08-10 2019-01-01 平安科技(深圳)有限公司 A kind of monitor video processing method, device and computer-readable medium
CN109685826A (en) * 2018-11-27 2019-04-26 哈尔滨工业大学(深圳) Target tracking method, system and the storage medium of adaptive features select
CN109767467A (en) * 2019-01-22 2019-05-17 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN110334635A (en) * 2019-06-28 2019-10-15 Oppo广东移动通信有限公司 Main body method for tracing, device, electronic equipment and computer readable storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643420A (en) * 2021-07-02 2021-11-12 北京三快在线科技有限公司 Three-dimensional reconstruction method and device
CN116058814A (en) * 2021-11-01 2023-05-05 北京荣耀终端有限公司 Heart rate detection method and electronic equipment
CN116543330A (en) * 2023-04-13 2023-08-04 北京京东乾石科技有限公司 Crop information storage method, device, electronic equipment and computer readable medium
CN116863249A (en) * 2023-09-01 2023-10-10 山东拓新电气有限公司 Coal mine conveyor belt deviation recognition method based on artificial intelligence
CN116863249B (en) * 2023-09-01 2023-11-21 山东拓新电气有限公司 Coal mine conveyor belt deviation recognition method based on artificial intelligence
CN117615255A (en) * 2024-01-19 2024-02-27 深圳市浩瀚卓越科技有限公司 Shooting tracking method, device, equipment and storage medium based on cradle head
CN117615255B (en) * 2024-01-19 2024-04-19 深圳市浩瀚卓越科技有限公司 Shooting tracking method, device, equipment and storage medium based on cradle head

Also Published As

Publication number Publication date
CN110334635A (en) 2019-10-15
CN110334635B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2020259264A1 (en) Subject tracking method, electronic apparatus, and computer-readable storage medium
WO2020259179A1 (en) Focusing method, electronic device, and computer readable storage medium
US11457138B2 (en) Method and device for image processing, method for training object detection model
US11178324B2 (en) Focusing method and device, electronic device and computer-readable storage medium
WO2021022983A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
WO2019233297A1 (en) Data set construction method, mobile terminal and readable storage medium
US9615039B2 (en) Systems and methods for reducing noise in video streams
WO2021057652A1 (en) Focusing method and apparatus, electronic device, and computer readable storage medium
WO2019233263A1 (en) Method for video processing, electronic device and computer-readable storage medium
WO2020259474A1 (en) Focus tracking method and apparatus, terminal device, and computer-readable storage medium
WO2019148978A1 (en) Image processing method and apparatus, storage medium and electronic device
US20220166930A1 (en) Method and device for focusing on target subject, and electronic device
US11538175B2 (en) Method and apparatus for detecting subject, electronic device, and computer readable storage medium
CN110650291B (en) Target focus tracking method and device, electronic equipment and computer readable storage medium
CN109712177B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
WO2019233260A1 (en) Method and apparatus for pushing advertisement information, storage medium and electronic device
CN110276831B (en) Method and device for constructing three-dimensional model, equipment and computer-readable storage medium
TWI749364B (en) Motion detection method and motion detection system
CN110490196B (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN110378934B (en) Subject detection method, apparatus, electronic device, and computer-readable storage medium
CN110365897B (en) Image correction method and device, electronic equipment and computer readable storage medium
CN110399823B (en) Subject tracking method and apparatus, electronic device, and computer-readable storage medium
CN110688926B (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
WO2022227916A1 (en) Image processing method, image processor, electronic device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20832211

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20832211

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20832211

Country of ref document: EP

Kind code of ref document: A1