CN110147750B - An image search method, system and electronic device based on motion acceleration - Google Patents
An image search method, system and electronic device based on motion acceleration Download PDFInfo
- Publication number
- CN110147750B CN110147750B CN201910393254.7A CN201910393254A CN110147750B CN 110147750 B CN110147750 B CN 110147750B CN 201910393254 A CN201910393254 A CN 201910393254A CN 110147750 B CN110147750 B CN 110147750B
- Authority
- CN
- China
- Prior art keywords
- target
- frame
- tracked
- search range
- acceleration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/53—Querying
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
- G06V20/47—Detecting features for summarising video content
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本申请属于图像搜索技术领域,特别涉及一种基于运动加速度的图像搜索方法、系统及电子设备。The present application belongs to the technical field of image search, and in particular relates to an image search method, system and electronic device based on motion acceleration.
背景技术Background technique
随着人工智能技术的发展,越来越多的前沿知识实现了落地,其中,视频中的物体(目标)追踪技术受到了高校和企业界的广泛关注。目前,对于视频中的目标追踪,一般采用的技术方案是在视频的开始的第一帧标记出待追踪目标位置,然后再接下来的每一帧中,进行全局搜索从而找到下一帧中的待追踪目标。通常采用以下几种方式实现:With the development of artificial intelligence technology, more and more cutting-edge knowledge has been implemented. Among them, the object (target) tracking technology in video has received extensive attention from universities and business circles. At present, for the target tracking in the video, the general technical solution is to mark the target position to be tracked in the first frame of the video, and then perform a global search in each subsequent frame to find the target position in the next frame. target to be tracked. It is usually implemented in the following ways:
一、对全局图像进行滑动窗口方式下的搜索[Girshick R B,Donahue J,DarrellT,et al.Rich Feature Hierarchies for Accurate Object Detection and SemanticSegmentation[J].computer vision and pattern recognition,2014:580-587.],这种搜索方式的效率相对低下,并不能克服物体在运动过程中的形变。1. Searching the global image in a sliding window manner , the efficiency of this search method is relatively low, and it cannot overcome the deformation of the object during motion.
二、采用区域提议网络(RPN,Region Proposal Network,区域生成网络)进行[RenS,He K,Girshick R B,et al.Faster R-CNN:Towards Real-Time Object Detectionwith Region Proposal Networks[J].IEEE Transactions on Pattern Analysis andMachine Intelligence,2017,39(6):1137-1149.],这种网络的好处在于人为设置了全局目标的搜索方式,但是这种方式仍然要计算大量的图像,搜索范围广。2. Using the Region Proposal Network (RPN, Region Proposal Network, Region Generation Network) for [RenS, He K, Girshick RB, et al.Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks [J].IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.], the advantage of this kind of network lies in the artificially set global target search method, but this method still needs to calculate a large number of images and has a wide search range.
如上所述,现有的图像搜索技术都是全局范围搜索,都会产生较长的检索时间和比较多的计算冗余。As mentioned above, the existing image search technologies are all global searches, which will result in longer retrieval time and more computational redundancy.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种基于运动加速度的图像搜索方法、系统及电子设备,旨在至少在一定程度上解决现有技术中的上述技术问题之一。The present application provides an image search method, system and electronic device based on motion acceleration, aiming to solve one of the above technical problems in the prior art at least to a certain extent.
为了解决上述问题,本申请提供了如下技术方案:In order to solve the above problems, the application provides the following technical solutions:
一种基于运动加速度的图像搜索方法,包括以下步骤:An image search method based on motion acceleration, comprising the following steps:
步骤a:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Step a: Calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the first two frame images;
步骤b:根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step b: determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
步骤c:通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框,并对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Step c: Extract the candidate frame of the target to be tracked in the current frame image through the RPN network along the diagonal of the rectangular frame of the search range, and perform feature analysis on the candidate frame to obtain the target to be tracked in the current frame image. in the location.
本申请实施例采取的技术方案还包括:在所述步骤a中,所述加速度为矢量单位,既有速度也有方向,所述加速度计算公式为:The technical solution adopted in the embodiment of the present application further includes: in the step a, the acceleration is a vector unit, which has both a speed and a direction, and the acceleration calculation formula is:
本申请实施例采取的技术方案还包括:在所述步骤b中,所述根据加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框具体包括:将第i+1帧图像中待追踪目标的中心位置作为搜索范围矩形框对角线的交点,定义分别表示待追踪目标的中心位置的横、纵坐标,定义下一帧即i+2帧的起始搜索原点为:The technical solution adopted in the embodiment of the present application further includes: in the step b, determining the rectangular frame of the search range of the target to be tracked in the current frame image according to the acceleration calculation result specifically includes: The center position of the tracking target is used as the intersection of the diagonal lines of the search range rectangle, and the definition Represent the horizontal and vertical coordinates of the center position of the target to be tracked, and define the starting search origin of the next frame, i+2 frame, as:
则i+2帧的搜索范围矩形框的起始点为搜索范围矩形框的长宽分别为:Then the starting point of the search range rectangle of frame i+2 is The length and width of the search range rectangle are:
widthi+2=2*widthi+1,heighti+2=2*heighti+2。width i+2 =2*width i+1 , height i+2 =2*height i+2 .
本申请实施例采取的技术方案还包括:在所述步骤c中,所述通过RPN网络沿搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框具体为:在所述搜索范围矩形框的斜对角线上分别按照预设的间隔距离取得三个点,然后分别按照设定的三种长宽尺度比进行再次缩放,得到九个候选框。The technical solutions adopted in the embodiments of the present application further include: in the step c, the extraction of the candidate frame of the target to be tracked in the current frame image along the diagonal of the rectangular frame of the search range through the RPN network is specifically: Three points are obtained on the diagonal diagonal of the rectangular frame of the search range according to the preset interval distance, and then scaled again according to the set three length-width scale ratios to obtain nine candidate frames.
本申请实施例采取的技术方案还包括:所述步骤a中,所述前两帧图像具体为连续的两帧图像、离散间隔的两帧图像或任意时刻的两帧图像。The technical solutions adopted in the embodiments of the present application further include: in the step a, the first two frames of images are specifically two consecutive frames of images, two frames of images at discrete intervals, or two frames of images at any time.
本申请实施例采取的另一技术方案为:一种基于运动加速度的图像搜索系统,包括:Another technical solution adopted by the embodiments of the present application is: an image search system based on motion acceleration, comprising:
加速度计算模块:用于根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Acceleration calculation module: used to calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the previous two frame images;
搜索范围计算模块:用于根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Search range calculation module: used to determine the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
候选框提取模块:用于通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框;Candidate frame extraction module: for extracting the candidate frame of the target to be tracked in the current frame image along the diagonal of the rectangular frame of the search range through the RPN network;
目标检索模块:用于对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Target retrieval module: used to perform feature analysis on the candidate frame to obtain the position of the target to be tracked in the current frame image.
本申请实施例采取的技术方案还包括:所述加速度为矢量单位,既有速度也有方向,所述加速度计算公式为:The technical solution adopted in the embodiment of the present application further includes: the acceleration is a vector unit, which has both a speed and a direction, and the acceleration calculation formula is:
本申请实施例采取的技术方案还包括:所述搜索范围计算模块根据加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框具体包括:将第i+1帧图像中待追踪目标的中心位置作为搜索范围矩形框对角线的交点,定义分别表示待追踪目标的中心位置的横、纵坐标,定义下一帧即i+2帧的起始搜索原点为:The technical solutions adopted in the embodiments of the present application further include: the search range calculation module determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result specifically includes: The center position is used as the intersection of the diagonal lines of the search range rectangle, and the definition Represent the horizontal and vertical coordinates of the center position of the target to be tracked, and define the starting search origin of the next frame, i+2 frame, as:
则i+2帧的搜索范围矩形框的起始点为搜索范围矩形框的长宽分别为:Then the starting point of the search range rectangle of frame i+2 is The length and width of the search range rectangle are:
widthi+2=2*widthi+1,heighti+2=2*heighti+2。width i+2 =2*width i+1 , height i+2 =2*height i+2 .
本申请实施例采取的技术方案还包括:所述候选框提取模块通过RPN网络沿搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框具体为:在所述搜索范围矩形框的斜对角线上分别按照预设的间隔距离取得三个点,然后分别按照设定的三种长宽尺度比进行再次缩放,得到九个候选框。The technical solution adopted in the embodiment of the present application further includes: the candidate frame extraction module extracts the candidate frame of the target to be tracked in the current frame image along the diagonal of the search range rectangular frame through the RPN network. Specifically: in the search range rectangular frame Three points are obtained on the diagonal diagonal of the frame according to the preset interval distance, and then scaled again according to the three set aspect ratios to obtain nine candidate frames.
本申请实施例采取的技术方案还包括:所述前两帧图像具体为连续的两帧图像、离散间隔的两帧图像或任意时刻的两帧图像。The technical solutions adopted in the embodiments of the present application further include: the first two frames of images are specifically two consecutive frames of images, two frames of images at discrete intervals, or two frames of images at any time.
本申请实施例采取的又一技术方案为:一种电子设备,包括:Another technical solution adopted in the embodiment of the present application is: an electronic device, comprising:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的基于运动加速度的图像搜索方法的以下操作:The memory stores instructions executable by the one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the following operations of the above-described motion acceleration-based image search method :
步骤a:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Step a: Calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the first two frame images;
步骤b:根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step b: determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
步骤c:通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框,并对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Step c: Extract the candidate frame of the target to be tracked in the current frame image through the RPN network along the diagonal of the rectangular frame of the search range, and perform feature analysis on the candidate frame to obtain the target to be tracked in the current frame image. in the location.
相对于现有技术,本申请实施例产生的有益效果在于:本申请实施例的基于运动加速度的图像搜索方法、系统及电子设备利用加速度计算方式确定的一个有限的搜索范围矩形框,并沿搜索范围矩形框对角线上三个点进行追踪目标的候选框选定,从而确定了一个更小的检索范围,相对于现有技术,本申请无需进行全局检索,大大缩小了搜索范围从而减少了计算量,提高了计算速度。Compared with the prior art, the beneficial effects of the embodiments of the present application are: the motion acceleration-based image search method, system, and electronic device of the embodiments of the present application use a limited search range rectangular box determined by the acceleration calculation method, and search along the The three points on the diagonal of the range rectangle frame are selected as candidate frames of the tracking target, thereby determining a smaller search range. Compared with the prior art, the present application does not need to perform global search, which greatly narrows the search range and reduces the number of searches. The amount of calculation increases the calculation speed.
附图说明Description of drawings
图1是本申请实施例的基于运动加速度的图像搜索方法的流程图;1 is a flowchart of an image search method based on motion acceleration according to an embodiment of the present application;
图2(a)为待追踪目标在第i帧的目标画面,图2(b)为待追踪目标在第(i+1)帧的目标画面;Fig. 2 (a) is the target picture of the target to be tracked in the ith frame, and Fig. 2 (b) is the target picture of the target to be tracked in the (i+1)th frame;
图3为同一拍摄画面下(摄像头固定不动)的加速度计算方式示意图;Figure 3 is a schematic diagram of the acceleration calculation method under the same shooting picture (the camera is fixed);
图4为i+2帧搜索范围矩形框示意图;4 is a schematic diagram of a rectangular frame of the i+2 frame search range;
图5为本申请实施例的RPN网络的生成规则示意图;5 is a schematic diagram of a generation rule of an RPN network according to an embodiment of the present application;
图6是本申请实施例的基于运动加速度的图像搜索系统的结构示意图;6 is a schematic structural diagram of an image search system based on motion acceleration according to an embodiment of the present application;
图7是本申请实施例提供的基于运动加速度的图像搜索方法的硬件设备结构示意图。FIG. 7 is a schematic structural diagram of a hardware device of an image search method based on motion acceleration provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
请参阅图1,是本申请实施例的基于运动加速度的图像搜索方法的流程图。本申请实施例的基于运动加速度的图像搜索方法包括以下步骤:Please refer to FIG. 1 , which is a flowchart of an image search method based on motion acceleration according to an embodiment of the present application. The image search method based on motion acceleration according to the embodiment of the present application includes the following steps:
步骤100:在视频开始的第一帧图像中标记出待追踪目标的位置;Step 100: mark the position of the target to be tracked in the first frame image at the beginning of the video;
步骤200:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度及其可能的方向;Step 200: Calculate the acceleration of the target to be tracked in the current frame image and its possible direction according to the displacement of the first two frame images;
步骤200中,如图2所示,其中,图2(a)为待追踪目标在第i帧的目标画面,图2(b)为待追踪目标在第(i+1)帧的目标画面。将该图的目标追踪过程抽象为数学形式,即可表示为图3所示,为同一拍摄画面下(摄像头固定不动)的加速度计算方式。本申请实施例中,加速度同样和物理学中的加速度保持一样的性质,均为矢量单位,既有速度也有方向。加速度计算公式具体为:In
可以理解,本申请不仅限于根据连续的前两帧图像位移来确定第三帧的加速度,还可以采用离散间隔的帧或任意时刻两帧图片中的目标位移进行当前帧的加速度计算。It can be understood that the present application is not limited to determining the acceleration of the third frame according to the displacement of the first two consecutive frames of images, but can also use discretely spaced frames or target displacements in two frames of pictures at any time to calculate the acceleration of the current frame.
步骤300:根据加速度和方向计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step 300: Determine the search range rectangle frame of the target to be tracked in the current frame image according to the acceleration and direction calculation results;
步骤300中,搜索范围矩形框计算方式具体为:将第i+1帧中待追踪目标的中心位置作为搜索范围矩形框对角线的交点,定义分别表示待追踪目标的中心位置的横、纵坐标,定义下一帧即i+2帧的起始搜索原点为:In
公式(2)、(3)确定了i+2帧起始搜索的左下原点位置,则i+2帧的搜索范围矩形框的起始点为搜索范围矩形框长宽分别为:Formulas (2) and (3) determine the position of the lower left origin of the starting search of the i+2 frame, then the starting point of the search range rectangle of the i+2 frame is The length and width of the search range rectangle are:
widthi+2=2*widthi+1,heighti+2=2*heighti+2 (4)width i+2 = 2*width i+1 , height i+2 = 2*height i+2 (4)
将上述过程绘制成如图4所示,即为i+2帧搜索范围矩形框示意图。如图所示,i+2帧的实际检测范围由传统算法的整张图片变为了右上方图片中方框内的矩形框(为清晰显示,i+2帧的图片尺寸做了放大,实际上整张图片尺寸一直不变,变的只有搜索范围矩形框),从而减少目标搜索的计算量。The above process is drawn as shown in FIG. 4 , which is a schematic diagram of a rectangular frame of the i+2 frame search range. As shown in the figure, the actual detection range of the i+2 frame is changed from the entire image of the traditional algorithm to the rectangular frame in the box in the upper right image (for clear display, the image size of the i+2 frame is enlarged, in fact, the whole The size of the image remains unchanged, only the search range rectangle is changed), thereby reducing the amount of calculation of the target search.
可以理解,因为全等四边形的中心和四个点均能确定唯一的矩形框,因此无论是通过坐标原点还是通过前一帧的四个边界顶点都可以确定下一帧的起始搜索原点。It can be understood that because the center of the congruent quadrilateral and the four points can determine a unique rectangular frame, the origin of the next frame can be determined whether it is through the coordinate origin or through the four boundary vertices of the previous frame.
步骤400:通过RPN网络沿搜索范围矩形框的对角线按照设定的间隔距离取三个点,并分别按照三种长宽比提取到待追踪目标在当前帧图像中的9个候选框;Step 400: take three points along the diagonal of the rectangular frame of the search range according to the set interval distance through the RPN network, and extract 9 candidate frames of the target to be tracked in the current frame image according to the three aspect ratios respectively;
步骤400中,现有的检测方式为在整张图像中,先对图像每一个选出的中心位置分别进行原始尺寸不变、0.5缩放原始图片、2倍扩大原始图像的操作,继而在这三种图像的尺寸上进行长宽比分别为1:1、1:2、2:1的改变。所以每一个中心点位置可以找到3*3种候选框进行选择。该方式生成的冗余候选框比较多,为了节省计算力并且提升速度,本申请不再采用三种尺度的候选框,即不再进行原始图片的原始尺寸不变、0.5缩放原始图片、2倍扩大原始图片的操作,而是采用沿搜索范围矩形框对角线上三个点进行候选框的选定。In
步骤500:对9个候选框进行特征分析,得到待追踪目标在当前帧图像中的位置。Step 500: Perform feature analysis on the nine candidate frames to obtain the position of the target to be tracked in the current frame image.
具体请参阅图5,为本申请实施例的候选框生成规则示意图。图5中的九个框即为生成的待追踪目标的候选框。这九个框都是将固定大小的候选框统一放大1.25倍后再按照三种不同的长宽比提取得到的。图5中的D即为搜索范围矩形框的斜对角线直径长,在斜对角线上分别按照0.25、0.5、0.75的间隔距离取得三个点,然后分别按照1:1、1:2、2:1的三种长宽尺度比进行再次缩放,从而得到九个候选框。现有的RPN网络是在全部的图片上进行N个中心点的9N个候选框检测和对比,而本申请只需要在确定搜索范围矩形框后进行9个候选框的检测,极大地缩小了检索范围。可以理解,斜对角线上取点的间隔距离以及缩放长宽尺度比等参数都可以根据实际操作进行设定。For details, please refer to FIG. 5 , which is a schematic diagram of a candidate frame generation rule according to an embodiment of the present application. The nine boxes in FIG. 5 are the generated candidate boxes of the target to be tracked. These nine boxes are obtained by uniformly enlarging the fixed-size candidate boxes by 1.25 times and then extracting them according to three different aspect ratios. D in Figure 5 is the diagonal diameter of the rectangular frame of the search range. Three points are obtained on the diagonal at intervals of 0.25, 0.5, and 0.75, respectively, and then 1:1 and 1:2 respectively. , and the three aspect ratios of 2:1 are rescaled to obtain nine candidate boxes. The existing RPN network detects and compares 9N candidate frames of N center points on all pictures, while this application only needs to detect 9 candidate frames after determining the search range rectangular frame, which greatly reduces the retrieval time. scope. It can be understood that parameters such as the interval distance of the points taken on the diagonal line and the scaling aspect ratio can be set according to the actual operation.
另外,如果候选框缩放后超过了搜索范围矩形框,则在这一步保留上一帧图片这个位置的像素值或者特征值,直到选出的候选框能够准确捕捉到所有搜索范围矩形框。In addition, if the candidate frame exceeds the search range rectangle after scaling, the pixel value or feature value of the position of the previous frame picture is retained in this step until the selected candidate frame can accurately capture all the search range rectangles.
请参阅图6,是本申请实施例的基于运动加速度的图像搜索系统的结构示意图。本申请实施例的基于运动加速度的图像搜索系统包括位置标记模块、加速度计算模块、搜索范围计算模块、候选框提取模块和目标检索模块。Please refer to FIG. 6 , which is a schematic structural diagram of an image search system based on motion acceleration according to an embodiment of the present application. The motion acceleration-based image search system in the embodiment of the present application includes a position marking module, an acceleration calculation module, a search range calculation module, a candidate frame extraction module, and a target retrieval module.
位置标记模块:用于在视频开始的第一帧图像中标记出待追踪目标的位置;Position marking module: used to mark the position of the target to be tracked in the first frame image at the beginning of the video;
加速度计算模块:用于根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度及其可能的方向;具体的,如图2所示,其中,图2(a)为待追踪目标在第i帧的目标画面,图2(b)为待追踪目标在第(i+1)帧的目标画面。将该图的目标追踪过程抽象为数学形式,即可表示为图3所示,为同一拍摄画面下(摄像头固定不动)的加速度计算方式。本申请实施例中,加速度同样和物理学中的加速度保持一样的性质,均为矢量单位,既有速度也有方向。加速度计算公式具体为:Acceleration calculation module: used to calculate the acceleration of the target to be tracked in the current frame image and its possible direction according to the displacement of the previous two frames of images; specifically, as shown in Figure 2, where Figure 2(a) is the target to be tracked. The target picture of the target in the ith frame, Figure 2(b) is the target picture of the target to be tracked in the (i+1)th frame. The target tracking process in this figure is abstracted into a mathematical form, which can be represented as shown in FIG. 3 , which is an acceleration calculation method under the same shooting picture (the camera is fixed). In the embodiment of the present application, the acceleration also maintains the same properties as the acceleration in physics, and both are vector units, which have both speed and direction. The acceleration calculation formula is as follows:
可以理解,本申请不仅限于根据图像前两帧位移来确定第三帧的加速度,还可以采用离散间隔的帧或任意时刻两帧图片中的目标位移进行加速度计算。It can be understood that the present application is not limited to determining the acceleration of the third frame according to the displacement of the first two frames of the image, but can also use discretely spaced frames or target displacements in two frames of pictures at any time to perform the acceleration calculation.
搜索范围计算模块:用于根据加速度和方向计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;其中,搜索范围矩形框计算方式具体为:将第i+1帧中待追踪目标的中心位置作为搜索范围矩形框对角线的交点,定义分别表示待追踪目标的中心位置的横、纵坐标,定义下一帧即i+2帧的起始搜索原点为:Search range calculation module: used to determine the search range rectangle of the target to be tracked in the current frame image according to the acceleration and direction calculation results; wherein, the calculation method of the search range rectangle is: The center position is used as the intersection of the diagonal lines of the search range rectangle, and the definition Represent the horizontal and vertical coordinates of the center position of the target to be tracked, respectively, and define the starting search origin of the next frame, i+2 frame, as:
公式(2)、(3)确定了i+2帧起始搜索的左下原点位置,则i+2帧的搜索范围矩形框的起始点为矩形框长宽分别为:Formulas (2) and (3) determine the position of the lower left origin of the starting search of the i+2 frame, then the starting point of the search range rectangle of the i+2 frame is The length and width of the rectangular frame are:
widthi+2=2*widthi+1,heighti+2=2*heighti+2 (4)width i+2 = 2*width i+1 , height i+2 = 2*height i+2 (4)
将上述过程绘制成如图4所示,即为i+2帧搜索范围矩形框示意图。如图所示,i+2帧的实际检测范围由传统算法的整张图片变为了右上方图片中方框内的搜索范围矩形框(为清晰显示,i+2帧的图片尺寸做了放大,实际上整张图片尺寸一直不变,变的只有搜索范围矩形框),从而减少目标搜索的计算量。The above process is drawn as shown in FIG. 4 , which is a schematic diagram of a rectangular frame of the i+2 frame search range. As shown in the figure, the actual detection range of the i+2 frame has changed from the entire picture of the traditional algorithm to the search range rectangle in the box in the upper right picture (for clear display, the size of the i+2 frame has been enlarged, the actual The size of the entire image above has remained unchanged, and only the search range rectangle has changed), thereby reducing the amount of calculation of the target search.
可以理解,因为全等四边形的中心和四个点均能确定唯一的矩形框,因此无论是通过坐标原点还是通过前一帧的四个边界顶点都可以确定下一帧的起始搜索原点。It can be understood that because the center of the congruent quadrilateral and the four points can determine a unique rectangular frame, the origin of the next frame can be determined whether it is through the coordinate origin or through the four boundary vertices of the previous frame.
候选框提取模块:用于通过RPN网络沿搜索范围矩形框对角线按照设定的间隔距离取三个点,并分别按照三种长宽比提取到待追踪目标在当前帧图像中的9个候选框;其中,为了节省计算力并且提升速度,本申请不再采用三种尺度的候选框,即不再进行原始图片的原始尺寸不变、0.5缩放原始图片、2倍扩大原始图片的操作,而是采用沿搜索范围矩形框对角线上三个点进行候选框的选定。Candidate frame extraction module: It is used to take three points along the diagonal of the rectangular frame of the search range according to the set interval distance through the RPN network, and extract 9 points of the target to be tracked in the current frame image according to the three aspect ratios respectively. Candidate frame; wherein, in order to save computing power and improve speed, this application no longer uses candidate frames of three scales, that is, the original size of the original image is no longer unchanged, the original image is scaled by 0.5, and the original image is enlarged by 2 times. Instead, three points along the diagonal of the rectangular box of the search range are used to select the candidate box.
具体请参阅图5,为本申请实施例的RPN网络的生成规则示意图。图中的九个框即为生成的待追踪目标的候选框。这九个框都是将固定大小的候选框统一放大1.25倍后再按照三种不同的长宽比提取得到的。图4中的D即为搜索范围矩形框的斜对角线直径长,在斜对角线上分别按照0.25、0.5、0.75的间隔距离取得三个点,然后分别按照1:1、1:2、2:1的三种长宽尺度比进行再次缩放,从而得到九个候选框。现有的RPN网络是在全部的图片上进行N个中心点的9N个候选框检测和对比,而本申请只需要在确定搜索范围矩形框后进行9个候选框的检测,极大地缩小了检索范围。可以理解,斜对角线上取点的间隔距离以及缩放长宽尺度比等参数都可以根据实际操作进行设定。For details, please refer to FIG. 5 , which is a schematic diagram of a generation rule of an RPN network according to an embodiment of the present application. The nine boxes in the figure are the generated candidate boxes of the target to be tracked. These nine boxes are obtained by uniformly enlarging the fixed-size candidate boxes by 1.25 times and then extracting them according to three different aspect ratios. D in Figure 4 is the diagonal diameter of the rectangular frame of the search range. Three points are obtained on the diagonal at intervals of 0.25, 0.5, and 0.75, respectively, and then 1:1 and 1:2 respectively. , and the three aspect ratios of 2:1 are rescaled to obtain nine candidate boxes. The existing RPN network detects and compares 9N candidate frames of N center points on all pictures, while this application only needs to detect 9 candidate frames after determining the search range rectangular frame, which greatly reduces the retrieval time. scope. It can be understood that parameters such as the interval distance of the points taken on the diagonal line and the scaling aspect ratio can be set according to the actual operation.
另外,如果候选框缩放后超过了搜索范围矩形框,则在这一步保留上一帧图片这个位置的像素值或者特征值,直到选出的候选框能够准确捕捉到所有搜索范围矩形框。In addition, if the candidate frame exceeds the search range rectangle after scaling, the pixel value or feature value of the position of the previous frame picture is retained in this step until the selected candidate frame can accurately capture all the search range rectangles.
目标检索模块:用于对9个候选框进行特征分析,得到待追踪目标在当前帧图像中的位置。Target retrieval module: It is used to perform feature analysis on 9 candidate frames to obtain the position of the target to be tracked in the current frame image.
图7是本申请实施例提供的基于运动加速度的图像搜索方法的硬件设备结构示意图。如图7所示,该设备包括一个或多个处理器以及存储器。以一个处理器为例,该设备还可以包括:输入系统和输出系统。FIG. 7 is a schematic structural diagram of a hardware device of an image search method based on motion acceleration provided by an embodiment of the present application. As shown in Figure 7, the device includes one or more processors and memory. Taking a processor as an example, the device may further include: an input system and an output system.
处理器、存储器、输入系统和输出系统可以通过总线或者其他方式连接,图7中以通过总线连接为例。The processor, the memory, the input system and the output system may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 7 .
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块。处理器通过运行存储在存储器中的非暂态软件程序、指令以及模块,从而执行电子设备的各种功能应用以及数据处理,即实现上述方法实施例的处理方法。As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor executes various functional applications and data processing of the electronic device by running the non-transitory software programs, instructions and modules stored in the memory, that is, the processing method of the above method embodiment is implemented.
存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至处理系统。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory may include a stored program area and a stored data area, wherein the stored program area can store an operating system and an application program required by at least one function; the stored data area can store data and the like. Additionally, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, which may be connected to the processing system via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入系统可接收输入的数字或字符信息,以及产生信号输入。输出系统可包括显示屏等显示设备。The input system can receive input numerical or character information and generate signal input. The output system may include a display device such as a display screen.
所述一个或者多个模块存储在所述存储器中,当被所述一个或者多个处理器执行时,执行上述任一方法实施例的以下操作:The one or more modules are stored in the memory, and when executed by the one or more processors, perform the following operations of any of the foregoing method embodiments:
步骤a:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Step a: Calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the first two frame images;
步骤b:根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step b: determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
步骤c:通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框,并对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Step c: Extract the candidate frame of the target to be tracked in the current frame image through the RPN network along the diagonal of the rectangular frame of the search range, and perform feature analysis on the candidate frame to obtain the target to be tracked in the current frame image. in the location.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例提供的方法。The above product can execute the method provided by the embodiments of the present application, and has functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, reference may be made to the method provided in this embodiment of the present application.
本申请实施例提供了一种非暂态(非易失性)计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行以下操作:An embodiment of the present application provides a non-transitory (non-volatile) computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions can perform the following operations:
步骤a:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Step a: Calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the first two frame images;
步骤b:根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step b: determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
步骤c:通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框,并对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Step c: Extract the candidate frame of the target to be tracked in the current frame image through the RPN network along the diagonal of the rectangular frame of the search range, and perform feature analysis on the candidate frame to obtain the target to be tracked in the current frame image. in the location.
本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行以下操作:An embodiment of the present application provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer , which causes the computer to do the following:
步骤a:根据前两帧图像的位移计算出待追踪目标在当前帧图像中的加速度;Step a: Calculate the acceleration of the target to be tracked in the current frame image according to the displacement of the first two frame images;
步骤b:根据所述加速度计算结果确定待追踪目标在当前帧图像中的搜索范围矩形框;Step b: determining the search range rectangle of the target to be tracked in the current frame image according to the acceleration calculation result;
步骤c:通过RPN网络沿所述搜索范围矩形框的对角线提取待追踪目标在当前帧图像中的候选框,并对所述候选框进行特征分析,得到所述待追踪目标在当前帧图像中的位置。Step c: Extract the candidate frame of the target to be tracked in the current frame image through the RPN network along the diagonal of the rectangular frame of the search range, and perform feature analysis on the candidate frame to obtain the target to be tracked in the current frame image. in the location.
本申请实施例的基于运动加速度的图像搜索方法、系统及电子设备利用加速度计算方式确定的一个有限的搜索范围矩形框,并沿搜索范围矩形框对角线上三个点进行追踪目标的候选框选定,从而确定了一个更小的检索范围,相对于现有技术,本申请无需进行全局检索,大大缩小了搜索范围从而减少了计算量,提高了计算速度。The motion acceleration-based image search method, system, and electronic device of the embodiments of the present application use an acceleration calculation method to determine a limited search range rectangular frame, and track three points along the diagonal of the search range rectangular frame to track the candidate frame of the target Therefore, a smaller search range is determined. Compared with the prior art, the present application does not need to perform a global search, which greatly reduces the search range, reduces the amount of calculation, and improves the calculation speed.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本申请中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本申请所示的这些实施例,而是要符合与本申请所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined in this application may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (7)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910393254.7A CN110147750B (en) | 2019-05-13 | 2019-05-13 | An image search method, system and electronic device based on motion acceleration |
| PCT/CN2019/130538 WO2020228353A1 (en) | 2019-05-13 | 2019-12-31 | Motion acceleration-based image search method, system, and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910393254.7A CN110147750B (en) | 2019-05-13 | 2019-05-13 | An image search method, system and electronic device based on motion acceleration |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110147750A CN110147750A (en) | 2019-08-20 |
| CN110147750B true CN110147750B (en) | 2021-08-24 |
Family
ID=67595163
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910393254.7A Active CN110147750B (en) | 2019-05-13 | 2019-05-13 | An image search method, system and electronic device based on motion acceleration |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110147750B (en) |
| WO (1) | WO2020228353A1 (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110147750B (en) * | 2019-05-13 | 2021-08-24 | 深圳先进技术研究院 | An image search method, system and electronic device based on motion acceleration |
| CN112800811B (en) * | 2019-11-13 | 2023-10-13 | 深圳市优必选科技股份有限公司 | Color block tracking method and device and terminal equipment |
| CN111008305B (en) * | 2019-11-29 | 2023-06-23 | 百度在线网络技术(北京)有限公司 | Visual search method and device and electronic equipment |
| CN114764817B (en) * | 2020-12-30 | 2025-09-19 | 浙江宇视科技有限公司 | Target tracking method and device of pan-tilt camera, medium and electronic equipment |
| CN113177918B (en) * | 2021-04-28 | 2022-04-19 | 上海大学 | Intelligent and accurate inspection method and system for electric power tower by unmanned aerial vehicle |
| CN114708306B (en) * | 2022-03-10 | 2024-10-29 | 南京邮电大学 | Single-target tracking method, single-target tracking device and storage medium |
| CN116205914B (en) * | 2023-04-28 | 2023-07-21 | 山东中胜涂料有限公司 | Waterproof coating production intelligent monitoring system |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102915552A (en) * | 2012-09-18 | 2013-02-06 | 中国科学院计算技术研究所 | Controllable flame animation generation method and system |
| CN106403976A (en) * | 2016-08-30 | 2017-02-15 | 哈尔滨航天恒星数据系统科技有限公司 | Dijkstra optimal traffic path planning method and system based on impedance matching |
| CN106604035A (en) * | 2017-01-22 | 2017-04-26 | 北京君泊网络科技有限责任公司 | Motion estimation method for video encoding and compression |
| CN106877237A (en) * | 2017-03-16 | 2017-06-20 | 天津大学 | A Method of Detecting Missing Insulators in Transmission Lines Based on Aerial Images |
| CN107180435A (en) * | 2017-05-09 | 2017-09-19 | 杭州电子科技大学 | A kind of human body target tracking method suitable for depth image |
| CN109635821A (en) * | 2018-12-04 | 2019-04-16 | 北京字节跳动网络技术有限公司 | Feature extracting method, device, equipment and the readable medium of image-region |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104933064B (en) * | 2014-03-19 | 2018-02-23 | 株式会社理光 | The method and apparatus for predicting the kinematic parameter of destination object |
| CN106373143A (en) * | 2015-07-22 | 2017-02-01 | 中兴通讯股份有限公司 | Adaptive method and system |
| CN105678808A (en) * | 2016-01-08 | 2016-06-15 | 浙江宇视科技有限公司 | Moving object tracking method and device |
| CN107346538A (en) * | 2016-05-06 | 2017-11-14 | 株式会社理光 | Method for tracing object and equipment |
| CN109559330B (en) * | 2017-09-25 | 2021-09-10 | 北京金山云网络技术有限公司 | Visual tracking method and device for moving target, electronic equipment and storage medium |
| CN108363998A (en) * | 2018-03-21 | 2018-08-03 | 北京迈格威科技有限公司 | A kind of detection method of object, device, system and electronic equipment |
| CN110147750B (en) * | 2019-05-13 | 2021-08-24 | 深圳先进技术研究院 | An image search method, system and electronic device based on motion acceleration |
-
2019
- 2019-05-13 CN CN201910393254.7A patent/CN110147750B/en active Active
- 2019-12-31 WO PCT/CN2019/130538 patent/WO2020228353A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102915552A (en) * | 2012-09-18 | 2013-02-06 | 中国科学院计算技术研究所 | Controllable flame animation generation method and system |
| CN106403976A (en) * | 2016-08-30 | 2017-02-15 | 哈尔滨航天恒星数据系统科技有限公司 | Dijkstra optimal traffic path planning method and system based on impedance matching |
| CN106604035A (en) * | 2017-01-22 | 2017-04-26 | 北京君泊网络科技有限责任公司 | Motion estimation method for video encoding and compression |
| CN106877237A (en) * | 2017-03-16 | 2017-06-20 | 天津大学 | A Method of Detecting Missing Insulators in Transmission Lines Based on Aerial Images |
| CN107180435A (en) * | 2017-05-09 | 2017-09-19 | 杭州电子科技大学 | A kind of human body target tracking method suitable for depth image |
| CN109635821A (en) * | 2018-12-04 | 2019-04-16 | 北京字节跳动网络技术有限公司 | Feature extracting method, device, equipment and the readable medium of image-region |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2020228353A1 (en) | 2020-11-19 |
| CN110147750A (en) | 2019-08-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110147750B (en) | An image search method, system and electronic device based on motion acceleration | |
| US11062123B2 (en) | Method, terminal, and storage medium for tracking facial critical area | |
| CN110866496B (en) | Robot positioning and mapping method and device based on depth image | |
| CN112597837B (en) | Image detection method, device, equipment, storage medium and computer program product | |
| CN104376576B (en) | A kind of method for tracking target and device | |
| CN107292949B (en) | Three-dimensional reconstruction method and device of scene and terminal equipment | |
| CN110807410B (en) | Key point positioning method and device, electronic equipment and storage medium | |
| CN109241810B (en) | Virtual character image construction method and device and storage medium | |
| CN111640089A (en) | Defect detection method and device based on feature map center point | |
| CN103440667B (en) | The automaton that under a kind of occlusion state, moving target is stably followed the trail of | |
| WO2021036373A1 (en) | Target tracking method and device, and computer readable storage medium | |
| CN113240716B (en) | Twin network target tracking method and system with multi-feature fusion | |
| CN111192312B (en) | Depth image acquisition method, device, equipment and medium based on deep learning | |
| CN102103457A (en) | Briefing operating system and method | |
| CN110619656A (en) | Face detection tracking method and device based on binocular camera and electronic equipment | |
| CN117132649A (en) | Artificial intelligence integrated Beidou satellite navigation ship video positioning method and device | |
| CN114283198A (en) | A SLAM method for removing dynamic objects based on RGBD sensors | |
| CN113808162B (en) | Target tracking method, device, electronic equipment and storage medium | |
| Yang et al. | A light CNN based method for hand detection and orientation estimation | |
| CN115909444A (en) | Head posture method and device based on video stream | |
| ZHANG et al. | YGC-SLAM: A visual SLAM based on improved YOLOv5 and geometric constraints for dynamic indoor environments | |
| CN116858233A (en) | Path generation method, device, server and storage medium | |
| CN110634154A (en) | A Fast Template Matching Method Oriented to Tracking Targets with Wide Variations in Velocity | |
| CN111768427B (en) | Multi-moving-object tracking method, device and storage medium | |
| CN104731323B (en) | A kind of gesture tracking method of many direction of rotation SVM models based on HOG features |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |