CN110322477A - Characteristic point watch window setting method, tracking, device, equipment and medium - Google Patents

Characteristic point watch window setting method, tracking, device, equipment and medium Download PDF

Info

Publication number
CN110322477A
CN110322477A CN201910494926.3A CN201910494926A CN110322477A CN 110322477 A CN110322477 A CN 110322477A CN 201910494926 A CN201910494926 A CN 201910494926A CN 110322477 A CN110322477 A CN 110322477A
Authority
CN
China
Prior art keywords
size
image
watch window
tracking
characteristic point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910494926.3A
Other languages
Chinese (zh)
Other versions
CN110322477B (en
Inventor
罗汉杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201910494926.3A priority Critical patent/CN110322477B/en
Publication of CN110322477A publication Critical patent/CN110322477A/en
Application granted granted Critical
Publication of CN110322477B publication Critical patent/CN110322477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • G06T7/248Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/269Analysis of motion using gradient-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20016Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The characteristic point watch window setting method based on image pyramid that the present invention relates to a kind of, tracking, device, equipment and medium, the original dimension of the watch window of tomographic image before this method includes determining when, obtain the tracking convergence state tracked in a upper tomographic image to characteristic point, it obtains pre-set dimension and adjusts step-length, based on tracking convergence state, using original dimension and size adjust step-length set Current Layer image watch window size, the tracking convergence state that the program can track characteristic point in conjunction with a upper tomographic image rationally set Current Layer image watch window size, the watch window of each tomographic image is set dynamically in realization, the size of watch window is flexibly changed, it can be improved the flexibility tracked to characteristic point based on the watch window flexibly changed, shape is restrained according to tracking Watch window is set dynamically in state, is also beneficial to while ensuring to accurately track characteristic point, reduces to the feature point tracking time.

Description

Characteristic point watch window setting method, tracking, device, equipment and medium
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of characteristic point observation window based on image pyramid Device, the feature point tracking based on image pyramid is arranged in mouth setting method, the characteristic point watch window based on image pyramid Method, feature point tracking device, computer equipment and computer readable storage medium based on image pyramid.
Background technique
In computer vision system, feature texture matching belongs to important image processing tasks, feature texture matching Refer to and extract some feature textures in multiple images, these feature textures are referred to as characteristic point, then by these characteristic points Matching is got up.
Traditional technology usually passes through the interconversion rate of pixel intensity at any time under the watch window of detection fixed size, comes Movement speed and the direction of individual features point are found out, to realize the tracking to characteristic point.However, this technology is in order to accurately look for To the position of match point, it will usually characteristic point is tracked using a biggish watch window, and with watch window Increase, operand can greatly increase, and the efficiency tracked to characteristic point will be lower, and cause this technology to characteristic point The flexibility tracked is lower, it is difficult to take into account the accuracy and efficiency tracked to characteristic point.
Summary of the invention
Based on this, it is necessary to which the lower technical problem of the flexibility tracked to characteristic point for traditional technology provides A kind of characteristic point watch window setting method based on image pyramid, the setting of the characteristic point watch window based on image pyramid Device, the feature point tracking method based on image pyramid, the feature point tracking device based on image pyramid, computer equipment And computer readable storage medium.
A kind of characteristic point watch window setting method based on image pyramid, comprising steps of
Determine the original dimension of the watch window of current tomographic image;
Obtain the tracking convergence state tracked in a upper tomographic image to characteristic point;
It obtains preset size and adjusts step-length;
Based on the tracking convergence state, step-length is adjusted using the original dimension and size, the watch window is set Size.
A kind of feature point tracking method based on image pyramid, comprising steps of
Image pyramid is established to original image and target image respectively;Described image pyramid includes multi-layer image;
Based on the characteristic point watch window setting method as described above based on image pyramid, be arranged each layer original image and The size of the watch window of each layer target image;
In each tomographic image, characteristic point is tracked using the watch window of corresponding size;Wherein, each tomographic image Including each layer original image and each layer target image.
A kind of characteristic point watch window setting device based on image pyramid, comprising:
Original dimension determining module, the original dimension of the watch window for determining current tomographic image;
Convergence state obtains module, restrains for obtaining the tracking tracked in a upper tomographic image to characteristic point State;
It adjusts step-length and obtains module, adjust step-length for obtaining preset size;
Window size setup module is adjusted for being based on the tracking convergence state using the original dimension and size The size of the watch window is arranged in step-length.
A kind of feature point tracking device based on image pyramid, comprising:
Module is established, for establishing image pyramid to original image and target image respectively;Described image pyramid includes Multi-layer image;
Setup module, for based on the characteristic point watch window setting method as described above based on image pyramid, if Set the size of the watch window of each layer original image and each layer target image;
Tracking module, for being tracked using the watch window of corresponding size to characteristic point in each tomographic image;Its In, each tomographic image includes each layer original image and each layer target image.
A kind of computer equipment, including processor and memory, the memory are stored with computer program, the processing Device realizes following steps when executing the computer program:
Determine the original dimension of the watch window of current tomographic image;Acquisition tracks characteristic point in a upper tomographic image Obtained tracking convergence state;It obtains preset size and adjusts step-length;Based on the tracking convergence state, the initial ruler is utilized Very little and size adjusts the size that the watch window is arranged in step-length.
A kind of computer equipment, including processor and memory, the memory are stored with computer program, the processing Device realizes following steps when executing the computer program:
Image pyramid is established to original image and target image respectively;Described image pyramid includes multi-layer image;It is based on Characteristic point watch window setting method based on image pyramid as described above, is arranged each layer original image and each layer target image Watch window size;In each tomographic image, characteristic point is tracked using the watch window of corresponding size;Wherein, institute Stating each tomographic image includes each layer original image and each layer target image.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Determine the original dimension of the watch window of current tomographic image;Acquisition tracks characteristic point in a upper tomographic image Obtained tracking convergence state;It obtains preset size and adjusts step-length;Based on the tracking convergence state, the initial ruler is utilized Very little and size adjusts the size that the watch window is arranged in step-length.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Image pyramid is established to original image and target image respectively;Described image pyramid includes multi-layer image;It is based on Characteristic point watch window setting method based on image pyramid as described above, is arranged each layer original image and each layer target image Watch window size;In each tomographic image, characteristic point is tracked using the watch window of corresponding size;Wherein, institute Stating each tomographic image includes each layer original image and each layer target image.
The above-mentioned characteristic point watch window setting method based on image pyramid, tracking, device, computer equipment and Storage medium, determines the original dimension of the watch window of current tomographic image, obtain in a upper tomographic image to characteristic point carry out with The tracking convergence state that track obtains obtains preset size and adjusts step-length, is then based on the tracking convergence state, using first Beginning size and size adjust step-length and are configured come the size of the watch window to current tomographic image, and the program can be in conjunction with upper one The size of the watch window of the reasonable image that sets Current Layer of the tracking convergence state that tomographic image tracks characteristic point, thus The watch window of each tomographic image of image pyramid is set dynamically in realization, and the size of watch window is flexibly become Change, can be improved the flexibility tracked to characteristic point based on the watch window flexibly changed, according to tracking convergence state pair Watch window is set dynamically, and is also beneficial to while ensuring to accurately track characteristic point, is reduced to the feature point tracking time.
Detailed description of the invention
Fig. 1 is the application scenario diagram of the characteristic point watch window setting method based on image pyramid in one embodiment;
Fig. 2 is the flow diagram of the characteristic point watch window setting method based on image pyramid in one embodiment;
Fig. 3 is the schematic diagram of image pyramid in one embodiment;
Fig. 4 is the schematic diagram of watch window in one embodiment;
Fig. 5 is the schematic diagram of light stream vectors in one embodiment;
Fig. 6 is the flow diagram of the feature point tracking method based on image pyramid in one embodiment;
Fig. 7 is a kind of effect contrast figure of tracking characteristics point in one embodiment;
Fig. 8 is another effect contrast figure of tracking characteristics point in one embodiment;
Fig. 9 is the structural block diagram of the characteristic point watch window setting device in one embodiment based on image pyramid;
Figure 10 is the structural block diagram of the feature point tracking device based on image pyramid in one embodiment;
Figure 11 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the present invention, not For limiting the present invention.
" first second " is only to distinguish similar object it should be noted that term involved in the embodiment of the present invention, The particular sorted for object is not represented, it is possible to understand that ground, " first second " can be interchanged specific suitable in the case where permission Sequence or precedence.It should be understood that the object that " first second " is distinguished is interchangeable under appropriate circumstances, so that described herein The embodiment of the present invention can be performed in other sequences than those illustrated or described herein.
Characteristic point watch window setting method provided by the invention based on image pyramid, can be applied to such as Fig. 1 institute In the application scenarios shown, Fig. 1 is that characteristic point watch window setting method based on image pyramid is answered in one embodiment With scene figure, which includes computer equipment 100, which can be with image-capable Terminal or server, wherein terminal may include various personal computers, laptop and tablet computer etc., and server can It is realized with the server cluster that is formed with independent server or multiple servers.
Computer equipment 100 can carry out tracking and matching to the characteristic point in multiple images, it is however generally that, to characteristic point When being tracked, can be changed with time rate by the characteristic point gray scale of image under the watch window of fixed size, to ask The movement speed of this feature point and direction out, to realize the tracking to this feature point, and traditional technology uses the sight of fixed size Window is examined to track to characteristic point, is come as shown in Figure 1, computer equipment 100 can use image pyramid to characteristic point Tracked, wherein set characteristic point K as the angle point of the object 200 on image, using image pyramid to characteristic point K with When track, traditional technology watch window W1 employed in this tomographic image I1 and the observation window employed in upper tomographic image I2 The size of mouthful W2 is identical, and in order in each tomographic image to the tracking of characteristic point accuracy rate with higher, traditional technology Generally can the size of watch window be arranged bigger, but with the increase of observation window size, computer equipment 100 is right The operand that characteristic point is tracked can greatly increase.
The characteristic point watch window setting method of image pyramid provided by the invention, computer equipment 100 determine current The original dimension of the watch window of tomographic image, and obtain preset size and adjust step-length, and obtain in a upper tomographic image to spy Sign clicks through the obtained tracking convergence state of line trace, finally, computer equipment 100 is based on the tracking convergence state, using initial Size and size adjust step-length and are configured to the size of the watch window of current tomographic image, combine a tomographic image to feature The size for clicking through the watch window of the reasonable image that sets Current Layer of tracking convergence state of line trace, is realized to image pyramid The watch window of each tomographic image be set dynamically, the size of watch window is flexibly changed, based on flexibly variation Watch window can be improved the flexibility tracked to characteristic point, according to tracking convergence state to watch window carry out dynamic Setting, is also beneficial to while ensuring to accurately track characteristic point, reduces to the feature point tracking time.
In one embodiment, a kind of characteristic point watch window setting method based on image pyramid is provided, is referred to Fig. 2, Fig. 2 are the flow diagram of the characteristic point watch window setting method based on image pyramid in one embodiment, the party Method can be realized based on computer equipment 100 shown in FIG. 1, should be arranged based on the characteristic point watch window of image pyramid Method may comprise steps of:
Step S101 determines the original dimension of the watch window of current tomographic image.
When the characteristic point to image tracks, characteristic point can be tracked based on image pyramid.Wherein, scheme As pyramid generally comprises multi-layer image, as shown in figure 3, Fig. 3 is the schematic diagram of image pyramid in one embodiment, image gold Word tower generally comprises two steps, carries out a low-pass filtering to image first and carries out smoothly, then to the pixel of image 1/2 sample process is carried out in transverse and longitudinal both direction, to obtain a series of image that scales reduce.If L indicates image gold word The level of tower is original image as shown in figure 3, as L=0, when mobile to the upper layer of image pyramid, the size of image and point Resolution reduces, and adjoint details is fewer.When being tracked based on image pyramid to characteristic point, usually from top layer (L=3) Start to track target feature point, a coarse tracking result is first obtained, then using tracking result as next layer Initial point is tracked again, and continuous iteration is until reaching L=0 layers, as a kind of analysis strategy from thick to thin.
In this step, current tomographic image refers in image pyramid, carries out the current of tracking processing to characteristic point The corresponding image of level, for example, if just carrying out tracking processing to characteristic point in this level of L=2, current tomographic image refers to Be the corresponding image of L=2 this level.It should be noted that using image pyramid to the characteristic point of image carry out with When track, each level of image pyramid all includes two images, and one is original image, and another is target image.Original image Refer to that the image where characteristic point, target image refer to that the image where match point, so-called match point refer to and characteristic point phase The point matched, and original image characteristic point is tracked, that is, will be according to the relevant information of the characteristic point of original image, in target figure The position of match point is found as in.In one embodiment, original image and target image can be adjacent two frame in video image Image.When being tracked using characteristic point of the image pyramid to image, can be built respectively for original image and target image Vertical image pyramid, and the image of each level all includes image corresponding with original image and target image.
In this step, current tomographic image may include current layer original image and current layer target image, in current tomographic image When being tracked to characteristic point, it is first determined the original dimension of the watch window of current tomographic image.For the initial of watch window Size, original dimension can be pre-set fixed value, and each tomographic image all uses identical original dimension, is also possible to Each tomographic image uses different original dimensions, and if top layer images use the watch window of size A, next layer of top layer images is adopted With the watch window etc. of size B.And for the shape of watch window, it, can be using the sight of square for the convenience of calculating It examines window and carrys out tracking characteristics point, for the watch window of square, the size of size can be measured by the length of side length, The size of the more long then watch window of side length is bigger, this step uses size phase in current layer original image and current layer target image With watch window characteristic point is tracked, watch window major function played in feature point tracking process Be, by detect be located at the watch window in characteristic point intensity change with time the information such as rate find out its movement speed and Direction, to click through line trace to this feature.
Specifically, being illustrated below with reference to Fig. 4 to watch window, Fig. 4 is the signal of watch window in one embodiment Figure, Fig. 4 show original image 310 and target image 320, have characteristic point K1 on original image 310, this feature point K1 is original image An angle point of object 31 on 310, has object 32 on target image 320, which is opposite with object 31 It answers, the same object that can be regarded as in adjacent two frame video image is moved to object 32 from the position of object 31 Position, and there is characteristic point K2 in target image 320, this feature point K2 is matched with characteristic point K1, i.e. characteristic point K2 For match point, the characteristic point K1 of original image 310 is tracked, i.e., finds out the position of characteristic point K2 in target image 320.It sees Examining window W can be used for the tracking characteristics point K1 in original image 310 and target image 320, find out the position of characteristic point K2, specifically Can such as using optical flow method feature point tracking method based on watch window W calculate characteristic point K1 in target image 320 On position offset A, feature then can be traced into the position of original image 310 according to position offset A and characteristic point K1 Position of the point K2 on mesh image 320.
Step S102 obtains the tracking convergence state tracked in a upper tomographic image to characteristic point.
In this step, a upper tomographic image refers to a upper tomographic image for current tomographic image, by taking Fig. 3 as an example, if current tomographic image It is the corresponding image of L=2 level, then a upper tomographic image refers to top layer images (i.e. the corresponding image of L=3).This step is mainly Obtain the tracking convergence state tracked in a upper tomographic image to characteristic point, image pyramid each tomographic image to spy Sign can obtain corresponding tracking result when clicking through line trace, and track convergence state and refer to and search characteristic point in a upper tomographic image When whether restrain, i.e., similar grain corresponding with the watch window of characteristic point can be found in a upper tomographic image.This step, Tracking convergence state may include convergence and not restrain, wherein tracking convergence state be convergence be usually in the regular hour or In the number of iterations, the position of match point can be found, is then usually that cannot be looked within the time of setting or the number of iterations without restraining To the position of match point, or match point is found within the time of setting or the number of iterations, but the position of the match point and feature The positional shift of point is excessive.
Step S103 obtains preset size and adjusts step-length.
In this step, size adjusts step-length and is used to that the size of the watch window of current tomographic image to be adjusted, Ke Yili The watch window that step-length increases or reduces current tomographic image is adjusted with the size, wherein size adjusting step-length can be to be set in advance The fixed value set is all made of identical size adjusting step-length for each tomographic image to adjust the size of watch window.
The specific set-up mode of step-length is adjusted for size, can be arranged in conjunction with the number of levels of image pyramid, one In a embodiment, the pyramid number of plies of the image pyramid can be first determined, so before obtaining preset size and adjusting step-length Ruler is arranged with the full-size, minimum dimension and the pyramid number of plies in the full-size and minimum dimension for obtaining watch window afterwards Very little adjusting step-length.
Specifically, setting LmIndicate that the given pyramid number of plies, the full-size of watch window are Wmax, minimum dimension is Wmin, then size adjusts step-length step and can indicate are as follows:The present embodiment is adjusted using fixed step size The size of watch window can make computer equipment 100 more efficient when tracking to characteristic point.
Setting for the full-size and minimum dimension of watch window, is L with the pyramid number of pliesmImage pyramid be Example, the image of the top of the image pyramid is bottom image resolution ratioSo if the ruler of watch window Very little is W, and wide and high respectively w and h, then in the image of top layer, substantial image context included by watch window isWithWhen watch window is sufficiently large, so that watch window is greater than the motion range of characteristic point, if w=h= 21, Lm=3, then the image range for the range 168 × 168 that watch window maximum can include, i.e., if the displacement of characteristic point is less than When 84 pixels (half of maximum magnitude), which can observe to obtain.Therefore, in the maximum of setting watch window It when size, can be determined according to the average displacement length of this feature point, if the average displacement length of this feature point is Then need to be arranged the full-size W of the suitable pyramid number of plies (generally 3) and watch windowmax, so thatAnd the minimum dimension of watch window should be enough small, reduces operation time so that maximizing, still If watch window is too small, can be easy to be interfered by noise, it under normal circumstances, can be by the minimum dimension W of watch windowminIt is set as 9 ×9。
Step S104 adjusts the ruler of step-length setting watch window using original dimension and size based on tracking convergence state It is very little.
This step be mainly according to the tracking convergence state of a upper tomographic image, by original dimension and size adjust step-length come Set Current Layer image watch window size.
It, can be with specifically, if the tracking convergence result that a upper tomographic image tracks characteristic point is not restrain Adjusting step-length using original dimension and size is that a larger size is arranged in watch window, and larger size is schemed relative to upper one layer For the watch window of picture, that is, assume that the size of upper one layer of watch window is W1, then can use original dimension and size Adjusting step-length is that a size is arranged greater than W in current tomographic image1Watch window, i.e., in a upper tomographic image to feature point tracking not When convergence, attempt to increase the probability for finding match point by increasing watch window.Correspondingly, if a upper tomographic image is to feature Clicking through the tracking convergence result that line trace obtains is convergence, then can use original dimension and size adjusting step-length is current layer figure It is less than W as a size is arranged1Watch window, to reduce the operand that current tomographic image tracks characteristic point so that The tracking convergence state that the size of the watch window of current tomographic image can track characteristic point based on a upper tomographic image into Row flexible modulation.And after setting the size of watch window of current tomographic image, it in one embodiment, can be based on such as light The feature point trackings method such as stream method tracks characteristic point in current tomographic image using the watch window.It needs to illustrate It is, if current tomographic image is top layer images, since top layer images do not have a upper tomographic image, for top layer images, Characteristic point can be tracked using the maximum sized watch window pre-set, to ensure the energy in top layer images The position of match point is enough found, the size of the subsequent watch window that corresponding tomographic image is adjusted in lower image is to balance to feature Click through the efficiency and accuracy rate of line trace.
The above-mentioned characteristic point watch window setting method based on image pyramid, determines the watch window of current tomographic image Original dimension obtains the tracking convergence state tracked in a upper tomographic image to characteristic point, obtains preset Size adjusts step-length, is then based on the tracking convergence state, adjusts step-length using original dimension and size come to current tomographic image The size of watch window be configured, the program can restrain shape in conjunction with the tracking that a upper tomographic image track characteristic point State carrys out the size of the watch window of the reasonable image that sets Current Layer, to realize the observation window to each tomographic image of image pyramid Mouth is set dynamically, and the size of watch window is flexibly changed, can be improved based on the watch window flexibly changed To the flexibility that characteristic point is tracked, watch window is set dynamically according to tracking convergence state, is also beneficial to true Definitely while true tracking characteristics point, reduce to the feature point tracking time.
Characteristic point can be tracked using optical flow method in each tomographic image of image pyramid, traditional KLT light stream Method is constant based on gray scale it is assumed that same point i.e. in space, the gray value in different images immobilize, and assumes it at this Under, rate, which is changed with time, by detecting pixel intensity in the watch window that is sized finds out the movement of individual features point Speed and direction, to realize the tracking of characteristic point.
Characteristic point can be tracked using optical flow method in a upper tomographic image, in one embodiment, upper one layer of figure As the tracking convergence state that is tracked to characteristic point can be using optical flow method on this in tomographic image to characteristic point It is iterated tracking, obtained tracking convergence state.
Wherein, successive ignition operation is carried out when can track in a upper tomographic image to characteristic point using optical flow method, The result that interative computation obtains each time is the light stream vectors p of the secondary iterationk, k indicates the number of iterations, and interative computation is all each time It can obtain a light stream vectors, the light stream vectors that successive ignition operation obtains and expression match point and characteristic point positional shift Amount.Light stream vectors are illustrated in conjunction with Fig. 5, Fig. 5 is the schematic diagram of light stream vectors in one embodiment, is located at a tomographic image It carries out 3 iteration to characteristic point using optical flow method in 400 to track, the light stream vectors that each secondary iteration tracks are respectively p1、p2With p3, then three light stream vectors and indicate this on tomographic image 400 an obtained match point and characteristic point position offset, can To think the match point obtained in a upper tomographic image 400 for x4.
Further, in one embodiment, above-mentioned acquisition tracks characteristic point in a upper tomographic image The step of tracking convergence state can specifically include: determination changes for being iterated tracking to characteristic point in a upper tomographic image Generation number;Obtain light stream vectors of the upper tomographic image under the number of iterations;Tracking convergence state is obtained according to light stream vectors.
Before the size of the watch window to current tomographic image is configured, need to obtain a tomographic image to characteristic point The tracking convergence state tracked, what the present embodiment can track characteristic point using optical flow method based on a upper tomographic image In the case of, first determine the number of iterations for being iterated tracking to characteristic point in a upper tomographic image, and the number of iterations is generally 30 Secondary, then light stream vectors of the available upper tomographic image under the number of iterations refer to maximum under the number of iterations here The number of iterations, if the number of iterations is set as 30, obtain light stream that a upper tomographic image is obtained when the number of iterations is 30 times to Amount finally obtains tracking convergence state according to the light stream vectors.Since light stream vectors have a certain size, and maximum number of iterations Corresponding light stream vectors are able to reflect out when a upper tomographic image tracks characteristic point, under defined the number of iterations whether It restrains (can find characteristic point), therefore can one layer of figure in accurate judgement according to the corresponding light stream vectors of maximum number of iterations The tracking convergence state of picture, if do not restrained, the size for needing to increase watch window accurately to find in current tomographic image The position of match point, on the contrary it can reduce the size of the watch window to accelerate arithmetic speed.
In one embodiment, above-mentioned the step of obtaining tracking convergence state according to the light stream vectors, can specifically include: The mould of the light stream vectors under above-mentioned the number of iterations is obtained, then judges a upper tomographic image to characteristic point according to the mould of the light stream vectors The tracking convergence state tracked.
In the present embodiment, light stream vectors pkIndicate light stream vectors of the characteristic point under kth time the number of iterations, i.e., corresponding iteration The position offset of the match point and characteristic point that are found under number, | | pk| | indicate light stream vectors pkMould, i.e., expression positional shift The length of amount, in normal iterative process, with the progress of iterative process each time, | | pk| | value can be smaller and smaller, directly To reach correct matching position (finding correct match point) when, | | pk| | value will become 0, but becoming 0 is ideal shape Under state | | pk| | the attainable value of institute, in practical situations, | | pk| | it usually will not be 0.Therefore, for one layer in accurate judgement The tracking convergence state that image tracks characteristic point, can be by light stream vectors | | pk| | in threshold value (such as 1e of setting-4) into Row compares, when | | pk| | value be less than the threshold value when, it is believed that tracking convergence state be convergence, if in maximum number of iterations K Under, light stream vectors pKStill without being less than threshold value, then judge tracking mode for not restraining, in this way can be quick and have Effect ground obtains a upper tomographic image to the tracking convergence state of characteristic point.
It can be convergence according to tracking convergence state after obtaining a upper tomographic image to the tracking convergence state of characteristic point Or two kinds of situations are not restrained, the size of the watch window of current tomographic image is adjusted.
In one of the embodiments, based on tracking convergence state, step-length setting is adjusted using original dimension and size and is seen If the step of examining the size of window may include: tracking convergence state for convergence, by original dimension and size adjust step-length into Row makees difference processing, obtains the size of watch window.
The present embodiment make difference by the way that original dimension and size are adjusted step-length to obtain the observation of current tomographic image The size of window can reduce current layer figure in the case where tracking convergence state of the upper tomographic image to characteristic point is convergent situation The size of the watch window of picture, compared to by the way of fixed size watch window, the scheme of the present embodiment be can achieve The effect of the operand tracked to characteristic point is reduced in current tomographic image.
In another embodiment, based on tracking convergence state, step-length setting observation is adjusted using original dimension and size If it is not restrain that the step of size of window, which may include: tracking convergence state, by original dimension and size adjust step-length into Row summation process obtains the size of watch window.
The present embodiment is summed by the way that original dimension and size are adjusted step-length, to obtain the observation of current tomographic image The size of window, can be in the case where tracking convergence state of the upper tomographic image to characteristic point be not convergent situation, and trial passes through increasing Add the mode of the size of watch window to increase the probability for finding match point in current tomographic image.
Further, original dimension and size are adjusted into step-length progress summation process above-mentioned, obtains the ruler of watch window In very little process, if the size for the watch window that summation process obtains is less than full-size, the size of the watch window is set For full-size, characteristic point is tracked in current tomographic image with maximum sized watch window.This is mainly considered Even if increasing the size of watch window according to step-length, but also it is difficult only by can once make the tracking to characteristic point receive It holds back, it is sometimes desirable to which repeatedly increasing window could make tracking restrain, and excessive adjustment can reduce the efficiency of tracking, therefore can be with Disposably the watch window of current tomographic image is adjusted the dimensions to full-size and tracked to characteristic point, using this side Formula efficiency can be higher, and more can be accurately in current layer image trace characteristic point.
In one embodiment, a kind of feature point tracking method based on image pyramid is additionally provided, with reference to Fig. 6, Fig. 6 For the flow diagram of the feature point tracking method in one embodiment based on image pyramid, this method may include walking as follows It is rapid:
Step S401, establishes image pyramid to original image and target image respectively.
In this step, before tracking to characteristic point, image gold word first can be established to original image and target image Tower, wherein original image refers to that the image where characteristic point, target image refer to that the image where match point, so-called match point are Refer to the point to match with characteristic point, and image pyramid then includes multi-layer image, each tomographic image of image pyramid may include Each layer original image and each layer target image.By taking the image pyramid with 3 levels as an example, the image of the 2nd level may include The original image of 2nd level and the target image of the 2nd level carry out tracking to characteristic point in the image of the 2nd level and refer to, be based on The relevant information of characteristic point on the original image of 2nd level finds in the target image of the 2nd level and matches with this feature point Match point position.
Step S402, based on the characteristic point watch window setting described in embodiment any one of as above based on image pyramid The size of the watch window of each layer original image and each layer target image is arranged in method.
This step is mainly using the characteristic point watch window setting method based on image pyramid as described above, to set It sets in image pyramid, the size of the watch window of each layer original image and each layer target image.
In one embodiment, if current tomographic image is top layer images, by current layer original image and current layer target figure The observation window size of picture is set as full-size, i.e., is carried out in top layer images to characteristic point with maximum sized watch window Tracking, is conducive to the position that characteristic point is accurate in top layer images in this way.
And if current tomographic image is not top layer images, and the size of the watch window of a upper tomographic image is set as current layer figure The original dimension of the watch window of picture is made using the size of a upper tomographic image used watch window in tracking characteristics point For the original dimension of the watch window of current tomographic image, based on the original dimension to the size of the watch window of current tomographic image into Row is adjusted.Then, it obtains preset size and adjusts step-length, and obtain and characteristic point is tracked to obtain in a upper tomographic image Tracking convergence state.
Wherein, if tracking convergence state is convergence, above-mentioned original dimension and size is adjusted into step-length and carry out making poor processing, Obtain the size of the watch window of current tomographic image;If tracking convergence state is not restrain, original dimension and size are adjusted Step-length carries out summation process, obtains the size of the watch window of current tomographic image.
Step S403 tracks characteristic point using the watch window of corresponding size in each tomographic image;Wherein, respectively Tomographic image includes each layer original image and each layer target image.
In this step, characteristic point is carried out using the watch window of corresponding size in each tomographic image of image pyramid Tracking, so that the size of watch window used by each tomographic image of image pyramid, it can be based on a upper tomographic image to characteristic point The tracking convergence state of tracking carrys out flexible modulation, balances the efficiency and accuracy rate of tracking.
In one embodiment, above-mentioned in each tomographic image, using corresponding size watch window to characteristic point carry out with The step of track, specifically includes:
In current layer original image, first the first ash of sum of the grayscale values of characteristic point is calculated using the watch window of corresponding size Gradient value is spent, the Hessian matrix of characteristic point is calculated according to the first shade of gray value.
This step gives the position x of original image I and a characteristic point disposed thereon, matching is found in target image J The position x ' of point.Assuming that the position of the initial matching point on target image J is x 'init, the minimum dimension of watch window is Wmin, Full-size is Wmax.It can be respectively that original image I and target image J establish image pyramid { IL}L=0...LmWith {JL}L=0...Lm, image pyramid may include multilayer, LmThe given pyramid number of plies of expression, generally 3, calculate watch window Adjust step-length
If the watch window of current layer original image is W={ (u, v) | 0 < u < w, 0 < v < h }, wherein w is watch window Width, h is the height of watch window, and u and v indicate the coordinate of the pixel in watch window.
In current layer original image, first sum of the grayscale values the first shade of gray value of characteristic point is calculated, and according to the first ash The specific steps of Hessian matrix that degree gradient value calculates characteristic point may include:
Current layer original image I is obtained firstLOn characteristic point the first gray value IL(x), it is then based on first gray value IL(x) this feature point is calculated in current layer original image ILThe gradient matrix of upper abscissa direction X and ordinate direction YWithThe gradient matrix of the abscissa direction and ordinate direction both direction can be made It is characterized the first shade of gray value a little.
Then it is based on watch window W, calculates current layer original image ILIn position xL=[px py]THessian matrix H (px py):
Wherein, (u, v) indicates the coordinate of pixel in watch window W, H (px py) be 2 × 2 sizes matrix, body Existing is in current layer original image ILIn, in xL=[px py]TThe image grayscale second dervative of position.
Then, in current layer target image, the second ash of initial matching point is calculated using the watch window of corresponding size Angle value;Initial matching point is the pixel defaulted on current layer target image;First the second gray value of sum of the grayscale values is carried out It is poor to make, and obtains gray-scale deviation value;The light of current tomographic image is calculated according to gray-scale deviation value, the first shade of gray value and Hessian matrix Flow vector.
Specifically, above step can use optical flow method, and the light stream of current tomographic image is calculated in the way of iteration Vector.Wherein it is possible to set variable k from 1 to K, for controlling the number of iterations of following steps, be traditionally arranged to be 30, iteration with Lower operation:
In current layer target image JLIn, using watch window W calculate initial matching point the second gray value, this initial It with point is defaulted in current layer target image JLOn pixel, the initial matching point is in current layer target image JLOn position It sets and is expressed asWherein,WithIt is preset With deviation postIn parameter, whereinIt can be preset as [0 0]T, andWithFor Position iterative parameter in -1 iterative process of kth, wherein the iterative parameter is initialized as γ0=[0 0]T.Based on observation window Mouth W, the second gray value that can calculate initial matching point is JL(q′x+u,q′y+ v), then can calculate gray-scale deviation value is IL (px+u,py+v)-JL(q′x+u,q′y+ v), wherein IL(px+u,py+ v) indicate the first gray value.Then current layer can be calculated The light stream vectors p of imagek:
Wherein, light stream vectors pkIllustrate characteristic point in the tracking offset of the secondary iteration, light stream vectors pkContain ash Spend deviation information and shade of gray information.
Finally, the position based on light stream vectors and initial matching point on current layer target image, obtains match point and is working as Position on front layer target image;Wherein, match point is the pixel to match on current layer target image with characteristic point.
In above-mentioned steps, light stream vectors p is being obtainedkAfterwards, position iterative parameter γ is updatedkk-1-pkIf | | pk|| Threshold value (such as 1e given less than one-4), then illustrate that iteration has restrained, iterative process can be exited, if | | pk| | it is greater than One given threshold value, then continue iteration.If the number of iterations k is greater than K, illustrate do not have under defined the number of iterations It restrains (not finding characteristic point), the size W=W+step of watch window can be increased at this time, if the observation window after increasing Mouth is not greater than Wmax, then tracked with the watch window after increasing.It, can be with if restrained under defined the number of iterations According to light stream vectors pkObtain final position iterative parameter γkk-1-pk, and can determine in current tomographic image (such as L layers of pyramid) finally matching offset are as follows: dLk, it is then based on the final matching and deviates and combine initial matching point current Position on layer target image, can be added to obtain position of the match point on current layer target image.And the match point is being worked as Position on front layer target image can be used for initializing the pyramidal matching deviation post of next layer: gL-1=2 (gL+dL), so After L=L-1 is set, again in next layer of pyramid diagram picture search match point position.Finally, in L=0 tomographic image, it is special The final position for levying match point of the point x in target image J can be expressed as x '=x 'init+g0+d0
The effect of the above-mentioned feature point tracking method based on image pyramid can refer to Fig. 7 and Fig. 8.Wherein, such as Fig. 7 institute Show, Fig. 7 is a kind of effect contrast figure of tracking characteristics point in one embodiment, and original image 701 and target image 702, which correspond to, to be passed The effect picture that the optical flow method of system tracks characteristic point, original image 703 and target image 704 correspond to the embodiment of the present invention The effect picture of feature point tracking method, the rectangular block midpoint in figure indicate the position of characteristic point and match point, the size of rectangle For the size of final watch window, it can be seen that the matching result of two methods is almost the same, and the spy of the embodiment of the present invention Point-tracking method is levied under using variable watch window strategy, most of characteristic points can be looked for by the smallest watch window To corresponding match point, the more difficult corresponding watch window of match point found in part can be larger.
As shown in figure 8, Fig. 8 is another effect contrast figure of tracking characteristics point in one embodiment, which is indicated Traditional optical flow method (former optical flow method) and feature point tracking method provided in an embodiment of the present invention are used respectively to a test set (variable window strategy optical flow method) carries out the time cost of Feature Points Matching as a result, ordinate indicates time cost, it can be seen that Feature point tracking method provided in an embodiment of the present invention has apparent advantage on operation efficiency.
As it can be seen that the above-mentioned feature point tracking method based on image pyramid provided in an embodiment of the present invention, can combine upper The size of the watch window of the reasonable image that sets Current Layer of the tracking convergence state that one tomographic image tracks characteristic point, from And realize and the watch window of each tomographic image of image pyramid is set dynamically, enable the size of watch window flexible Variation, can be improved the flexibility tracked to characteristic point based on the watch window flexibly changed, according to tracking convergence state Watch window is set dynamically, is also beneficial to while ensuring to accurately track characteristic point, when reducing to feature point tracking Between.
In one embodiment, a kind of characteristic point watch window setting device based on image pyramid, reference are provided Fig. 9, Fig. 9 are the structural block diagram of the characteristic point watch window setting device in one embodiment based on image pyramid, the device May include:
Original dimension determining module 101, the original dimension of the watch window for determining current tomographic image;
Convergence state obtains module 102, for obtaining the tracking tracked in a upper tomographic image to characteristic point Convergence state;
It adjusts step-length and obtains module 103, adjust step-length for obtaining preset size;
Window size setup module 104, for adjusting step-length using original dimension and size and setting based on tracking convergence state Set the size of watch window.
In one embodiment, tracking convergence state is to be iterated in a upper tomographic image to characteristic point using optical flow method Tracking, obtained tracking convergence state;Convergence state obtains module 102 and is further used for: determining in a upper tomographic image The number of iterations of tracking is iterated to characteristic point;Obtain light stream vectors of the upper tomographic image under the number of iterations;According to light stream Vector obtains tracking convergence state.
In one embodiment, convergence state obtains module 102 and is further used for: obtaining the mould of light stream vectors;If light The mould of flow vector is greater than or equal to threshold value, then judges to track convergence state not restrain;If the mould of light stream vectors is less than the threshold Value judges to track convergence state then for convergence.
In one embodiment, window size setup module 104 is further used for: if tracking convergence state is convergence, Original dimension and size are adjusted step-length to carry out making poor processing, obtain the size of watch window.
In one embodiment, window size setup module 104 is further used for: if tracking convergence state is not restrain, Original dimension and size are then adjusted into step-length and carry out summation process, obtains the size of watch window.
In one embodiment, window size setup module 104 is further used for: if the observation window that summation process obtains The size of mouth is less than full-size, then the size of watch window is set as full-size.
In one embodiment, device is arranged in the above-mentioned characteristic point watch window based on image pyramid, can also include: Step-length setting unit is adjusted, is used for: determining the pyramid number of plies of image pyramid;Obtain the full-size and minimum of watch window Size;Size is set according to full-size, minimum dimension and the pyramid number of plies and adjusts step-length.
In one embodiment, device is arranged in the above-mentioned characteristic point watch window based on image pyramid, can also include: Feature point tracking unit, for being tracked in current tomographic image to characteristic point using watch window.
Characteristic point watch window setting device based on image pyramid of the invention and of the invention based on image gold word The characteristic point watch window setting method of tower corresponds, and device is arranged about the characteristic point watch window based on image pyramid It is specific limit the restriction that may refer to above for the characteristic point watch window setting method based on image pyramid, upper Technical characteristic and its advantages for stating the embodiment elaboration of the characteristic point watch window setting method based on image pyramid are equal Suitable for the embodiment of the characteristic point watch window setting device based on image pyramid, details are not described herein.It is above-mentioned to be based on Modules in the characteristic point watch window setting device of image pyramid can be fully or partially through software, hardware and its group It closes to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with Software form is stored in the memory in computer equipment, executes the corresponding behaviour of the above modules in order to which processor calls Make.
In one embodiment, a kind of feature point tracking device based on image pyramid is additionally provided, with reference to Figure 10, figure 10 be the structural block diagram of the feature point tracking device based on image pyramid in one embodiment, the apparatus may include:
Module 401 is established, for establishing image pyramid to original image and target image respectively;Image pyramid includes more Tomographic image;
Setup module 402, for based on the characteristic point observation described in embodiment any one of as above based on image pyramid The size of the watch window of each layer original image and each layer target image is arranged in window setting method;
Tracking module 403, for being tracked using the watch window of corresponding size to characteristic point in each tomographic image; Wherein, each tomographic image includes each layer original image and each layer target image.
In one embodiment, setup module 402 is further used for:, will be current if current tomographic image is top layer images The observation window size of layer original image and current layer target image is set as full-size;If current tomographic image is not top layer images, The size of the watch window of a upper tomographic image is then set as to the original dimension of the watch window of current tomographic image;Obtain preset ruler Very little adjusting step-length;Obtain the tracking convergence state tracked in a upper tomographic image to characteristic point;If tracking convergence shape State is convergence, then original dimension and size is adjusted step-length and carry out making poor processing, obtain the ruler of the watch window of current tomographic image It is very little;If tracking convergence state is not restrain, original dimension and size are adjusted into step-length and carry out summation process, obtains current layer figure The size of the watch window of picture.
In one embodiment, tracking module 403 is further used for: in current layer original image, utilizing corresponding size Watch window calculates first sum of the grayscale values the first shade of gray value of characteristic point, calculates characteristic point according to the first shade of gray value Hessian matrix;In current layer target image, the second gray value of initial matching point is calculated using the watch window of corresponding size; Initial matching point is the pixel defaulted on current layer target image;It is poor that first the second gray value of sum of the grayscale values make, Obtain gray-scale deviation value;According to gray-scale deviation value, the first shade of gray value and Hessian matrix calculate the light stream of current tomographic image to Amount;Position based on light stream vectors and initial matching point on current layer target image obtains match point in current layer target figure As upper position;Wherein, match point is the pixel to match on current layer target image with characteristic point.
The feature point tracking device based on image pyramid of the invention and the feature of the invention based on image pyramid Point-tracking method corresponds, and the specific restriction about the feature point tracking device based on image pyramid may refer to above Restriction for the feature point tracking method based on image pyramid, in the above-mentioned feature point tracking method based on image pyramid The technical characteristic that illustrates of embodiment and its advantages be suitable for the reality of the feature point tracking device based on image pyramid It applies in example, details are not described herein.Modules in the above-mentioned feature point tracking device based on image pyramid can whole or portion Divide and is realized by software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independently of computer equipment In processor in, can also be stored in a software form in the memory in computer equipment, in order to processor calling hold The corresponding operation of the above modules of row.
In one embodiment, a kind of computer equipment is provided, which can be with image procossing energy The terminal or server of power, internal structure chart can be as shown in figure 11, and Figure 11 is the interior of computer equipment in one embodiment Portion's structure chart.The computer equipment includes the processor and memory connected by system bus.Wherein, the computer equipment Processor is for providing calculating and control ability.The memory of the computer equipment includes non-volatile memory medium, interior storage Device.The non-volatile memory medium is stored with operating system and computer program.The built-in storage is non-volatile memory medium In operating system and computer program operation provide environment.To realize a kind of base when the computer program is executed by processor Characteristic point watch window setting method in image pyramid, the feature point tracking method based on image pyramid.
It will be understood by those skilled in the art that structure shown in Figure 11, only part relevant to the present invention program The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to the present invention program, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including processor and memory, the memory storage are provided There is computer program, the processor is realized described in as above any one embodiment when executing the computer program based on image Pyramidal characteristic point watch window setting method, the feature point tracking method based on image pyramid.
In one embodiment, a kind of computer equipment, including processor and memory, the memory storage are provided There is computer program, the processor performs the steps of when executing the computer program
Determine the original dimension of the watch window of current tomographic image;Acquisition tracks characteristic point in a upper tomographic image Obtained tracking convergence state;It obtains preset size and adjusts step-length;Based on tracking convergence state, original dimension and size are utilized Adjust the size of step-length setting watch window.
In one embodiment, it is also performed the steps of when processor executes computer program
Determine the number of iterations for being iterated tracking to characteristic point in a upper tomographic image;A upper tomographic image is obtained to exist Light stream vectors under the number of iterations;Tracking convergence state is obtained according to light stream vectors;Wherein, tracking convergence state is to utilize light stream Method is iterated tracking to characteristic point in a upper tomographic image, obtained tracking convergence state.
In one embodiment, it is also performed the steps of when processor executes computer program
Obtain the mould of light stream vectors;If the mould of light stream vectors is greater than or equal to threshold value, judge to track convergence state for not Convergence;If the mould of light stream vectors is less than threshold value, judge to track convergence state for convergence.
In one embodiment, it is also performed the steps of when processor executes computer program
If tracking convergence state is convergence, original dimension and size are adjusted into step-length and carry out making poor processing, is observed The size of window.
In one embodiment, it is also performed the steps of when processor executes computer program
If tracking convergence state is not restrain, original dimension and size are adjusted into step-length and carry out summation process, is seen Examine the size of window.
In one embodiment, it is also performed the steps of when processor executes computer program
If the size for the watch window that summation process obtains is less than full-size, the size of watch window is set as maximum Size.
In one embodiment, it is also performed the steps of when processor executes computer program
Determine the pyramid number of plies of image pyramid;Obtain the full-size and minimum dimension of watch window;According to maximum Size, minimum dimension and pyramid number of plies setting size adjust step-length.
In one embodiment, it is also performed the steps of when processor executes computer program
Characteristic point is tracked in current tomographic image using watch window.
In one embodiment, a kind of computer equipment, including processor and memory, the memory storage are provided There is computer program, the processor performs the steps of when executing the computer program
Image pyramid is established to original image and target image respectively;Image pyramid includes multi-layer image;Based on as above Characteristic point watch window setting method described in any one embodiment based on image pyramid, is arranged each layer original image and each layer The size of the watch window of target image;In each tomographic image, characteristic point is tracked using the watch window of corresponding size; Wherein, each tomographic image includes each layer original image and each layer target image.
In one embodiment, it is also performed the steps of when processor executes computer program
If current tomographic image is top layer images, by the observation window size of current layer original image and current layer target image It is set as full-size;If current tomographic image is not top layer images, the size of the watch window of a upper tomographic image is set as current The original dimension of the watch window of tomographic image;It obtains preset size and adjusts step-length;It obtains in a upper tomographic image to characteristic point The tracking convergence state tracked;If tracking convergence state is convergence, by original dimension and size adjust step-length into Row makees difference processing, obtains the size of the watch window of current tomographic image;If tracking convergence state is not restrain, by original dimension Step-length is adjusted with size and carries out summation process, obtains the size of the watch window of current tomographic image.
In one embodiment, it is also performed the steps of when processor executes computer program
In current layer original image, first the first ash of sum of the grayscale values of characteristic point is calculated using the watch window of corresponding size Gradient value is spent, the Hessian matrix of characteristic point is calculated according to the first shade of gray value;In current layer target image, corresponding ruler is utilized Very little watch window calculates the second gray value of initial matching point;Initial matching point is the picture defaulted on current layer target image Vegetarian refreshments;It is poor that first the second gray value of sum of the grayscale values make, and obtains gray-scale deviation value;According to gray-scale deviation value, the first gray scale Gradient value and Hessian matrix calculate the light stream vectors of current tomographic image;Based on light stream vectors and initial matching point in current layer target Position on image obtains position of the match point on current layer target image;Wherein, match point is on current layer target image The pixel to match with characteristic point.
Above-mentioned computer equipment is realized by the computer program run on the processor to each of image pyramid The watch window of tomographic image is set dynamically, and the size of watch window is flexibly changed, based on the sight flexibly changed Examining window can be improved the flexibility tracked to characteristic point, carries out dynamic to watch window according to tracking convergence state and sets It sets, is also beneficial to while ensuring to accurately track characteristic point, reduce to the feature point tracking time.
Those of ordinary skill in the art will appreciate that realizing described in as above any one embodiment based on image pyramid All or part of the process in characteristic point watch window setting method, the feature point tracking method based on image pyramid, being can It is completed with instructing relevant hardware by computer program, the computer program can be stored in a non-volatile calculating In machine read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Its In, to any reference of memory, storage, database or other media used in each embodiment provided by the present invention, It may each comprise non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), may be programmed ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory can wrap Include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM in a variety of forms may be used , such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), increase Strong type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Accordingly, in one embodiment, a kind of computer readable storage medium is also provided, computer journey is stored thereon with Sequence, wherein the characteristic point based on image pyramid described in as above any one embodiment is realized when the program is executed by processor Watch window setting method, the feature point tracking method based on image pyramid.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Determine the original dimension of the watch window of current tomographic image;Acquisition tracks characteristic point in a upper tomographic image Obtained tracking convergence state;It obtains preset size and adjusts step-length;Based on tracking convergence state, original dimension and size are utilized Adjust the size of step-length setting watch window.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Determine the number of iterations for being iterated tracking to characteristic point in a upper tomographic image;A upper tomographic image is obtained to exist Light stream vectors under the number of iterations;Tracking convergence state is obtained according to light stream vectors;Wherein, tracking convergence state is to utilize light stream Method is iterated tracking to characteristic point in a upper tomographic image, obtained tracking convergence state.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Obtain the mould of light stream vectors;If the mould of light stream vectors is greater than or equal to threshold value, judge to track convergence state for not Convergence;If the mould of light stream vectors is less than threshold value, judge to track convergence state for convergence.
In one embodiment, it is also performed the steps of when computer program is executed by processor
If tracking convergence state is convergence, original dimension and size are adjusted into step-length and carry out making poor processing, is observed The size of window.
In one embodiment, it is also performed the steps of when computer program is executed by processor
If tracking convergence state is not restrain, original dimension and size are adjusted into step-length and carry out summation process, is seen Examine the size of window.
In one embodiment, it is also performed the steps of when computer program is executed by processor
If the size for the watch window that summation process obtains is less than full-size, the size of watch window is set as maximum Size.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Determine the pyramid number of plies of image pyramid;Obtain the full-size and minimum dimension of watch window;According to maximum Size, minimum dimension and pyramid number of plies setting size adjust step-length.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Characteristic point is tracked in current tomographic image using watch window.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Image pyramid is established to original image and target image respectively;Image pyramid includes multi-layer image;Based on as above Characteristic point watch window setting method described in any one embodiment based on image pyramid, is arranged each layer original image and each layer The size of the watch window of target image;In each tomographic image, characteristic point is tracked using the watch window of corresponding size; Wherein, each tomographic image includes each layer original image and each layer target image.
In one embodiment, it is also performed the steps of when computer program is executed by processor
If current tomographic image is top layer images, by the observation window size of current layer original image and current layer target image It is set as full-size;If current tomographic image is not top layer images, the size of the watch window of a upper tomographic image is set as current The original dimension of the watch window of tomographic image;It obtains preset size and adjusts step-length;It obtains in a upper tomographic image to characteristic point The tracking convergence state tracked;If tracking convergence state is convergence, by original dimension and size adjust step-length into Row makees difference processing, obtains the size of the watch window of current tomographic image;If tracking convergence state is not restrain, by original dimension Step-length is adjusted with size and carries out summation process, obtains the size of the watch window of current tomographic image.
In one embodiment, it is also performed the steps of when computer program is executed by processor
In current layer original image, first the first ash of sum of the grayscale values of characteristic point is calculated using the watch window of corresponding size Gradient value is spent, the Hessian matrix of characteristic point is calculated according to the first shade of gray value;In current layer target image, corresponding ruler is utilized Very little watch window calculates the second gray value of initial matching point;Initial matching point is the picture defaulted on current layer target image Vegetarian refreshments;It is poor that first the second gray value of sum of the grayscale values make, and obtains gray-scale deviation value;According to gray-scale deviation value, the first gray scale Gradient value and Hessian matrix calculate the light stream vectors of current tomographic image;Based on light stream vectors and initial matching point in current layer target Position on image obtains position of the match point on current layer target image;Wherein, match point is on current layer target image The pixel to match with characteristic point.
Above-mentioned computer readable storage medium realizes each layer to image pyramid by the computer program that it is stored The watch window of image is set dynamically, and the size of watch window is flexibly changed, based on the observation flexibly changed Window can be improved the flexibility tracked to characteristic point, and watch window is set dynamically according to tracking convergence state, It is also beneficial to while ensuring to accurately track characteristic point, reduces to the feature point tracking time.
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (15)

1. a kind of characteristic point watch window setting method based on image pyramid, which is characterized in that comprising steps of
Determine the original dimension of the watch window of current tomographic image;
Obtain the tracking convergence state tracked in a upper tomographic image to characteristic point;
It obtains preset size and adjusts step-length;
Based on the tracking convergence state, the ruler that the watch window is arranged in step-length is adjusted using the original dimension and size It is very little.
2. the method according to claim 1, wherein the tracking convergence state be using optical flow method on described Tracking is iterated to the characteristic point in one tomographic image, obtained tracking convergence state;
The step of tracking convergence state that the acquisition tracks characteristic point in a upper tomographic image includes:
Determine the number of iterations for being iterated tracking to the characteristic point in a upper tomographic image;
Obtain light stream vectors of the upper tomographic image under the number of iterations;
The tracking convergence state is obtained according to the light stream vectors.
3. according to the method described in claim 2, it is characterized in that, described obtain the tracking convergence according to the light stream vectors The step of state includes:
Obtain the mould of the light stream vectors;
If the mould of the light stream vectors is greater than or equal to threshold value, the tracking convergence state is judged not restrain;
If the mould of the light stream vectors is less than the threshold value, judge the tracking convergence state for convergence.
4. the method according to claim 1, wherein described be based on the tracking convergence state, at the beginning of described Beginning size and size adjust the step of size of the watch window is arranged in step-length
If the tracking convergence state is convergence, the original dimension and size are adjusted into step-length and carry out making poor processing, is obtained The size of the watch window.
5. the method according to claim 1, wherein described be based on the tracking convergence state, at the beginning of described Beginning size and size adjust the step of size of the watch window is arranged in step-length
If the tracking convergence state is not restrain, the original dimension and size are adjusted into step-length and carry out summation process, is obtained To the size of the watch window.
6. according to the method described in claim 5, it is characterized in that, described adjust step-length progress for the original dimension and size Summation process, the step of obtaining the size of the watch window include:
If the size for the watch window that summation process obtains is less than full-size, the size of the watch window is set as The full-size.
7. the method according to claim 1, wherein it is described obtain the step of preset size adjusts step-length it Before, further includes:
Determine the pyramid number of plies of image pyramid;
Obtain the full-size and minimum dimension of the watch window;
The size is set according to the full-size, minimum dimension and the pyramid number of plies and adjusts step-length.
8. method according to any one of claims 1 to 7, which is characterized in that it is based on the tracking convergence state described, After the step of size of the watch window is set using the original dimension and size adjusting step-length, further includes:
The characteristic point is tracked in the current tomographic image using the watch window.
9. a kind of feature point tracking method based on image pyramid, which is characterized in that comprising steps of
Image pyramid is established to original image and target image respectively;Described image pyramid includes multi-layer image;
Based on the characteristic point watch window setting method as claimed in any one of claims 1 to 8 based on image pyramid, setting The size of the watch window of each layer original image and each layer target image;
In each tomographic image, characteristic point is tracked using the watch window of corresponding size;Wherein, each tomographic image includes Each layer original image and each layer target image.
10. according to the method described in claim 9, it is characterized in that, described based on as claimed in any one of claims 1 to 8 Characteristic point watch window setting method based on image pyramid, is arranged the watch window of each layer original image and each layer target image Size the step of include:
If current tomographic image is top layer images, the observation window size of current layer original image and current layer target image is set as Full-size;
If the current tomographic image is not the top layer images, the size of the watch window of a upper tomographic image is set as described and is worked as The original dimension of the watch window of preceding tomographic image;It obtains preset size and adjusts step-length;It is right in a upper tomographic image to obtain The tracking convergence state that characteristic point is tracked;If the tracking convergence state is convergence, by the original dimension and Size adjusts step-length and carries out making poor processing, obtains the size of the watch window of the current tomographic image;If the tracking restrains shape State is not restrain, then the original dimension and size is adjusted step-length and carry out summation process, obtain the sight of the current tomographic image Examine the size of window.
11. according to the method described in claim 9, utilizing the observation of corresponding size it is characterized in that, described in each tomographic image The step of window tracks characteristic point include:
In current layer original image, the first sum of the grayscale values of the characteristic point is calculated using the watch window of the corresponding size One shade of gray value calculates the Hessian matrix of the characteristic point according to the first shade of gray value;
In current layer target image, the second gray value of initial matching point is calculated using the watch window of the corresponding size; The initial matching point is the pixel defaulted on the current layer target image;
It is poor that first sum of the grayscale values, second gray value make, and obtains gray-scale deviation value;
The light stream vectors of current tomographic image are calculated according to the gray-scale deviation value, the first shade of gray value and Hessian matrix;
Position based on the light stream vectors and initial matching point on the current layer target image obtains match point and exists Position on the current layer target image;Wherein, the match point be the current layer target image on the characteristic point The pixel to match.
12. device is arranged in a kind of characteristic point watch window based on image pyramid characterized by comprising
Original dimension determining module, the original dimension of the watch window for determining current tomographic image;
Convergence state obtains module, restrains shape for obtaining the tracking tracked in a upper tomographic image to characteristic point State;
It adjusts step-length and obtains module, adjust step-length for obtaining preset size;
Window size setup module adjusts step-length using the original dimension and size for being based on the tracking convergence state The size of the watch window is set.
13. a kind of feature point tracking device based on image pyramid characterized by comprising
Module is established, for establishing image pyramid to original image and target image respectively;Described image pyramid includes multilayer Image;
Setup module, for based on the characteristic point watch window as claimed in any one of claims 1 to 8 based on image pyramid The size of the watch window of each layer original image and each layer target image is arranged in setting method;
Tracking module, for being tracked using the watch window of corresponding size to characteristic point in each tomographic image;Wherein, institute Stating each tomographic image includes each layer original image and each layer target image.
14. a kind of computer equipment, including processor and memory, the memory are stored with computer program, feature exists In when the processor executes the computer program the step of any one of realization claim 1 to 11 the method.
15. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of any one of claim 1 to 11 the method is realized when being executed by processor.
CN201910494926.3A 2019-06-10 2019-06-10 Feature point observation window setting method, tracking method, device, equipment and medium Active CN110322477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910494926.3A CN110322477B (en) 2019-06-10 2019-06-10 Feature point observation window setting method, tracking method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910494926.3A CN110322477B (en) 2019-06-10 2019-06-10 Feature point observation window setting method, tracking method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN110322477A true CN110322477A (en) 2019-10-11
CN110322477B CN110322477B (en) 2022-01-04

Family

ID=68120860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910494926.3A Active CN110322477B (en) 2019-06-10 2019-06-10 Feature point observation window setting method, tracking method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110322477B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307936A (en) * 2020-10-28 2021-02-02 江苏云从曦和人工智能有限公司 Passenger flow volume analysis method, system and device based on head and shoulder detection
CN112748682A (en) * 2020-12-07 2021-05-04 珠海格力电器股份有限公司 Signal sampling processing method, device, equipment and storage medium
CN112929567A (en) * 2021-01-27 2021-06-08 咪咕音乐有限公司 Shooting position determining method, electronic device and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102016921A (en) * 2008-08-01 2011-04-13 丰田自动车株式会社 Image processing device
CN102609945A (en) * 2012-02-09 2012-07-25 西北工业大学 Automatic registration method of visible light and thermal infrared image sequences
US20130076915A1 (en) * 2011-09-28 2013-03-28 Qualcomm Incorporated Framework for reference-free drift-corrected planar tracking using lucas-kanade optical flow
CN103247058A (en) * 2013-05-13 2013-08-14 北京工业大学 Fast optical flow field calculation method based on error-distributed multilayer grid
CN103745458A (en) * 2013-12-26 2014-04-23 华中科技大学 A robust method for estimating the rotation axis and mass center of a spatial target based on a binocular optical flow
CN104599286A (en) * 2013-10-31 2015-05-06 展讯通信(天津)有限公司 Optical flow based feature tracking method and device
CN104869387A (en) * 2015-04-19 2015-08-26 中国传媒大学 Method for acquiring binocular image maximum parallax based on optical flow method
US9307251B2 (en) * 2009-08-19 2016-04-05 Sharp Laboratories Of America, Inc. Methods and systems for determining data-adaptive weights for motion estimation in a video sequence
US20160292879A1 (en) * 2013-12-16 2016-10-06 Thales Nederland B.V. Video enhancing device and method
CN106204484A (en) * 2016-07-11 2016-12-07 徐州工程学院 A kind of traffic target tracking based on light stream and local invariant feature
CN106228578A (en) * 2016-08-12 2016-12-14 上海盟云移软网络科技股份有限公司 A kind of motion capture algorithm improving optical flow method
CN107111878A (en) * 2016-06-07 2017-08-29 深圳市大疆创新科技有限公司 Data processing method, apparatus and system
CN108846856A (en) * 2018-06-12 2018-11-20 广州视源电子科技股份有限公司 The tracking and tracking device of picture feature point
US20180333123A1 (en) * 2017-05-19 2018-11-22 The Chinese University Of Hong Kong Methods and apparatuses for quantifying vascular fluid motions from dsa
CN109345564A (en) * 2018-07-30 2019-02-15 深圳市艾为智能有限公司 A method of it solves not being inconsistent due to self-similarity characteristics generation optical flow field with sports ground

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102016921A (en) * 2008-08-01 2011-04-13 丰田自动车株式会社 Image processing device
US9307251B2 (en) * 2009-08-19 2016-04-05 Sharp Laboratories Of America, Inc. Methods and systems for determining data-adaptive weights for motion estimation in a video sequence
US20130076915A1 (en) * 2011-09-28 2013-03-28 Qualcomm Incorporated Framework for reference-free drift-corrected planar tracking using lucas-kanade optical flow
CN102609945A (en) * 2012-02-09 2012-07-25 西北工业大学 Automatic registration method of visible light and thermal infrared image sequences
CN103247058A (en) * 2013-05-13 2013-08-14 北京工业大学 Fast optical flow field calculation method based on error-distributed multilayer grid
CN104599286A (en) * 2013-10-31 2015-05-06 展讯通信(天津)有限公司 Optical flow based feature tracking method and device
US20160292879A1 (en) * 2013-12-16 2016-10-06 Thales Nederland B.V. Video enhancing device and method
CN103745458A (en) * 2013-12-26 2014-04-23 华中科技大学 A robust method for estimating the rotation axis and mass center of a spatial target based on a binocular optical flow
CN104869387A (en) * 2015-04-19 2015-08-26 中国传媒大学 Method for acquiring binocular image maximum parallax based on optical flow method
CN107111878A (en) * 2016-06-07 2017-08-29 深圳市大疆创新科技有限公司 Data processing method, apparatus and system
CN107111878B (en) * 2016-06-07 2019-05-24 深圳市大疆创新科技有限公司 Data processing method, apparatus and system
CN106204484A (en) * 2016-07-11 2016-12-07 徐州工程学院 A kind of traffic target tracking based on light stream and local invariant feature
CN106228578A (en) * 2016-08-12 2016-12-14 上海盟云移软网络科技股份有限公司 A kind of motion capture algorithm improving optical flow method
US20180333123A1 (en) * 2017-05-19 2018-11-22 The Chinese University Of Hong Kong Methods and apparatuses for quantifying vascular fluid motions from dsa
CN108846856A (en) * 2018-06-12 2018-11-20 广州视源电子科技股份有限公司 The tracking and tracking device of picture feature point
CN109345564A (en) * 2018-07-30 2019-02-15 深圳市艾为智能有限公司 A method of it solves not being inconsistent due to self-similarity characteristics generation optical flow field with sports ground

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NIRMALA RAMAKRISHNAN 等: "Adaptive Window Strategy for High-Speed and Robust KLT Feature Tracker", 《PSIVT2015:IMAGE AND VIDEO TECHNOLOGY》 *
REZA SERAJEH 等: "Multi scale feature point tracking", 《2014 22ND IRANIAN CONFERENCE ON ELECTRICAL ENGINEERING (ICEE)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307936A (en) * 2020-10-28 2021-02-02 江苏云从曦和人工智能有限公司 Passenger flow volume analysis method, system and device based on head and shoulder detection
CN112748682A (en) * 2020-12-07 2021-05-04 珠海格力电器股份有限公司 Signal sampling processing method, device, equipment and storage medium
CN112748682B (en) * 2020-12-07 2021-12-14 珠海格力电器股份有限公司 Signal sampling processing method, device, equipment and storage medium
CN112929567A (en) * 2021-01-27 2021-06-08 咪咕音乐有限公司 Shooting position determining method, electronic device and storage medium

Also Published As

Publication number Publication date
CN110322477B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN110322477A (en) Characteristic point watch window setting method, tracking, device, equipment and medium
CN110909693B (en) 3D face living body detection method, device, computer equipment and storage medium
CN106920215B (en) Method for detecting registration effect of panoramic image
CN109035299A (en) Method for tracking target, device, computer equipment and storage medium
CN104613930B (en) Method and device for measuring distance as well as mobile terminal
CN109102524B (en) Tracking method and tracking device for image feature points
CN111833237A (en) Image registration method based on convolutional neural network and local homography transformation
CN110598638A (en) Model training method, face gender prediction method, device and storage medium
CN108680185A (en) Mobile robot gyroscope data correction method, device and equipment
CN109887002A (en) Matching process, device, computer equipment and the storage medium of image characteristic point
CN108876806A (en) Method for tracking target and system, storage medium and equipment based on big data analysis
CN114092793B (en) End-to-end biological target detection method suitable for complex underwater environment
CN109872344A (en) Tracking, matching process and coordinate acquiring method, the device of image characteristic point
CN110475123A (en) A kind of manual real-time joining method for microscope video flowing
CN109165654A (en) The training method and object localization method and device of a kind of target location model
CN109801244A (en) Image enchancing method, device, computer equipment and storage medium
CN114332125A (en) Point cloud reconstruction method and device, electronic equipment and storage medium
CN108846856B (en) Picture feature point tracking method and tracking device
CN108844527A (en) Antenna for base station engineering parameter acquisition methods and system, storage medium and equipment
TW202127312A (en) Image processing method and computer readable medium thereof
CN112330671A (en) Method and device for analyzing cell distribution state, computer equipment and storage medium
CN116310899A (en) YOLOv 5-based improved target detection method and device and training method
CN112699809B (en) Vaccinia category identification method, device, computer equipment and storage medium
CN112070810B (en) Positioning method, mobile device, and computer-readable storage medium
WO2021218020A1 (en) Vehicle damage picture processing method and apparatus, and computer device and storage medium

Legal Events

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