Image set completion method, device, equipment and medium

By acquiring and matching the capture time and location of the image acquisition device, determining peers and adding similar images, the problem of incomplete image sets of target characters is solved, and the integrity of image sets and the accuracy of portrait clustering is achieved.

CN114155360BActive Publication Date: 2025-02-07ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111358909.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2025-02-07
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

Due to the different capture conditions of image acquisition equipment in different scenarios, the image collection of the target person is incomplete. It is difficult for the prior art to ensure that the image collection of the target person is complete without reducing the accuracy of portrait clustering.

Method used

By obtaining the time and place of each character's image being captured, determine its trajectory file. If there is a matching time and place for capture in the trajectory file of other characters, determine the other character as the target person's peer and based on the peer point Determines the candidate image and adds it to the image set of the target person if the similarity between the candidate image and the target person's image is greater than the set threshold.

Benefits of technology

By reducing the scope of archive completion, ensure the completeness of the image set of target characters while maintaining the accuracy of portrait clustering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155360B_ABST
    Figure CN114155360B_ABST
Patent Text Reader

Abstract

The present application discloses an image set completion method, device, equipment and medium. In the method, for each person, a trajectory file containing the time and location of the image of the person is obtained, the companions of the target person are determined based on the time and location of the image in the trajectory files of other people, and the sub-trajectory file corresponding to the companions is determined based on the number of companion points. According to the time and location of the image in the sub-trajectory file, the candidate images collected in the adjacent time and adjacent area are determined, and whether to add the candidate image to the image set of the target person is determined based on the similarity threshold. Since the companions of the target person are determined based on the time and location of the image in the trajectory files of other people in the embodiment of the present application, the scope of file completion is reduced, and whether to add the candidate image to the image set of the target person is determined based on the similarity threshold, thereby ensuring the integrity of the image set of the target person.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of trajectory recognition technology, and in particular to an image set completion method, device, equipment and medium. Background Art

[0002] With the rapid development of science and technology, image acquisition devices are spread throughout the streets and alleys in the city. Based on the images captured by these image acquisition devices, different portrait files are formed through portrait clustering technology. The relevant departments use the formed portrait files to monitor the target objects and maintain social order.

[0003] Most of the existing portrait clustering technologies are based on portrait recognition technology. Portrait clustering is performed based on the similarity between images, and images of the target person captured when the target person passes through each image acquisition device are obtained to form a portrait file of the target person. However, due to the different capture conditions in different scenes, the target portrait file of the target person is often incomplete during the portrait clustering process. For example, due to different capture conditions, the captured image of the target person is likely to exist in the portrait files of other people. Therefore, how to ensure the completeness of the image set of the target person without reducing the accuracy of portrait clustering is an urgent problem to be solved. Summary of the invention

[0004] The present application implements a method, apparatus, device and medium for completing an image set, which are used to solve the problem of incomplete image sets of target persons caused by different capturing conditions of image acquisition devices in different scenes.

[0005] In a first aspect, the present application provides an image set completion method, the method comprising:

[0006] For each person, obtain the time and location when the image containing the person is captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location when each image is captured;

[0007] If the time and location of the capture of at least a set number of images in the trajectory files of other characters match the time and location of the capture of the images in the target trajectory file of the target character, then the other characters are determined to be the companions of the target character, and the time and location of the matching capture are used as the walking points of the companions and the target character;

[0008] Determine the sub-trajectory file of the companion corresponding to the companion point, determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured, and if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, add the candidate image to the image set of the target person.

[0009] In a second aspect, the present application further provides an image set completion device, the device comprising:

[0010] An acquisition module, for acquiring, for each person, the time and location at which the image containing the person was captured, and determining a trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location at which each image was captured;

[0011] A determination module, for determining that the other person is a companion of the target person if the time and location of the capture of at least a set number of images in the trajectory files of the other person match the time and location of the capture of the images in the target trajectory file of the target person, and using the time and location of the matched capture as the walking point of the companion and the target person;

[0012] The adding module is used to determine the sub-trajectory file of the companion corresponding to the companion point, and determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured. If the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, the candidate image is added to the image set of the target person.

[0013] In a third aspect, the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned image set completion methods when executing a computer program stored in the memory.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned image set completion methods.

[0015] The embodiment of the present application provides an image set completion method, device, equipment and medium. In the method, for each person, the time and place where the image containing the person is captured are obtained, and the trajectory file of the person is determined. If the time and place of the capture of at least a set number of images in the trajectory files of other people match the time and place of the capture of the image in the target trajectory file of the target person, then the other person is determined to be a companion of the target person, and the time and place of the matched capture are used as the walking point between the companion and the target person, and the sub-trajectory file corresponding to the companion is determined based on the walking point, and the candidate image collected in the adjacent time and adjacent area is determined according to the time and place of the capture of the image in the sub-trajectory file, and if the similarity between the candidate image and the image of the target person is greater than the set similarity threshold, the candidate image is added to the image set of the target person. Since the companion of the target person is determined by judging whether the time and place of the capture of a set number of images in the trajectory files of other people match the time and place of the capture of the image in the target trajectory file of the target person in the embodiment of the present application, the scope of file completion is reduced. And according to the similarity between the time and location of the image captured in the sub-trajectory file corresponding to the companion and the candidate image collected in the adjacent area and the image of the target person, it is determined whether to add the candidate image to the image set of the target person, thereby ensuring the completeness of the image set of the target person. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 A schematic diagram of the image set completion process provided in an embodiment of the present application;

[0018] Figure 2 A schematic diagram of the structure of an image set completion device provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the embodiment of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

[0021] In order to improve the integrity of the target person's image set, an embodiment of the present application provides an image set completion method, device, equipment and medium. In the method, for each person, the time and place when the image containing the person is captured are obtained, and the trajectory file of the person is determined. If the time and place of capturing of at least a set number of images in the trajectory files of other persons match the time and place of capturing of the image in the target trajectory file of the target person, the other persons are determined to be companions of the target person, and the matched time and place of capturing are used as the companion points of the companions and the target person. Based on the companion points, the sub-trajectory file corresponding to the companion is determined, and according to the time and place when the image in the sub-trajectory file is captured, the candidate image collected in the adjacent time and adjacent area is determined. If the similarity between the candidate image and the image of the target person is greater than the set similarity threshold, the candidate image is added to the image set of the target person. In the embodiment of the present application, the target person's companions are determined by judging whether there are a set number of images in the trajectory files of other persons whose capture time and location match the capture time and location of the images in the target trajectory file of the target person, and based on the similarity between the candidate image collected in the neighborhood of the time and location of the image capture in the sub-trajectory file corresponding to the companion and the image of the target person, it is determined whether to add the candidate image to the image set of the target person, thereby ensuring the completeness of the target person's image set.

[0022] Embodiment 1:

[0023] Figure 1 This is a schematic diagram of the image set completion process provided in an embodiment of the present application. The process specifically includes the following steps:

[0024] S101: For each person, obtain the time and location when the image containing the person is captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location when each image is captured.

[0025] The image set completion process provided in the embodiment of the present application is applied to an electronic device, which may be a server, a PC, or other device.

[0026] When receiving the image of each person taken by the image acquisition device, in order to obtain the trajectory file of each person, for each person, based on the portrait recognition technology, the time and place where the image containing the person was captured are obtained, and the image set determines the trajectory file of the person, where the trajectory file contains each image containing the person, and the time and place where each image was captured.

[0027] S102: If the time and location of the capture of at least a set number of images in the trajectory files of other characters match the time and location of the capture of the images in the target trajectory file of the target character, then the other characters are determined to be companions of the target character, and the matching time and location of the capture are used as the traveling points between the companions and the target character.

[0028] After the trajectory file of each character is obtained, each character's trajectory file records the time and place when the image containing the character was captured. For the target person to be searched, the trajectory file of the target person is matched with the files of each other character. In the embodiment of the present application, the time and place when the image in the trajectory file of the target person is captured can be matched with the time and place when the image in the trajectory file of each other character is captured. For each image in the trajectory file of other characters, if the time and place when the image is captured matches the time and place when a certain image in the trajectory file of the target person is captured, it is considered that the other person and the target person are matched successfully once. If after each image in the trajectory file of the other person is compared with the image in the trajectory file of the target person, the number of times the other person and the target person are successfully matched is not less than the set number, then the other person is considered to be a companion of the target person.

[0029] Specifically, it can be understood that if other characters and the target character pass through the same capture location at the same capture time, it is considered that the other character and the target character are matched successfully once. If the number of successful matches is not less than the set number, the other character can be considered to be a companion of the target character, and the matched capture time and location are used as the companion point between the companion and the target character.

[0030] In addition, even when the target person's companions pass by the same image acquisition device, there may be differences in the time of being captured. Therefore, in the embodiment of the present application, a successful match can also be understood as if the location where an image in the trajectory file of another person is captured is consistent with the location where an image in the trajectory file of the target person is captured, and the difference between the time when the image is captured and the time when the corresponding image of the target person is captured is not greater than a preset threshold, then it is considered that the other person is successfully matched with the target person once.

[0031] S103: Determine the sub-trajectory file of the companion corresponding to the companion point, and determine the candidate images collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured. If the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, add the candidate image to the image set of the target person.

[0032] After the companion is determined, the entire trajectory file of the companion can be used as the sub-trajectory file of the companion corresponding to the companion point, or the partial trajectory file including the companion point can be used as the sub-trajectory file, for example, the partial trajectory file including the companion point and a set number of other snapshot locations before and after the companion point can be used as the sub-trajectory file of the companion corresponding to the companion point. In the specific implementation, it can be flexibly set as needed.

[0033] After the sub-trajectory file corresponding to the travel point of the companions is determined, the candidate images collected in the adjacent time and adjacent area are determined according to the time and place when each image in the sub-trajectory file is captured. The candidate images may include the image of the target person. Therefore, in order to obtain all images of the target person, each obtained candidate image can be compared with the image of the target person for similarity. If there is a candidate image with a similarity greater than a set similarity threshold, the candidate image with a similarity greater than the set similarity threshold can be added to the image set of the target person. Each image contained in the image set of the target person contains the target person, and each image contained in the image set of the target person constitutes the target portrait file of the target person.

[0034] In the embodiment of the present application, the companions of the target person are determined by judging whether there are a set number of images in the trajectory files of other characters whose capture time and location match the capture time and location of the images in the target trajectory file of the target person, thereby reducing the scope of file completion. And according to the similarity between the candidate images collected in the adjacent time and adjacent area of ​​the capture time and location of the images in the sub-trajectory files corresponding to the companions and the image of the target person, it is determined whether to add the candidate image to the image set of the target person, thereby ensuring the integrity of the image set of the target person.

[0035] Embodiment 2:

[0036] In order to facilitate viewing and using the archive trajectory of each character, based on the above embodiment, in the embodiment of the present application, the determination of the trajectory archive of the character includes:

[0037] The images containing the person are sorted according to the order in which they were captured, and each sorted image, as well as the time and location when each image was captured, is used as the trajectory file of the person.

[0038] Specifically, after obtaining the time and place when the image containing each person was captured, because the time and place when each image was captured is fixed, each image corresponds to a time and place when it was captured. Therefore, in order to facilitate the viewing and use of the file trajectory of each person, each image containing the person can be sorted according to the chronological order of the time when the image containing the person was captured, and each sorted image and the time and place when each image was captured are used as the trajectory file of the person.

[0039] In the embodiment of the present application, for the convenience of description, the time and location at which each image contained in the trajectory file of each character is captured can be expressed by the following expression. For example, the trajectory file of character A can be expressed as:

[0040]

[0041] In the above expression, the images of the person are sorted in the order of the time when they were captured, T A1 is the earliest time when the image of person A is captured in the trajectory file, T An The latest time when the image of person A is captured in the trajectory file. Ai represents the location where the image containing person A was captured, that is, the location where person A was captured, T Ai represents the time corresponding to the location where the image containing person A was captured, which can be understood as person A at T Ai C Ai The image acquisition device at is captured, where i=1,…,n, and n represents that person A is captured n times in total.

[0042] Embodiment 3:

[0043] In order to more conveniently determine the companions of the target person, based on the above embodiments, in the embodiment of the present application, after determining the trajectory file of the person, the method further includes:

[0044] For each image contained in each trajectory file, according to the time when the image was captured and the time range corresponding to each preset time block, determine the target time block corresponding to the time when the image was captured, and according to the location where the image was captured and the space block corresponding to each preset area range, determine the target space block corresponding to the location where the image was captured;

[0045] The determining that the other person is a companion of the target person includes:

[0046] If the target time block of the other person exists, and the difference between the identifier corresponding to the target time block of the target person and the identifier corresponding to the target time block of the target person is not greater than a set value, and the target space block corresponding to the target time block of the other person is an adjacent space block of the target space block corresponding to the target time block of the target person, then it is determined that the other person and the target person have a traveling point; wherein the identifier of the time block is determined after sorting each time block according to the time sequence;

[0047] If the number of points of travel between the other person and the target person is greater than a set number, the other person is determined to be a traveler of the target person.

[0048] After obtaining the trajectory file of each person, since the time and address of the capture recorded in the trajectory file are specific time and address, the time of capture can be 18:11:59 on November 6, 2021, and the location of the capture can be the device identifier of the image acquisition device, or the longitude and latitude of the location where the image acquisition device is installed.

[0049] In order to facilitate the identification of the target person's companions, in the embodiment of the present application, each day can be divided into multiple time ranges, each time range corresponds to a time block, because the length of a day is determined, so the number of time ranges included in each day is also determined, that is, the number of time blocks included in each day is also determined. The entire monitored area can also be divided into multiple area ranges, each area range corresponds to a space block.

[0050] The time range corresponding to each preset time block can be 30 seconds, 1 minute, 2 minutes or longer. The technicians in this field can set the time range corresponding to the time block according to the needs. In the embodiment of the present application, the time range corresponding to the preset time block is preset to 1 minute. In order to facilitate the distinction between time blocks, each time block can be given an identifier. In the present application, each time block can be numbered according to the sequence of the time range corresponding to each time block, and the number is used as the identifier of the time block. For example, the time block corresponding to the captured time 00:00:12 is 0, and the time block corresponding to the captured time 01:03:18 is 63. The area range corresponding to each preset spatial block can be assigned an identifier to facilitate the distinction between spatial blocks. In the present application, the longitude and latitude of the captured location can be converted into a fixed-length string based on the GeoHash algorithm, and the string is used as the identifier of the spatial block.

[0051] The GeoHash algorithm is an address encoding algorithm that can encode the longitude and latitude data of a two-dimensional space into a string. In this embodiment of the present application, the encoding conversion is performed according to GeoHash7, where "7" represents the length of the encoding string, identifying different range intervals. The longer the length of the encoding string, the more accurate the range represented. For example, the encoding string obtained by encoding conversion according to GeoHash7 is more accurate than the range identified by the encoding string obtained by encoding conversion according to GeoHash6. For example, the longitude and latitude of a certain place A is 37.788422'N, 122.391907'W. After the GeoHash7 algorithm is calculated, the string "9q8yyzh" can be obtained. This string represents a rectangular area. The longitude and latitude of place B in the adjacent area of ​​place A is 37.787933'N, 122.392887'W. Although the longitude and latitude of the two places are different, the string obtained by calculating the longitude and latitude through the GeoHash7 algorithm is the same as the string calculated by place A, that is, place A and place B are both in the rectangular area corresponding to 9q8yyzh. In this application, the process of encoding and converting the captured location of the image according to the GeoHash algorithm belongs to the prior art and will not be repeated here.

[0052] Therefore, for each image contained in each trajectory file, the time when each image was captured can be obtained, and the target time block corresponding to the captured time can be determined according to the time range corresponding to each preset time block. At the same time, the location where each image was captured can be obtained, and the target space block corresponding to the captured location can be determined according to the space block corresponding to each preset area range, so that the target time block and target space block corresponding to each image can be determined.

[0053] Therefore, the expression A of the trajectory file of the above person A can also be expressed as

[0054]

[0055] In the above expression, G Ai Indicates the location where the photo was taken C Ai The corresponding spatial block, M Ai is the time when the photo was taken Ai Corresponding time blocks, where i=1,…,n.

[0056] After obtaining the target time block corresponding to the time when each image contained in the trajectory file of the other person is captured and the target space block corresponding to the location where the image is captured, it is possible to determine whether the other person is a traveler of the target person by comparing the target time block and target space block corresponding to each image contained in the trajectory file of the other person with the target time block and target space block corresponding to each image contained in the trajectory file of the target person. If the target time block and target space block corresponding to a certain image in the trajectory file of the other person match the target time block and target space block corresponding to a certain image in the trajectory file of the target person, it can be determined that the other person and the target person have a travel point, that is, it is determined that the other person and the target person travel together once.

[0057] Specifically, in an embodiment of the present application, when determining whether a target time block corresponding to an image in the trajectory file of another character matches a target time block corresponding to an image in the trajectory file of the target character, it is determined whether the absolute value of the difference between the identifier corresponding to the target time block of the other character and the identifier corresponding to the target time block of the target character is less than a set value. If the absolute value of the difference between the identifier corresponding to the target time block corresponding to an image of the other character and the identifier corresponding to the target time block corresponding to an image of the target character is less than a set value, it is considered that the target time block of the other character matches the target time block of the target character; otherwise, it is considered that the target time block of the other character does not match the target time block of the target character.

[0058] When determining the target spatial block match, it is to determine whether the target spatial block corresponding to the target time block of the other character is a spatial block corresponding to the target time block of the target character within a preset neighborhood containing the target spatial block. Specifically, it can be determined whether it is one of the 3*3 spatial blocks containing the target spatial block. For the convenience of description, the 3*3 spatial blocks around the target spatial block corresponding to the target character can be called the adjacent spatial blocks of the target spatial block corresponding to the target character. If the target spatial block of the other character is one of the adjacent spatial blocks of the target spatial block of the target character, it is considered that the target spatial block corresponding to the target time block of the other character matches the target spatial block corresponding to the target time block of the target character, otherwise it is considered that the target spatial block corresponding to the target time block of the other character does not match the target spatial block corresponding to the target time block of the target character.

[0059] Assume that person A is the target person. For other person B, there is an image in the trajectory file of other person B, and the target time block corresponding to the image is marked as M. Bj , the target time block corresponding to a certain image in the target person's trajectory file is marked as M Ai , after calculation |M Bj -M Ai|≤1, then it can be determined that the target time block corresponding to a certain image in the trajectory file of other person B matches the target time block corresponding to a certain image in the trajectory file of target person A; Bj The corresponding target space block is identified as G Bj , in the trajectory file of target person A, M Ai The corresponding target space block is identified as G Ai , after comparison with G Bj G Ai If one of the surrounding 3*3 space blocks is used, the target time block M in the trajectory file of other character B can be determined. Bj The corresponding target space block and the target time block M in the trajectory file of target person A Ai The corresponding target space block matching can determine that other character B travels with target character A once.

[0060] After obtaining the number of times the other person and the target person have traveled together, it can be determined whether the number of times the other person and the target person have traveled together is greater than the set number based on the number of times the other person and the target person have traveled together and the set number. If so, it can be determined that the other person is a traveler of the target person.

[0061] Assuming that the number of times of traveling together is set to 2, if character B and character A have traveled together more than 3 times, it is determined that character B is a traveler of character A.

[0062] Embodiment 4:

[0063] In order to ensure the accuracy of the determined portrait file, on the basis of the above embodiments, in the embodiment of the present application, after obtaining the time and place at which the image containing the person is captured for each person and determining the trajectory file of the person, and before determining that the other person is a companion of the target person, the method further includes:

[0064] For each of the trajectory files, if there are two images with the same target time block and target space block in the trajectory file, one of the images and the target time block and target space block corresponding to the image are deleted.

[0065] After obtaining the trajectory file of each person, in order to ensure the accuracy of subsequent image set completion, for each trajectory file, it can be determined whether there are two images with the same target time block and target space block in the trajectory file. If there are two images with the same target time block and target space block in the trajectory file, one of the images and the target time block and target space block corresponding to the image are deleted. For convenience, the above method can be called deduplication.

[0066] Specifically, in the embodiment of the present application, in combination with the trajectory file A′ of person A obtained in Example 2, if G in the trajectory file A′ Ai =G Ai+1 &M Ai =M Ai+1 , that is, in the trajectory file A′, the target spatial block corresponding to the i-th image and the i+1-th image is the same, and the target time block corresponding to the i-th image and the i+1-th image is also the same, then delete one of the i-th image and the i+1-th image in the trajectory file A′ and the target time block and target spatial block corresponding to the image. For example, delete the i-th image and the target time block and target spatial block corresponding to the image. After deduplication, a new trajectory file A″ of person A can be obtained:

[0067]

[0068] As shown in the above-mentioned deduplicated trajectory file A″, the repeated i+1th image and the captured time, target time block, captured location and target space block corresponding to the image have been deleted.

[0069] Embodiment 5:

[0070] In order to facilitate image set completion, based on the above embodiments, in the embodiment of the present application, after determining that the other person is a companion of the target person and before determining the sub-trajectory file of the companion corresponding to the companion point, the method further includes:

[0071] For each image in the trajectory file corresponding to the companion, if the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, the image and the previous image adjacent to it are segmented in the trajectory file.

[0072] After obtaining the trajectory file of the target person's companion, it is likely that the time interval between the capture times of two adjacent images in the trajectory file of the companion is large, and it can be considered that the trajectory of the companion is discontinuous. Therefore, in an embodiment of the present application, for each image in the trajectory file corresponding to each companion, the time when the image is captured is obtained. If the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, it is considered that the trajectory of the companion is discontinuous, and the current image and the previous image adjacent to it can be segmented in the trajectory file of the companion. After segmentation, at least two continuous trajectory files about the companion can be obtained, wherein a continuous trajectory file can be understood as a time interval between the time when each image contained in the continuous trajectory file is captured and the time when the previous image adjacent to it is captured is not greater than the preset time threshold.

[0073] In the present application, for the convenience of identification, the target time block and target space block corresponding to each image in the trajectory file are determined. The target time block corresponding to the time when the current image is captured and the target time block corresponding to the time when the previous image adjacent to it is captured can also be obtained. By judging whether the absolute value of the difference between the identifiers corresponding to the two target time blocks is greater than the set value, it is determined whether the trajectory corresponding to the trajectory file is a continuous trajectory. If the absolute value of the difference is greater than the set value, the image and the previous image adjacent to it are split in the trajectory file.

[0074] Assume that the trajectory file of companion B after deduplication is:

[0075]

[0076] Sequentially traverse the target time blocks corresponding to the time when each image in the trajectory file B″ is captured, where the time range corresponding to each target time block is one minute. If there is |M Bj -M Bj-1 |>120, the trajectory of companion B is considered to be a discontinuous trajectory, and the trajectory file B″ of companion B can be divided into two segments, namely trajectory file B″1 and trajectory file B″2:

[0077]

[0078]

[0079] C Bi and T Bi They represent the companion B at T Bi Time in C Bi The location is captured, and the target space block corresponding to the captured location is G Bi , the target time block is M Bi , where i = 1, ..., m, m means that the trajectory file of fellow traveler B is captured m times after deduplication. The target time blocks corresponding to all the captured times of the trajectory file B″ are traversed in sequence, and the trajectory file B″ is divided to obtain s trajectory files in total, which are recorded as B″1, B″2, ..., B″ s .

[0080] Embodiment 6:

[0081] In order to improve the efficiency of image set completion, based on the above embodiments, in the embodiment of the present application, the sub-trajectory file of the traveling person corresponding to the traveling point is determined, including:

[0082] For each trajectory file, if the number of the same-travel points in the trajectory file is not less than the preset number threshold, the capture time corresponding to each of the same-travel points is obtained, and the earliest time and the latest time of the capture in the same-travel points are determined; the trajectory file corresponding to the image captured between the earliest time and the latest time is used as the first sub-trajectory file; the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time is used as the second sub-trajectory file.

[0083] After obtaining the segmented trajectory files of each person, for each trajectory file, if the number of points in the trajectory file that travel with the target person is not less than a preset threshold, the segment of the trajectory file can be used as a sub-trajectory file of the corresponding points of the travel with the companion.

[0084] In order to further improve the recall rate of the target person's image, in the embodiment of the present application, for each companion's trajectory file, if the number of companion points with the target person in the trajectory file is not less than the preset number threshold, the earliest time and the latest time of the captured time in all the companion points with the target person in the trajectory file are obtained, and the trajectory file corresponding to the image captured between the earliest time and the latest time is used as the first sub-trajectory file. For the convenience of description, the first sub-trajectory file can be referred to as the companion trajectory file. However, in the companion's trajectory file, there may also be images of the target person in the images captured earlier than the earliest time and later than the latest time. Therefore, in the embodiment of the present application, the trajectory files corresponding to the images captured earlier than the earliest time and the trajectory files corresponding to the images captured later than the latest time can also be merged to obtain a second sub-trajectory file. For convenience, the second sub-trajectory file obtained after the merger can be referred to as a non-common sub-trajectory file.

[0085] Specifically, assume that the trajectory file of the companion B is divided into two trajectory files, namely, trajectory file B″1 and trajectory file B″2, and the preset number threshold is 2. There are three travel points between trajectory file B″1 and trajectory file A″ after deduplication of target person A, and the identifiers of the time blocks corresponding to each travel point are M B2 , M B5 , M B6 Since the time block identifier is determined by sorting each time block according to the time sequence, it can be determined that M B6 is the largest time block among peers, M B2 is the smallest peer time block among peer points, so the largest time block M B6 The corresponding captured time is the latest time among the captured times of the same point, and the smallest time block M B2 The corresponding captured time is the earliest time among the captured times of the same point, so the trajectory file B″1 can be divided into the first sub-trajectory file and the second sub-track archive

[0086]

[0087]

[0088] In addition, in the present application, in order to improve the recall rate of the target person image, based on the above embodiments, the sub-trajectory file of the traveling person corresponding to the traveling point is determined to include:

[0089] If the number of points in the same line in the trajectory file is less than a preset number threshold, the trajectory file is used as a second sub-trajectory file of a non-same line.

[0090] After obtaining each trajectory file of the companions after segmentation, for each trajectory file of the companions, if the number of points of travel with the target person in the trajectory file is less than the preset number threshold, it means that the number of points of travel with the target person in the trajectory file is relatively small, or there is no point of travel with the target person, and the trajectory file is regarded as a non-travel sub-trajectory file, that is, the trajectory file is regarded as the second sub-trajectory file.

[0091] Specifically, assume that the trajectory file of the companion B is divided into two trajectory files, namely, trajectory file B″1 and trajectory file B″2, and the preset number threshold is 2. Assume that there is one co-travel point between trajectory file B″2 and the trajectory file A″ after deduplication of target person A, and the number of co-travel points is less than the preset number threshold 2, then the trajectory file B″2 is determined to be the second sub-trajectory file

[0092]

[0093] After using the above method to judge each segmented trajectory file, more than one first sub-trajectory file and more than one second sub-trajectory file may be obtained.

[0094] Because the number of peer points included in the first sub-trajectory file and the second sub-trajectory file is different, in order to further improve the accuracy of image set completion, in the embodiment of the present application, if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, adding the candidate image to the image set of the target person includes:

[0095] For the first sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set first similarity threshold, the candidate image is added to the image set of the target person;

[0096] For the second sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set second similarity threshold, the candidate image is added to the image set of the target person; wherein the first similarity threshold is less than the second similarity threshold.

[0097] In an embodiment of the present application, a first similarity threshold is pre-set. In the subsequent image set completion process, for the same sub-trajectory file, that is, the first sub-trajectory file, the time and location of each image in the first sub-trajectory file are obtained, and the candidate images collected in the neighborhood of the location where the image is captured and within the neighborhood time range of the time of the capture are determined. For each candidate image obtained, the similarity between the candidate image and the image of the target person is calculated, and based on the first similarity threshold, it is determined whether to add the candidate image to the image set of the target person.

[0098] In the embodiment of the present application, the second similarity threshold is also pre-set. In the subsequent image set completion process, for the non-same sub-track file, that is, the second sub-track file, the candidate images collected in the vicinity of the location where each image in the second sub-track file is captured are obtained. For each candidate image obtained, the similarity between the candidate image and the image of the target person is calculated, and whether to add the candidate image to the image set of the target person is determined based on the second similarity threshold. The first similarity threshold and the second similarity threshold are two different values, and the first similarity threshold can be smaller than the second similarity threshold.

[0099] Because the number of points in the same line contained in the first sub-track file is larger than that in the second sub-track file, the possibility that the candidate image determined based on the time and location of each image in the first sub-track file is the image of the target person is relatively large. Therefore, under the premise of ensuring the accuracy of image set completion, a relatively small similarity threshold is pre-set to obtain as many images of the target person as possible in the same sub-track file. Similarly, because the possibility that the candidate image determined based on the time and location of each image in the second sub-track file is the image of the target person is relatively small according to the judgment of the points in the same line, a large similarity threshold is pre-set to ensure the accuracy of image set completion.

[0100] In order to further improve the accuracy of image set completion, based on the above embodiments, in the embodiment of the present application, the candidate images collected in the adjacent time and adjacent area are determined according to the time and place where the images in the sub-trajectory file are captured, including:

[0101] For the image in the sub-trajectory file, according to the first target time block corresponding to the time when the image was captured and the preset time threshold, determine the second target time block corresponding to the adjacent time of the first target time block, and according to the first target space block corresponding to the location where the image was captured and the preset space range, determine the second target space block corresponding to the adjacent area of ​​the first target space block;

[0102] The images collected in the second target time block and the second target space block are determined as candidate images.

[0103] After determining the sub-trajectory files of the companions, in order to obtain all images containing the target person and ensure the integrity of the target person's images, candidate images collected in the vicinity of the time when each image in the sub-trajectory files of each companion and the vicinity of the location where each image was captured can be obtained, which is convenient for the subsequent completion of the target person's image set.

[0104] Specifically, when determining the candidate images, because the time and location of each image contained in each sub-trajectory file of each companion are determined, the target time block and target space block corresponding to each image are also determined. For each image, the second target time block corresponding to the adjacent time range of the first target time block can be determined based on the first target time block corresponding to the time when the image was captured and the preset time threshold. Among them, the time threshold can be set according to the needs, for example, it can be 30 seconds, 1 minute, 10 minutes, etc. When determining the second target time block based on the preset time threshold, the first target time block can be used as the determined initial time block, or the first target time block can be used as the determined termination time block. Preferably, the first target time block is used as the determined intermediate time block, which can be flexibly set according to the needs in specific use.

[0105] Similarly, the second target spatial block corresponding to the adjacent spatial range of the first target spatial block can be determined based on the first target spatial block corresponding to the location where the image was captured and the preset spatial range. In the embodiment of the present application, the preset spatial range is the spatial range corresponding to the eight spatial blocks around the first target spatial block, and the second target spatial block can be determined. Based on the determined second target time block and second target spatial block, the image captured in the second target time block and the second target spatial block is determined as a candidate image.

[0106] Based on the above embodiments, for the first sub-track file and the second sub-track archive The first similarity threshold and the second similarity threshold are respectively preset. Get the first sub-track file The time and location at which each image is captured are determined, and candidate images collected in the vicinity of the captured location and within the vicinity of the captured time are determined; for each candidate image obtained, the similarity between the candidate image and the image of the target person is calculated, and based on a first similarity threshold, it is determined whether to add the candidate image to the image set of the target person.

[0107] For example, in the first sub-track file The time and location of each image in the image are determined, so the target time block and target space block corresponding to each image are also determined, and the first sub-trajectory file can be obtained. The time T when the first image is captured B2 The corresponding first target time block M B2 , and the location C where the first image was captured B2 The corresponding first target space block G B2 , so that according to the first time block M B2 and a preset duration threshold, determine the first target time block M B2 The second target time block corresponding to the adjacent time range, and according to the first target space block G B2 and the preset spatial range, determine the first target spatial block G B2 The corresponding second target space block within the adjacent space range. According to the determined second target time block and second target space block, the image captured in the second target time block and the second target space block is determined as a candidate image. For each candidate image obtained, the similarity between the candidate image and the image of the target person is calculated. If the similarity between the candidate image and the image of the target person is greater than a preset first similarity threshold, the candidate image is added to the image set of the target person. After calculating the similarity threshold between each candidate image obtained and the image of the target person, the candidate images corresponding to other captured times can be obtained in turn, and whether to add the candidate image to the image set of the target person is determined based on the first similarity threshold.

[0108] For the second sub-track file Get the second sub-track file The time and location of each image in the captured image are determined, and the candidate images collected in the vicinity of the captured location and the time range of the captured time are determined. For each candidate image obtained, the similarity between the candidate image and the image of the target person is calculated, and whether to add the candidate image to the image set of the target person is determined based on the first similarity threshold. For example, the second sub-trajectory file can be obtained The time T when the first image is captured B1 The corresponding first target time block M B1, and the location C where the first image was captured B1 The corresponding first target space block G B1 , so that according to the first time block M B1 and a preset duration threshold, determine the second target time block corresponding to the adjacent time range, and according to the first target space block G B1 and a preset spatial range, determine the corresponding second target spatial block within the adjacent spatial range. According to the determined second target time block and second target spatial block, determine the image captured in the second target time block and the second target spatial block as a candidate image. For each candidate image obtained, calculate the similarity between the candidate image and the target person's image. If the similarity between the candidate image and the target person's image is greater than a set second similarity threshold, add the candidate image to the target person's image set. After calculating the similarity threshold between each candidate image obtained and the target person's image, the candidate images corresponding to other captured times can be obtained in turn, and determine whether to add the candidate image to the target person's image set based on the second similarity threshold.

[0109] Figure 2 A schematic diagram of the structure of the image set completion device provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the device comprises:

[0110] The acquisition module 201 is used to acquire, for each person, the time and location at which the image containing the person was captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location at which each image was captured;

[0111] The determination module 202 is used to determine that the other person is a traveler of the target person if the time and location of the capture of at least a set number of images in the trajectory file of the other person matches the time and location of the capture of the image in the target trajectory file of the target person, and use the time and location of the matched capture as the travel point between the traveler and the target person;

[0112] The adding module 203 is used to determine the sub-trajectory file of the companion corresponding to the companion point, and determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured. If the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, the candidate image is added to the image set of the target person.

[0113] In a possible implementation, the acquisition module 201 is specifically used to sort the images containing the person according to the order in which the images containing the person were captured, and use each sorted image, and the time and place when each image was captured as the trajectory file of the person.

[0114] In a possible implementation, the determination module 202 is specifically used to determine, for each image contained in each trajectory file, a target time block corresponding to the time of capture according to the time when the image was captured and the time range corresponding to each preset time block, and determine a target space block corresponding to the location where the image was captured according to the space block corresponding to each preset area range; if the other person has a target time block whose absolute value of the difference between an identifier corresponding to the target time block and an identifier corresponding to the target time block of the target person is not greater than a set value, and the target space block corresponding to the target time block of the other person is an adjacent space block of the target space block corresponding to the target time block of the target person, then it is determined that the other person and the target person have a travel point; wherein the identifier of the time block is determined after sorting each time block according to the time order; if the number of travel points between the other person and the target person is greater than the set number, then it is determined that the other person is a traveler of the target person.

[0115] In a possible implementation, the device further includes:

[0116] The deduplication module 204 is configured to, for each trajectory file, delete one of the images and the target time block and target space block corresponding to the image if there are two images with the same target time block and target space block in the trajectory file.

[0117] In a possible implementation, the device further includes:

[0118] The segmentation module 205 is also used to segment each image in the trajectory file corresponding to the companion, if the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, then the image and the previous image adjacent to it are segmented in the trajectory file.

[0119] In a possible implementation, the segmentation module 205 is also used to obtain the capture time corresponding to each of the peer points for each trajectory file, and determine the earliest time and the latest time of the capture in the peer points, if the number of the peer points in the trajectory file is not less than a preset number threshold; use the trajectory file corresponding to the image captured between the earliest time and the latest time as the first sub-trajectory file; and use the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time as the second sub-trajectory file.

[0120] In a possible implementation, the segmentation module 205 is further configured to determine the sub-trajectory file of the companion corresponding to the traveling points, including: if the number of traveling points in the trajectory file is less than a preset number threshold, using the trajectory file as the second sub-trajectory file.

[0121] In a possible implementation, the adding module 203 is further configured to, for the first sub-trajectory file, add the candidate image to the image set of the target person if the similarity between the candidate image and the image of the target person is greater than a set first similarity threshold; and for the second sub-trajectory file, add the candidate image to the image set of the target person if the similarity between the candidate image and the image of the target person is greater than a set second similarity threshold; wherein the first similarity threshold is less than the second similarity threshold.

[0122] In a possible implementation, the adding module 203 is specifically used to determine, for the image in the sub-trajectory file, based on the first target time block corresponding to the time when the image was captured and a preset duration threshold, a second target time block corresponding to the adjacent time range of the first target time block; based on the first target space block corresponding to the location where the image was captured and a preset spatial range, determine the second target space block corresponding to the adjacent spatial range of the first target space block; and determine the second target time block and the images captured in the second target space block as candidate images.

[0123] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Based on the above embodiments, the present application further provides an electronic device, such as Figure 3 As shown, it includes: a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304;

[0124] The memory 303 stores a computer program. When the program is executed by the processor 301, the processor 301 performs the following steps:

[0125] For each person, obtain the time and location when the image containing the person is captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location when each image is captured;

[0126] If the time and location of the capture of at least a set number of images in the trajectory files of other characters match the time and location of the capture of the images in the target trajectory file of the target character, then the other characters are determined to be the companions of the target character, and the time and location of the matching capture are used as the walking points of the companions and the target character;

[0127] Determine the sub-trajectory file of the companion corresponding to the companion point, determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured, and if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, add the candidate image to the image set of the target person.

[0128] In a possible implementation, determining the trajectory profile of the person includes:

[0129] The images containing the person are sorted according to the order in which they were captured, and each sorted image, as well as the time and location when each image was captured, is used as the trajectory file of the person.

[0130] In a possible implementation manner, after determining the trajectory profile of the person, the method further includes:

[0131] For each image contained in each trajectory file, according to the time when the image was captured and the time range corresponding to each preset time block, determine the target time block corresponding to the time when the image was captured, and according to the location where the image was captured and the space block corresponding to each preset area range, determine the target space block corresponding to the location where the image was captured;

[0132] The determining that the other person is a companion of the target person includes:

[0133] If the other person has a target time block whose absolute value of the difference between the identifier corresponding to the target time block of the target person and the identifier corresponding to the target time block of the target person is not greater than a set value, and the target space block corresponding to the target time block of the other person is an adjacent space block of the target space block corresponding to the target time block of the target person, then it is determined that the other person and the target person have a traveling point; wherein the identifier of the time block is determined after sorting each time block according to the time sequence;

[0134] If the number of points of travel between the other person and the target person is greater than a set number, the other person is determined to be a traveler of the target person.

[0135] In a possible implementation, after obtaining the time and location at which the image containing the person is captured for each person and determining the trajectory file of the person, and before determining that the other person is a companion of the target person, the method further includes:

[0136] For each of the trajectory files, if there are two images with the same target time block and target space block in the trajectory file, one of the images and the target time block and target space block corresponding to the image are deleted.

[0137] In a possible implementation, after determining that the other person is a companion of the target person and before determining the sub-trajectory file of the companion corresponding to the companion point, the method further includes:

[0138] For each image in the trajectory file corresponding to the companion, if the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, the image and the previous image adjacent to it are segmented in the trajectory file.

[0139] In a possible implementation manner, determining the sub-trajectory file of the traveling person corresponding to the traveling point includes:

[0140] For each trajectory file, if the number of the same-travel points in the trajectory file is not less than the preset number threshold, the capture time corresponding to each of the same-travel points is obtained, and the earliest time and the latest time of the capture in the same-travel points are determined; the trajectory file corresponding to the image captured between the earliest time and the latest time is used as the first sub-trajectory file; the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time is used as the second sub-trajectory file.

[0141] In a possible implementation manner, determining the sub-trajectory file of the traveling person corresponding to the traveling point includes:

[0142] If the number of the points in the same track in the track file is less than a preset number threshold, the track file is used as the second sub-track file.

[0143] In a possible implementation, if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, adding the candidate image to the image set of the target person includes:

[0144] For the first sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set first similarity threshold, the candidate image is added to the image set of the target person;

[0145] For the second sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set second similarity threshold, the candidate image is added to the image set of the target person; wherein the first similarity threshold is less than the second similarity threshold.

[0146] In a possible implementation manner, determining the candidate images captured in the adjacent time and adjacent area according to the time and location of the image in the sub-trajectory file includes:

[0147] For the image in the sub-trajectory file, according to the first target time block corresponding to the time when the image was captured and the preset time threshold, determine the second target time block corresponding to the adjacent time range of the first target time block, and according to the first target space block corresponding to the location where the image was captured and the preset space range, determine the second target space block corresponding to the adjacent space range of the first target space block;

[0148] The images collected in the second target time block and the second target space block are determined as candidate images.

[0149] Since the principle of solving the problem by the above electronic device is similar to that of the image set completion method, the implementation of the above electronic device can refer to the above embodiment, and the repeated parts will not be repeated.

[0150] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 302 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor. The above processor may be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it may also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0151] On the basis of the above embodiments, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor, and when the program runs on the processor, the processor implements the following steps when executing:

[0152] For each person, obtain the time and location when the image containing the person is captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location when each image is captured;

[0153] If the time and location of the capture of at least a set number of images in the trajectory files of other characters match the time and location of the capture of the images in the target trajectory file of the target character, then the other characters are determined to be the companions of the target character, and the time and location of the matching capture are used as the walking points of the companions and the target character;

[0154] Determine the sub-trajectory file of the companion corresponding to the companion point, determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured, and if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, add the candidate image to the image set of the target person.

[0155] In a possible implementation, determining the trajectory profile of the person includes:

[0156] The images containing the person are sorted according to the order in which they were captured, and each sorted image, as well as the time and location when each image was captured, is used as the trajectory file of the person.

[0157] In a possible implementation manner, after determining the trajectory profile of the person, the method further includes:

[0158] For each image contained in each trajectory file, according to the time when the image was captured and the time range corresponding to each preset time block, determine the target time block corresponding to the time when the image was captured, and according to the location where the image was captured and the space block corresponding to each preset area range, determine the target space block corresponding to the location where the image was captured;

[0159] The determining that the other person is a companion of the target person includes:

[0160] If the other person has a target time block whose absolute value of the difference between the identifier corresponding to the target time block of the target person and the identifier corresponding to the target time block of the target person is not greater than a set value, and the target space block corresponding to the target time block of the other person is an adjacent space block of the target space block corresponding to the target time block of the target person, then it is determined that the other person and the target person have a traveling point; wherein the identifier of the time block is determined after sorting each time block according to the time sequence;

[0161] If the number of points of travel between the other person and the target person is greater than a set number, the other person is determined to be a traveler of the target person.

[0162] In a possible implementation, after obtaining the time and location at which the image containing the person is captured for each person and determining the trajectory file of the person, and before determining that the other person is a companion of the target person, the method further includes:

[0163] For each of the trajectory files, if there are two images with the same target time block and target space block in the trajectory file, one of the images and the target time block and target space block corresponding to the image are deleted.

[0164] In a possible implementation, after determining that the other person is a companion of the target person and before determining the sub-trajectory file of the companion corresponding to the companion point, the method further includes:

[0165] For each image in the trajectory file corresponding to the companion, if the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, the image and the previous image adjacent to it are segmented in the trajectory file.

[0166] In a possible implementation manner, determining the sub-trajectory file of the traveling person corresponding to the traveling point includes:

[0167] For each trajectory file, if the number of the same-travel points in the trajectory file is not less than the preset number threshold, the capture time corresponding to each of the same-travel points is obtained, and the earliest time and the latest time of the capture in the same-travel points are determined; the trajectory file corresponding to the image captured between the earliest time and the latest time is used as the first sub-trajectory file; the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time is used as the second sub-trajectory file.

[0168] In a possible implementation manner, determining the sub-trajectory file of the traveling person corresponding to the traveling point includes:

[0169] If the number of the points in the same track in the track file is less than a preset number threshold, the track file is used as the second sub-track file.

[0170] In a possible implementation, if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, adding the candidate image to the image set of the target person includes:

[0171] For the first sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set first similarity threshold, the candidate image is added to the image set of the target person;

[0172] For the second sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set second similarity threshold, the candidate image is added to the image set of the target person; wherein the first similarity threshold is less than the second similarity threshold.

[0173] In a possible implementation manner, determining the candidate images captured in the adjacent time and adjacent area according to the time and location of the image in the sub-trajectory file includes:

[0174] For the image in the sub-trajectory file, according to the first target time block corresponding to the time when the image was captured and the preset time threshold, determine the second target time block corresponding to the adjacent time range of the first target time block, and according to the first target space block corresponding to the location where the image was captured and the preset space range, determine the second target space block corresponding to the adjacent space range of the first target space block;

[0175] The images collected in the second target time block and the second target space block are determined as candidate images.

[0176] Since the principle of solving the problem by the computer-readable medium provided above is similar to that of the image set completion method, after the processor executes the computer program in the computer-readable medium above, the steps implemented can refer to the above embodiment, and the repeated parts will not be repeated.

[0177] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0178] As for the system / device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0179] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0182] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0183] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for completing an image set, characterized in that: The method comprises: For each person, obtain the time and location when the image containing the person is captured, and determine the trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location when each image is captured; If the time and location of the capture of at least a set number of images in the trajectory files of other characters match the time and location of the capture of the images in the target trajectory file of the target character, then the other characters are determined to be the companions of the target character, and the time and location of the matching capture are used as the walking points of the companions and the target character; Determine the sub-trajectory file of the companion corresponding to the companion point, determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured, and if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, add the candidate image to the image set of the target person; Wherein, the determining of the sub-trajectory file of the traveling person corresponding to the traveling point comprises: For each trajectory file, if the number of the same-travel points in the trajectory file is not less than the preset number threshold, the capture time corresponding to each of the same-travel points is obtained, and the earliest time and the latest time of the capture in the same-travel points are determined; the trajectory file corresponding to the image captured between the earliest time and the latest time is used as the first sub-trajectory file; the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time is used as the second sub-trajectory file.

2. The method according to claim 1, characterized in that Determining the trajectory file of the person includes: The images containing the person are sorted according to the order in which they were captured, and each sorted image, as well as the time and location when each image was captured, is used as the trajectory file of the person.

3. The method according to claim 1 or 2, characterized in that After determining the trajectory file of the person, the method further includes: For each image contained in each trajectory file, according to the time when the image was captured and the time range corresponding to each preset time block, determine the target time block corresponding to the time when the image was captured, and according to the location where the image was captured and the space block corresponding to each preset area range, determine the target space block corresponding to the location where the image was captured; The determining that the other person is a companion of the target person includes: If the other person has a target time block whose absolute value of the difference between the identifier corresponding to the target time block of the target person and the identifier corresponding to the target time block of the target person is not greater than a set value, and the target space block corresponding to the target time block of the other person is an adjacent space block of the target space block corresponding to the target time block of the target person, then it is determined that the other person and the target person have a traveling point; wherein the identifier of the time block is determined after sorting each time block according to the time sequence; If the number of points of travel between the other person and the target person is greater than a set number, the other person is determined to be a traveler of the target person.

4. The method according to claim 3, characterized in that After obtaining the time and location at which the image containing the person is captured for each person and determining the trajectory file of the person, and before determining that the other person is a companion of the target person, the method further includes: For each of the trajectory files, if there are two images with the same target time block and target space block in the trajectory file, one of the images and the target time block and target space block corresponding to the image are deleted.

5. The method according to claim 1, characterized in that After determining that the other person is a companion of the target person and before determining the sub-trajectory file of the companion corresponding to the companion point, the method further includes: For each image in the trajectory file corresponding to the companion, if the time interval between the time when the image is captured and the time when the previous image adjacent to it is captured is greater than a preset time threshold, the image and the previous image adjacent to it are segmented in the trajectory file.

6. The method according to claim 1, characterized in that The determining of the sub-trajectory file of the traveling person corresponding to the traveling point comprises: If the number of the points in the same track file is less than a preset number threshold, the track file is used as the second sub-track file.

7. The method according to claim 6, characterized in that If the similarity between the candidate image and the image of the target person is greater than a set similarity threshold, adding the candidate image to the image set of the target person comprises: For the first sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set first similarity threshold, the candidate image is added to the image set of the target person; For the second sub-trajectory file, if the similarity between the candidate image and the image of the target person is greater than a set second similarity threshold, the candidate image is added to the image set of the target person; wherein the first similarity threshold is less than the second similarity threshold.

8. The method according to claim 1, characterized in that Determining the candidate images collected in the adjacent time and adjacent area according to the time and location of the image in the sub-track file includes: For the image in the sub-trajectory file, according to the first target time block corresponding to the time when the image was captured and the preset time threshold, determine the second target time block corresponding to the adjacent time range of the first target time block, and according to the first target space block corresponding to the location where the image was captured and the preset space range, determine the second target space block corresponding to the adjacent space range of the first target space block; The images collected in the second target time block and the second target space block are determined as candidate images.

9. An image set completion device, characterized in that: The device comprises: An acquisition module, for acquiring, for each person, the time and location at which the image containing the person was captured, and determining a trajectory file of the person, wherein the trajectory file contains each image containing the person, and the time and location at which each image was captured; A determination module, for determining that the other person is a companion of the target person if the time and location of the capture of at least a set number of images in the trajectory files of the other person match the time and location of the capture of the images in the target trajectory file of the target person, and using the time and location of the matched capture as the walking point of the companion and the target person; An adding module is used to determine the sub-trajectory file of the traveling person corresponding to the traveling point, determine the candidate image collected in the adjacent time and adjacent area according to the time and place when the image in the sub-trajectory file is captured, and add the candidate image to the image set of the target person if the similarity between the candidate image and the image of the target person is greater than a set similarity threshold; The adding module is specifically used for obtaining the capture time corresponding to each of the peer points for each trajectory file, and determining the earliest time and the latest time of the capture in the peer points, if the number of the peer points in the trajectory file is not less than a preset number threshold; taking the trajectory file corresponding to the image captured between the earliest time and the latest time as the first sub-trajectory file; and taking the trajectory file corresponding to the image captured earlier than the earliest time and later than the latest time as the second sub-trajectory file.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the image set completion method described in any one of claims 1 to 8 when executing a computer program stored in the memory.

11. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the image set completion method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method and device for determining target person movement track

    CN111429476A