An image deduplication method, device and storage medium

By using a grid partitioning and Hamming distance comparison method based on feature codes, the accuracy and computational complexity issues of existing image deduplication methods in the face of noise and target variations are solved, thus achieving efficient image deduplication.

CN116246189BActive Publication Date: 2026-02-24CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111476640.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2026-02-24
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Existing image deduplication methods have high deduplication error rates when the background contains a lot of image noise and exposure differences. Descriptor matching-based methods can cause non-repeating images to be detected as duplicates. Deep learning-based object detection methods require retraining the model when the object category changes and have a large computational cost, resulting in low practicality.

Method used

The image is refined by using a grid division method, and the differences between the images are determined by comparing the Hamming distance of the feature codes of the image grids, thereby improving the accuracy of deduplication.

Benefits of technology

It improves the accuracy of image deduplication, reduces false positives, lowers computational load, and adapts to scenarios with different backgrounds and changing targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116246189B_ABST
    Figure CN116246189B_ABST
Patent Text Reader

Abstract

The application discloses an image deduplication method and device and a storage medium. The method comprises the following steps: acquiring a plurality of frames of to-be-deduplicated images, and performing gray scale processing on each frame of image in the plurality of frames of to-be-deduplicated images to obtain a plurality of frames of gray scale images corresponding to the plurality of frames of to-be-deduplicated images; dividing each frame of image in the plurality of frames of gray scale images into a group of image grids to obtain a plurality of groups of image grids corresponding to the plurality of frames of to-be-deduplicated images; comparing the plurality of groups of image grids to divide similar images in the plurality of frames of to-be-deduplicated images into the same image set to obtain at least one image set; and selecting one frame of image from each set of the at least one image set to save. Through the technical scheme, the accuracy of image deduplication is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image deduplication method, apparatus and storage medium. Background Technology

[0002] In daily shooting or video surveillance, a large number of continuous images are often collected. These continuous images are taken from the same area, and the number of duplicate images far exceeds the number of valuable images. If the images are simply screened manually, it will consume a lot of manpower and resources.

[0003] Currently, image deduplication typically employs methods such as image feature coding, descriptor matching, or deep learning object detection. Among these, image feature coding-based methods suffer from high deduplication error rates when dealing with identical images in backgrounds containing significant noise and large exposure differences. While descriptor matching-based methods can address this drawback, they generate numerous descriptor matches in the background region, leading to the misidentification of non-repeating images as duplicates. Deep learning object detection-based methods, on the other hand, require model retraining when the target category changes, resulting in lower practicality and higher computational costs. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of the present invention aim to provide an image deduplication method, apparatus, and storage medium. This method utilizes a grid division approach to refine the entire image and compares grids in the same position within the refined image to determine the differences between images, thereby improving the accuracy of image deduplication.

[0005] The technical solution of this invention is implemented as follows:

[0006] This invention provides an image deduplication method, the method comprising:

[0007] Multiple frames of images to be deduplicated are acquired, and each frame of the multiple frames of images to be deduplicated is processed into grayscale to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated.

[0008] Each frame of the multi-frame grayscale image is divided into a set of image grids to obtain multiple sets of image grids that correspond one-to-one with the multi-frame images to be deduplicated.

[0009] By comparing the multiple sets of image gratings, similar images in the multiple frames of images to be deduplicated are grouped into the same image set to obtain at least one image set;

[0010] One frame of image is selected and saved from each of the at least one set of images.

[0011] In the above method, the step of dividing similar images in the multiple frames of images to be deduplicated into the same image set by comparing the multiple sets of image rasters to obtain at least one image set includes:

[0012] When there is a temporal correlation between the multiple frames of images to be deduplicated, the multiple frames of images to be deduplicated are arranged based on the image generation time to obtain an image sequence;

[0013] In the image sequence, the set of image gratings corresponding to the first frame image is compared with the set of image gratings corresponding to each frame image arranged after the first frame image until a frame image is found whose corresponding image gratings do not meet the first difference condition, and is then determined as the first difference image.

[0014] In the image sequence, the image from the first frame to the frame before the first difference image is divided into the same image set;

[0015] The image grid corresponding to the first difference image in the image sequence is further compared with the image grid corresponding to each frame image arranged after the first difference image, until the last frame image in the image sequence is divided into an image set, thus obtaining the at least one image set.

[0016] In the above method, the step of comparing the difference between a set of image gratings corresponding to the first frame image in the image sequence and a set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found where the corresponding image gratings do not satisfy the first difference condition, includes:

[0017] For the first frame image and the second frame image in the image sequence, the feature codes of each grid in their respective set of image grids are extracted to form a corresponding set of feature codes, thus obtaining the first set of feature codes corresponding to the first frame image and the second set of feature codes corresponding to the second frame image.

[0018] In the first group of feature codes and the second group of feature codes, the two feature codes corresponding to the grids with the same position are determined as a pair of first feature codes, thus obtaining multiple pairs of first feature codes;

[0019] Calculate the Hamming distance between each pair of first feature codes in the plurality of pairs of first feature codes to obtain a plurality of first Hamming distances that correspond one-to-one with the plurality of pairs of first feature codes;

[0020] If, based on the plurality of first Hamming distances, it is determined that a set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the second frame image satisfy the first difference condition, then, in conjunction with the plurality of first Hamming distances, the set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the third frame image in the image sequence are further compared for differences until a frame image is found where the corresponding image graticles do not satisfy the first difference condition.

[0021] In the above method, before determining, based on the plurality of first Hamming distances, that a set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the second frame image satisfy the first difference condition, and combining the plurality of first Hamming distances to continue comparing the differences between the set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the third frame image in the image sequence, the method includes:

[0022] When all of the first Hamming distances are less than or equal to the first preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0023] In the case where one of the plurality of first Hamming distances is greater than the first preset threshold and less than the second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0024] In the case where there are multiple first Hamming distances among the plurality of first Hamming distances that are greater than the first preset threshold, each pair of first feature codes in the plurality of first feature codes whose first Hamming distance is greater than the first preset threshold is determined as a pair of first target feature codes, thus obtaining multiple pairs of first target feature codes;

[0025] The feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image in the plurality of pairs of first target feature codes are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image.

[0026] If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image is less than a second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0027] In the above method, the step of combining the multiple first Hamming distances to further compare the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image in the image sequence includes:

[0028] When all of the first Hamming distances are less than or equal to the first preset threshold, a difference comparison is made between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image.

[0029] In the case where at least one of the plurality of first Hamming distances is greater than the first preset threshold, the grid corresponding to the first Hamming distance being greater than the first preset threshold is selected from the second frame image, and the image region corresponding to the selected grid is determined as the target sub-image;

[0030] Find the grid corresponding to the target sub-image in the first frame image and the third frame image, and determine the grid corresponding to the first frame image as the first group of grids and the grid corresponding to the third frame image as the second group of grids;

[0031] The first group of grids and the second group of grids are further divided into grids to obtain the first sub-grid group corresponding to the first frame image and the second sub-grid group corresponding to the third frame image.

[0032] In the group of image gratings corresponding to the first frame image, the gratings that are different from the first group of gratings are determined as the first group of remaining gratings, and in the group of image gratings corresponding to the third frame image, the gratings that are different from the second group of gratings are determined as the second group of remaining gratings.

[0033] The first sub-raster group and the remaining raster of the first group are compared with the second sub-raster group and the remaining raster of the second group to obtain the difference comparison result between the first frame image and the third frame image.

[0034] In the above method, the step of comparing the first sub-raster group and the first group of remaining rasters with the second sub-raster group and the second group of remaining rasters to obtain the difference comparison result between the first frame image and the third frame image includes:

[0035] For the first group of remaining grids and the second group of remaining grids, extract the feature code of each grid in their respective groups to form a corresponding set of feature codes, and obtain the first set of remaining feature codes corresponding to the first group of remaining grids and the second set of remaining feature codes corresponding to the second group of remaining grids.

[0036] In the first group of remaining feature codes and the second group of remaining feature codes, the two feature codes corresponding to the grids with the same position are determined as a pair of second feature codes, thus obtaining multiple pairs of second feature codes;

[0037] Calculate the Hamming distance between each pair of second feature codes in the plurality of pairs of second feature codes to obtain a plurality of second Hamming distances that correspond one-to-one with the plurality of pairs of second feature codes;

[0038] For the first sub-grid group and the second sub-grid group, extract the feature code of each sub-grid in each group to form a corresponding set of feature codes, and obtain the first set of target feature codes corresponding to the first sub-grid group and the second set of target feature codes corresponding to the second sub-grid group.

[0039] In the first group of target feature codes and the second group of target feature codes, the two feature codes corresponding to the sub-grids with the same position are determined as a pair of third feature codes, thus obtaining multiple pairs of third feature codes;

[0040] Calculate the Hamming distance between each pair of third feature codes in the plurality of pairs of third feature codes to obtain a plurality of third Hamming distances that correspond one-to-one with the plurality of pairs of third feature codes;

[0041] Based on the plurality of second Hamming distances and the plurality of third Hamming distances, the difference comparison result between the first frame image and the third frame image is determined.

[0042] In the above method, determining the difference comparison result between the first frame image and the third frame image based on the plurality of second Hamming distances and the plurality of third Hamming distances includes:

[0043] In the case where one of the plurality of second Hamming distances and the plurality of third Hamming distances is greater than a third preset threshold, or in the case where one of the third Hamming distances is greater than a fourth preset threshold, a second Hamming distance greater than the third preset threshold is selected from the plurality of pairs of second feature codes, or a feature code with a third Hamming distance greater than the fourth preset threshold is selected from the plurality of pairs of third feature codes, and the selected pair of feature codes is determined as the second target feature code;

[0044] If the Hamming distance between the second target feature codes is less than or equal to a fifth preset threshold, the difference comparison result is determined to be similar.

[0045] If the Hamming distance between the second target feature codes is greater than the fifth preset threshold, the difference comparison result is determined to be dissimilar.

[0046] If all the plurality of second Hamming distances are less than or equal to the third preset threshold, and all the plurality of third Hamming distances are less than or equal to the fourth preset threshold, the difference comparison result is determined to be similar.

[0047] In the above method, determining the difference comparison result between the first frame image and the third frame image based on the plurality of second Hamming distances and the plurality of third Hamming distances includes:

[0048] In the case where there are multiple second Hamming distances and multiple third Hamming distances, including second Hamming distances greater than a third preset threshold, or / and multiple third Hamming distances greater than a fourth preset threshold, each pair of feature codes in the multiple pairs of second feature codes whose second Hamming distance is greater than the third preset threshold and each pair of feature codes in the multiple pairs of third feature codes whose third Hamming distance is greater than the fourth preset threshold are determined as a pair of third target feature codes, thus obtaining multiple pairs of third target feature codes;

[0049] The feature codes corresponding to the first frame image and the feature codes corresponding to the third frame image in the multiple pairs of third target feature codes are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image.

[0050] If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third image is greater than a sixth preset threshold, the difference comparison result is determined to be dissimilar.

[0051] If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image is less than or equal to the sixth preset threshold, the difference comparison result is determined to be similar.

[0052] In the above method, the step of dividing similar images in the multiple frames of images to be deduplicated into the same image set by comparing the multiple sets of image rasters to obtain at least one image set includes:

[0053] If there is no temporal correlation between the multiple frames of images to be deduplicated, the differences between the different groups of image rasters in the multiple groups of image rasters are compared.

[0054] In the multi-frame images to be deduplicated, the images whose differences between corresponding image rasters satisfy the second difference condition are grouped into the same set to obtain the at least one image set.

[0055] This invention provides an image deduplication device, comprising:

[0056] The acquisition module is used to acquire multiple frames of images to be deduplicated, and to perform grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated.

[0057] The segmentation module is used to divide each frame of the multi-frame grayscale image into a set of image grids to obtain multiple sets of image grids that correspond one-to-one with the multi-frame images to be deduplicated.

[0058] The comparison module is used to divide similar images in the multiple frames of images to be deduplicated into the same image set by comparing the multiple sets of image rasters, so as to obtain at least one image set;

[0059] A deduplication module is used to select and save a frame of image from each set of the at least one image set.

[0060] This invention provides an image deduplication device, comprising: a processor, a memory, and a communication bus;

[0061] The communication bus is used to realize the communication connection between the processor and the memory;

[0062] The processor is used to execute the image deduplication program stored in the memory to implement the above-described image deduplication method.

[0063] The present invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the above-described image deduplication method.

[0064] This invention provides an image deduplication method, apparatus, and storage medium. The method includes: acquiring multiple frames of images to be deduplicated; performing grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images corresponding one-to-one with the multiple frames of images to be deduplicated; dividing each frame of the multiple grayscale images into a set of image gratings to obtain multiple sets of image gratings corresponding one-to-one with the multiple frames of images to be deduplicated; comparing the multiple sets of image gratings to group similar images in the multiple frames of images to be deduplicated into the same image set to obtain at least one image set; and selecting one image from each set of the at least one image set for storage. The technical solution provided by this invention uses a grating division method to refine the entire image and compares gratings in the same position in the refined image to determine the differences between images, thereby improving the accuracy of image deduplication. Attached Figure Description

[0065] Figure 1 This is a flowchart illustrating an image deduplication method provided in an embodiment of the present invention.

[0066] Figure 2This invention provides an exemplary two-frame deduplication image.

[0067] Figure 3 An exemplary two-frame grayscale image provided in this embodiment of the invention;

[0068] Figure 4 A schematic diagram illustrating an exemplary pair of image gratings provided in an embodiment of the present invention;

[0069] Figure 5 A schematic diagram of an exemplary differential grid provided for an embodiment of the present invention;

[0070] Figure 6 A schematic diagram of an exemplary target sub-image provided in an embodiment of the present invention;

[0071] Figure 7 This is an exemplary schematic diagram of estimating the motion of a target sub-image, provided as an embodiment of the present invention.

[0072] Figure 8 This is a schematic diagram of an exemplary optimized grid division provided for an embodiment of the present invention;

[0073] Figure 9 This is a schematic diagram of an exemplary image deduplication process provided in an embodiment of the present invention;

[0074] Figure 10 A schematic diagram of the structure of an image deduplication device provided in an embodiment of the present invention. Figure 1 ;

[0075] Figure 11 A schematic diagram of the structure of an image deduplication device provided in an embodiment of the present invention. Figure 2 . Detailed Implementation

[0076] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings of the embodiments of the present invention. It is to be understood that the specific embodiments described herein are merely for explaining the relevant application and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the relevant application are shown in the accompanying drawings.

[0077] This invention provides an image deduplication method, implemented using an image deduplication device. Figure 1 This is a flowchart illustrating an image deduplication method provided in an embodiment of the present invention. Figure 1 As shown, the main steps include:

[0078] S101. Obtain multiple frames of images to be deduplicated, and perform grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated.

[0079] In an embodiment of the present invention, the image deduplication device acquires multiple frames of images to be deduplicated, and performs grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated.

[0080] It should be noted that, in the embodiments of the present invention, after the image deduplication device obtains multiple frames to be deduplicated, it is necessary to perform grayscale processing on each frame of the multiple images to be deduplicated, that is, each frame of the image to be deduplicated corresponds to a grayscale image, resulting in multiple grayscale images.

[0081] It should be noted that, in the embodiments of the present invention, since the multiple frames of images to be deduplicated acquired by the image deduplication device may be images of the same background area captured by the same camera device, the pixels of the multiple frames of images to be deduplicated are consistent.

[0082] Figure 2 This provides an exemplary two-frame image to be deduplicated as an embodiment of the present invention. From... Figure 2 As can be seen, the background areas of the two frames, Ia1 and Ib1, have a large area that is completely identical. Figure 3 This invention provides an exemplary two-frame grayscale image, wherein Ia2 is a grayscale image obtained after grayscale processing of Ia1, and Ib2 is a grayscale image obtained after grayscale processing of Ib1.

[0083] S102. Divide each frame of the multi-frame grayscale image into a set of image gratings to obtain multiple sets of image gratings that correspond one-to-one with the multi-frame images to be deduplicated.

[0084] In an embodiment of the present invention, the image deduplication device divides each frame of a multi-frame grayscale image into a set of image gratings to obtain multiple sets of image gratings that correspond one-to-one with the multi-frame images to be deduplicated.

[0085] It should be noted that, in the embodiments of the present invention, after obtaining multiple frames of grayscale images, the image deduplication device performs raster division on each frame of grayscale images to obtain a corresponding set of image gratings, that is, each frame of grayscale image corresponds to a set of image gratings, resulting in multiple sets of image gratings.

[0086] Figure 4 This is a schematic diagram of two exemplary sets of image gratings provided in an embodiment of the present invention. Ia3 is a set of image gratings obtained after rasterization processing of Ia2, and Ib3 is a set of image gratings obtained after rasterization processing of Ib2, wherein the rasterization methods of Ia3 and Ib3 are the same.

[0087] It should be noted that, in the embodiments of the present invention, when the image deduplication device divides each frame of the multi-frame grayscale image into grids, it will use the same division method, such as dividing each frame of the multi-frame grayscale image into a 5*5 grid. The specific grid size can be set according to the actual situation and application requirements, and the present invention does not limit it.

[0088] It should be noted that, in the embodiments of the present invention, when the image deduplication device performs raster division on each frame of a multi-frame grayscale image, it uses the same division method. The specific division method is set according to actual needs and application scenarios. For example, in a surveillance camera scenario for detecting pedestrians, since human images are generally long and narrow, if a pixel space raster with a small aspect ratio is used, the proportion of the human image in the raster area is small, increasing the difficulty of detection. In this case, to maximize the proportion of the target human body in the pixel space raster, the aspect ratio of the raster can be set according to the average height of the human body. For example, the average height-to-shoulder-width ratio of Asians is 22.87, so the aspect ratio of the pixel space raster is set to 22.87. In a surveillance camera scenario for detecting vehicles, since vehicle images have a small aspect ratio, if a raster with a large aspect ratio is used, the proportion of the vehicle image in the raster area is small, increasing the difficulty of detection. To reduce detection difficulty, for cameras used for vehicle detection, the pixel space grid needs to be set as a rectangle with a length smaller than its width. This reduces the impact of the background area on the pixel space grid containing the target. For cameras monitoring close-up scenes, the target occupies a large area in the entire image. Increasing the pixel space grid area allows target variations to be concentrated in a few grids, making the distinction between the target and the background more obvious and increasing the target-background resolution. For these reasons, appropriately increasing the pixel space grid area for image deduplication in close-up scene monitoring can improve detection performance. For cameras monitoring distant scenes, the target generally occupies a small area in the entire image. Reducing the pixel space grid area allows some grids to contain only target variations, reducing the background area and making the distinction between the target and the background more obvious, thus increasing the target-background resolution. For these reasons, appropriately reducing the pixel space grid area for image deduplication in distant scene monitoring can improve detection performance.

[0089] S103. By comparing multiple sets of image rasters, similar images in multiple frames of images to be deduplicated are divided into the same image set to obtain at least one image set.

[0090] In an embodiment of the present invention, the image deduplication device compares multiple sets of image gratings to divide similar images in multiple frames of images to be deduplicated into the same image set, thereby obtaining at least one image set.

[0091] Specifically, in embodiments of the present invention, the image deduplication device, by comparing multiple sets of image gratings, divides similar images in multiple frames of images to be deduplicated into the same image set to obtain at least one image set. This includes: when there is a temporal correlation between the multiple frames of images to be deduplicated, arranging the multiple frames of images to be deduplicated based on their image generation time to obtain an image sequence; comparing the differences between a set of image gratings corresponding to the first frame image in the image sequence and a set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found where the corresponding image gratings do not satisfy a first difference condition, and determining it as the first difference image; dividing the image sequence from the first frame image to the frame image before the first difference image into the same image set; and continuing to compare the differences between a set of image gratings corresponding to the first difference image and a set of image gratings corresponding to each frame image arranged after the first difference image, until the last frame image in the image sequence is divided into an image set to obtain at least one image set.

[0092] It should be noted that, in the embodiments of the present invention, when there is a temporal correlation between multiple frames of images to be deduplicated, the image deduplication device sorts the multiple frames of images to be deduplicated based on the image generation time to obtain an image sequence. After obtaining the image sequence, the image deduplication device begins to compare the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found where the corresponding image gratings do not meet the first difference condition, thus obtaining the first difference image.

[0093] It should be noted that, in the embodiments of the present invention, the first difference condition is the condition that must be met to determine that two frames of images to be deduplicated are similar images. That is, the first difference image determined by the image deduplication device from the image sequence is an image that is different from the first frame image. Then, in the image sequence, all images before the first difference image are similar images to the first frame image. These similar images are divided into the same set. Then, the image grid corresponding to the first difference image is compared with a set of image grids corresponding to each frame image arranged after the first difference image until all images in the image sequence are divided into corresponding image sets, resulting in at least one image set.

[0094] It should be noted that, in the embodiments of the present invention, each image set in at least one image set contains similar images.

[0095] Specifically, in an embodiment of the present invention, the image deduplication device compares the differences between a set of image gratings corresponding to the first frame image in the image sequence and a set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found where the corresponding image gratings do not satisfy the first difference condition. This includes: extracting the feature codes of each grating in the corresponding set of image gratings for the first frame image and the second frame image in the image sequence to form a corresponding set of feature codes, obtaining a first set of feature codes corresponding to the first frame image and a second set of feature codes corresponding to the second frame image; and matching the gratings in the first set of feature codes and the second set of feature codes that are in the same position. Two feature codes are identified as a pair of first feature codes, resulting in multiple pairs of first feature codes. The Hamming distance between each pair of first feature codes is calculated, resulting in multiple first Hamming distances that correspond one-to-one with the multiple pairs of first feature codes. Based on the multiple first Hamming distances, if a set of image gratings corresponding to the first frame image satisfies the first difference condition with a set of image gratings corresponding to the second frame image, the multiple first Hamming distances are combined to continue comparing the differences between the set of image gratings corresponding to the first frame image and the set of image gratings corresponding to the third frame image in the image sequence, until a frame image is found where the corresponding image gratings do not satisfy the first difference condition.

[0096] It should be noted that, in the embodiments of the present invention, the method by which the image deduplication device determines whether the first frame image and the second frame image in an image sequence are similar images is to compare the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image. However, in the prior art, the entire image is usually treated as a whole for difference comparison. Figure 2 When the two frames shown contain a large amount of background area, the background area contains a lot of image noise and exposure differences, which makes it easy to mask the changes in the core area when using the whole image as the comparison object. This results in low accuracy of the comparison between the images and misjudgment of the differences between the images. The image deduplication device compares the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image. It divides the whole image into multiple gratings for difference comparison, which can improve the accuracy of the difference judgment between the images.

[0097] It should be noted that, in the embodiments of the present invention, the image deduplication device extracts the feature codes of each grid cell in the corresponding set of image grids of the first frame image and the second frame image in the image sequence to form a corresponding set of feature codes, thereby obtaining the first set of feature codes corresponding to the first frame image and the second set of feature codes corresponding to the second frame image. For example, the method by which the image deduplication device extracts feature codes can be as follows:

[0098] For a frame of image to be deduplicated with U horizontal pixels and V vertical pixels, the image is divided into M equal parts along the horizontal axis in the uv coordinate system, where each pixel interval has a length of m. Considering the case that mod(U,M)≠0 (mod is the remainder sign), let m=[U / M]. The image is also divided into N equal parts along the vertical axis, where each pixel interval has a length of n. Considering the case that mod(V,N)≠0, let n=[V / N]. That is, the entire image pixel space is divided into M×N grid intervals with a resolution of m×n.

[0099] Let the image raster be G with x-axis index and y-axis index. x,y Let x = (1,2,3,…,M) and y = (1,2,3,…,N), and let the pixels p contained therein satisfy the following conditions: As shown in formula (1):

[0100]

[0101] Where (u,v) represents pixel p u,v The x and y coordinates.

[0102] pixel p u,v The grayscale value is f u,v , Discrete Cosine Transform F based on image raster partitioning k,l,x,y See formula (2):

[0103]

[0104] Where k is p u,v In G x,y The x-coordinate, k = u - (x - 1)m, l is p u,v In G x,y The ordinate, l = v - (y - 1)n, function As shown in formula (3):

[0105]

[0106] The function δ(l) is shown in formula (4):

[0107]

[0108] Image raster G x,y The feature code corresponding to the pixel with coordinates (k, l) is c. k,l,x,y As shown in formula (5):

[0109]

[0110] The feature code of each raster in a set of image rasters corresponding to a frame of image to be deduplicated is a one-dimensional vector C composed of pixel feature codes according to a priority combination. x,y Its i-th position can be represented as:

[0111]

[0112] In formula (6), C x,y [i] is the feature code corresponding to the i-th grid in a set of image grids corresponding to a frame of image to be deduplicated.

[0113] It should be noted that, in the embodiments of the present invention, the image deduplication device assembles the feature codes of each grid in a set of image grids corresponding to the first frame image into a set of feature codes to obtain a first set of feature codes, and assembles the feature codes of each grid in a set of image grids corresponding to the second frame image into a set of feature codes to obtain a second set of feature codes. Then, the two feature codes corresponding to the grids with the same position in the first set of feature codes and the second set of feature codes are determined as a pair of first feature codes to obtain multiple pairs of first feature codes. Then, the Hamming distance between each pair of first feature codes in the multiple pairs of first feature codes is calculated to obtain multiple first Hamming distances, that is, each pair of first feature codes corresponds to a first Hamming distance.

[0114] It should be noted that, in the embodiments of the present invention, after obtaining multiple first Hamming distances, the image deduplication device determines, based on the multiple first Hamming distances, whether a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0115] Specifically, in an embodiment of the present invention, before the image deduplication device determines, based on multiple first Hamming distances, that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy a first difference condition, and before further comparing the differences between the set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image in the image sequence, it may further perform the following steps: If multiple first Hamming distances are all less than or equal to a first preset threshold, determine that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy a first difference condition; if among the multiple first Hamming distances there is one first Hamming distance greater than the first preset threshold and less than the second preset threshold, determine that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy a first difference condition. A set of image graticules satisfies a first difference condition. Among multiple first Hamming distances, including multiple first Hamming distances greater than a first preset threshold, each pair of first feature codes whose first Hamming distance is greater than the first preset threshold is determined as a pair of first target feature codes, resulting in multiple pairs of first target feature codes. The feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image are recombined in the multiple pairs of first target feature codes to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image. If the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the second frame image is less than a second preset threshold, it is determined that a set of image graticules corresponding to the first frame image and a set of image graticules corresponding to the second frame image satisfy the first difference condition.

[0116] It should be noted that, in the embodiments of the present invention, the first preset threshold is a threshold for judging the difference between the same grid in different images. If the difference between the grids in the same position in two frames is less than or equal to the first preset threshold, it means that the grids in the same position in these two frames have a high degree of repetition, that is, they are similar. The specific setting method of the first preset threshold can be set according to the actual scenario and application requirements.

[0117] For example, the image deduplication device can set the first preset threshold by acquiring a fixed background in which no target appears within s hours, wherein ∈ frames of images are acquired every hour. The calculation method for the first preset threshold under this fixed background is shown in formula (7):

[0118]

[0119] Where τ1 is the first preset threshold, M is the x-coordinate of the fixed background, N is the y-coordinate of the fixed background, and h(C) j,x,y C j-1,x,y ) represents two consecutive frames of images in raster Gx,y Hamming distance.

[0120] It should be noted that, in the embodiments of the present invention, the image deduplication device divides multiple frames of images to be deduplicated into multiple sets of image grids, determines the Hamming distance between grids with the same position, and then distinguishes the background region and core region in two frames of images according to a first preset threshold, so as to avoid the problem that the signal noise caused by directly calculating the entire image will cover up the real signal. In other words, the first preset threshold can distinguish the grids corresponding to the background region that does not contain substantial changes and the grids corresponding to the core target changes.

[0121] It should be noted that, in the embodiments of the present invention, after obtaining multiple first Hamming distances, the image deduplication device determines the magnitude between each of the multiple first Hamming distances and a first preset threshold. If all of the multiple first Hamming distances are less than or equal to the first preset threshold, it indicates that the first frame image and the second frame image are highly similar, that is, both are background areas and do not include core areas. Then it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0122] It should be noted that, in the embodiments of the present invention, when there is a first Hamming distance greater than a first preset threshold among a plurality of first Hamming distances, the image deduplication device needs to further determine the size of the first Hamming distance greater than the first preset threshold and a second preset threshold. The second preset threshold is a threshold for judging the difference between different images. That is, the image is treated as a whole and the difference between two frames is directly compared.

[0123] For example, the image deduplication device can set the second preset threshold by acquiring a fixed background where the target appears in frame ε, and the calculation method of the second preset threshold under the fixed background is shown in formula (8):

[0124]

[0125] Where τ2 is the second preset threshold, C Ij For the overall feature code of image Ij, C Ij-1 For the overall feature code of the Ij-1 image, h(C) Ij C Ij-1 ) represents the Hamming distance between the Ij image and the Ij-1 image.

[0126] It should be noted that, in the embodiments of the present invention, when there is a first Hamming distance among the plurality of first Hamming distances that is greater than a first preset threshold and less than a second preset threshold, the image deduplication device determines that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy a first difference condition, that is, the first frame image and the second frame image are similar images.

[0127] It should be noted that, in the embodiments of the present invention, when multiple first Hamming distances include multiple first Hamming distances greater than a first preset threshold, it indicates that multiple grids with the same position in the first frame image and the second frame image are dissimilar. Then, the image deduplication device selects the dissimilar image grids and reassembles the feature codes corresponding to the dissimilar grids. That is, it selects the feature codes corresponding to the dissimilar grids from multiple pairs of first feature codes. Specifically, it determines each pair of first feature codes whose first Hamming distance is greater than the first preset threshold as a pair of first target feature codes, thus obtaining multiple pairs of first target feature codes. Finally, it separates the feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image from the multiple pairs of first target feature codes. Reconstruction is performed to obtain a set of reconstructed feature codes corresponding to the first frame image and a set of reconstructed feature codes corresponding to the second frame image. At this time, the set of reconstructed feature codes corresponding to the first frame image is used as the overall feature code of the first frame image, and the set of reconstructed feature codes corresponding to the second frame image is used as the overall feature code of the second frame image. The Hamming distance between the overall feature codes of the two frames is directly compared to determine whether the first frame image and the second frame image are similar. If the Hamming distance between the set of reconstructed feature codes corresponding to the first frame image and the set of reconstructed feature codes corresponding to the second frame image is less than a second preset threshold, it is determined that the set of image gratings corresponding to the first frame image and the set of image gratings corresponding to the second frame image satisfy the first difference condition, that is, the first frame image and the second frame image are similar.

[0128] Figure 5 This is a schematic diagram of an exemplary differential grid provided for an embodiment of the present invention. Figure 5 As shown, only the image regions circled in gray in Ia4 and Ib4 are dissimilar, that is, the Hamming distance between the feature codes corresponding to the two gratings is greater than the first preset threshold. Then, the feature codes corresponding to the dissimilar gratings corresponding to the selected first frame image are recombined to obtain a set of recombined feature codes corresponding to the first frame image. The feature codes corresponding to the dissimilar gratings corresponding to the second frame image are recombined to obtain a set of recombined feature codes corresponding to the second frame image. Finally, the recombined feature codes corresponding to the first frame image and the recombined feature codes corresponding to the second frame image are compared to obtain the difference comparison result between the first frame image and the second frame image.

[0129] Specifically, in embodiments of the present invention, the image deduplication device, in conjunction with multiple first Hamming distances, continues to compare the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image in the image sequence. This includes: when all multiple first Hamming distances are less than or equal to a first preset threshold, comparing the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image; when at least one of the multiple first Hamming distances is greater than the first preset threshold, selecting gratings from the second frame image whose first Hamming distance is greater than the first preset threshold, and determining the image region corresponding to the selected grating as the target sub-image; and searching for the target sub-image in the first frame image and the third frame image. The grid corresponding to the target image is identified, and the grid corresponding to the first frame image is determined as the first group of grids, and the grid corresponding to the third frame image is determined as the second group of grids. The first group of grids and the second group of grids are further divided into the first sub-grid group corresponding to the first frame image and the second sub-grid group corresponding to the third frame image. The grids in the first group of grids that are different from the first group of grids are determined as the first group of remaining grids, and the grids in the third group of grids that are different from the second group of grids are determined as the second group of remaining grids. The first sub-grid group and the first group of remaining grids are compared with the second sub-grid group and the second group of remaining grids to obtain the difference comparison result between the first frame image and the third frame image.

[0130] It should be noted that, in the embodiments of the present invention, after the image deduplication device determines that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition, that is, after the first frame image and the second frame image are similar, it continues to compare the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image.

[0131] It should be noted that, in the embodiments of the present invention, if multiple first Hamming distances are all less than or equal to the first preset threshold, the image deduplication device directly compares the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image. The specific comparison method is the same as the comparison method between the first frame image and the second frame image, and will not be described in detail here.

[0132] It should be noted that, in the embodiments of the present invention, if among the plurality of first Hamming distances therein is at least one first Hamming distance greater than the first preset threshold, the image deduplication device will select the grid corresponding to the first Hamming distance greater than the first preset threshold from the second frame image, and determine the image region corresponding to the selected grid as the target sub-image.

[0133] Figure 6This is a schematic diagram of an exemplary target sub-image provided in an embodiment of the present invention. For example... Figure 6 As shown, the four-pointed star represents the core area, i.e., the target sub-region, excluding the background area. Figure 6 As can be seen, the first frame image I1 and the second frame image I2 only differ in the raster corresponding to the target sub-region. Based on the comparison of the differences between a set of image rasters corresponding to the first frame image and a set of image rasters corresponding to the second frame image, dissimilar rasters are identified. The position in the second frame image.

[0134] It should be noted that, in the embodiments of the present invention, when the image deduplication device obtains the target sub-region in the second frame image, in the process of determining whether the first frame image and the third frame image are similar, it will use optical flow to find the grid corresponding to the target sub-region in the third frame image, and determine all the grids found as the second group of grids. Then, it will project the grid corresponding to the target sub-region in the third frame image back onto the first frame image, determine all the grids obtained by projection as the first group of grids, and then perform grid re-division on the first group of grids and the second group of grids.

[0135] Figure 7 This is a schematic diagram illustrating an exemplary method for estimating the motion of a target sub-image, provided as an embodiment of the present invention. For example... Figure 7 As shown, when the image deduplication device compares the differences between the first frame image and the second frame image, it can obtain the target sub-region in the second frame image, that is, the grid with a first Hamming distance greater than a first preset threshold. For example, the second frame image I2 includes the grid of the target sub-region. Estimation by optical flow method The raster corresponding to image I3 in the third frame Right now Pixel p is obtained using optical flow method. u,v In the third frame image, p' u,v , Will The image is projected backwards onto the first frame image I1, i.e. if and The coordinates are the same, and The grid is further divided into M'*N' sub-grids, resulting in the first sub-grid group corresponding to the first frame image and the second sub-grid group corresponding to the third frame image. M' and N' are integers greater than 1, and can be set to M' = N' = 2. The specific values ​​can be set according to the actual scenario and application requirements, and this invention does not limit them.

[0136] It should be noted that, in the embodiments of the present invention, after obtaining the first sub-grid group and the second sub-grid group, the image deduplication device determines the grids in the group of image grids corresponding to the first frame image that are different from the first group of grids as the first group of remaining grids, and determines the grids in the group of image grids corresponding to the third frame image that are different from the second group of grids as the second group of remaining grids. Then, it performs a difference comparison on the grids corresponding to the same position in the first sub-grid group and the second sub-grid group, and performs a difference comparison on the grids corresponding to the same position in the first group of remaining grids and the second group of remaining grids, to obtain the difference comparison result between the first frame image and the third frame image.

[0137] Specifically, in an embodiment of the present invention, the image deduplication device compares the first sub-grid group and the first group of remaining grids with the second sub-grid group and the second group of remaining grids to obtain the difference comparison results between the first frame image and the third frame image. This includes: extracting the feature codes of each grid within each group of the first group of remaining grids and the second group of remaining grids, forming a corresponding set of feature codes, thus obtaining the first group of remaining feature codes corresponding to the first group of remaining grids and the second group of remaining feature codes corresponding to the second group of remaining grids; determining two feature codes corresponding to grids with the same position in the first group of remaining feature codes and the second group of remaining feature codes as a pair of second feature codes, thus obtaining multiple pairs of second feature codes; and calculating the Hamming distance between each pair of second feature codes in the multiple pairs of second feature codes to obtain... Multiple second Hamming distances are obtained, each corresponding to one pair of second feature codes. For the first and second sub-grid groups, the feature codes of each sub-grid within each group are extracted to form a corresponding set of feature codes, resulting in the first set of target feature codes corresponding to the first sub-grid group and the second set of target feature codes corresponding to the second sub-grid. The two feature codes corresponding to the sub-grids with the same position in the first and second sets of target feature codes are determined as a pair of third feature codes, resulting in multiple pairs of third feature codes. The Hamming distance between each pair of third feature codes is calculated, resulting in multiple third Hamming distances corresponding one-to-one with the multiple pairs of third feature codes. Based on the multiple second Hamming distances and the multiple third Hamming distances, the difference comparison result between the first frame image and the third frame image is determined.

[0138] It should be noted that, in the embodiments of the present invention, when the image deduplication device performs difference comparison between the first group of remaining graticles and the second group of remaining graticles, it needs to extract feature codes from each sub-graticle in the first group of remaining graticles and the second group of remaining graticles. The specific extraction process is the same as the process of extracting graticle feature codes described above, and will not be repeated here. The first group of remaining feature codes corresponding to the first group of remaining graticles and the second group of remaining graticles are obtained. Then, the two feature codes corresponding to the sub-graticles with the same position in the first group of remaining feature codes and the second group of remaining feature codes are determined as a pair of second feature codes, resulting in multiple pairs of second feature codes. The Hamming distance corresponding to each pair of second feature codes is calculated, resulting in multiple second Hamming distances, wherein each pair of second feature codes corresponds to one second Hamming distance.

[0139] It should be noted that, in the embodiments of the present invention, when the image deduplication device performs difference comparison between the first sub-grid group and the second sub-grid group, it needs to extract feature codes for each sub-grid in the first sub-grid group and the second sub-grid group. The specific extraction process is the same as the process of extracting grid feature codes described above, and will not be repeated here. The first set of target feature codes corresponding to the first sub-grid group and the second set of target feature codes corresponding to the second sub-grid group are obtained. Then, the two feature codes corresponding to the sub-grids with the same position in the first set of target feature codes and the second set of target feature codes are determined as a pair of third feature codes, resulting in multiple pairs of third feature codes. The Hamming distance corresponding to each pair of third feature codes is calculated, resulting in multiple third Hamming distances, wherein each pair of third feature codes corresponds to one third Hamming distance.

[0140] It should be noted that, in the embodiments of the present invention, the image deduplication device, having obtained multiple second Hamming distances and multiple third Hamming distances, determines the difference comparison result between the first frame image and the third frame image based on the multiple second Hamming distances and multiple third Hamming distances.

[0141] Specifically, in embodiments of the present invention, the image deduplication device determines the difference comparison result between the first frame image and the third frame image based on multiple second Hamming distances and multiple third Hamming distances, including: if, among the multiple second Hamming distances and multiple third Hamming distances, there is a second Hamming distance greater than a third preset threshold, or if there is a third Hamming distance greater than a fourth preset threshold, then select a feature code from multiple pairs of second feature codes whose second Hamming distance is greater than the third preset threshold, or select a feature code from multiple pairs of third feature codes whose third Hamming distance is greater than the fourth preset threshold, and determine the selected pair of feature codes as the second target feature codes; if the Hamming distance between the second target feature codes is less than or equal to a fifth preset threshold, determine that the difference comparison result is similar; if the Hamming distance between the second target feature codes is greater than the fifth preset threshold, determine that the difference comparison result is dissimilar; if multiple second Hamming distances are all less than or equal to the third preset threshold, and multiple third Hamming distances are all less than or equal to the fourth preset threshold, determine that the difference comparison result is similar.

[0142] It should be noted that, in the embodiments of the present invention, the third preset threshold is a threshold for judging the difference between the same grid in different images. For the same background, the image deduplication device can set the third preset threshold to be the same as the first preset threshold. The third preset threshold is a threshold for judging the difference between the same sub-grid in different images. The image deduplication device can set the fourth preset threshold according to the third preset threshold or the first preset threshold. The specific setting formula is as shown in formula (9):

[0143] τ'1=τ1 / (M'N') (9)

[0144] Where τ1 is the first preset threshold, τ'1 is the fourth preset threshold, and M'N' is the number of sub-grids when the grid is re-divided.

[0145] It should be noted that, in the embodiments of the present invention, when there is a second Hamming distance greater than a third preset threshold or a third Hamming distance greater than a fourth preset threshold among the multiple second Hamming distances and multiple third Hamming distances, that is, in the first sub-grid group and the second sub-grid group, or in the first group of remaining grids and the second group of grids, there is a dissimilar grid selected by the third preset threshold or the fourth preset threshold. The Hamming distance corresponding to this dissimilar grid is compared with the fifth preset threshold. If the Hamming distance is less than or equal to the fifth preset threshold, the difference comparison result between the first frame image and the third frame image is determined to be similar. If the Hamming distance is greater than the fifth preset threshold, the difference comparison result between the first frame image and the third frame image is determined to be dissimilar. The specific fifth preset threshold needs to be determined according to the actual situation. The fifth preset threshold can be consistent with the second preset threshold.

[0146] It should be noted that, in the embodiments of the present invention, when multiple second Hamming distances are all less than or equal to a third preset threshold, and multiple third Hamming distances are all less than or equal to a fourth preset threshold, the image deduplication device directly determines that the difference comparison result between the first frame image and the third frame image is similar.

[0147] Specifically, in embodiments of the present invention, determining the difference comparison result between the first frame image and the third frame image based on multiple second Hamming distances and multiple third Hamming distances includes: when there are multiple second Hamming distances and multiple third Hamming distances, including second Hamming distances greater than a third preset threshold, and / or multiple third Hamming distances greater than a fourth preset threshold, each pair of feature codes in the multiple pairs of second feature codes whose corresponding second Hamming distance is greater than the third preset threshold and each pair of feature codes in the multiple pairs of third feature codes whose corresponding third Hamming distance is greater than the fourth preset threshold are determined as a pair of third target feature codes, thus obtaining multiple pairs of third target feature codes. Feature codes; among multiple pairs of third target feature codes, the feature codes corresponding to the first frame image and the feature codes corresponding to the third frame image are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image; if the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the third frame image is greater than a sixth preset threshold, the difference comparison result is determined to be dissimilar; if the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the third frame image is less than or equal to the sixth preset threshold, the difference comparison result is determined to be similar.

[0148] It should be noted that, in the embodiments of the present invention, when there are multiple second Hamming distances and multiple third Hamming distances, including a number of second Hamming distances greater than a third preset threshold and / or a number of third Hamming distances greater than a fourth preset threshold, that is, when there are multiple dissimilar grates selected by the third preset threshold or the fourth preset threshold in the first sub-grating group and the second sub-grating group, or in the first group of remaining grates and the second group of grates, the feature codes corresponding to the first frame image and the feature codes corresponding to the third frame image in the multiple pairs of third target feature codes corresponding to these multiple dissimilar grates are respectively recombined to obtain the first Hamming distance. A set of reconstructed feature codes corresponding to the first frame image and a set of reconstructed feature codes corresponding to the third frame image are used as the overall feature codes of the first frame image and the third frame image, respectively. If the Hamming distance between the two sets of reconstructed feature codes is greater than a sixth preset threshold, the first frame image and the second frame image are determined to be dissimilar. If the Hamming distance between the two sets of reconstructed feature codes is less than the sixth preset threshold, the first frame image and the second frame image are determined to be similar. The sixth preset threshold is a threshold for judging the differences between different images. Specifically, the sixth preset threshold can be the same as the second preset threshold.

[0149] It should be noted that, in the embodiments of the present invention, if the first frame image is also similar to the third frame image, the image deduplication device will search for the target area that needs to be divided into grids in the fourth frame image based on the third frame image, and perform grid division, thereby directly optimizing the original grid division method to obtain the optimized grid division method. In other words, when comparing the first frame image with other frame images, the optimized grid division method will be determined based on the previous frame image of the image being compared.

[0150] Figure 8 This is a schematic diagram illustrating an exemplary optimized grid division provided in an embodiment of the present invention. Figure 8 As shown, for example, when the image deduplication device compares the differences between the first frame image and the Nth frame image, it needs to identify the dissimilar gratings in the previous frame image of the Nth frame image and the first frame image. Then, it uses optical flow to find these dissimilar gratings in the Nth frame image. N The corresponding grid is then projected onto the first frame image I1. The corresponding position in the first frame image is found, and the grid is further divided to obtain the optimized grid division method. Then, when the image deduplication device compares the differences between the first frame image and the Nth frame image, the grid can be divided directly according to the optimized grid division method. The previous frame image of the Nth frame image is a similar image to the first frame image.

[0151] Specifically, in embodiments of the present invention, the image deduplication device compares multiple sets of image gratings to group similar images in multiple frames of images to be deduplicated into the same image set, thereby obtaining at least one image set. This includes: when there is no temporal correlation between the multiple frames of images to be deduplicated, comparing the differences between different sets of image gratings in the multiple sets of image gratings; and grouping the images to be deduplicated in the multiple frames of images to be deduplicated into the same set where the differences between corresponding image gratings satisfy a second difference condition, thereby obtaining at least one image set.

[0152] It should be noted that, in the embodiments of the present invention, when there is no temporal correlation between multiple frames of images to be deduplicated, the image deduplication device needs to compare the differences between the two sets of image gratings corresponding to every two frames of images in the multiple deduplicated images. The specific comparison method is the same as the comparison method between the first frame and the second frame when there is a temporal correlation between the multiple frames of images to be deduplicated, and will not be described in detail here.

[0153] It should be noted that, in the embodiments of the present invention, the second difference condition is the same as the first difference condition, indicating that the two frames of images for difference comparison are similar images.

[0154] It should be noted that, in the embodiments of the present invention, when there is no temporal correlation between multiple frames of images to be deduplicated, the image deduplication device compares the differences between the two sets of image gratings corresponding to every two frames of images in the multiple frames, and divides similar images into the same set, thereby obtaining at least one set of images, wherein the images in each set of the at least one set are similar.

[0155] S104. Select and save a frame image from each of at least one set of images.

[0156] In an embodiment of the present invention, the image deduplication device selects and saves one frame of image from each set of at least one image set.

[0157] It should be noted that, in the embodiments of the present invention, after obtaining at least one image set, the image deduplication device selects the clearest image from each image set in the at least one image set for saving, and deletes other images similar to the clearest image, thereby reducing memory usage and improving the image deduplication effect.

[0158] Figure 9 This is a schematic diagram illustrating an exemplary image deduplication process provided in an embodiment of the present invention. Figure 9As shown, the image deduplication device first acquires multiple frames of images to be deduplicated. Each frame of the images is then processed into grayscale to obtain a multi-frame grayscale image corresponding to each frame. The device then determines whether the multiple frames contain temporal correlation. If there is no temporal correlation, the images are directly rasterized according to the raster division method. If there is temporal correlation, it needs to determine if previous image comparisons were performed to obtain an optimized raster division method. If not, raster division is performed directly. If an optimized raster division method exists, it is used to rasterize the images. The two groups of raster images are then compared for differences until all multiple frames are subjected to duplication detection. Similar images are grouped into the same set, resulting in at least one image set. One frame is selected from each of these at least one image set and saved, while other similar images are deleted, thus completing the image deduplication process.

[0159] It should be noted that, in the embodiments of the present invention, the image deduplication device divides the image by grid division, compares the grids, and recombines the image feature codes of dissimilar pixel space grids into the feature code vector of the entire image. This reduces the accumulation of background noise, preserves most of the changes in the core target of the image, and increases the accuracy of image deduplication. While improving the accuracy of image deduplication, it does not significantly increase the amount of computation and manual work.

[0160] This invention provides an image deduplication method, comprising: acquiring multiple frames of images to be deduplicated; performing grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images corresponding one-to-one with the multiple frames of images to be deduplicated; dividing each frame of the multiple grayscale images into a set of image gratings to obtain multiple sets of image gratings corresponding one-to-one with the multiple frames of images to be deduplicated; comparing the multiple sets of image gratings to group similar images in the multiple frames of images to be deduplicated into the same image set to obtain at least one image set; and selecting one frame of image from each set of the at least one image set and saving it. The image deduplication method provided by this invention uses a grating division method to refine the entire image and compares gratings in the same position in the refined image to determine the differences between images, thereby improving the accuracy of image deduplication.

[0161] This invention provides an image deduplication device. Figure 10 A schematic diagram of the structure of an image deduplication device provided in an embodiment of the present invention. Figure 1 .like Figure 10 As shown, it includes:

[0162] The acquisition module 1001 is used to acquire multiple frames of images to be deduplicated, and to perform grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated.

[0163] The segmentation module 1002 is used to divide each frame of the multi-frame grayscale image into a set of image grids to obtain multiple sets of image grids that correspond one-to-one with the multi-frame images to be deduplicated.

[0164] The comparison module 1003 is used to divide similar images in the multiple frames of images to be deduplicated into the same image set by comparing the multiple sets of image gratings, so as to obtain at least one image set;

[0165] The deduplication module 1004 is used to select and save a frame image from each set of the at least one image set.

[0166] Optionally, the comparison module 1003 is specifically used to, when there is a temporal correlation between the multiple frames of images to be deduplicated, arrange the multiple frames of images to be deduplicated based on the image generation time to obtain an image sequence; compare the differences between a set of image gratings corresponding to the first frame image in the image sequence and a set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found whose corresponding image gratings do not meet the first difference condition, and determine it as the first difference image; classify the frame image from the first frame image to the frame image before the first difference image in the image sequence into the same image set; continue to compare the differences between a set of image gratings corresponding to the first difference image in the image sequence and a set of image gratings corresponding to each frame image arranged after the first difference image, until the last frame image in the image sequence is classified into an image set, to obtain the at least one image set.

[0167] Optionally, the comparison module 1003 is specifically used to extract the feature codes of each grid in the corresponding set of image grids of the first frame image and the second frame image in the image sequence to form a corresponding set of feature codes, thereby obtaining a first set of feature codes corresponding to the first frame image and a second set of feature codes corresponding to the second frame image; determine two feature codes corresponding to grids with the same position in the first set of feature codes and the second set of feature codes as a pair of first feature codes, thereby obtaining multiple pairs of first feature codes; calculate the Hamming distance between each pair of first feature codes in the multiple pairs of first feature codes, thereby obtaining multiple first Hamming distances that correspond one-to-one with the multiple pairs of first feature codes; and, based on the multiple first Hamming distances, determine that the set of image grids corresponding to the first frame image and the set of image grids corresponding to the second frame image satisfy the first difference condition, and then, in combination with the multiple first Hamming distances, continue to compare the differences between the set of image grids corresponding to the first frame image and the set of image grids corresponding to the third frame image in the image sequence, until a frame image is found where the corresponding image grids do not satisfy the first difference condition.

[0168] Optionally, the image deduplication device further includes a determination module (not shown in the figure), configured to: determine, when all of the plurality of first Hamming distances are less than or equal to a first preset threshold, that a group of image gratings corresponding to the first frame image satisfies the first difference condition with a group of image gratings corresponding to the second frame image; determine, when one of the plurality of first Hamming distances is greater than the first preset threshold and less than the second preset threshold, that a group of image gratings corresponding to the first frame image satisfies the first difference condition with a group of image gratings corresponding to the second frame image; and determine, when multiple of the plurality of first Hamming distances are greater than the first preset threshold, deduplicate the plurality of pairs of first Hamming distances... In the feature codes, each pair of first feature codes corresponding to a first Hamming distance greater than the first preset threshold is determined as a pair of first target feature codes, resulting in multiple pairs of first target feature codes; the feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image are respectively recombined among the multiple pairs of first target feature codes to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image; if the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the second frame image is less than the second preset threshold, it is determined that the set of image gratings corresponding to the first frame image and the set of image gratings corresponding to the second frame image satisfy the first difference condition.

[0169] Optionally, the comparison module 1003 is specifically configured to: when all of the plurality of first Hamming distances are less than or equal to a first preset threshold, perform a difference comparison between a group of image gratings corresponding to the first frame image and a group of image gratings corresponding to the third frame image; when at least one of the plurality of first Hamming distances is greater than the first preset threshold, select gratings from the second frame image whose first Hamming distance is greater than the first preset threshold, and determine the image region corresponding to the selected gratings as the target sub-image; search for gratings corresponding to the target sub-image in the first frame image and the third frame image, and determine the gratings corresponding to the first frame image found as the first group of gratings. The first and second sets of grids are further divided into a first sub-grid group corresponding to the first frame image and a second sub-grid group corresponding to the third frame image. Grids in the first set of grids that are different from the first set of grids are identified as the first set of remaining grids, and grids in the third set of grids that are different from the second set of grids are identified as the second set of remaining grids. The first sub-grid group and the first set of remaining grids are compared with the second sub-grid group and the second set of remaining grids to obtain the difference comparison result between the first frame image and the third frame image.

[0170] Optionally, the comparison module 1003 is specifically used to extract the feature codes of each grid cell in the first group of remaining grid cells and the second group of remaining grid cells respectively, forming a corresponding set of feature codes, to obtain the first set of remaining feature codes corresponding to the first group of remaining grid cells and the second set of remaining feature codes corresponding to the second group of remaining grid cells; to determine two feature codes corresponding to grid cells with the same position in the first group of remaining feature codes and the second group of remaining feature codes as a pair of second feature codes, to obtain multiple pairs of second feature codes; to calculate the Hamming distance between each pair of second feature codes in the multiple pairs of second feature codes, to obtain multiple second Hamming distances that correspond one-to-one with the multiple pairs of second feature codes; and to compare the first sub-grid group and the second group of remaining grid cells... For each sub-grid group, feature codes are extracted from each sub-grid within that group to form a corresponding set of feature codes, resulting in a first set of target feature codes for the first sub-grid group and a second set of target feature codes for the second sub-grid group. Two feature codes corresponding to sub-grids with the same position in the first and second sets of target feature codes are identified as a pair of third feature codes, resulting in multiple pairs of third feature codes. The Hamming distance between each pair of third feature codes is calculated, yielding multiple third Hamming distances that correspond one-to-one with the multiple pairs of third feature codes. Based on the multiple second and third Hamming distances, the difference comparison result between the first frame image and the third frame image is determined.

[0171] Optionally, the comparison module 1003 is specifically configured to: select, in the case that among the plurality of second Hamming distances and the plurality of third Hamming distances, there is a second Hamming distance greater than a third preset threshold, or a third Hamming distance greater than a fourth preset threshold, select a feature code from the plurality of pairs of second feature codes whose second Hamming distance is greater than the third preset threshold, or select a feature code from the plurality of pairs of third feature codes whose third Hamming distance is greater than the fourth preset threshold, and determine the selected pair of feature codes as second target feature codes; determine that the difference comparison result is similar when the Hamming distance between the second target feature codes is less than or equal to a fifth preset threshold; determine that the difference comparison result is dissimilar when the Hamming distance between the second target feature codes is greater than the fifth preset threshold; and determine that the difference comparison result is similar when all of the plurality of second Hamming distances are less than or equal to the third preset threshold, and all of the plurality of third Hamming distances are less than or equal to the fourth preset threshold.

[0172] Optionally, the comparison module 1003 is specifically configured to, when there are multiple pairs of second Hamming distances and multiple third Hamming distances, including second Hamming distances greater than a third preset threshold and / or third Hamming distances greater than a fourth preset threshold, determine each pair of feature codes in the multiple pairs of second feature codes whose corresponding second Hamming distance is greater than the third preset threshold and each pair of feature codes in the multiple pairs of third feature codes whose corresponding third Hamming distance is greater than the fourth preset threshold as a pair of third target feature codes, thereby obtaining multiple pairs of third target feature codes; and determine the first frame image pair among the multiple pairs of third target feature codes. The corresponding feature code and the feature code corresponding to the third frame image are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image. If the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the third frame image is greater than a sixth preset threshold, the difference comparison result is determined to be dissimilar. If the Hamming distance between the set of recombined feature codes corresponding to the first frame image and the set of recombined feature codes corresponding to the third frame image is less than or equal to the sixth preset threshold, the difference comparison result is determined to be similar.

[0173] Optionally, the comparison module 1003 is specifically used to compare the differences between different groups of image gratings in the multiple sets of image gratings when there is no temporal correlation between the multiple frames of images to be deduplicated; and to divide the images to be deduplicated into the same set when the differences between the corresponding image gratings in the multiple frames of images to be deduplicated satisfy the second difference condition, thereby obtaining the at least one image set.

[0174] This invention provides an image deduplication device. Figure 11 A schematic diagram of the structure of an image deduplication device provided in an embodiment of the present invention. Figure 2 .like Figure 11 As shown, the image deduplication device includes: a processor 1101, a memory 1102, and a communication bus 1103;

[0175] The communication bus 1103 is used to realize the communication connection between the processor 1101 and the memory 1102;

[0176] The processor 1101 is configured to execute the image deduplication program stored in the memory 1102 to implement the above-described image deduplication method. This invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the above-described image deduplication method. The computer-readable storage medium can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or it can be a device including one or any combination of the above-described memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.

[0177] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0178] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0180] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0181] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this utility application should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An image deduplication method, characterized in that, The method includes: Multiple frames of images to be deduplicated are acquired, and each frame of the multiple frames of images to be deduplicated is processed into grayscale to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated. Each frame of the multi-frame grayscale image is divided into a set of image grids to obtain multiple sets of image grids that correspond one-to-one with the multi-frame images to be deduplicated. When there is a temporal correlation between the multiple frames of images to be deduplicated, the multiple frames of images to be deduplicated are arranged based on the image generation time to obtain an image sequence; For the first frame image and the second frame image in the image sequence, the feature code of each grid in the corresponding set of image grids is extracted respectively, and the two feature codes corresponding to the grids with the same position in the first frame image and the second frame image are determined as a pair of first feature codes, thus obtaining multiple pairs of first feature codes; Calculate the Hamming distance between each pair of first feature codes in the plurality of pairs of first feature codes to obtain a plurality of first Hamming distances that correspond one-to-one with the plurality of pairs of first feature codes; When all of the first Hamming distances are less than or equal to the first preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition. In the case where one of the plurality of first Hamming distances is greater than the first preset threshold and less than the second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition. In the case where there are multiple first Hamming distances among the plurality of first Hamming distances that are greater than the first preset threshold, each pair of first feature codes in the plurality of first feature codes whose first Hamming distance is greater than the first preset threshold is determined as a pair of first target feature codes, thus obtaining multiple pairs of first target feature codes; The feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image in the plurality of pairs of first target feature codes are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image. If the Hamming distance between a set of reconstructed feature codes corresponding to the first frame image and a set of reconstructed feature codes corresponding to the second frame image is less than a second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition; the first difference condition is the condition that must be satisfied to determine that two frames of images to be deduplicated are similar images. By comparing the multiple sets of image gratings, similar images in the multiple frames of images to be deduplicated are grouped into the same image set to obtain at least one image set; One frame of image is selected and saved from each of the at least one set of images.

2. The method according to claim 1, characterized in that, The step of comparing the multiple sets of image rasters to group similar images in the multiple frames of images to be deduplicated into the same image set, thereby obtaining at least one image set, includes: In the image sequence, the set of image gratings corresponding to the first frame image is compared with the set of image gratings corresponding to each frame image arranged after the first frame image until a frame image is found whose corresponding image gratings do not meet the first difference condition, and is then determined as the first difference image. In the image sequence, the image from the first frame to the frame before the first difference image is divided into the same image set; The image grid corresponding to the first difference image in the image sequence is further compared with the image grid corresponding to each frame image arranged after the first difference image, until the last frame image in the image sequence is divided into an image set, thus obtaining the at least one image set.

3. The method according to claim 2, characterized in that, The step of comparing the set of image gratings corresponding to the first frame image in the image sequence with the set of image gratings corresponding to each frame image arranged after the first frame image, until a frame image is found where the corresponding image gratings do not meet the first difference condition, includes: For the first frame image and the second frame image in the image sequence, the feature codes of each grid in their respective set of image grids are extracted to form a corresponding set of feature codes, thus obtaining the first set of feature codes corresponding to the first frame image and the second set of feature codes corresponding to the second frame image. In the first group of feature codes and the second group of feature codes, the two feature codes corresponding to the grids with the same position are determined as a pair of first feature codes, thus obtaining multiple pairs of first feature codes; Calculate the Hamming distance between each pair of first feature codes in the plurality of pairs of first feature codes to obtain a plurality of first Hamming distances that correspond one-to-one with the plurality of pairs of first feature codes; If, based on the plurality of first Hamming distances, it is determined that a set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the second frame image satisfy the first difference condition, then, in conjunction with the plurality of first Hamming distances, the set of image graticles corresponding to the first frame image and a set of image graticles corresponding to the third frame image in the image sequence are further compared for differences until a frame image is found where the corresponding image graticles do not satisfy the first difference condition.

4. The method according to claim 3, characterized in that, The step of combining the multiple first Hamming distances and further comparing the differences between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image in the image sequence includes: When all of the first Hamming distances are less than or equal to the first preset threshold, a difference comparison is made between a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the third frame image. In the case where at least one of the plurality of first Hamming distances is greater than the first preset threshold, the grid corresponding to the first Hamming distance being greater than the first preset threshold is selected from the second frame image, and the image region corresponding to the selected grid is determined as the target sub-image; Find the grid corresponding to the target sub-image in the first frame image and the third frame image, and determine the grid corresponding to the first frame image as the first group of grids and the grid corresponding to the third frame image as the second group of grids; The first group of grids and the second group of grids are further divided into grids to obtain the first sub-grid group corresponding to the first frame image and the second sub-grid group corresponding to the third frame image. In the group of image gratings corresponding to the first frame image, the gratings that are different from the first group of gratings are determined as the first group of remaining gratings, and in the group of image gratings corresponding to the third frame image, the gratings that are different from the second group of gratings are determined as the second group of remaining gratings. The first sub-raster group and the remaining raster of the first group are compared with the second sub-raster group and the remaining raster of the second group to obtain the difference comparison result between the first frame image and the third frame image.

5. The method according to claim 4, characterized in that, The step of comparing the first sub-raster group and the remaining raster of the first group with the second sub-raster group and the remaining raster of the second group to obtain the difference comparison result between the first frame image and the third frame image includes: For the first group of remaining grids and the second group of remaining grids, extract the feature code of each grid in their respective groups to form a corresponding set of feature codes, and obtain the first set of remaining feature codes corresponding to the first group of remaining grids and the second set of remaining feature codes corresponding to the second group of remaining grids. In the first group of remaining feature codes and the second group of remaining feature codes, the two feature codes corresponding to the grids with the same position are determined as a pair of second feature codes, thus obtaining multiple pairs of second feature codes; Calculate the Hamming distance between each pair of second feature codes in the plurality of pairs of second feature codes to obtain a plurality of second Hamming distances that correspond one-to-one with the plurality of pairs of second feature codes; For the first sub-grid group and the second sub-grid group, extract the feature code of each sub-grid in each group to form a corresponding set of feature codes, and obtain the first set of target feature codes corresponding to the first sub-grid group and the second set of target feature codes corresponding to the second sub-grid group. In the first group of target feature codes and the second group of target feature codes, the two feature codes corresponding to the sub-grids with the same position are determined as a pair of third feature codes, thus obtaining multiple pairs of third feature codes; Calculate the Hamming distance between each pair of third feature codes in the plurality of pairs of third feature codes to obtain a plurality of third Hamming distances that correspond one-to-one with the plurality of pairs of third feature codes; Based on the plurality of second Hamming distances and the plurality of third Hamming distances, the difference comparison result between the first frame image and the third frame image is determined.

6. The method according to claim 5, characterized in that, The step of determining the difference comparison result between the first frame image and the third frame image based on the plurality of second Hamming distances and the plurality of third Hamming distances includes: In the case where one of the plurality of second Hamming distances and the plurality of third Hamming distances is greater than a third preset threshold, or in the case where one of the third Hamming distances is greater than a fourth preset threshold, a second Hamming distance greater than the third preset threshold is selected from the plurality of pairs of second feature codes, or a feature code with a third Hamming distance greater than the fourth preset threshold is selected from the plurality of pairs of third feature codes, and the selected pair of feature codes is determined as the second target feature code; If the Hamming distance between the second target feature codes is less than or equal to a fifth preset threshold, the difference comparison result is determined to be similar. If the Hamming distance between the second target feature codes is greater than the fifth preset threshold, the difference comparison result is determined to be dissimilar. If all the plurality of second Hamming distances are less than or equal to the third preset threshold, and all the plurality of third Hamming distances are less than or equal to the fourth preset threshold, the difference comparison result is determined to be similar.

7. The method according to claim 5, characterized in that, The step of determining the difference comparison result between the first frame image and the third frame image based on the plurality of second Hamming distances and the plurality of third Hamming distances includes: In the case where there are multiple second Hamming distances and multiple third Hamming distances, including second Hamming distances greater than a third preset threshold, or / and multiple third Hamming distances greater than a fourth preset threshold, each pair of feature codes in the multiple pairs of second feature codes whose second Hamming distance is greater than the third preset threshold and each pair of feature codes in the multiple pairs of third feature codes whose third Hamming distance is greater than the fourth preset threshold are determined as a pair of third target feature codes, thus obtaining multiple pairs of third target feature codes; The feature codes corresponding to the first frame image and the feature codes corresponding to the third frame image in the multiple pairs of third target feature codes are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image. If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image is greater than a sixth preset threshold, the difference comparison result is determined to be dissimilar. If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the third frame image is less than or equal to the sixth preset threshold, the difference comparison result is determined to be similar.

8. The method according to claim 1, characterized in that, The step of comparing the multiple sets of image rasters to group similar images in the multiple frames of images to be deduplicated into the same image set, thereby obtaining at least one image set, includes: If there is no temporal correlation between the multiple frames of images to be deduplicated, the differences between the different groups of image rasters in the multiple groups of image rasters are compared. In the multi-frame images to be deduplicated, the images whose differences between corresponding image rasters satisfy the second difference condition are grouped into the same set to obtain the at least one image set.

9. An image deduplication device, characterized in that, The acquisition module is used to acquire multiple frames of images to be deduplicated, and to perform grayscale processing on each frame of the multiple frames of images to be deduplicated to obtain multiple grayscale images that correspond one-to-one with the multiple frames of images to be deduplicated. The segmentation module is used to divide each frame of the multi-frame grayscale image into a set of image grids to obtain multiple sets of image grids that correspond one-to-one with the multi-frame images to be deduplicated. The comparison module is used to arrange the multiple frames of images to be deduplicated based on the image generation time to obtain an image sequence when there is a time correlation between them. For the first frame image and the second frame image in the image sequence, the feature code of each grid in the corresponding set of image grids is extracted respectively, and the two feature codes corresponding to the grids with the same position in the first frame image and the second frame image are determined as a pair of first feature codes, thus obtaining multiple pairs of first feature codes; Calculate the Hamming distance between each pair of first feature codes in the plurality of pairs of first feature codes to obtain a plurality of first Hamming distances that correspond one-to-one with the plurality of pairs of first feature codes; When all of the first Hamming distances are less than or equal to the first preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition. In the case where one of the plurality of first Hamming distances is greater than the first preset threshold and less than the second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition. In the case where there are multiple first Hamming distances among the plurality of first Hamming distances that are greater than the first preset threshold, each pair of first feature codes in the plurality of first feature codes whose first Hamming distance is greater than the first preset threshold is determined as a pair of first target feature codes, thus obtaining multiple pairs of first target feature codes; The feature codes corresponding to the first frame image and the feature codes corresponding to the second frame image in the plurality of pairs of first target feature codes are recombined to obtain a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image. If the Hamming distance between a set of recombined feature codes corresponding to the first frame image and a set of recombined feature codes corresponding to the second frame image is less than a second preset threshold, it is determined that a set of image gratings corresponding to the first frame image and a set of image gratings corresponding to the second frame image satisfy the first difference condition. The first difference condition is the condition that must be met to determine that two frames of images to be deduplicated are similar images; By comparing the multiple sets of image gratings, similar images in the multiple frames of images to be deduplicated are grouped into the same image set to obtain at least one image set; A deduplication module is used to select and save a frame of image from each set of the at least one image set.

10. An image deduplication device, characterized in that, include: Processor, memory, and communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is configured to execute the image deduplication program stored in the memory to implement the image deduplication method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the image deduplication method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Detection method and device for similar pictures

    CN104504120A

  • Image data cleaning method for de-weighting same and similar images

    CN107480203A

  • Video deduplication and compression method and device, server and storage medium

    CN110944201A

  • Image processing method and device, electronic equipment and storage medium

    CN112232394A