CN112508994A - Target tracking frame adjusting method and device, computer equipment and readable storage medium - Google Patents

Target tracking frame adjusting method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112508994A
CN112508994A CN202011476686.3A CN202011476686A CN112508994A CN 112508994 A CN112508994 A CN 112508994A CN 202011476686 A CN202011476686 A CN 202011476686A CN 112508994 A CN112508994 A CN 112508994A
Authority
CN
China
Prior art keywords
sequence
median
target tracking
tracking frame
same category
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
Application number
CN202011476686.3A
Other languages
Chinese (zh)
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.)
Shenzhen Wondershare Software Co Ltd
Original Assignee
Shenzhen Wondershare Software 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 Shenzhen Wondershare Software Co Ltd filed Critical Shenzhen Wondershare Software Co Ltd
Priority to CN202011476686.3A priority Critical patent/CN112508994A/en
Publication of CN112508994A publication Critical patent/CN112508994A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/223Analysis of motion using block-matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • 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/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

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

Abstract

The embodiment of the invention discloses a target tracking frame adjusting method, a target tracking frame adjusting device, computer equipment and a readable storage medium. The method comprises the following steps: acquiring a tracking video, and dividing the tracking video into continuous single-frame images; acquiring the target tracking frame attributes of all single-frame images; extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category; performing median filtering processing on each sequence of the same category according to a preset first window width to obtain a plurality of median sequences; performing mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences; and adjusting the target tracking frame according to the attributes in the plurality of mean value sequences. The method not only enables the position of the target tracking frame to move smoothly, but also enables the size of the target tracking frame to become smooth when the size of the target tracking frame changes according to the size of the tracked target.

Description

Target tracking frame adjusting method and device, computer equipment and readable storage medium
Technical Field
The embodiment of the invention relates to the field of image processing, in particular to a target tracking frame adjusting method and device, computer equipment and a storage medium.
Background
Today, multimedia information is developed, and object tracking technology is often used to identify content or objects in a video. For example, the detection of human faces or the selection of license plates in a security system requires the correct selection of target objects.
When the target tracking frame with a fixed size tracks the target, the target tracking frame may generate a deviation to the feature value captured by the target object; the size of the target tracking frame in each frame of image is adjusted according to the size of the target object, which may cause the target tracking frame to change dramatically. Therefore, adjusting the variation range of the target tracking frame is an urgent technical problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adjusting a target tracking frame, computer equipment and a readable storage medium, and aims to solve the problem that the target tracking frame is easy to change violently in the prior art.
In a first aspect, an embodiment of the present invention provides a method for adjusting a target tracking frame, including:
acquiring a tracking video, and dividing the tracking video into continuous single-frame images;
acquiring target tracking frame attributes of all the single-frame images, wherein the target tracking frame attributes at least comprise coordinates of the same reference point of the target tracking frame and the width and height of the target tracking frame;
extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category;
performing median filtering processing on each sequence of the same category according to a preset first window width to obtain a plurality of median sequences;
performing mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences;
and adjusting the target tracking frame according to the attributes in the plurality of mean value sequences.
In a second aspect, an embodiment of the present invention provides an apparatus for adjusting a target tracking frame, including:
the device comprises a segmentation module, a tracking module and a tracking module, wherein the segmentation module is used for acquiring a tracking video and segmenting the tracking video into continuous single-frame images;
the acquisition module is used for acquiring the target tracking frame attributes of all the single-frame images, wherein the target tracking frame attributes at least comprise the coordinates of the same reference point of the target tracking frame and the width and height of the target tracking frame;
the extraction module is used for respectively extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category;
the median filtering module is used for carrying out median filtering processing on the sequences of the same category according to a preset first window width to obtain a plurality of median sequences;
the mean filtering module is used for carrying out mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences;
and the adjusting module is used for adjusting the target tracking frame according to the attributes in the plurality of mean value sequences.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the target tracking frame adjustment method according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for adjusting a target tracking frame according to the first aspect.
The embodiment of the invention provides a target tracking frame adjusting method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a tracking video, and dividing the tracking video into continuous single-frame images; acquiring the target tracking frame attributes of all single-frame images; extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category; performing median filtering processing on each sequence of the same category according to a preset first window width to obtain a plurality of median sequences; performing mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences; and adjusting the target tracking frame according to the attributes in the plurality of mean value sequences. The method not only enables the position of the target tracking frame to move smoothly, but also enables the size of the target tracking frame to become smooth when the size of the target tracking frame changes according to the size of the tracked target.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are 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 schematic flow chart illustrating a target tracking frame adjusting method according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flow chart of a target tracking frame adjustment method according to an embodiment of the present invention;
FIG. 3 is a schematic view of another sub-process of a target tracking frame adjustment method according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of an apparatus for adjusting a target tracking frame according to an embodiment of the present invention.
Detailed Description
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 some, not all, embodiments of the present invention. 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 will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In the past, the target object in the video is captured by using a target tracking frame with a fixed size to track the target object, and the size of the target tracking frame should be the best size closest to the target object. In general, the size of the target object in the target tracking frame of each frame of image usually changes with time, for example: when the lens is zoomed in or zoomed out, the display size of the target object in the target tracking frame is changed. If the target object is only circled by the target tracking frame with a fixed size, when the size of the selected target object is larger or smaller than the target tracking frame, the feature value extracted from the target object by the target tracking frame in other subsequent applications will generate a deviation, so that the subsequent calculation result is wrong.
Therefore, a variable target tracking frame has been proposed and applied to a target object that may change. And aiming at the size of the target object in each frame of image, the target tracking frame with the corresponding size is adjusted, so that the target tracking frame is easy to change violently. Therefore, adjusting the variation range of the target tracking frame is an urgent technical problem to be solved.
The method provided by the embodiment of the invention sequentially uses the median filtering processing and the mean filtering processing to filter the attributes of the target tracking frame, so that the position of the target tracking frame moves smoothly, and the size of the target tracking frame becomes smooth when the size of the target tracking frame changes according to the size of the tracked target.
Please refer to fig. 1, which is a flowchart illustrating a method for adjusting a target tracking frame according to an embodiment of the present invention, the method includes steps S110 to S160.
And step S110, acquiring the tracking video, and dividing the tracking video into continuous single-frame images.
In this embodiment, the tracking video may be obtained from a video monitoring device covering the target monitoring area. After the tracking video is obtained, the tracking video is divided into a frame and a frame of continuous single-frame image. The present embodiment does not limit the division method. The video acquisition equipment can be video data acquisition equipment such as a video camera, a video recorder and an image sensor. The acquisition area is a target monitoring area which can be shot by the video object acquisition equipment. The video object acquisition equipment is arranged, so that the acquisition area can cover the whole target detection area.
For example, vehicle tracking video is captured from highway monitoring equipment, and then segmented into single frame images by a video processing tool.
And step S120, acquiring the target tracking frame attributes of all the single-frame images, wherein the target tracking frame attributes at least comprise the coordinates of the same reference point of the target tracking frame and the width and height of the target tracking frame.
In this embodiment, the attribute of the target tracking frame in each frame of the single-frame image is sequentially detected according to the playing sequence of each frame of the single-frame image in the tracking video. The attributes of the target tracking frame comprise the coordinates of the target tracking frames of all the single-frame images relative to the same reference point and the size of the target tracking frames. The size of the target-tracking box includes the width and height of the target-tracking box. Preferably, the reference point is a center point of the target tracking frame.
For example, the coordinate of the target tracking frame for acquiring the single frame image of the first frame relative to the central point of the single frame image has P1(1,2), and the width 4cm and the height 3cm of the target tracking frame.
And S130, respectively extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category.
In this embodiment, in order to adjust the variation range of the target tracking frame, attributes of the same category are extracted from the attributes of the target tracking frame of each single frame image, so as to form a sequence of the same category. For example, based on the target tracking frame attributes in all the single-frame images, sequentially extracting the abscissa of the coordinates relative to the same reference point in the single-frame images one by one to obtain an abscissa sequence; sequentially extracting the vertical coordinates of the coordinates relative to the same reference point in the single-frame image one by one to obtain a vertical coordinate sequence; sequentially extracting the widths of the target tracking frames in the single-frame image one by one to obtain a width sequence; and sequentially extracting the heights of the target tracking frames in the single-frame image one by one to obtain a height sequence.
Step S140, performing median filtering processing on each sequence of the same category according to a preset first window width to obtain a plurality of median sequences;
in this embodiment, the median filtering is a nonlinear signal processing technique capable of effectively suppressing noise based on a ranking statistical theory. Median filtering is to replace the value of a point in a digital image or digital sequence with the median of the values of the points in a neighborhood of the point, so that the surrounding pixel values are close to the true values, thereby eliminating isolated noise points. And acquiring a preset first window width, and then extracting attribute values of the first window width in a corresponding number from the sequences of the same category to perform median filtering calculation to obtain a median sequence. And sequentially carrying out median filtering calculation on the abscissa sequence, the ordinate sequence, the width sequence and the height sequence according to the same method to obtain a plurality of median filtering sequences.
In one embodiment, as shown in fig. 2, step S140 includes:
step S141, storing the first attribute value in the same category sequence to the first position of the median sequence;
step S142, sequentially extracting attribute values of a number corresponding to a first window width from the same category sequence from the first attribute value of the same category sequence to obtain a plurality of first candidate values;
s143, sorting the first candidate values according to sizes to obtain a sorting sequence;
s144, screening out intermediate values from the sorting sequence according to a preset screening rule, and storing the intermediate values into a median sequence in sequence;
s145, sequentially extracting the attribute values corresponding to the first window width from the second attribute value of the same category sequence, and continuously sequencing, screening and storing until all the attribute values in the same category sequence are screened;
and step S146, storing the last attribute value in the same category sequence to the last bit in the median sequence.
In this embodiment, median filtering is performed on the sequences of the same category. The method specifically comprises the steps of storing a first attribute value in a sequence of the same category to the first position of a median sequence, and sequentially extracting attribute values corresponding to a first window width from the sequence of the same category from the first attribute value of the sequence of the same category to obtain a plurality of first candidate values; sorting the plurality of first candidate values according to sizes to obtain a sorting sequence; screening out intermediate values from the sorting sequence according to a preset screening rule, and storing the intermediate values into a median sequence in sequence; sequentially extracting attribute values of the number corresponding to the first window width from the second attribute value of the same category sequence, and continuously sequencing, screening and storing until all the attribute values in the same category sequence are screened; and storing the last attribute value in the sequences of the same category to the last bit in the median sequence, thereby obtaining a final median filtering result, namely the median sequence. Wherein, the first window width can be set by user self-definition, and the preferred value is 5.
It should be noted that, in the median filtering, since the median value of the candidate values is taken, when the first window width value taken is an odd number, the first candidate value at the middle position of the sorting sequence is taken as the median value; when the first window width value is even, two intermediate values exist, and only one intermediate value is taken at a time, so that the average value of the two intermediate values is used as the intermediate value of the sorting sequence.
In one embodiment, the preset first window width is odd 3, median filtering is performed on the abscissa sequence [100, 102, 107, 215, 109, 114, 118, 120], the first value in the sequence is taken as the first bit of the abscissa median sequence, then, starting from the first attribute value 100 in the sequence, three attribute values, namely 100, 102, 107 are taken as first candidate values, the candidate values are sorted from small to large as 100, 102, 107, and the middle value is taken as 102 and stored in the second bit of the abscissa median sequence; then, starting from the second attribute value 102, three attribute values 102, 107 and 215 are taken as first candidate values, the first candidate values are sorted from small to large into 102, 107 and 215, and the middle value 107 is taken and stored in the third position of the median sequence on the abscissa. And analogizing in sequence, taking the middle value 109 in 107, 215 and 109 as the fourth bit, taking the middle value 114 in 215, 109 and 114 as the fifth bit, taking the middle value 114 in 109, 114 and 118 as the sixth bit, taking the middle value 118 in 114, 118 and 120 as the seventh bit, then only leaving two attribute values 118 and 120, less than three, ending screening the middle values, and taking the last attribute value 120 as the last bit of the abscissa middle value sequence to obtain the abscissa middle value sequence of [100, 102, 107, 109, 114, 114, 118 and 120 ].
In another embodiment, a first window width is preset to be an even number 4, median filtering is performed on the abscissa sequence [100, 102, 107, 215, 109, 114, 118, 120], a first value in the sequence is taken to store a first digit of the abscissa median sequence, then four attribute values, namely 100, 102, 107, 215 are taken as first candidate values from the first attribute value 100 in the sequence, the first candidate values are sorted from small to large as 100, 102, 107, 215, intermediate values are taken as (102+107)/2, namely 104.5 are stored to a second digit of the abscissa median sequence, then four attribute values, namely 102, 107, 215, 109 are taken as first candidate values from the second attribute value 102, and the intermediate values are sorted from small to large as 102, 107, 109, 215, and intermediate values (107+109)/2, namely 108 are stored to a third digit of the abscissa median sequence. And analogizing, taking the middle value 111.5 of 107, 215, 109 and 114 as the fourth bit, taking the middle value 116 of 215, 109, 114 and 118 as the fifth bit, taking the middle value 116 of 109, 114, 118 and 120 as the sixth bit, then only leaving three attribute values 114, 118 and 120, and ending screening the middle values if the number of the intermediate values is not four, and taking the last attribute value 120 as the last bit of the abscissa middle value sequence to obtain the abscissa middle value sequence of [100, 104.5, 108, 111.5, 116 and 120 ].
And S150, performing mean value filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean value sequences.
In this embodiment, the mean filtering is also referred to as linear filtering, and the main method adopted by the mean filtering is a neighborhood averaging method. The basic principle of linear filtering is to replace each pixel value in the original image with the mean value, namely, to-be-processed current pixel point (x, y), select a template, which is composed of a plurality of pixels adjacent to the template, find the mean value of all pixels in the template, and then give the mean value to the current pixel point (x, y) as the filtering pixel point g (x, y) of the processed image at the point. It should be noted that the mean filtering used in the present application is different from the conventional mean filtering in that different weight values are given instead of calculating the mean value with the same weight value. And acquiring a preset second window frame, extracting attribute values of the second window frame in a corresponding number from the median sequence, and performing mean value filtering calculation of different weights to obtain a mean value sequence. And sequentially carrying out median filtering calculation on median sequences corresponding to the abscissa sequence, the ordinate sequence, the width sequence and the height sequence according to the same method to obtain a plurality of mean sequences.
In one embodiment, as shown in fig. 3, step S150 includes:
s151, sequentially storing the top N-1 attribute values in the median sequence into the mean sequence, wherein N is a second window width;
step S152, starting from the first attribute value of the median sequence, sequentially extracting attribute values of a number corresponding to the second window width from the median sequence to obtain a plurality of second candidate values;
step S153, performing mean value filtering calculation on the plurality of second candidate values according to preset weights to obtain a mean value of the plurality of second candidate values, and storing the mean value into a mean value sequence in sequence;
and step S154, starting from the second attribute value of the median sequence, sequentially extracting the attribute values corresponding to the second window width from the median sequence, and calculating the mean value until all the attribute values in the median sequence are calculated.
In this embodiment, mean filtering processing is performed on the median sequence. The method specifically comprises the following steps: sequentially storing the top N-1 attribute values in the median sequence into the mean sequence, wherein N is a second window width; sequentially extracting attribute values of a number corresponding to a second window width from the median sequence from the first attribute value of the median sequence to obtain a plurality of second candidate values; carrying out mean value filtering calculation on the plurality of second candidate values according to a preset weight to obtain a mean value of the plurality of second candidate values, and storing the mean value into a mean value sequence in sequence; and sequentially extracting a number of attribute values corresponding to the second window width from the median sequence from the second attribute value of the median sequence, and calculating the mean value until all the attribute values in the median sequence are calculated, thereby obtaining a mean value filtering processing result, namely the mean value sequence. Wherein the second window width is consistent with the first window width, is user-definable, and has a preferred value of 5.
In one embodiment, the second window frame is preset to be 5, the preset weight is [0.1, 0.2, 0.4, 0.2, 0.1], mean filtering is performed on the median sequence [13, 14, 15, 16, 17, 17, 19, 21] in the ordinate, the first four attribute values are stored in the mean sequence in the ordinate, the fifth bit of the mean sequence in the ordinate is calculated, the fifth bit is 0.1 × 13+0.2 × 14+0.4 × 15+0.2 × 16+0.1 × 17, namely 15, and 15 is stored as the fifth bit in the mean sequence in the ordinate; the sixth bit is 0.1 × 14+0.2 × 15+0.4 × 16+0.2 × 17+0.1 × 17, i.e., 15.9, and 15.9 is stored as the sixth bit in the ordinate mean sequence; the seventh bit is 0.1X 15+ 0.2X 16+ 0.4X 17+ 0.2X 17+ 0.1X 19, i.e., 16.8, and the eighth bit is 0.1X 16+ 0.2X 17+ 0.4X 17+ 0.2X 19+ 0.1X 21, i.e., 17.7; then, only four attribute values of 17, 19 and 21 are left, and less than five attribute values are left, and the mean value calculation is ended to obtain a mean value sequence [13, 14, 15, 16, 15, 15.9, 16.8 and 17.7 ].
And S160, adjusting a target tracking frame according to the attributes in the plurality of mean value sequences.
In this embodiment, the attributes of the target tracking frame are adjusted according to the mean sequence of all the categories of attributes of the target tracking frame obtained in the above steps, that is, the mean sequence of the abscissa, the ordinate, the width, and the height, and the average sequence of each group, so as to adjust the variation range of the target tracking frame.
The method combines median filtering and mean filtering to process various attribute value sequences of the target tracking frame, so that the position of the target tracking frame moves smoothly, and the size of the target tracking frame is smooth when the size of the target tracking frame changes according to the size of the tracked target.
An embodiment of the present invention further provides a target tracking frame adjusting apparatus, which is configured to perform any one of the embodiments of the target tracking frame adjusting method. Specifically, referring to fig. 4, fig. 4 is a schematic block diagram of a target tracking frame adjusting apparatus according to an embodiment of the present invention. The target tracking frame adjusting apparatus 100 may be configured in a server.
As shown in fig. 4, the target tracking frame adjusting apparatus 100 includes a segmentation module 110, an obtaining module 120, an extracting module 130, a median filtering module 140, a mean filtering module 150, and an adjusting module 160.
A segmentation module 110, configured to obtain a tracking video, and segment the tracking video into continuous single-frame images;
an obtaining module 120, configured to obtain target tracking frame attributes of all single-frame images, where the target tracking frame attributes at least include coordinates of a same reference point of the target tracking frame and a width and a height of the target tracking frame;
the extracting module 130 is configured to extract attributes of the same category from the attributes of the target tracking frame of each single-frame image, so as to obtain a plurality of sequences of the same category;
the median filtering module 140 is configured to perform median filtering on the sequences of the same category according to a preset first window width to obtain a plurality of median sequences;
the mean filtering module 150 is configured to perform mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences;
and an adjusting module 160, configured to adjust the target tracking frame according to the attributes in the plurality of mean sequences.
In one embodiment, the median filtering module 140 includes:
the first storage unit is used for storing the first attribute value in the same category sequence to the first bit of the median sequence;
the first extraction unit is used for sequentially extracting attribute values of a number corresponding to a first window width from the same category sequence from a first attribute value of the same category sequence to obtain a plurality of first candidate values;
the sorting unit is used for sorting the first candidate values according to sizes to obtain a sorting sequence;
the screening unit is used for screening out intermediate values from the sorting sequence according to a preset screening rule and storing the intermediate values into the median sequence in sequence;
the screening unit is used for continuously extracting the attribute values of the number corresponding to the first window width from the second attribute value of the same category sequence, and continuously sequencing, screening and storing the attribute values until all the attribute values in the same category sequence are screened;
and the first storage unit is used for storing the last attribute value in the same category sequence to the last bit in the median sequence.
In one embodiment, the mean filtering module 150 includes:
the second storage unit is used for sequentially storing the first N-1 attribute values in the median sequence into the mean sequence, wherein N is a second window width;
the second extraction unit is used for sequentially extracting attribute values of a quantity corresponding to a second window width from the median sequence from the first attribute value of the median sequence to obtain a plurality of second candidate values;
the calculating unit is used for performing mean value filtering calculation on the plurality of second candidate values according to preset weights to obtain a mean value of the plurality of second candidate values, and storing the mean value into a mean value sequence in sequence;
and the calculating unit is used for sequentially extracting the attribute values corresponding to the second window width from the median sequence from the second attribute value of the median sequence, and calculating the mean value until all the attribute values in the median sequence are calculated.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for adjusting the target tracking frame as described above when executing the computer program.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to execute the target tracking frame adjustment method as described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for adjusting a target tracking frame is characterized by comprising the following steps:
acquiring a tracking video, and dividing the tracking video into continuous single-frame images;
acquiring target tracking frame attributes of all the single-frame images, wherein the target tracking frame attributes at least comprise the same reference point coordinate of the target tracking frame and the width and height of the target tracking frame;
extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category;
performing median filtering processing on each sequence of the same category according to a preset first window width to obtain a plurality of median sequences;
performing mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences;
and adjusting the target tracking frame according to the attributes in the plurality of mean value sequences.
2. The method of claim 1, wherein the performing median filtering on each of the sequences of the same category according to a preset first window width to obtain a plurality of median sequences comprises:
storing the first attribute value in the same category sequence to the first position of a median sequence;
sequentially extracting attribute values of a quantity corresponding to the first window width from the same category sequence from the first attribute value of the same category sequence to obtain a plurality of first candidate values;
sorting the first candidate values according to sizes to obtain a sorting sequence;
screening out intermediate values from the sorting sequence according to a preset screening rule, and storing the intermediate values into a median sequence in sequence;
sequentially extracting the attribute values corresponding to the first window width from the second attribute value of the same category sequence, and continuously sequencing, screening and storing until all the attribute values in the same category sequence are screened;
and storing the last attribute value in the same category sequence to the last bit in the median sequence.
3. The method of claim 2, wherein the filtering the intermediate value from the sorted sequence according to a preset filtering rule comprises:
if the window width is an odd number, taking a first candidate value at the middle position of the sorting sequence as a middle value;
and if the window width is an even number, taking the average value of the two first candidate values at the middle position of the sorting sequence as a middle value.
4. The method of claim 1, wherein the performing a mean filtering process on each of the median sequences according to a preset second window width and a preset weight to obtain a plurality of mean sequences comprises:
sequentially storing the top N-1 attribute values in the median sequence into a mean sequence, wherein N is a second window width;
sequentially extracting a number of attribute values corresponding to the second window width from the median sequence from the first attribute value of the median sequence to obtain a plurality of second candidate values;
carrying out mean value filtering calculation on the plurality of second candidate values according to a preset weight to obtain a mean value of the plurality of second candidate values, and storing the mean value into a mean value sequence in sequence;
and sequentially extracting the attribute values of the number corresponding to the second window width from the median sequence from the second attribute value of the median sequence, and calculating the mean value until all the attribute values in the median sequence are calculated.
5. The method of claim 1, wherein the reference point is a center point of the target tracking frame.
6. An apparatus for adjusting a target tracking frame, comprising:
the device comprises a segmentation module, a tracking module and a tracking module, wherein the segmentation module is used for acquiring a tracking video and segmenting the tracking video into continuous single-frame images;
the acquisition module is used for acquiring the target tracking frame attributes of all the single-frame images, wherein the target tracking frame attributes at least comprise the coordinates of the same reference point of the target tracking frame and the width and height of the target tracking frame;
the extraction module is used for respectively extracting attributes of the same category from the attributes of the target tracking frame of each single-frame image to obtain a plurality of sequences of the same category;
the median filtering module is used for carrying out median filtering processing on the sequences of the same category according to a preset first window width to obtain a plurality of median sequences;
the mean filtering module is used for carrying out mean filtering processing on each median sequence according to a preset second window width and a preset weight to obtain a plurality of mean sequences;
and the adjusting module is used for adjusting the target tracking frame according to the attributes in the plurality of mean value sequences.
7. The apparatus of claim 6, wherein the median filter module comprises:
the first storage unit is used for storing the first attribute value in the same category sequence to the first bit of the median sequence;
a first extracting unit, configured to extract attribute values of a number corresponding to the first window width from the same category sequence in sequence starting from a first attribute value of the same category sequence to obtain a plurality of first candidate values;
the sorting unit is used for sorting the first candidate values according to sizes to obtain a sorting sequence;
the screening unit is used for screening out intermediate values from the sorting sequence according to a preset screening rule and storing the intermediate values into a median sequence in sequence;
the screening unit is used for continuously extracting the attribute values of the number corresponding to the first window width from the second attribute value of the same category sequence, and continuously sequencing, screening and storing the attribute values until all the attribute values in the same category sequence are screened;
and the first storage unit is used for storing the last attribute value in the same category sequence to the last bit in the median sequence.
8. The apparatus of claim 6, wherein the mean filter module comprises:
the second storage unit is used for sequentially storing the first N-1 attribute values in the median sequence into the mean sequence, wherein N is a second window width;
a second extracting unit, configured to extract, in order from a first attribute value of the median sequence, attribute values corresponding to the second window width from the median sequence to obtain a plurality of second candidate values;
the calculating unit is used for performing mean value filtering calculation on the second candidate values according to preset weight to obtain a mean value of the second candidate values, and storing the mean value into a mean value sequence in sequence;
and the calculating unit is used for sequentially extracting the attribute values corresponding to the second window width from the median sequence from the second attribute value of the median sequence, and calculating the mean value until all the attribute values in the median sequence are calculated.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the object tracking frame adjustment method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored, which, when executed by a processor, causes the processor to execute the target tracking frame adjustment method according to any one of claims 1 to 5.
CN202011476686.3A 2020-12-15 2020-12-15 Target tracking frame adjusting method and device, computer equipment and readable storage medium Pending CN112508994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011476686.3A CN112508994A (en) 2020-12-15 2020-12-15 Target tracking frame adjusting method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011476686.3A CN112508994A (en) 2020-12-15 2020-12-15 Target tracking frame adjusting method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112508994A true CN112508994A (en) 2021-03-16

Family

ID=74973485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011476686.3A Pending CN112508994A (en) 2020-12-15 2020-12-15 Target tracking frame adjusting method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112508994A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545581A (en) * 2016-06-28 2018-01-05 圆展科技股份有限公司 Target tracking method and target tracking device
US20190130191A1 (en) * 2017-10-30 2019-05-02 Qualcomm Incorporated Bounding box smoothing for object tracking in a video analytics system
US20200327679A1 (en) * 2019-04-12 2020-10-15 Beijing Moviebook Science and Technology Co., Ltd. Visual target tracking method and apparatus based on deeply and densely connected neural network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545581A (en) * 2016-06-28 2018-01-05 圆展科技股份有限公司 Target tracking method and target tracking device
US20190130191A1 (en) * 2017-10-30 2019-05-02 Qualcomm Incorporated Bounding box smoothing for object tracking in a video analytics system
US20200327679A1 (en) * 2019-04-12 2020-10-15 Beijing Moviebook Science and Technology Co., Ltd. Visual target tracking method and apparatus based on deeply and densely connected neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱秀昌等: "《数字图像处理与图像信息》", 31 August 2016 *

Similar Documents

Publication Publication Date Title
EP3021575B1 (en) Image processing device and image processing method
US6819796B2 (en) Method of and apparatus for segmenting a pixellated image
US8508599B2 (en) Motion vector detection apparatus, motion vector detection method, and image capturing apparatus
US7925053B2 (en) Motion detection method, motion detection program, storage medium in which motion detection program is stored, and motion detection apparatus
US9760999B2 (en) Image processing apparatus, imaging apparatus, and image processing method
KR101706216B1 (en) Apparatus and method for reconstructing dense three dimension image
WO2012115826A1 (en) Extracting motion information from digital video sequences
CN105894464A (en) Median filtering image processing method and apparatus
CN111183630B (en) Photo processing method and processing device of intelligent terminal
CN112995678B (en) Video motion compensation method and device and computer equipment
CN111199197B (en) Image extraction method and processing equipment for face recognition
CN113723399A (en) License plate image correction method, license plate image correction device and storage medium
CN111209908B (en) Method, device, storage medium and computer equipment for updating annotation frame
CN106846262B (en) Method and system for removing mosquito noise
CN112508994A (en) Target tracking frame adjusting method and device, computer equipment and readable storage medium
US6785415B1 (en) Image processing method, an image processing apparatus, and a recording media on which an image processing program is recorded
CN114584832B (en) Video self-adaptive multi-size dynamic playing method and device
CN112990263B (en) Data enhancement method for high-resolution image of dense small target
CN113362390B (en) Rapid circular target positioning video processing method based on ellipse detection
CN112085683B (en) Depth map credibility detection method in saliency detection
CN112991419A (en) Parallax data generation method and device, computer equipment and storage medium
CN112529786A (en) Image processing apparatus and method, and non-transitory computer-readable storage medium
JP2021039647A (en) Image data classification device and image data classification method
CN117710250B (en) Method for eliminating honeycomb structure imaged by fiberscope
CN114095683B (en) Video noise estimation method, device, equipment and storage medium based on difference blocks

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210316