CN114463386A - Visual tracking method, device, equipment and storage medium - Google Patents
Visual tracking method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114463386A CN114463386A CN202210113895.4A CN202210113895A CN114463386A CN 114463386 A CN114463386 A CN 114463386A CN 202210113895 A CN202210113895 A CN 202210113895A CN 114463386 A CN114463386 A CN 114463386A
- Authority
- CN
- China
- Prior art keywords
- target
- area
- determining
- super
- seeds
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000000007 visual effect Effects 0.000 title claims abstract description 79
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 33
- 238000012795 verification Methods 0.000 claims description 36
- 230000006870 function Effects 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 16
- 230000000694 effects Effects 0.000 abstract description 7
- 238000004891 communication Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000000903 blocking effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4053—Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/215—Motion-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a visual tracking method, which comprises the following steps: acquiring an image to be detected; the image to be detected comprises a rectangular target area; determining a pure target area in the rectangular target area; and performing visual tracking by taking the pure target area as a tracking target in a set visual tracking algorithm. According to the visual tracking method disclosed by the invention, the problem that part of background areas are used as tracking targets in a visual tracking algorithm is solved by determining the pure target areas, and the tracking effect of the visual tracking algorithm is improved.
Description
Technical Field
The present invention relates to the field of computer vision, and in particular, to a visual tracking method, apparatus, device, and storage medium.
Background
With the rapid development of computer networks, information storage technologies, imaging technologies, computer processing capabilities, digital communications and other related sciences, real-world information can be converted into digital information which can be processed by a computer through a computer vision system. Computer vision utilizes a video sensor to capture real-world images, video or multi-dimensional data information, which is further processed by a computer to realize human eye functions such as target detection, tracking, behavior recognition and analysis. Computer vision, one of the most popular problems in the world today, aims to achieve understanding of images by algorithmically detecting objects contained in the images and defining relationships between these objects. As a branch of computer vision, visual tracking mainly has applications in human-computer interaction, intelligent transportation systems, visual navigation, military applications, and the like.
Existing visual tracking algorithms based on blocking strategies employ multiple local blocks to represent the tracked target and obtain the tracked result using an associative filter under the framework of particle filtering. The core point of the algorithm is how to identify image patches cut from the object during the tracking process.
The blocking tracking strategy does not fully utilize the target and the surrounding environment information thereof, so that the tracking effect is influenced, and the blocking tracking strategy specifically comprises the following two points: (1) because the target to be tracked usually has an irregular shape, and the manually labeled target bounding box usually is a regular rectangular box, the image blocks sampled by the block tracking algorithm according to the target bounding box may contain excessive background areas, and the use of these image blocks for the subsequent tracking of the target may cause inaccurate tracking results; (2) in the block tracking strategy, part of background information is used as an apparent representation of a target, which affects the tracking effect, and more seriously, errors are gradually accumulated and spread in the tracking process, which affects the calculation of a tracking algorithm on the target position in a subsequent frame, and may cause the loss of the tracked target.
Disclosure of Invention
The invention provides a visual tracking method, a visual tracking device and a storage medium, which are used for improving the visual tracking effect.
According to an aspect of the present invention, there is provided a visual tracking method, including:
acquiring an image to be detected; the image to be detected comprises a rectangular target area;
determining a pure target region in the rectangular target region;
and performing visual tracking by taking the pure target area as a tracking target in a set visual tracking algorithm.
Further, determining a clean target region in the rectangular target region includes:
establishing a target prior area in the rectangular target area;
determining a part between the rectangular target area and the target prior area as an area to be verified;
determining a target area belonging to the target object in the area to be verified, and determining a set of the target prior area and the target area as the pure target area.
Further, establishing a target prior region in the rectangular target region, including:
determining the area ratio of the target prior region to the rectangular target region; the area ratio is less than 1;
determining the center of the rectangular target region as the center of the target prior region, and determining the size of the target prior region according to the area ratio.
Further, determining a target area belonging to the target object in the area to be verified includes:
establishing a background prior area; the background prior area comprises the rectangular target area and a background area;
performing superpixel division on the background prior area to obtain a set number of superpixel seeds;
determining the super-pixel seeds belonging to the to-be-verified area as to-be-verified super-pixel seeds, and determining target super-pixel seeds belonging to the target object in the to-be-verified super-pixel seeds;
determining the set of target superpixel seeds as the target region.
Further, determining a target superpixel seed belonging to the target object in the to-be-verified superpixel seeds comprises:
classifying the super-pixel seeds to be verified into secondary verification super-pixel seeds and background super-pixel seeds according to the similarity of the super-pixel seeds to be verified with the target prior region and the background region;
determining a weight self-similarity function value corresponding to each secondary verification super-pixel seed, and determining a target super-pixel seed in the secondary verification super-pixel seeds according to the weight self-similarity function value.
Further, determining a target superpixel seed in the secondary verification superpixel seeds according to the magnitude of the weight self-similarity function value, comprising:
sorting the weight self-similarity function values corresponding to the secondary verification super-pixel seeds in a descending order;
determining the secondary verification super-pixel seeds with the set number which are sorted at last as the background super-pixel seeds;
determining the secondary verification super-pixel seeds after the background super-pixel seeds are removed as the target super-pixel seeds.
Further, the set visual tracking algorithm comprises a block tracking algorithm.
According to another aspect of the present invention, there is provided a visual tracking apparatus comprising:
the image acquisition module to be detected is used for acquiring an image to be detected; the image to be detected comprises a rectangular target area;
the pure target area determining module is used for determining a pure target area in the rectangular target area;
and the visual tracking module is used for performing visual tracking on the pure target area as a tracking target in a set visual tracking algorithm.
Optionally, the pure target region determining module is further configured to:
establishing a target prior area in the rectangular target area;
determining a part between the rectangular target area and the target prior area as an area to be verified;
determining a target area belonging to the target object in the area to be verified, and determining a set of the target prior area and the target area as the pure target area.
Optionally, the pure target region determining module is further configured to:
determining the area ratio of the target prior region to the rectangular target region; the area ratio is less than 1;
determining the center of the rectangular target region as the center of the target prior region, and determining the size of the target prior region according to the area ratio.
Optionally, the pure target region determining module is further configured to:
establishing a background prior area; the background prior area comprises the rectangular target area and a background area;
performing superpixel division on the background prior area to obtain a set number of superpixel seeds;
determining the super-pixel seeds belonging to the to-be-verified area as to-be-verified super-pixel seeds, and determining target super-pixel seeds belonging to the target object in the to-be-verified super-pixel seeds;
determining the set of target superpixel seeds as the target region.
Optionally, the pure target region determining module is further configured to:
classifying the super-pixel seeds to be verified into secondary verification super-pixel seeds and background super-pixel seeds according to the similarity of the super-pixel seeds to be verified with the target prior region and the background region;
determining a weight self-similarity function value corresponding to each secondary verification super-pixel seed, and determining a target super-pixel seed in the secondary verification super-pixel seeds according to the weight self-similarity function value.
Optionally, the pure target region determining module is further configured to:
sorting the weight self-similarity function values corresponding to the secondary verification super-pixel seeds in a descending order;
determining the secondary verification super-pixel seeds with the set number which are sorted at last as the background super-pixel seeds;
determining the secondary verification super-pixel seeds after the background super-pixel seeds are removed as the target super-pixel seeds.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the visual tracking method of any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a visual tracking method according to any one of the embodiments of the present invention when executed.
The embodiment of the invention firstly obtains an image to be detected; the image to be detected comprises a rectangular target area; then determining a pure target area in the rectangular target area; and finally, the pure target area is used as a tracking target in a set visual tracking algorithm for visual tracking. According to the visual tracking method provided by the embodiment of the invention, the problem that part of background areas are used as tracking targets in the visual tracking algorithm is solved by determining the pure target areas, and the tracking effect of the visual tracking algorithm is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a visual tracking method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a visual tracking method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a visual tracking apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a visual tracking method according to a fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a visual tracking method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a target object in an image is tracked, and the method may be performed by a visual tracking apparatus, where the visual tracking apparatus may be implemented in a form of hardware and/or software, and the visual tracking apparatus may be configured in an electronic device. As shown in fig. 1, the method includes:
and S110, acquiring an image to be detected.
The image to be detected comprises a rectangular target area.
In this embodiment, the rectangular target area may be an artificially labeled area containing the tracked target object. For a given frame of image to be detected, it usually contains two parts: rectangular target area TrAnd a background area B around the target objectr. Preferably, a rectangular target area TrCan be obtained by manually labeling a rectangular bounding box, which can be denoted as T, in the first frame of the video sequencer=[x,y,w,h]∈R4This is known as the true value, where (x, y) denotes the center coordinates of the tracked target object, and w and h denote the width and height of the target object, respectively.
Optionally, the mode of acquiring the image to be detected may be to acquire a video sequence to be detected, and take an image in the video sequence as the image to be detected.
And S120, determining a pure target area in the rectangular target area.
Since the target object may have an irregular shape, the rectangular target region may include a partial background region, and the clean target region is a partial region of the rectangular target region after the background region is removed.
In this embodiment, in order to improve the accuracy of visual tracking, a pure target region in the rectangular target region may be identified, instead of the rectangular target region, for further processing.
Optionally, the pure target region in the rectangular target region may be determined by dividing the rectangular target region into a plurality of super-pixel seeds by using a super-pixel segmentation method, and determining the pure target region by classifying the super-pixel seeds. The super-pixel seeds are small areas formed by a series of pixel points with adjacent positions and similar characteristics such as color, brightness and texture, most of the small areas keep effective information for further image segmentation, and the boundary information of objects in the images can not be damaged generally.
And S130, performing visual tracking by taking the pure target area as a tracking target in a set visual tracking algorithm.
Optionally, the visual tracking algorithm is set to include a block tracking algorithm.
In this embodiment, after the pure target region is determined, the method may be used to optimize a method for selecting a block in a block tracking policy, so as to complete target tracking by using the block tracking policy. Preferably, the visual tracking process can be embedded into the single chip microcomputer, and for a given video sequence, the rectangular target area of the first frame of the video sequence is manually marked, so that the tracking of the target object in each subsequent frame of video can be completed.
The embodiment of the invention firstly obtains an image to be detected; the image to be detected comprises a rectangular target area; then determining a pure target area in the rectangular target area; and finally, the pure target area is used as a tracking target in a set visual tracking algorithm for visual tracking. According to the visual tracking method provided by the embodiment of the invention, the problem that part of background areas are used as tracking targets in the visual tracking algorithm is solved by determining the pure target areas, and the tracking effect of the visual tracking algorithm is improved.
Example two
Fig. 2 is a flowchart of a visual tracking method according to a second embodiment of the present invention, which is a refinement of the second embodiment S120. As shown in fig. 2, the method includes:
and S210, acquiring an image to be detected.
The image to be detected comprises a rectangular target area.
In this embodiment, the image to be detected may be obtained by obtaining a video sequence to be detected, and the rectangular target area may be determined in the image to be detected by manual labeling.
And S220, establishing a target prior area in the rectangular target area.
The target prior region is a region which is included in the rectangular target region and has an area smaller than that of the rectangular target region.
In this embodiment, since the rectangular target region includes a part of the background region, the background region included in the target prior region can be made smaller by setting a smaller target prior region.
Optionally, the manner of establishing the target prior region in the rectangular target region may be: determining the area ratio of a target prior region to a rectangular target region; the area ratio is less than 1; and determining the center of the rectangular target region as the center of the target prior region, and determining the size of the target prior region according to the area ratio.
Specifically, the target prior region may be Tp,TpHas an area of a rectangular target region TrGamma (gamma < 1) times of (A), is a guaranteed region TpContains enough features of the target object, γ should not be too large. The prior region of the target is TpMay be denoted as Tp=[x,y,γw,γh]∈R4Where (x, y) denotes the center coordinates of the tracked target object, and w and h denote the width and height of the target object, respectively.
And S230, determining a part between the rectangular target area and the target prior area as an area to be verified.
In this embodiment, the clean target region can be defined asThe region to be verified is T'rFor the established target prior region, the region can be considered to belong to a pure target regionTherefore, the part between the rectangular target area and the target prior area can be determined as the area to be verified T'r。
S240, determining a target area belonging to the target object in the area to be verified, and determining a set of the target prior area and the target area as a pure target area.
In the embodiment, for the region to be verified T'rThe region may be further partitioned to determine a target region in which the target object is located.
Optionally, the method for determining the target area belonging to the target object in the area to be verified may be: establishing a background prior area; the background prior area comprises a rectangular target area and a background area; performing superpixel division on the background prior area to obtain a set number of superpixel seeds; determining the super-pixel seeds belonging to the to-be-verified area as the super-pixel seeds to be verified, and determining target super-pixel seeds belonging to a target object in the super-pixel seeds to be verified; a set of target superpixel seeds is determined as a target region.
Specifically, the background prior area may be Xr,XrIs a target area T larger than the rectanglerThe bounding box of which can be denoted as Xr=[x,y,λw,λh]∈R4. Where λ is a constant greater than 1, (x, y) represents the center coordinates of the tracked target object, and w and h represent the width and height of the target object, respectively. Preferably, a Simple Linear Iterative Clustering (SLIC) algorithm can be used for superpixel division, and a plurality of compact small regions with consistent size are obtained according to a set number, wherein each small region is a superpixel seed. For the super-pixel seeds of the to-be-verified area, the target super-pixel seeds belonging to the target object can be determined through classification and division of the super-pixel seeds, and then the target area belonging to the target object in the to-be-verified area can be determined.
Further, the manner of determining the target superpixel seed belonging to the target object in the superpixel seeds to be verified may be: classifying the super-pixel seeds to be verified into secondary verification super-pixel seeds and background super-pixel seeds according to the similarity between the super-pixel seeds to be verified and a target prior region and a background region; and determining a weight self-similarity function value corresponding to each secondary verification super-pixel seed, and determining a target super-pixel seed in the secondary verification super-pixel seeds according to the weight self-similarity function value.
Specifically, in order to accurately classify the super-pixel seeds, the prior knowledge can be obtained by learning the target prior region and the background region, the super-pixel seeds with high similarity to the target prior region are determined as secondary verification super-pixel seeds according to the similarity to the target prior region and the background region, and the super-pixel seeds with high similarity to the background region are determined as background super-pixel seeds. For a certain superpixel seed, it is classified as follows:
wherein ln(Sn) Representing a superpixel seed SnClass label of, TpIs a target prior region, BrIs a background area.
For the secondary verification super-pixel seeds, a small amount of super-pixel seeds which do not belong to the target object can be contained, and the super-pixel seeds can be further classified according to the weight self-similarity function values of the super-pixel seeds.
Further, the manner of determining the target superpixel seed in the secondary verification superpixel seed according to the magnitude of the weight self-similarity function value may be: sorting the weight self-similarity function values corresponding to the secondary verification superpixel seeds in a descending order; determining the secondary verification super-pixel seeds with the set number which are sorted at last as background super-pixel seeds; and determining the secondary verification super-pixel seeds after the background super-pixel seeds are removed as target super-pixel seeds.
Specifically, in order to divide the super-pixel seeds more accurately, the super-pixel seeds belonging to the target object can be found from the region by constructing a weight self-similarity function. In the secondary verification superpixel seeds, the number of the superpixel seeds belonging to the background area is smaller than that of the superpixel seeds belonging to the pure target area, the superpixel seeds belonging to the background area are usually dissimilar to the superpixel seeds belonging to the target area, and self-similarity exists between the superpixel seeds belonging to the target area. By utilizing the weight self-similarity function, the similarity between the super-pixel seeds can be tested, the super-pixel seeds belonging to the target area are separated from the super-pixel seeds belonging to the background area, and then the target without the background area is obtained.
Wherein,the super-pixel seed is a weight self-similarity function, the value of a determined super-pixel seed shows the possibility that the seed belongs to a tracking target, the probability that the super-pixel seed belongs to the tracking target is higher if the value of the super-pixel seed is larger, and the probability that the super-pixel seed belongs to a background area is higher if the value of the super-pixel seed is smaller. F denotes the Fourier transform, I(s)i) Is a matrix representing the gray values of the image corresponding to a rectangular block that can contain the superpixel seed regions.Is a local weighting function, which aims to suppress the boundary area of the rectangular block, and is defined as follows:
wherein,is a fixed scale parameter, and z represents the position coordinate of a rectangular block; (x)z,yz) Is the central coordinate position of a rectangular block.
Further, the probability that the superpixel seed closer to the central position coordinate of the tracking target belongs to the pure target is higher, so that a spatial weight function can be designedIt is defined as follows:
Further, the corresponding value of each super pixel seed is comparedCalculating and sorting the N values according to the descending order, and selecting the last N in the sortingsA super-pixel seed is considered to be a super-pixel seed that is likely to belong to a background region. N is a radical ofsIs a shaping constant used to control the number of seeds belonging to the background superpixel.
For a certain superpixel seed,/n(Sn) The update is in the form:
After determining the target superpixel seeds belonging to the target object, determining a set of the target superpixel seeds as a target area, and further determining a set of the target prior area and the target area as a pure target area.
And S250, performing visual tracking by taking the pure target area as a tracking target in a set visual tracking algorithm.
In this embodiment, after the pure target region is obtained, the pure target region may be used as a tracking target in a visual tracking algorithm such as block tracking, and the accuracy of the tracking algorithm may be improved.
The embodiment of the invention firstly obtains an image to be detected; then, establishing a target prior area in the rectangular target area; determining a part between the rectangular target area and the target prior area as an area to be verified; determining a target area belonging to a target object in the area to be verified, and determining a set of a target prior area and the target area as a pure target area; and finally, the pure target area is used as a tracking target in a set visual tracking algorithm for visual tracking. According to the visual tracking method provided by the embodiment of the invention, the problem that part of background areas are used as tracking targets in the visual tracking algorithm is solved by determining the pure target areas, and the tracking effect of the visual tracking algorithm is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a visual tracking apparatus according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an image to be detected acquisition module 310, a clean target area determination module 320, and a visual tracking module 330.
And an image to be detected acquiring module 310, configured to acquire an image to be detected.
The image to be detected comprises a rectangular target area.
A clean target region determination module 320, configured to determine a clean target region in the rectangular target region.
And the visual tracking module 330 is configured to perform visual tracking on the pure target region as a tracking target in a set visual tracking algorithm.
Optionally, the clean target area determining module 320 is further configured to:
establishing a target prior area in a rectangular target area; determining a part between a rectangular target area and a target prior area as an area to be verified; determining a target area belonging to a target object in the area to be verified, and determining a set of a target prior area and the target area as a pure target area.
Optionally, the clean target area determining module 320 is further configured to:
determining the area ratio of a target prior region to a rectangular target region; the area ratio is less than 1; and determining the center of the rectangular target region as the center of the target prior region, and determining the size of the target prior region according to the area ratio.
Optionally, the clean target area determining module 320 is further configured to:
establishing a background prior area; the background prior area comprises a rectangular target area and a background area; carrying out superpixel division on a background prior area to obtain superpixel seeds with a set number; determining the super-pixel seeds belonging to the to-be-verified area as super-pixel seeds to be verified, and determining target super-pixel seeds belonging to a target object in the super-pixel seeds to be verified; a set of target superpixel seeds is determined as a target region.
Optionally, the clean target area determining module 320 is further configured to:
classifying the super-pixel seeds to be verified into secondary verification super-pixel seeds and background super-pixel seeds according to the similarity between the super-pixel seeds to be verified and a target prior region and a background region; and determining a weight self-similarity function value corresponding to each secondary verification super-pixel seed, and determining a target super-pixel seed in the secondary verification super-pixel seeds according to the weight self-similarity function value.
Optionally, the clean target area determining module 320 is further configured to:
sorting the weight self-similarity function values corresponding to the secondary verification super-pixel seeds in a descending order; determining the secondary verification super-pixel seeds with the set number which are sorted at last as background super-pixel seeds; and determining the secondary verification super-pixel seeds after the background super-pixel seeds are removed as target super-pixel seeds.
The visual tracking device provided by the embodiment of the invention can execute the visual tracking method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the visual tracking method.
In some embodiments, the visual tracking method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the visual tracking described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the visual tracking method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A visual tracking method, comprising:
acquiring an image to be detected; the image to be detected comprises a rectangular target area;
determining a clean target region in the rectangular target region;
and performing visual tracking by taking the pure target area as a tracking target in a set visual tracking algorithm.
2. The method of claim 1, wherein determining a clean target region of the rectangular target regions comprises:
establishing a target prior area in the rectangular target area;
determining a part between the rectangular target area and the target prior area as an area to be verified;
determining a target area belonging to the target object in the area to be verified, and determining a set of the target prior area and the target area as the pure target area.
3. The method of claim 2, wherein establishing a target prior region in the rectangular target region comprises:
determining the area ratio of the target prior region to the rectangular target region; the area ratio is less than 1;
and determining the center of the rectangular target region as the center of the target prior region, and determining the size of the target prior region according to the area ratio.
4. The method of claim 2, wherein determining a target area of the areas to be verified that belongs to the target object comprises:
establishing a background prior area; the background prior area comprises the rectangular target area and a background area;
performing superpixel division on the background prior area to obtain a set number of superpixel seeds;
determining the super-pixel seeds belonging to the to-be-verified area as to-be-verified super-pixel seeds, and determining target super-pixel seeds belonging to the target object in the to-be-verified super-pixel seeds;
determining the set of target superpixel seeds as the target region.
5. The method of claim 4, wherein determining a target superpixel seed of the superpixel seeds to be verified that belongs to the target object comprises:
classifying the super-pixel seeds to be verified into secondary verification super-pixel seeds and background super-pixel seeds according to the similarity of the super-pixel seeds to be verified with the target prior region and the background region;
determining a weight self-similarity function value corresponding to each secondary verification super-pixel seed, and determining a target super-pixel seed in the secondary verification super-pixel seeds according to the weight self-similarity function value.
6. The method of claim 5, wherein determining a target superpixel seed in the secondary verification superpixel seed according to a magnitude of the weight self-similarity function value comprises:
sorting the weight self-similarity function values corresponding to the secondary verification super-pixel seeds in a descending order;
determining the secondary verification super-pixel seeds with the set number which are sorted at last as the background super-pixel seeds;
determining the secondary verification super-pixel seeds after the background super-pixel seeds are removed as the target super-pixel seeds.
7. The method of claim 1, wherein the set visual tracking algorithm comprises a block tracking algorithm.
8. A visual tracking apparatus, comprising:
the image acquisition module to be detected is used for acquiring an image to be detected; the image to be detected comprises a rectangular target area;
the pure target area determining module is used for determining a pure target area in the rectangular target area;
and the visual tracking module is used for performing visual tracking on the pure target area as a tracking target in a set visual tracking algorithm.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the visual tracking method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the visual tracking method of any one of claims 1-7 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210113895.4A CN114463386A (en) | 2022-01-30 | 2022-01-30 | Visual tracking method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210113895.4A CN114463386A (en) | 2022-01-30 | 2022-01-30 | Visual tracking method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114463386A true CN114463386A (en) | 2022-05-10 |
Family
ID=81411951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210113895.4A Pending CN114463386A (en) | 2022-01-30 | 2022-01-30 | Visual tracking method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114463386A (en) |
-
2022
- 2022-01-30 CN CN202210113895.4A patent/CN114463386A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112801164A (en) | Training method, device and equipment of target detection model and storage medium | |
CN112633276B (en) | Training method, recognition method, device, equipment and medium | |
CN115131566A (en) | Automatic image segmentation method based on super-pixels and improved fuzzy C-means clustering | |
CN113065614B (en) | Training method of classification model and method for classifying target object | |
CN112381030B (en) | Satellite optical remote sensing image target detection method based on feature fusion | |
CN107506792B (en) | Semi-supervised salient object detection method | |
CN112989995B (en) | Text detection method and device and electronic equipment | |
CN116740355A (en) | Automatic driving image segmentation method, device, equipment and storage medium | |
CN118053027A (en) | Defect identification method and device, electronic equipment and storage medium | |
CN113887630A (en) | Image classification method and device, electronic equipment and storage medium | |
CN115272705B (en) | Training method, device and equipment for saliency object detection model | |
CN116188917A (en) | Defect data generation model training method, defect data generation method and device | |
CN115359322A (en) | Target detection model training method, device, equipment and storage medium | |
CN115471772A (en) | Method, device, equipment and medium for extracting key frame | |
CN115019057A (en) | Image feature extraction model determining method and device and image identification method and device | |
CN114463386A (en) | Visual tracking method, device, equipment and storage medium | |
CN113936158A (en) | Label matching method and device | |
CN114092739B (en) | Image processing method, apparatus, device, storage medium, and program product | |
CN114037865B (en) | Image processing method, apparatus, device, storage medium, and program product | |
CN114494818B (en) | Image processing method, model training method, related device and electronic equipment | |
CN117274778B (en) | Image search model training method based on unsupervised and semi-supervised and electronic equipment | |
CN115578583B (en) | Image processing method, device, electronic equipment and storage medium | |
CN116091785A (en) | Identification model generation method and device, electronic equipment and storage medium | |
CN117078997A (en) | Image processing or training method, device, equipment and medium of image processing model | |
CN116486144A (en) | Method for generating noise label detector, method and device for detecting noise label |
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 |