Target document gathering method, electronic device and computer storage medium

文档序号:8339 发布日期:2021-09-17 浏览:27次 中文

1. A target document gathering method, the method comprising:

obtaining a set consisting of a plurality of cameras, and generating a topological matrix corresponding to the cameras based on the average time of moving of a target among the cameras in the set;

dividing the set into a plurality of subsets based on the topological matrix, respectively clustering targets in the subsets, and fusing features of the same target to obtain a plurality of first document-clustering results respectively corresponding to the subsets;

performing target clustering among the first clustering results, fusing the characteristics of the same target to generate a file corresponding to the target, so as to obtain a second clustering result;

and acquiring the average time of the same target moving among the cameras in the set based on the second clustering result so as to update the topological matrix corresponding to the cameras, and returning to the step of dividing the set into a plurality of subsets based on the topological matrix.

2. The target document gathering method according to claim 1, wherein the step of dividing the set into a plurality of subsets based on the topology matrix, clustering targets in the plurality of subsets, and fusing features of the same target to obtain a plurality of first document gathering results corresponding to the plurality of subsets, respectively, comprises:

dividing the set into a plurality of subsets by using a mean clustering algorithm based on the topology matrix;

and respectively carrying out target clustering on the targets shot by the cameras in the subsets, and fusing the characteristics of the same target to obtain a plurality of first document clustering results respectively corresponding to the subsets.

3. The target document gathering method according to claim 2, wherein the step of clustering the targets captured by the cameras in the subsets respectively and fusing the features of the same target is preceded by the step of:

obtaining a plurality of targets shot by the cameras in the subset and corresponding quality scores thereof;

and arranging the targets in a descending order according to the quality scores to obtain a target collection corresponding to the subset.

4. The target document gathering method according to claim 3, wherein the step of clustering the targets shot by the cameras in the subsets respectively and fusing the features of the same target comprises:

obtaining a first target with the highest quality score in the target set, and taking the camera shooting the first target as a first camera;

performing feature comparison on the targets shot by the cameras in the subset including the first camera and the first target, and classifying the targets with comparison results larger than a first threshold value as the same targets as the first target;

fusing the obtained characteristics of all the first targets;

removing all the first targets from the target set, returning to obtain the first target with the highest quality score in the target set, and taking the camera shooting the first target as the first camera until the targets in the target set are emptied.

5. The method of claim 4, wherein the step of performing a feature comparison between the targets captured by the cameras in the subset including the first camera and the first target, and classifying the targets with comparison results greater than a first threshold as the same targets as the first target comprises:

obtaining at least one second camera within a preset distance from the first camera within the subset;

generating a time window for the first camera relative to the second camera based on an average time the target moves between the first camera and the second camera;

comparing the characteristics of the target shot by the second camera with the first target in a time window between the first camera and the second camera;

judging whether the comparison result of the feature comparison is greater than the first threshold value;

if the comparison result is greater than the first threshold, classifying the target with the comparison result greater than the first threshold as the target same as the first target, removing the first target from the targets shot by the first camera, taking the second camera as a new first camera, and returning to the step of obtaining at least one second camera in the subset within a preset distance from the first camera;

otherwise, acquiring the second camera which is not compared with the first camera, returning to a time window between the first camera and the second camera, and performing a step of comparing the features of the target shot by the second camera with the features of the first target until the second camera is traversed.

6. The target document gathering method according to claim 2, wherein the step of clustering the targets shot by the cameras in the subsets respectively and fusing the features of the same target comprises:

extracting features corresponding to each target shot by the cameras in the subset;

and comparing the characteristics corresponding to the targets by using a density clustering algorithm, classifying the targets with the comparison result larger than a first threshold value into the same target, and fusing the characteristics of the same target.

7. The target archive gathering method according to claim 4 or 6, wherein the step of clustering targets among the first archive gathering results, fusing features of the same target to generate a profile corresponding to the target, so as to obtain a second archive gathering result comprises:

comparing the characteristics of the targets in the first document gathering result corresponding to each subset, and classifying the targets with the comparison result larger than a second threshold value as the same targets;

fusing the same characteristics of the targets and establishing a file of the same target, and independently establishing a file for the targets with the comparison results smaller than or equal to the second threshold value to obtain second file aggregation results; wherein the second threshold is greater than the first threshold.

8. The method of claim 1, wherein the step of obtaining a set of a plurality of cameras and generating a topology matrix corresponding to the cameras based on an average time that the target moves between the cameras in the set comprises:

obtaining a set of a plurality of said cameras and distances between said cameras;

estimating the average time of the target moving between the cameras based on the distance between the cameras, and generating the topological matrix corresponding to the cameras according to the average time.

9. The target document gathering method as claimed in claim 1, wherein the step of obtaining a set of a plurality of cameras and generating a topology matrix corresponding to the cameras based on an average time that a target moves between the cameras in the set is preceded by the step of:

and acquiring the targets shot by the plurality of cameras, and discarding the targets with false detection, preset uniform wearing and image quality lower than a preset threshold value.

10. An electronic device, comprising: a memory and a processor coupled to each other, wherein the memory stores program data that the processor calls to perform the method of any of claims 1-9.

11. A computer storage medium having program data stored thereon, which program data, when executed by a processor, implements the method according to any one of claims 1-9.

Background

With the continuous development of the security field, in order to obtain valuable personnel information, a large number of targets captured in different time and space are generally required to be gathered, and information belonging to the same target is integrated to establish a file corresponding to the target. In the prior art, a snapshot target is usually compared with an existing archive library, and a new archive is established separately for a target which fails in comparison, however, the target archive aggregation method has a large data volume and low processing efficiency, and in addition, targets which are close to a time node but have a long distance may be classified as the same archive, so that the target archive aggregation accuracy is low. In view of the above, how to improve the efficiency and accuracy of target gear-gathering becomes an urgent problem to be solved.

Disclosure of Invention

The technical problem mainly solved by the application is to provide a target file gathering method, electronic equipment and a computer storage medium, which can improve the efficiency and accuracy of target file gathering.

To solve the above technical problem, a first aspect of the present application provides a target document gathering method, including: obtaining a set consisting of a plurality of cameras, and generating a topological matrix corresponding to the cameras based on the average time of moving of a target among the cameras in the set; dividing the set into a plurality of subsets based on the topological matrix, respectively clustering targets in the subsets, and fusing features of the same target to obtain a plurality of first document-clustering results respectively corresponding to the subsets; performing target clustering among the first clustering results, fusing the characteristics of the same target to generate a file corresponding to the target, so as to obtain a second clustering result; and acquiring the average time of the same target moving among the cameras in the set based on the second clustering result so as to update the topological matrix corresponding to the cameras, and returning to the step of dividing the set into a plurality of subsets based on the topological matrix.

Wherein the step of dividing the set into a plurality of subsets based on the topology matrix, clustering the targets in the plurality of subsets, and fusing the features of the same target to obtain a plurality of first archive aggregation results corresponding to the plurality of subsets, respectively, includes: dividing the set into a plurality of subsets by using a mean clustering algorithm based on the topology matrix; and respectively carrying out target clustering on the targets shot by the cameras in the subsets, and fusing the characteristics of the same target to obtain a plurality of first document clustering results respectively corresponding to the subsets.

Before the step of performing target clustering on the targets shot by the cameras in the subsets and fusing the features of the same target, the method comprises the following steps: obtaining a plurality of targets shot by the cameras in the subset and corresponding quality scores thereof; and arranging the targets in a descending order according to the quality scores to obtain a target collection corresponding to the subset.

Wherein the step of performing target clustering on the targets shot by the cameras in the subset and fusing the features of the same target respectively comprises: obtaining a first target with the highest quality score in the target set, and taking the camera shooting the first target as a first camera; performing feature comparison on the targets shot by the cameras in the subset including the first camera and the first target, and classifying the targets with comparison results larger than a first threshold value as the same targets as the first target; fusing the obtained characteristics of all the first targets; removing all the first targets from the target set, returning to obtain the first target with the highest quality score in the target set, and taking the camera shooting the first target as the first camera until the targets in the target set are emptied.

Wherein the step of comparing the features of the targets shot by the cameras in the subset including the first camera with the first target and classifying the targets with the comparison result larger than a first threshold as the same targets as the first target comprises: obtaining at least one second camera within a preset distance from the first camera within the subset; generating a time window for the first camera relative to the second camera based on an average time the target moves between the first camera and the second camera; comparing the characteristics of the target shot by the second camera with the first target in a time window between the first camera and the second camera; judging whether the comparison result of the feature comparison is greater than the first threshold value; if the comparison result is greater than the first threshold, classifying the target with the comparison result greater than the first threshold as the target same as the first target, removing the first target from the targets shot by the first camera, taking the second camera as a new first camera, and returning to the step of obtaining at least one second camera in the subset within a preset distance from the first camera; otherwise, acquiring the second camera which is not compared with the first camera, returning to a time window between the first camera and the second camera, and performing a step of comparing the features of the target shot by the second camera with the features of the first target until the second camera is traversed.

Wherein the step of performing target clustering on the targets shot by the cameras in the subset and fusing the features of the same target respectively comprises: extracting features corresponding to each target shot by the cameras in the subset; and comparing the characteristics corresponding to the targets by using a density clustering algorithm, classifying the targets with the comparison result larger than a first threshold value into the same target, and fusing the characteristics of the same target.

Wherein, the step of clustering the targets among the first archive aggregation results, fusing the features of the same target to generate an archive corresponding to the target, so as to obtain a second archive aggregation result comprises: comparing the characteristics of the targets in the first document gathering result corresponding to each subset, and classifying the targets with the comparison result larger than a second threshold value as the same targets; fusing the same characteristics of the targets and establishing a file of the same target, and independently establishing a file for the targets with the comparison results smaller than or equal to the second threshold value to obtain second file aggregation results; wherein the second threshold is greater than the first threshold.

The step of obtaining a set of multiple cameras and generating a topology matrix corresponding to the cameras based on an average time of a target moving between the cameras in the set includes: obtaining a set of a plurality of said cameras and distances between said cameras; estimating the average time of the target moving between the cameras based on the distance between the cameras, and generating the topological matrix corresponding to the cameras according to the average time.

The step of obtaining a set of a plurality of cameras and generating a topology matrix corresponding to the cameras based on an average time of a target moving between the cameras in the set is preceded by the step of: and acquiring the targets shot by the plurality of cameras, and discarding the targets with false detection, preset uniform wearing and image quality lower than a preset threshold value.

In order to solve the above technical problem, a second aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the target archiving method of the first aspect.

To solve the above technical problem, a third aspect of the present application provides a computer storage medium having stored thereon program data, which when executed by a processor, implements the target filing method of the first aspect.

The beneficial effect of this application is: when a set composed of a plurality of cameras is divided into a plurality of subsets, a topological matrix of the cameras is generated according to the average time of the movement of a target among the cameras in the set, the set is divided into a plurality of subsets based on the topological matrix, the cameras in the subsets are clustered according to time and space constraints based on the topological matrix, further primary clustering is carried out in each subset, the target shot by the cameras in the subsets only needs to be clustered when clustering is carried out in each subset, the efficiency of target clustering is improved, the features of the same target are fused after the clustering is completed in each subset, the features of the target are enriched, further when the target clustering is carried out among a plurality of first clustering results, the probability of grouping different targets into the same target caused by insufficient features of the target is reduced, and the topological matrix is corrected and updated according to a second clustering result, the rationality of subset division is further improved, and the accuracy of target gear aggregation is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:

FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a target archive aggregation method of the present application;

FIG. 2 is a schematic flow chart diagram illustrating another embodiment of a target archive aggregation method of the present application;

FIG. 3 is a flowchart illustrating an embodiment corresponding to step S206 in FIG. 2;

FIG. 4 is a schematic structural diagram of an embodiment of an electronic device of the present application;

FIG. 5 is a schematic structural diagram of an embodiment of a computer storage medium according to the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all 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 application.

The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.

Referring to fig. 1, fig. 1 is a schematic flow chart diagram illustrating an embodiment of a target document gathering method according to the present application, the method including:

step S101: a set consisting of a plurality of cameras is obtained, and a topological matrix corresponding to the cameras is generated based on the average time of the movement of the target among the cameras in the set.

Specifically, when multiple cameras are applied to a monitoring place, the multiple cameras in the monitoring place are grouped into the same set, the average time of the target moving in the monitoring range of each camera in the set is estimated according to the moving average speed of the target, and a topology matrix corresponding to the cameras is generated according to the average time of the target moving, wherein the process is expressed by the following formula:

wherein, tijRepresenting the average time that the object moves from camera i to camera j.

In an application mode, when the cameras are arranged in monitoring places such as shopping malls, subways, office buildings or houses, the cameras in the same place are grouped into the same set, pedestrians are used as monitoring targets, the average moving speed of the pedestrians in the monitoring places is obtained according to existing monitoring data in the monitoring places, the average time of the targets from the monitoring area of the current camera to the monitoring areas of other cameras is further estimated, the average moving time of the targets among the cameras in the set is obtained, and the average moving time is used as a parameter of a topology matrix S, so that the topology matrix S corresponding to the cameras is obtained.

Step S102: the method comprises the steps of dividing a set into a plurality of subsets based on a topological matrix, clustering targets in the subsets respectively, and fusing features of the same target to obtain a plurality of first document-gathering results corresponding to the subsets respectively.

Specifically, the camera set is divided into a plurality of subsets according to the topology matrix, wherein each subset comprises at least one camera, and the cameras in each subset are not overlapped with each other.

Further, target clustering is performed on the targets shot by the cameras in each subset respectively to obtain targets judged to be the same target, and features of the same target are fused to obtain a plurality of first document clustering results corresponding to the subsets respectively.

In an application mode, a set is divided into a plurality of subsets by using a mean value clustering algorithm based on a topological matrix, then targets shot by cameras in the subsets are clustered respectively, and features of the same target are fused to obtain a plurality of first document gathering results corresponding to the subsets respectively.

Specifically, a plurality of cameras are selected from a camera set as a clustering center, cameras outside the clustering center and cameras serving as the clustering center are clustered, the cameras outside the clustering center are allocated to the cameras serving as the clustering center closest to the cameras according to a topological matrix corresponding to the cameras serving as the clustering center, and after clustering is completed, clustering is not performed on each camera with other cameras, so that the cameras in the set are restricted according to time and space during clustering, and the cameras in each subset have time and space aggregations, so that the division of the subsets is matched with the limitation space-time of a target moving in an actual scene.

In a specific application scene, dividing a set corresponding to cameras into subsets consisting of K small-range cameras by using a K-means clustering algorithm, randomly selecting K cameras as initial clustering centers, then calculating the distance between each camera and each clustering center, and allocating the camera to the clustering center closest to the camera. Each camera is assigned, the clustering center of the cluster is recalculated according to the existing camera in the cluster, the process is repeated continuously until the cameras in the cluster are assigned, and the clustering center and the cameras assigned to the clustering center form a subset together. The above process is formulated as follows:

and Ci∩Cj≠i=φ (2)

Wherein the set C is a plurality of subsets C1,C2,…CkAnd the subsets intersect with each other to form an empty set.

Further, after the subset is divided, extracting the features corresponding to each target shot by the cameras in the subset, comparing the features corresponding to each target by using a density clustering algorithm, classifying the targets with the comparison result larger than a first threshold value as the same target, and fusing the features of the same target. When the cameras in the set are dispersed to the subsets and the targets shot by the cameras in the subsets are gathered, the targets do not need to be compared with the targets in the whole set, the comparison times of target clustering in the subsets are reduced, and the target gathering efficiency is improved.

In an application mode, the characteristics corresponding to the targets shot by the cameras in the current subset are extracted, the characteristics of the targets are clustered by using cosine distances and adopting a density clustering algorithm, and the targets with the cosine distance values larger than a first threshold value are judged to be the same target. The above process is formulated as follows:

wherein the content of the first and second substances,respectively representing the corresponding characteristics of different targets. When two objects correspond to each otherAnd when the characteristics are very close, the value of cos (theta) approaches to 1, and when the comparison result is greater than a first threshold value, the corresponding targets are classified as the same target, and the characteristics of the same target are fused.

In a specific application scene, extracting the human body re-identification features corresponding to the human body of the pedestrian shot by the camera in the current subset, performing feature comparison on the human body re-identification features of the human body by using the cosine distance formula (3) and adopting a density clustering algorithm, judging the object with the cosine distance value greater than a first threshold value as the same pedestrian, and performing object clustering on the pedestrians shot by the cameras in all the subsets in the subsets respectively to obtain a first clustering result corresponding to the pedestrian in each subset.

Step S103: and performing target clustering among the first clustering results, fusing the characteristics of the same target to generate a file corresponding to the target, so as to obtain a second clustering result.

Specifically, the features of the targets in the first archive aggregation results corresponding to the subsets are fused, so that the features corresponding to the same target are richer, the first archive aggregation results corresponding to the subsets are subjected to target clustering to obtain the targets judged as the same target, the features of the same target are further fused, the archive corresponding to the target is generated, and the second archive aggregation result is generated.

In an application mode, performing feature comparison on the targets in the first gathering result corresponding to each subset, and classifying the targets with the comparison result larger than a second threshold value as the same targets; fusing the characteristics of the same target and establishing a file of the same target, and independently establishing a file for the target of which the comparison result is less than or equal to a second threshold value so as to obtain a second filing result.

Specifically, the density clustering algorithm is used for comparing the characteristics corresponding to each target, please refer to the formula (3) again, the targets in the first clustering result are respectively substituted into the formula (3), the targets with the comparison result larger than the second threshold are classified into the same target, the characteristics of the same target are fused and a file of the same target is built, otherwise, the targets are classified into different targets, and a file is built separately for the corresponding targets, so that a second clustering result is obtained.

It can be understood that when all targets in the set are subjected to feature comparison in pairs until the targets complete filing, the data processing efficiency is low, and two different targets close in time point but far in distance are classified as the same target possibly because of insufficient features of the targets, so that the accuracy of filing is reduced.

Further, the second threshold is greater than the first threshold, and since the division of the subsets has space-time constraints and the movement of the targets also has space-time constraints, the probability that the same target appears in different subsets at close time points is low, so that the criterion for judging the target as the same target when clustering the targets between the first clustering results is higher than the criterion for clustering the targets in the subsets, thereby reducing the probability of classifying different targets in different subsets as the same target.

Step S104: and based on the second clustering result, acquiring the average time of the same target moving among the cameras in the set so as to update the topological matrix corresponding to the cameras.

Specifically, after the second clustering result is obtained, the average time of the movement of the target among the cameras in the set is updated based on the time of the movement of the same targets among different cameras, so that the topology matrix corresponding to the cameras can be updated in real time, and the rationality of subset partitioning is further improved.

According to the scheme, when a set consisting of a plurality of cameras is divided into a plurality of subsets, a topological matrix of the cameras is generated according to the average time of the movement of the target among the cameras in the set, the set is divided into the subsets based on the topological matrix, the cameras in the subsets are clustered based on the topological matrix according to the time and space constraints, further primary clustering is performed in each subset, only the target shot by the cameras in the subsets needs to be clustered when clustering is performed in each subset, the efficiency of target clustering is improved, the features of the same target are fused after clustering is completed in each subset, the features of the target are enriched, further, when target clustering is performed among a plurality of first clustering results, the probability of grouping different targets into the same target due to insufficient features of the target is reduced, and the topological matrix is corrected and updated according to a second clustering result, the rationality of subset division is further improved, and the accuracy of target gear aggregation is improved.

Referring to fig. 2, fig. 2 is a schematic flow chart diagram illustrating another embodiment of a target document gathering method according to the present application, the method including:

step S201: a set consisting of a plurality of cameras is obtained, and a topological matrix corresponding to the cameras is generated based on the average time of the movement of the target among the cameras in the set.

Specifically, a set of a plurality of cameras and distances between the cameras are obtained, the average time of moving the target between the cameras is estimated based on the distances between the cameras, and a topological matrix corresponding to the cameras is generated according to the average time.

In an application mode, after a plurality of cameras in a monitoring place are obtained, the distance between the cameras in the monitoring place is calibrated, the average time of the movement of a target between the cameras can be estimated according to the speed of the movement of the target, a topological matrix corresponding to the cameras is generated by taking the average time as a parameter, and when the set is subsequently divided into a plurality of subsets, the subset division can be restrained according to the space position of the cameras and the time of the movement of the target.

In a specific application scenario, after a plurality of cameras are installed in a monitoring place, when a pedestrian is used as a target to be monitored, the average moving speed of the pedestrian in the current monitoring place is obtained, and the average time of the target moving in the monitoring range of each camera is estimated according to the installation distance between the cameras and the monitoring range of the cameras, so as to obtain a topology matrix corresponding to the cameras.

Optionally, before step S201, the method further includes: and acquiring targets shot by a plurality of cameras, and discarding the targets with false detection, preset uniform wearing and image quality lower than a preset threshold value.

Specifically, after an image shot by a camera is obtained, a target in the image is preliminarily recognized, whether false detection occurs in the image is judged, the target subjected to false detection is deleted, the target including preset uniforms in the image is extracted, the target with the uniform worn by a user is deleted, whether the quality of the image is lower than a preset threshold value is judged, wherein the preset threshold value is set based on the definition of the image, the target which is too low in definition to be recognized is deleted, and after the primary recognition, part of the target which is not needed to be recognized or cannot be recognized is deleted, so that the quality of the image used for target document collection is improved, and the efficiency of the target document collection is improved.

In an application scene, when a camera shoots an image and captures a target, a false detection identifier is added to the image, if false detection occurs, the identifier is 1, otherwise, the identifier is 0, and after the processing platform obtains the image, whether false detection occurs is judged based on the false detection identifier so as to filter the target with the false detection. Establish archives in advance for the staff, after the staff of wearing preset uniform was caught as the target, processing platform will wear the staff of preset uniform and filter to reduce follow-up invalid comparison work, improve comparison efficiency. And deleting the image with the image definition smaller than the preset threshold value so as to avoid that the target which cannot acquire the effective information is classified into an independent file and improve the accuracy of the target file aggregation.

Step S202: the set is divided into a plurality of subsets by using a mean clustering algorithm based on the topology matrix.

Specifically, the set corresponding to the cameras is divided into subsets formed by k small-range cameras by using a k-means clustering algorithm, and specific contents may refer to step S102 described above, which is not described herein again.

Step S203: a plurality of targets captured by the cameras within the subset and their corresponding quality scores are obtained.

Specifically, after the camera shoots an image including the target, the image including the target is uploaded to a processing platform, and the processing platform evaluates the quality of the image to obtain a quality score corresponding to the target.

In an application mode, after the camera shoots an image including a target, the image is uploaded to a processing platform, the processing platform scores according to the definition of the image as the quality of the target, and the higher the definition is, the higher the score corresponding to the target is.

Step S204: and arranging the plurality of targets in a descending order according to the quality scores to obtain a target collection corresponding to the subset.

Specifically, in each subset, the targets shot by the cameras in the subset are arranged in a descending order according to the quality score from high to low to obtain a corresponding target set in each subset, and then during subsequent comparison of the targets, the high-quality targets can be preferentially gathered according to the quality order of the targets, and for the same target, a high-quality image is preferentially obtained, and then when the features are fused, the features on the high-quality image can be used as main features to enhance the features of the same target.

Step S205: and obtaining a first target with the highest quality score in the target set, and taking the camera shooting the first target as a first camera.

Specifically, a target with the highest quality score in the remaining targets in the current target set is obtained and used as a first target, and a camera for shooting the first target is used as a first camera.

Step S206: and performing characteristic comparison on the targets shot by the cameras in the subset including the first camera and the first target, and classifying the targets with the comparison result larger than a first threshold value as the same targets as the first target.

Specifically, the first target and the target shot by the camera in the current subset are subjected to feature comparison, a density clustering algorithm is used to obtain a comparison result of the feature comparison between the first target and other targets based on the formula (3) in the above embodiment, and the targets with the comparison result larger than the first threshold are classified as the same targets as the first target. Through relay gathering of the first target among the cameras, the fusion characteristics have good robustness to target posture change, illumination change, scene change and the like.

In an application manner, please refer to fig. 3, where fig. 3 is a flowchart illustrating an embodiment corresponding to step S206 in fig. 2, and step S206 specifically includes:

step S301: at least one second camera within a preset distance from the first camera within the subset is obtained.

Specifically, a preset distance is set based on the average time of target movement, a camera in the preset distance is a camera in an adjacent area of a first camera, after the first target is collected by the first camera for the first time, because the target has limitations in time and space when moving, the camera close to the spatial position of the first camera is preferentially selected to find out whether the first target is shot, and the target gear-gathering efficiency is improved.

Step S302: a time window of the first camera relative to the second camera is generated based on an average time that the object moves between the first camera and the second camera.

Specifically, please refer to the above formula (1), tijRepresents the average time for the object to move from the first camera i to the second camera j, at tijIs subtracted from the predetermined value as the lower limit of the time window T, at TijOn the basis of the above, a given value is added as an upper limit of the time window T, and the above process is expressed by the following formula:

T=(tij-w,tij+w) (4)

specifically, the time period range of the time window T is increased to expand the traversal range of the adjacent cameras, and reduce the error of feature comparison caused by the moving speed of the target.

Step S303: and in a time window between the first camera and the second camera, performing characteristic comparison on the target shot by the second camera and the first target.

Specifically, when a second camera adjacent to the first camera is traversed, a target meeting a time window in the second camera is obtained, and the target in the time window is compared with the first target in a feature mode through a density clustering algorithm.

Step S304: and judging whether the comparison result of the feature comparison is greater than a first threshold value.

Specifically, the result of the feature comparison is obtained based on the above formula (3), and if the result is greater than the first threshold, the step S305 is performed, otherwise, the step S306 is performed.

Step S305: and classifying the target with the comparison result larger than the first threshold value as the same target as the first target, removing the first target from the target shot by the first camera, and taking the second camera as a new first camera.

Specifically, when the comparison result is greater than the first threshold, the target is taken as the same target as the first target, the first target is temporarily removed from the target shot by the first camera, the target is cached in the storage space to wait for feature fusion so as to avoid repeated comparison, the second camera is taken as a new first camera, and the step of obtaining at least one second camera within a preset distance from the first camera in the subset is returned, so that the cameras in the subset perform relay gathering on the first target, thereby improving time continuity and space rationality and improving the accuracy of target gathering.

Step S306: and judging whether the second camera is traversed or not.

Specifically, if the second camera is traversed, it is indicated that the second camera adjacent to the first camera cannot find the first target, and the first target leaves the monitoring location, and the process proceeds to step S308. If there is a second camera that has not been traversed, the process proceeds to step S307.

Step S307: and acquiring a second camera which is not compared with the first camera.

Specifically, when the first target is not found in the other second cameras, which indicates that the target is likely not to move to the direction of the second camera that has been compared, but the second cameras in other directions are moved, the second camera that has not been compared with the first camera is obtained, and the step of performing feature comparison on the target shot by the second camera and the first target is performed in a time window between the first camera and the second camera, until the second camera is traversed.

Step S308: and ending the traversal.

Specifically, the process proceeds to step S207 after the traversal is finished.

Step S207: and fusing the obtained characteristics of all the first targets.

Specifically, the features of all the first objects obtained are fused to fuse the features of the same objects within the subset to obtain a first aggregate result.

In an application scenario, when the target is a pedestrian, the human body re-recognition features of the first target are fused to obtain a human body with fused features.

Step S208: and removing all the first targets from the target set, and judging whether the targets in the target set are empty or not.

Specifically, after the same features of the first targets are fused, all the first targets are removed from the target set, and whether the targets in the target set are empty is determined. And if not, returning to the step of obtaining the first target with the highest quality score in the target set, and taking the camera shooting the first target as the first camera until the target in the target set is emptied. If the target collection is empty, it indicates that the target in the target collection has completed the traversal, and the process proceeds to step S209.

Step S209: and acquiring a plurality of first archive aggregation results corresponding to the subsets respectively, clustering targets among the plurality of first archive aggregation results, and fusing the characteristics of the same target to generate a file corresponding to the target so as to acquire a second archive aggregation result.

Specifically, the objects in the first archive aggregation result corresponding to each subset are subjected to feature comparison, the objects with the comparison results larger than the second threshold are classified as the same object, the features of the same object are further fused to generate an archive corresponding to the object, and the archive is separately established for the objects with the comparison results smaller than or equal to the second threshold to obtain the second archive aggregation result.

Optionally, the second threshold is greater than the first threshold, so that the criterion when performing target clustering between the first clustering results is stricter, thereby reducing the probability of classifying different targets in different subsets into the same target, and improving the accuracy of target clustering.

In one application, referring again to equation (3) above, the first threshold is set to 0.9 when feature matching is performed within a subset, and the second threshold is set to 0.95 when feature matching is performed between first archive results, to improve the criteria when performing target clustering between first archive results.

In this embodiment, a target with the highest quality score is selected as a first target in each subset, a corresponding camera is used as a first camera, a second camera within a preset distance from the first camera is acquired, and a characteristic comparison is performed between the target of the second camera and the first target in a time window, so that the cameras in the subsets perform relay gathering on the first target, thereby improving time continuity and spatial rationality and improving the accuracy of target gathering.

Referring to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of an electronic device 40 of the present application, where the electronic device includes a memory 401 and a processor 402 coupled to each other, where the memory 401 stores program data (not shown), and the processor 402 calls the program data to implement the target document gathering method in any of the above embodiments, and the description of relevant contents refers to the detailed description of the above method embodiments, which is not repeated herein.

Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a computer storage medium 50 of the present application, the computer storage medium 50 stores program data 500, and the program data 500 is executed by a processor to implement the target document gathering method in any of the above embodiments, and the related contents are described in detail with reference to the above method embodiments, which are not repeated herein.

It should be noted that, 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 multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application 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 computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种矿工异常行为监测方法、装置及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!