A method and device for determining image difference information
By acquiring image and position information in the drone image recognition system, matching and processing images in chunks, identifying the differences between the drone image and template image, the problems of complex and cost of existing systems are solved, and efficiently identifying small area changes are achieved.
Patent Information
- Application Number
- CN202210350555.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-04
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-04-04
AI Technical Summary
Existing drone image recognition systems are complex and costly, making it difficult to recognize scene changes in small areas, especially for ultra-high altitude images to identify details.
By obtaining the images and position information taken by the drone equipment, matching the template images from the image database, performing chunking processing and similar matching, determining the image difference information, and identifying the degree of difference between the drone image and the template image, avoiding the pre-learning process of deep learning algorithms and big data.
It enables efficient identification of changing areas in the drone image without complex deployment and high costs, saving deployment time and cost.
Smart Images

Figure CN114648709B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a technology for determining image difference information. Background Art
[0002] With the rapid development of science and technology in recent years, drone technology has gradually come into people's attention. Drones, with their unique advantages, are rapidly being adopted across various industries. With the increasing adoption of digital and intelligent highways, drones are also showing increasing application prospects in the highway sector. Drones fly high and can see far. Especially when monitoring specific scenes, their high-definition cameras can instantly transmit images to monitoring platforms in real time, facilitating timely response from management departments. Existing systems use remote sensing maps or aerial maps to identify changes in geographic scenes. However, these systems are complex to deploy and expensive, making them difficult to use for general management departments. Furthermore, these systems primarily use images from very high altitudes, making it difficult to identify changes in scenes over small areas. Summary of the Invention
[0003] One object of the present application is to provide a method and device for determining image difference information.
[0004] According to one aspect of the present application, a method for determining image difference information is provided, the method comprising:
[0005] Acquire a drone image of a target area captured by a drone device and shooting posture information corresponding to the drone device when the drone image is captured;
[0006] determining a template image of the target area from an image database based on the shooting posture information, wherein the template shooting posture information of the template image matches the shooting posture information;
[0007] Performing block processing on the drone image and the template image to determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and performing similarity matching between the plurality of drone sub-images and the plurality of template sub-images to determine a matching image;
[0008] Image difference information of the drone image is determined according to the matching image, wherein the image difference information is used to indicate a degree of image difference between the drone image and the template image.
[0009] According to another aspect of the present application, a device for determining image difference information is provided, wherein the device includes:
[0010] A module for acquiring a drone image of a target area captured by a drone device and shooting posture information corresponding to the drone device when the drone image is captured;
[0011] a first module and a second module, configured to determine a template image of the target area from an image database based on the shooting posture information, wherein the template shooting posture information of the template image matches the shooting posture information;
[0012] Module 13 is configured to perform block processing on the drone image and the template image, determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and perform similarity matching between the plurality of drone sub-images and the plurality of template sub-images to determine a matching image;
[0013] A fourth module is used to determine image difference information of the drone image based on the matching image, wherein the image difference information is used to indicate the degree of image difference between the drone image and the template image.
[0014] According to one aspect of the present application, a computer device is provided, wherein the device includes:
[0015] processor; and
[0016] A memory arranged to store computer executable instructions, which when executed cause the processor to perform the steps of any of the methods described above.
[0017] According to one aspect of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored, characterized in that when the computer program / instruction is executed, the system performs the steps of any of the methods described above.
[0018] According to one aspect of the present application, a computer program product is provided, comprising a computer program / instruction, wherein the computer program / instruction implements the steps of any of the above methods when executed by a processor.
[0019] Compared with the existing technology, this application analyzes drone images taken by drone equipment and compares them with template images in the database to identify areas that have changed in drone images. It does not require deep learning algorithms and corresponding big data pre-learning processes, saving costs and reducing a lot of deployment time. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0021] Figure 1 A flow chart of a method for determining image difference information according to one embodiment of the present application is shown;
[0022] Figure 21 shows the functional modules of a computer device 100 according to another embodiment of the present application;
[0023] Figure 3 An exemplary system is shown that can be used to implement the various embodiments described in this application.
[0024] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0025] The present application is described in further detail below with reference to the accompanying drawings.
[0026] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (eg, a central processing unit (CPU)), an input / output interface, a network interface and a memory.
[0027] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium.
[0028] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0029] The devices referred to in this application include but are not limited to user devices, network devices, or devices formed by integrating user devices and network devices through a network. The user devices include but are not limited to any mobile electronic products that can interact with users, such as smart phones, tablet computers, drone devices, etc. The mobile electronic products can use any operating system, such as Android operating system, iOS operating system, etc. Among them, the network device includes an electronic device that can automatically perform numerical calculations and information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc. The network devices include but are not limited to computers, network hosts, single network servers, multiple network server sets or clouds composed of multiple servers; here, the cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The network includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless self-organizing network (Ad Hoc network), etc. Preferably, the device may also be a program running on the user device, the network device, or a device formed by integrating the user device and the network device, the network device and the touch terminal, or the network device and the touch terminal via a network.
[0030] Of course, those skilled in the art should understand that the above-mentioned devices are only examples, and other existing or future devices that are applicable to this application should also be included in the scope of protection of this application and are included here by reference.
[0031] In the description of the present application, “plurality” means two or more, unless otherwise clearly defined.
[0032] Figure 1A method for determining image difference information according to one aspect of the present application is shown, wherein the method is applied to a computer device and specifically includes steps S101, S102, S103, and S104. In step S101, a drone image of a target area captured by a drone device and shooting pose information corresponding to the drone device when the drone image was captured are obtained; in step S102, a template image of the target area is determined from an image database based on the shooting pose information, wherein the template shooting pose information of the template image matches the shooting pose information; in step S103, the drone image and the template image are divided into blocks to determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and similarity matching is performed based on the plurality of drone sub-images and the plurality of template sub-images to determine a matching image; in step S104, image difference information of the drone image is determined based on the matching image, wherein the image difference information is used to indicate the degree of image difference between the drone image and the template image. Here, the computer device includes a device with a data processing device, specifically including but not limited to a user device, a network device, or a device formed by integrating a user device and a network device via a network. For example, the computer device includes a drone device with a data processing device, or a ground processing device that is in communication with the drone device, or a remote server that is in communication with the drone device. Here, this application uses the computer device including the ground processing device as an example to illustrate the following embodiments. Those skilled in the art should understand that the following embodiments are also applicable to other scenarios.
[0033] Specifically, in step S101, a drone image of a target area captured by a drone device and shooting posture information corresponding to the drone device when the drone image is captured are obtained. For example, the drone device includes a camera device for capturing a drone image of a corresponding area, for example, capturing a drone-perspective image of a city road or building area along a preset route through an automatic cruise function, or manually controlling the drone cruise, etc.; the drone device also includes a posture sensor, etc., for obtaining shooting posture information corresponding to the drone device, the shooting posture information including shooting position information of the drone device (for example, relative altitude, relative latitude and longitude relative to the drone take-off position, etc.; also, for example, the current absolute altitude, absolute latitude and longitude of the drone device, etc.) and shooting posture information of the drone camera device, the shooting posture information including angle information of the drone gimbal, such as yaw / pitch / roll, where yaw is the yaw angle, pitch is the pitch angle, and roll is the roll angle, etc. The drone device obtains corresponding shooting pose information and compares it with preset shooting pose information. If the pose difference between the current shooting pose information and the preset shooting pose information is less than a pose difference threshold, the drone device captures a drone image of the corresponding area through a camera device. Specifically, for example, the drone device can set a cruise route based on the preset shooting pose information and then cruise automatically or manually control the cruise. For example, the drone device first cruises to a preset location and then adjusts the shooting pose information of the current camera device based on the preset pose information so that the camera device can capture a drone image of the corresponding area. For another example, the drone device first adjusts the shooting pose information of the current camera device based on the preset pose information and then cruises to the preset location. The drone device also includes a data transmission device for transmitting the drone image to a computer device or other device, and for receiving shooting instructions, flight instructions, etc. from the computer device or other device. The computer device can receive drone images transmitted by the drone device or received drone images forwarded by the drone device via other devices. The number of drone images can be one or more. The computer device can select an image frame based on the one or more drone images as the current drone image for processing. Among them, the transmission of drone images also includes the shooting posture information of the drone equipment when each drone image is taken. The shooting posture information includes the shooting position information and shooting posture information corresponding to the drone equipment when the drone image is taken.
[0034] In some cases, drone equipment can automatically cruise along a pre-set route, or it can be manually controlled to cruise. The camera device mounted on the drone can shoot the monitoring point or monitoring area at a pre-set shooting position based on pre-set shooting posture information, and transmit the captured drone images to the computer equipment for subsequent visual recognition.
[0035] In step S102, a template image of the target area is determined from an image database based on the shooting pose information, wherein the template shooting pose information of the template image matches the shooting pose information. For example, the corresponding image database is used to store template images of target areas, and each target area includes one or more template images of equal or different numbers. Each template image includes the shooting pose information of the template image at the time of acquisition. For example, when each template image is acquired, the shooting position information and shooting pose information corresponding to the template image are obtained, and a mapping relationship is established between the corresponding shooting position information and the shooting pose information and the template image, and the corresponding shooting position information and shooting pose information are stored in the template image database. Specifically, for the target area, the target area is photographed in advance according to the preset shooting pose information, and the template image corresponding to the target area is determined. That is, the template shooting pose information corresponding to the template image is the same as the preset shooting pose information. In some embodiments, the template image includes corresponding image identification information, such as the image name, the image corresponding target area identification, or a serial number. The shooting pose information of the corresponding template image can be pre-acquired to ensure that the shooting pose information of the template image and the drone image are as consistent as possible, which is used to identify scene anomalies in the same target area. The number of template images for the same target area can be one or more. In some embodiments, the number of template images is greater than or equal to a preset threshold value. For example, for each target area, a template image group is formed in which the number of images collected based on the preset shooting posture information is K. The number of images K is the corresponding template image number threshold, such as K is 5 or 7. The template image group consisting of the K template images corresponding to the target area corresponds to different shooting time information or different weather conditions for the same target area, so as to ensure that the template image group can cover different conditions in the actual scene. The template image referred to here can be one or more template images in the template image group of the area, or all template images in the template image group of the area, etc.
[0036] The image database can be set up on a computer device, and the computer device compares the template shooting pose information of the template image in the image database with the shooting pose information of the drone image to determine a matching template image, etc. Alternatively, the image database can be set up on another device, and the computer device sends the drone image or the shooting pose information of the drone image to the corresponding other device, and receives the template image that matches the shooting pose information returned by the other device based on the shooting pose information of the drone image. Wherein, the matching of the corresponding template shooting pose information and the shooting pose information includes that the position difference between the corresponding template shooting position information and the shooting position information is less than or equal to the position difference threshold, and the angular difference between the template shooting posture information and the shooting posture information is less than or equal to the angular difference threshold, etc. Preferably, the template shooting pose information is the same as the shooting posture information.
[0037] In step S103, the drone image and the template image are divided into blocks to determine a plurality of corresponding drone sub-images and a plurality of template sub-images. Similarity matching is then performed based on the plurality of drone sub-images and the plurality of template sub-images to determine a matching image. For example, different weather conditions or different shooting times may result in different brightness (e.g., different lighting conditions, etc.), which may cause significant differences in pixel values in the global and / or local regions of the drone image and the template image. Specific examples include the same scene under strong sunlight and under cloudy skies, or the shadows of buildings and trees cast in different locations by the sun at 10 a.m. and 2 p.m. If the difference between the two images is simply calculated based on the pixel difference between the two images, the aforementioned different brightness conditions will inevitably result in a large number of image differences, thereby amplifying the differences in the target area itself and obtaining erroneous image difference information. Here, we perform a block processing on the drone image and template image, dividing them into multiple image blocks according to a preset scale. The preset scale can be set to a certain ratio of the drone image's width and height or to an N*N size, for example. When the preset scale is set to N*N, if the width / height of the drone image and template image do not divide N evenly, the redundant portions at the edges of the drone image and template image can be removed or supplemented to determine the corresponding multiple N*N image blocks. The drone image and template image have the same pixel width and height, and are both block-processed according to the same preset scale (e.g., a preset N*N), thereby obtaining multiple block-processed drone sub-images and multiple template sub-images. Due to the same block processing, drone sub-images with corresponding pixel areas in the drone image have template sub-images with the same relative positions in the template image. Similarity matching is performed on these drone sub-images and template sub-images with the same relative positions, and a match is calculated. If so, the sub-images with the same relative positions are determined to be a matching sub-image pair. The similarity matching may be calculated based on pixel difference, channel pixel difference average, or sub-image feature vector.
[0038] The computer device can determine corresponding matching images based on multiple matching sub-image pairs. For example, the original pixel regions of matching sub-image pairs in the drone image are marked as matching regions, and the original pixel regions of the drone sub-image in the drone image that do not match the template sub-image are marked as non-matching regions, thereby obtaining a matching map based on the original drone image. This matching map allows for a simple and intuitive understanding of the relevant scenes of the matching and non-matching regions. Of course, to save computing resources and improve processing efficiency, the computer device determines corresponding matching thumbnails based on the multiple matching sub-image pairs. The matching thumbnail consists of M points / pixels, each of which corresponds to a sub-image, and the relative positions of the corresponding points in the thumbnail are the same as the relative positions of the corresponding sub-images in the drone image. In other words, the point distribution of the matching thumbnail corresponds to the sub-image distribution of the drone image. In the matching thumbnail, the matching points corresponding to the matching sub-image pairs can be assigned a value (e.g., 1), and the matching points corresponding to the non-matching sub-image pairs can be assigned a different value (e.g., 0), thereby obtaining a corresponding matching image.
[0039] In step S104, image difference information of the drone image is determined based on the matching image, where the image difference information indicates the degree of image difference between the drone image and the template image. For example, the computer device may determine the non-matching portion of the matching image based on the corresponding matching image to determine the image difference information of the drone image. The image difference information indicates the degree of image difference between the drone image of the target area and the template image of the target area. Specifically, the determination may be based on, for example, the proportion of the non-matching portion in the drone image or the largest connected area of the non-matching portion in the matching image. In some cases, when there are multiple corresponding template images, the computer device may determine a candidate image difference information based on each template image, and determine the corresponding image difference information of the drone image based on the multiple candidate image difference information. For example, the computer device may determine an average image difference information based on the multiple candidate image difference information and determine the average image difference information as the image difference information of the drone image, or may take the maximum or minimum candidate image difference information as the image difference information of the drone image.
[0040] In some embodiments, in step S104, multiple matching images are determined based on multiple template images, and multiple candidate image difference information of the drone image is determined based on the multiple matching images, wherein the multiple candidate image difference information are respectively used to indicate the degree of image difference between the drone image and each template image; and the smallest candidate image difference information among the multiple candidate image difference information is determined as the image difference information of the drone image. For example, there is usually a corresponding template image group in a target area, and each template image group has multiple template images. The drone image is sequentially similarly matched with each template image in the multiple template images to determine multiple matching images. We only need to determine the template image with the highest similarity to the drone image among the multiple template images, and the image difference information with the drone image. This image difference information is used as the final image difference information of the drone image, which is used to identify the image difference information between the drone image and the template image group of the target area, etc. For example, the computer device can determine multiple matching images based on the aforementioned block matching process according to multiple template images, and determine multiple candidate image difference information based on the multiple matching images, where each candidate image difference information is used to indicate the degree of image difference between a template image and a drone image; the computer device takes the smallest candidate image difference information among the multiple candidate image difference information as the image difference information of the drone image, which is used to determine the image difference information between the drone image and the template image with the highest similarity in the template image group, etc.
[0041] In some embodiments, the method further includes step S105 (not shown), in which the drone image is corrected based on the template image to obtain a corresponding corrected drone image. In step S103, the corrected drone image and the template image are segmented to determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and similarity matching is performed between the plurality of drone sub-images and the plurality of template sub-images to determine a matching image. For example, since each time a drone device cruises to a preset position and a preset posture to capture a drone image, there will be certain errors in its shooting position and shooting posture information, resulting in certain spatial differences in the captured drone image. Therefore, one of the two images to be compared and identified must be corrected to eliminate the spatial differences. To this end, the computer device calculates features, such as SURF, SIFT, or FAST, of the drone image captured by the current drone device and a template image of a template image group corresponding to the preset position and posture (i.e., the template shooting posture). Through feature matching, the perspective transformation matrix of the two images is calculated. The drone image is then perspective transformed based on the template image to obtain a corrected drone image. When there are multiple template images in the template image group corresponding to the preset position and posture, in some embodiments, the features of the drone image and each template image in the multiple template images are calculated in turn, the drone image is corrected respectively, and then a block matching process is performed based on the corrected drone image to determine multiple matching images; in other embodiments, the features of the drone image and a template image selected from the multiple template images (for example, selected according to the shooting time, randomly selected, or the template image with the lowest / highest average pixel difference, etc.) are calculated, and the drone image is corrected, and then a block matching process is performed based on the corrected drone image to determine multiple matching images, etc.
[0042] In some embodiments, in step S103, the drone image and the template image are segmented using a preset scale to determine a plurality of corresponding drone sub-images and a plurality of template sub-images; corresponding sub-image pairs are determined based on the plurality of drone sub-images and the plurality of template sub-images, wherein the sub-image pairs include a drone sub-image and a template sub-image corresponding to the pixel position of the drone sub-image; similarity matching is performed on each sub-image pair, and the matching image is determined based on the matched sub-image pairs. For example, the preset scale includes, but is not limited to, setting it to a certain ratio of the width and height of the drone image or the template image, or setting it to an N*N size, where N can be, but is not limited to, 16, 32, 64, or 96. Based on the number of pixels in the width and height of the drone image and the resource consumption of the comprehensive calculation process, the computer device can flexibly set the corresponding preset scale, thereby saving computing resources while ensuring the accuracy and effectiveness of the calculation results. If N is 32 and the drone image size is 1920*1080, the drone image is divided into (1920 / 32)*(1080 / 32)=60*33 blocks (if the number is not divisible, the left and right and / or top and bottom edges of the image are ignored or supplemented. For example, here we ignore the top 12 rows and the bottom 12 rows of the image). In some embodiments, the preset scale is determined based on the proportion of the preset units in the drone sub-image. For example, in order to ensure the calculation accuracy of different image sizes in the drone image, we determine the corresponding preset scale based on the size of the preset units in the target area. For example, the corresponding preset scale is determined based on the proportion of the preset units in the drone image in the current application scenario. Specifically, the preset units include but are not limited to units with mobility in each target area that can bring scene changes to the target area, such as pedestrians and cars. For example, it is determined that the proportion of a single pedestrian in the drone sub-image should be less than 1 / 4, and the corresponding preset scale is determined based on the proportion of the single pedestrian in the drone sub-image.
[0043] After the computer device performs block processing on the drone image and the template image, it can determine multiple drone sub-images and corresponding multiple template sub-images, where the multiple drone sub-images include corresponding drone sub-image distribution information (for example, the pixel position of each drone sub-image in the original drone image, identified by an expression of the pixel outline of the drone sub-image or the pixel coordinates of the image center of the drone sub-image, etc.), and the corresponding multiple template sub-images include corresponding template sub-image distribution information (for example, the pixel position of each template sub-image in the original template image, identified by an expression of the pixel outline of the template sub-image or the pixel coordinates of the image center of the template sub-image, etc.). Based on the sub-image distribution information of the two images, multiple sub-image pairs can be formed. For example, after the drone image and template image are determined as 66*33 sub-images as described above, 66*33 sub-image pairs can be formed based on the corresponding sub-image distribution information, where the pixel positions of the two sub-images in each sub-image pair (the pixel position of the drone sub-image in the drone image and the pixel position of the template sub-image in the template image) are the same.
[0044] After the computer device determines the corresponding multiple sub-image pairs, it can perform similarity matching on each sub-image pair. If the similarity of a sub-image pair meets the corresponding similarity threshold, the sub-image pair is determined to be a matching sub-image pair, and the corresponding matching image is determined based on the matching sub-image pair.
[0045] In some embodiments, performing similarity matching on each sub-image pair and determining the matching image based on the matching sub-image pairs includes: calculating the average pixel difference between the two sub-images in each sub-image pair to determine the three average pixel differences corresponding to the three channels of the two sub-images in each sub-image pair; if the maximum average pixel difference among the three average pixel differences of a sub-image pair is less than or equal to a preset pixel difference threshold, then the sub-image pair is determined to be a matching sub-image pair, and the matching image is determined based on the matching sub-image pair. For example, for a sub-image pair at the same location in a drone image and a template image, we calculate the average pixel difference D between the two sub-images in each RGB channel. The specific calculation process is as follows:
[0046]
[0047] Where a(i, j) and b(i, j) are the pixel values at position (i, j) of template sub-image a and drone sub-image b, respectively, and N is the width and height of the sub-image. For the three RGB channels, there are three D values for the two sub-images in a sub-image pair. The computer device takes the maximum average pixel difference as the final average pixel difference and determines whether the two sub-images in the sub-image pair are similar based on this average pixel difference. For example, after the computer device determines that the three channels correspond to three D values, if the maximum D value is less than a preset pixel difference threshold (such as 4), the two sub-images are considered unchanged and the sub-image pair is determined to be a matching sub-image pair. Subsequent matching image calculations are performed based on the matching sub-image pair. Otherwise, it indicates that there is a significant difference in pixel values between the two sub-images, and the two sub-images in the sub-image pair are determined to be significantly different.
[0048] In some embodiments, performing similarity matching on each sub-image pair and determining the matching image based on the matching sub-image pairs further includes: if the largest pixel difference average among the three pixel difference averages of a sub-image pair is greater than a preset pixel difference threshold, determining a drone feature vector for the drone sub-image in the sub-image pair and a template feature vector for the corresponding template sub-image; if the distance between the drone feature vector and the template feature vector is less than or equal to a preset distance threshold, determining the sub-image pair as a matching sub-image pair, and determining the matching image based on the matching sub-image pair. For example, if a computer device determines based on the pixel difference average that there is a large difference in pixel values between two sub-images, this may be a real image change or may be caused by lighting or shadows, and further processing is required, such as calculating feature vectors for the drone sub-image and the template sub-image, where the feature vectors may be HOG features, gray-level co-occurrence matrices, Gabor texture features, LBP texture features, etc., and the feature vectors herein are merely examples and are not intended to be limiting. In some embodiments, before calculating the feature vectors of the drone sub-images, histogram matching can be performed on sub-image b captured by the current drone, using sub-image a of the template image as a reference, to obtain sub-image c. This can eliminate the effects of brightness inconsistencies caused by lighting and shadows. Feature vectors are then calculated for each of sub-images a and c. The following example uses HOG features as the feature vector. The specific process is as follows:
[0049] 1) Grayscale sub-images a and c;
[0050] 2) Gamma correction is used to normalize the color space of the two sub-images in the sub-image pair. The purpose is to adjust the contrast of the image, reduce the impact of local shadows and lighting changes in the image, and suppress noise interference.
[0051] 3) Calculate the gradient (including magnitude and direction) of each pixel in the image, mainly to capture contour information while further weakening the interference of lighting;
[0052] 4) Divide the image block into 4*4 cells. For example, for a 32*32 image block, the size of each cell is 8*8. The cell size can also be other values, which are empirical values here.
[0053] 5) Compute the gradient histogram of each cell to obtain its feature vector. The bin values of the histogram are divided into 18 or 9 directional bins (i.e., 360 degrees is divided into 18 or 9 bins). For example, 18 bins are divided into 20° bins, meaning that the pixels can be divided into 18 groups based on angle. The gradient values corresponding to all pixels in each bin are summed to obtain 18 values. The histogram is an array of these 18 values, corresponding to angles 0, 20, 40, 60, ..., 340.
[0054] 6) Concatenate the feature vectors of all cells in a sub-image and normalize them to obtain the HOG feature vector of the sub-image. For example, for a 32x32 image block with 4x4 cells and a histogram bin size of 18, the length of the HOG feature vector for this sub-image is 288.
[0055] After the computer device obtains the HOG feature vectors of sub-image a and sub-image c, it calculates the Euclidean distance between the two feature vectors. If the Euclidean distance is less than a preset distance threshold (such as 0.1), the sub-image pair is determined to be a matching sub-image pair, and subsequent matching image calculations are performed based on the matching sub-image pair.
[0056] In some embodiments, the method further includes step S106 (not shown), in which a corresponding matching thumbnail is determined based on the regional position of each sub-image pair in the drone image, wherein each sub-image pair has a corresponding matching pixel in the matching thumbnail, and the pixel position of the matching pixel in the matching thumbnail corresponds to the position of the corresponding sub-image pair in the drone image; wherein determining the matching image based on the matching sub-image pair includes: assigning values to the matching pixels corresponding to the matching thumbnail based on the matching sub-image pair to determine the corresponding matching image, wherein the assigned values of the matching pixels of the matching sub-image pair are different from the assigned values of the matching pixels of the unmatched sub-image pair. For example, a computer device can first generate a matching thumbnail based on the sub-image distribution information of a drone image. In this matching thumbnail, each matching pixel corresponds to a drone sub-image, and the relative position of each matching pixel in the thumbnail is the same as the relative position of the corresponding drone sub-image in the drone image. In other words, the number of matching pixels is the same as the number of drone sub-images, and the distribution of each matching pixel in the thumbnail is the same as the distribution of the corresponding drone sub-image in the drone image. Based on the aforementioned steps, the computer device can determine multiple matching sub-image pairs. The matching pixels corresponding to the matching sub-image pairs are assigned a value, and the matching pixels corresponding to the remaining unmatched sub-image pairs are assigned another value, such as assigning the matching pixels corresponding to the matching sub-image pairs to 1 and the remaining matching pixels to 0, thereby obtaining a matching image composed of 0s and 1s. In some embodiments, the area corresponding to the matching pixels corresponding to the matching sub-image pairs in the matching image is marked as a matching area, and the area corresponding to the matching pixels corresponding to the unmatched sub-image pairs in the matching image is marked as an unmatched area.
[0057] In some embodiments, in step S104, one or more corresponding difference regions are determined based on the matching image, wherein each difference region includes a connected region in the matching image other than the matching region; and image difference information of the drone image is determined based on the one or more difference regions, wherein the image difference information is used to indicate a degree of image difference between the drone image and the template image. For example, after the computer device determines the corresponding matching image, in some embodiments, if the matching image is a matching image based on the original image of the drone image, the non-matching areas in the matching image (i.e., the original pixel areas where the drone sub-image in the drone image does not match the template sub-image) can be connected to obtain corresponding connected areas. In other embodiments, if the matching image is a matching image determined based on the matching thumbnail, the non-matching areas in the matching image (i.e., the areas corresponding to the corresponding matching pixels of the non-matching sub-images in the matching image) can also be connected to obtain corresponding connected areas. Specifically, the computer device determines the connected areas assigned a value of 0 and calculates the size of each connected area, and determines the connected areas as difference areas. After the computer device determines one or more difference areas, it can determine the corresponding image difference information based on the size of the one or more difference areas. When there are multiple difference areas, the corresponding difference score can be output, such as taking the average value or taking the largest difference area. In some embodiments, determining the image difference information of the drone image based on the one or more difference regions includes determining the region with the largest pixel difference among the one or more difference regions as a target difference region, and determining the image difference information of the drone image based on the target difference region, wherein the image difference information indicates the degree of image difference between the drone image and the template image. For example, when there are multiple difference regions in the matching image, the computer device uses the size of the largest difference region as the difference score between the drone image and the template image, and uses this difference score as the image difference information of the drone image. In some embodiments, when the target region corresponds to multiple template images, a corresponding matching image is determined for each template image. For each matching image, the computer device uses the size of the largest difference region in the matching image as a candidate difference score between the drone image and the template image, uses this candidate difference score as candidate image difference information for the drone image, and then determines the smallest candidate image difference information among the multiple candidate image difference information as the image difference information of the drone image. In some cases, the computer device may output and present a corresponding matching graph, which allows a user to identify which regions in the drone image have undergone significant changes.
[0058] In some embodiments, the method further includes step S107 (not shown). In step S107, if the image difference information is less than or equal to a preset image difference threshold, the template image is updated based on the drone image. For example, after the computer device determines the image difference information corresponding to the drone image, based on the image difference information, the computer device may determine the degree of difference between the drone image and the template image. If the degree of difference is large, the computer device may output a corresponding warning message. If the degree of difference is small, the computer device may further update the template image based on the drone image, such as by adding the drone image to the template image set or replacing one of the template images. For example, the target area of the same scene may gradually change over time, such as grass slowly turning from green to yellow, leaves turning from green to yellow and then falling, asphalt on the ground slowly turning from black to gray, etc. If the image template set is not updated, false alarms will inevitably occur. If the computer device determines that the corresponding image difference information is less than or equal to a preset image difference threshold (e.g., set to 2), the computer device updates the corresponding template image based on the drone image. In some embodiments, the method further includes step S108 (not shown). In step S108, if the image difference information is greater than the preset image difference threshold, a difference warning prompt message regarding the target area is output. For example, if the image difference information is greater than the corresponding preset image difference threshold, a corresponding difference warning prompt message is output, wherein the difference warning prompt message is used to indicate that the image difference between the drone image and the target area is large. Specific prompt information includes, but is not limited to, warning information presented in the form of text, voice, video, or vibration. In some embodiments, the difference warning prompt message also includes the corresponding unmatched drone image area to further indicate the area where the difference is located.
[0059] In some embodiments, updating the template image based on the drone image information includes: if the number of images in the template image is less than a preset number threshold, adding the drone image to the template image group to update the template image. For example, if the image difference information is less than or equal to the image difference threshold information, the computer device does not output a warning, indicating that the scene of the currently captured drone image has not changed, and the drone image is used to update the template image group. For example, if the number of template images in the template image group corresponding to the current target area is less than a preset number threshold (such as a preset K=5, etc.), the current drone image is directly added to the image template group. If the number of template images in the template image group corresponding to the current target area is greater than or equal to the preset number threshold, we can replace one of the template images based on the drone image to update the image template group. For example, in some embodiments, updating the template image according to the drone image information further includes: if the number of images in the template image is greater than or equal to a preset number threshold, determining the drone image and the template image as candidate template images; determining multiple image pairs based on the two images in the candidate template image, and calculating the image similarity of the two images in the multiple image pairs; taking the image pair corresponding to the largest image similarity among the multiple image pairs as the target image pair, and updating the template image based on the target image pair. For example, if the computer device determines that the number of template images in the template image group corresponding to the current target area is greater than or equal to the preset number threshold, the computer device determines a candidate template image group of K+1 using the drone image and the template images in the template image group, and then forming image pairs based on the two images in the candidate template image group, and calculating the corresponding image similarity (for example, the Euclidean distance of the images, etc.), and determining the group of image pairs with the largest similarity as the target image pair. The specific similarity calculation method can be based on the aforementioned block matching process to calculate the Euclidean distance of the feature vectors (such as HOG features) of the sub-image pairs corresponding to the two images, and calculate according to the following formula:
[0060]
[0061] Where S is the similarity between the two images, M is the number of sub-images, and Pi is the Euclidean distance of the i-th sub-image pair. After the computer device determines the corresponding target image pair, it deletes one of the two images in the target image pair to determine a set of K updated template images. For example, if the target image pair includes a drone image, the other image in the target image pair is deleted. If the target image pair does not include a drone image, one of the images may be deleted randomly or based on certain conditions, retaining the other images to update the image template set. In some embodiments, the drone image and the template images in the template image set include corresponding shooting time information. Updating the template image based on the target image pair includes: based on the shooting time information of the two images in the target image pair, determining the image with the shooting time information farther from the current time as the target image, and removing the target image from the candidate template images to determine the updated template image. For example, if the drone image acquisition also includes the corresponding shooting time information, based on the shooting time information, the most recent image in the target image pair may be retained, while the image with the farther shooting time may be deleted. Specifically, the computer device selects the target image pair with the greatest similarity (most similarity), and based on the two images in the target image pair, deletes the one with the longer shooting time, so that the remaining images can better cover the characteristics of the same scene in different external environments, and determine the updated template image, etc.
[0062] The above mainly introduces the various embodiments of the method for determining image difference information of the present application. In addition, the present application also provides a specific device that can implement the above embodiments. Figure 2 Make an introduction.
[0063] Figure 2 A computer device 100 for determining image difference information according to one aspect of the present application is shown, specifically comprising a first module 101, a second module 102, a third module 103, and a fourth module 104. The first module 101 is configured to obtain a drone image of a target area captured by a drone device and the shooting pose information corresponding to the drone device when the drone image was captured; the first module 102 is configured to determine a template image of the target area from an image database based on the shooting pose information, wherein the template shooting pose information of the template image matches the shooting pose information; the third module 103 is configured to perform block processing on the drone image and the template image, determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and determine a matching image based on similarity matching between the plurality of drone sub-images and the plurality of template sub-images; and the fourth module 104 is configured to determine image difference information of the drone image based on the matching image, wherein the image difference information is used to indicate the degree of image difference between the drone image and the template image.
[0064] In some embodiments, the number of images of the template image is greater than or equal to a preset number threshold.
[0065] In some embodiments, module 104 is configured to determine multiple matching images based on multiple template images, and determine multiple candidate image difference information of the drone image based on the multiple matching images, wherein the multiple candidate image difference information are respectively used to indicate the degree of image difference between the drone image and each template image; and the smallest candidate image difference information among the multiple candidate image difference information is determined as the image difference information of the drone image.
[0066] Here, the Figure 2 The specific embodiments of the modules 101, 102, 103 and 104 shown are the same as those described above. Figure 2 The illustrated embodiments of step S101 , step S102 , step S103 and step S104 are the same or similar, and thus are not described in detail and are incorporated herein by reference.
[0067] In some embodiments, the device further includes a module 15 (not shown) for performing image correction on the drone image based on the template image to obtain a corresponding corrected drone image; wherein the module 13 103 is used to perform block processing on the corrected drone image and the template image, determine a corresponding plurality of drone sub-images and a plurality of template sub-images, and determine a matching image based on similarity matching between the plurality of drone sub-images and the plurality of template sub-images.
[0068] In some embodiments, module 103 is configured to perform block processing on the drone image and the template image using a preset scale to determine a plurality of corresponding drone sub-images and a plurality of corresponding template sub-images; determine corresponding sub-image pairs based on the plurality of drone sub-images and the plurality of template sub-images, wherein the sub-image pairs include a drone sub-image and a template sub-image corresponding to the pixel position of the drone sub-image; perform similarity matching on each sub-image pair, and determine the matching image based on the matched sub-image pairs. In some embodiments, the preset scale is determined based on the proportion of a preset unit in the drone image to the drone sub-image.
[0069] In some embodiments, the similarity matching is performed on each sub-image pair, and the matching image is determined based on the matching sub-image pair, including: calculating the average pixel difference between the two sub-images in each sub-image pair, and determining the three average pixel differences corresponding to the three channels of the two sub-images in each sub-image pair; if the maximum average pixel difference among the three average pixel differences of a sub-image pair is less than or equal to a preset pixel difference threshold, then the sub-image pair is determined to be a matching sub-image pair, and the matching image is determined based on the matching sub-image pair.
[0070] For example, in some embodiments, the similarity matching is performed on each sub-image pair, and the matching image is determined based on the matching sub-image pair, and further includes: if the maximum pixel difference average value among the three pixel difference average values of a sub-image pair is greater than a preset pixel difference threshold, then determining the drone feature vector of the drone sub-image in the sub-image pair and the template feature vector of the corresponding template sub-image; if the distance between the drone feature vector and the template feature vector is less than or equal to a preset distance threshold, then determining the sub-image pair as a matching sub-image pair, and determining the matching image based on the matching sub-image pair.
[0071] In some embodiments, the device further includes a module (not shown) for determining a corresponding matching thumbnail based on the regional position of each sub-image pair in the drone image, wherein each sub-image pair has a corresponding matching pixel in the matching thumbnail, and the pixel position of the matching pixel in the matching thumbnail corresponds to the position of the corresponding sub-image pair in the drone image; wherein determining the matching image based on the matching sub-image pair includes: assigning values to the matching pixels corresponding to the matching thumbnail based on the matching sub-image pair to determine the corresponding matching image, wherein the assigned values of the matching pixels of the matching sub-image pair are different from the assigned values of the matching pixels of the unmatched sub-image pair.
[0072] In some embodiments, a module 104 is configured to determine one or more corresponding difference regions based on the matching image, wherein each difference region includes a connected region in the matching image other than the matching region; and determine image difference information of the drone image based on the one or more difference regions, wherein the image difference information is used to indicate a degree of image difference between the drone image and the template image.
[0073] In some embodiments, the device further includes a module (not shown) configured to update the template image based on the drone image if the image difference information is less than or equal to a preset image difference threshold. In some embodiments, the device further includes a module (not shown) configured to output a difference warning prompt message regarding the target area if the image difference information is greater than the preset image difference threshold. In some embodiments, updating the template image based on the drone image information includes: if the number of images in the template image is less than a preset number threshold, adding the drone image to the template image group to update the template image. In some embodiments, updating the template image based on the drone image information further includes: if the number of images in the template image is greater than or equal to a preset number threshold, determining the drone image and the template image as candidate template images; determining multiple image pairs based on each pair of images in the candidate template images, and calculating the image similarity between two images in the multiple image pairs; selecting the image pair corresponding to the largest image similarity among the multiple image pairs as the target image pair, and updating the template image based on the target image pair.
[0074] In some embodiments, the drone image and the template image in the template image group include corresponding shooting time information; wherein, updating the template image based on the target image pair includes: according to the shooting time information of the two images in the target image pair, determining the image whose shooting time information is farther away from the current time as the target image, removing the target image from the candidate template image to determine the updated template image.
[0075] Here, the specific implementations corresponding to the modules 15 to 18 are the same as or similar to the embodiments of the aforementioned steps S105 to S108, and thus are not described in detail and are included herein by reference.
[0076] In addition to the methods and devices described in the above embodiments, the present application also provides a computer-readable storage medium, which stores computer code. When the computer code is executed, the method described in any of the above items is executed.
[0077] The present application also provides a computer program product. When the computer program product is executed by a computer device, the method described in any one of the preceding items is executed.
[0078] The present application also provides a computer device, comprising:
[0079] one or more processors;
[0080] a memory for storing one or more computer programs;
[0081] When the one or more computer programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any one of the preceding items.
[0082] Figure 3 shows an exemplary system that can be used to implement the various embodiments described in this application;
[0083] like Figure 3 In some embodiments, the system 300 can function as any of the aforementioned devices in the various embodiments described. In some embodiments, the system 300 may include one or more computer-readable media (e.g., system memory or NVM / storage device 320) having instructions and one or more processors (e.g., processor(s) 305) coupled to the one or more computer-readable media and configured to execute the instructions to implement the modules and thereby perform the actions described herein.
[0084] For one embodiment, system control module 310 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 305 and / or any suitable device or component in communication with system control module 310 .
[0085] The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315. The memory controller module 330 may be a hardware module, a software module, and / or a firmware module.
[0086] System memory 315 can be used, for example, to load and store data and / or instructions for system 300. For one embodiment, system memory 315 can include any suitable volatile memory, such as a suitable DRAM. In some embodiments, system memory 315 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0087] For one embodiment, system control module 310 may include one or more input / output (I / O) controllers to provide interfaces to NVM / storage device 320 and communication interface(s) 325 .
[0088] For example, NVM / storage 320 may be used to store data and / or instructions. NVM / storage 320 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0089] NVM / storage device 320 may include storage resources that are physically part of the device on which system 300 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 320 may be accessed over a network via communication interface(s) 325.
[0090] Communication interface(s) 325 may provide an interface for system 300 to communicate over one or more networks and / or with any other suitable devices. System 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0091] For one embodiment, at least one of the processor(s) 305 may be packaged together with the logic of one or more controllers of the system control module 310 (e.g., the memory controller module 330). For one embodiment, at least one of the processor(s) 305 may be packaged together with the logic of one or more controllers of the system control module 310 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310. For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310 to form a system-on-chip (SoC).
[0092] In various embodiments, system 300 may be, but is not limited to, a server, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, system 300 may have more or fewer components and / or a different architecture. For example, in some embodiments, system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0093] It should be noted that the application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the application can be executed by a processor to realize the steps or functions described above. Similarly, the software program of the application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0094] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0095] Communication media include media by which communication signals containing, for example, computer-readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media may include guided transmission media such as cables and wires (e.g., fiber optic, coaxial, etc.) and wireless (unguided transmission) media capable of propagating energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared. Computer-readable instructions, data structures, program modules, or other data may be embodied as, for example, a modulated data signal in a wireless medium such as a carrier wave or similar mechanism such as that embodied as part of spread spectrum technology. The term "modulated data signal" refers to a signal that has one or more of its characteristics changed or set in such a manner as to encode information in the signal. Modulation may be analog, digital, or a hybrid modulation technique.
[0096] By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memory, such as random access memory (RAM, DRAM, SRAM); and non-volatile memory, such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or later developed that can store computer-readable information / data for use by a computer system.
[0097] Here, according to one embodiment of the present application, a device is included, which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions based on the aforementioned multiple embodiments of the present application.
[0098] It is obvious to those skilled in the art that the present application is not limited to the details of the above-mentioned exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.
Claims
1. A method for determining image difference information, wherein: The method includes: Acquire a drone image of a target area captured by a drone device and shooting posture information corresponding to the drone device when the drone image is captured; determining a template image of the target area from an image database based on the shooting posture information, wherein the template shooting posture information of the template image matches the shooting posture information; The drone image and the template image are divided into blocks according to a preset scale to determine a plurality of corresponding drone sub-images and a plurality of template sub-images; corresponding sub-image pairs are determined based on the plurality of drone sub-images and the plurality of template sub-images, wherein the sub-image pair includes a drone sub-image and a template sub-image corresponding to a pixel position of the drone sub-image; pixel difference averages are calculated for the two sub-images in each sub-image pair to determine three pixel difference averages corresponding to three channels of the two sub-images in each sub-image pair; if the maximum pixel difference average among the three pixel difference averages of a certain sub-image pair is less than or equal to a preset pixel difference threshold, the sub-image pair is determined to be a matching sub-image pair, and a matching image is determined based on the matching sub-image pair; if the maximum pixel difference average among the three pixel difference averages of a certain sub-image pair is greater than the preset pixel difference threshold, a drone feature vector of the drone sub-image in the sub-image pair and a template feature vector of the corresponding template sub-image are determined; if the distance between the drone feature vector and the template feature vector is less than or equal to the preset distance threshold, the sub-image pair is determined to be a matching sub-image pair, and a matching image is determined based on the matching sub-image pair; Image difference information of the drone image is determined according to the matching image, wherein the image difference information is used to indicate a degree of image difference between the drone image and the template image.
2. The method according to claim 1, wherein The number of images of the template image is greater than or equal to a preset number threshold.
3. The method according to claim 2, wherein: The determining the image difference information of the drone image according to the matching image includes: Determining a plurality of matching images according to the plurality of template images, and determining a plurality of candidate image difference information of the drone image based on the plurality of matching images, wherein the plurality of candidate image difference information are respectively used to indicate a degree of image difference between the drone image and each template image; The smallest candidate image difference information among the multiple candidate image difference information is determined as the image difference information of the drone image.
4. The method according to claim 1, wherein The method further comprises: Performing image correction on the drone image based on the template image to obtain a corresponding corrected drone image; The step of dividing the drone image and the template image into blocks to determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and performing similarity matching between the plurality of drone sub-images and the plurality of template sub-images to determine a matching image includes: The corrected drone image and the template image are divided into blocks to determine a corresponding plurality of drone sub-images and a plurality of template sub-images, and a matching image is determined based on similarity matching between the plurality of drone sub-images and the plurality of template sub-images.
5. The method according to claim 1, wherein The preset scale is determined based on a proportion of a preset unit in the drone image in the drone sub-image.
6. The method according to claim 1, wherein The method further comprises: Determine a corresponding matching thumbnail based on the regional position of each sub-image pair in the drone image, wherein each sub-image pair has a corresponding matching pixel in the matching thumbnail, and the pixel position of the matching pixel in the matching thumbnail corresponds to the position of the corresponding sub-image pair in the drone image; The determining of the matching image based on the matched sub-image pair includes: According to the matched sub-image pair, matching pixels corresponding to the matching thumbnail are assigned values to determine the corresponding matching image, wherein the assigned values of the matching pixels of the matched sub-image pair are different from the assigned values of the matching pixels of the unmatched sub-image pair.
7. The method according to claim 1, wherein The determining the image difference information of the drone image according to the matching image includes: determining one or more corresponding difference regions according to the matching image, wherein each difference region includes a connected region in the matching image other than the matching region; Image difference information of the drone image is determined according to the one or more difference regions, wherein the image difference information is used to indicate a degree of image difference between the drone image and the template image.
8. The method according to claim 7, wherein: The determining the image difference information of the drone image according to the one or more difference areas includes: A difference area with the largest pixel area among the one or more difference areas is determined as a target difference area, and image difference information of the drone image is determined based on the target difference area, wherein the image difference information is used to indicate the degree of image difference between the drone image and the template image.
9. The method according to claim 8, wherein The method further comprises: If the image difference information is less than or equal to a preset image difference threshold, the template image is updated according to the drone image.
10. The method according to claim 9, wherein: The updating of the template image according to the drone image information includes: If the number of images of the template image is less than a preset number threshold, the drone image is added to the template image group to update the template image.
11. The method according to claim 10, wherein: The updating of the template image according to the drone image information further includes: If the number of images of the template image is greater than or equal to a preset number threshold, determining the drone image and the template image as candidate template images; Determining a plurality of image pairs based on each of the candidate template images, and calculating image similarities between two images in the plurality of image pairs; An image pair corresponding to the greatest image similarity among the plurality of image pairs is taken as a target image pair, and the template image is updated based on the target image pair.
12. The method according to claim 11, wherein The drone image and the template image in the template image group include corresponding shooting time information; wherein updating the template image based on the target image pair includes: According to the shooting time information of the two images in the target image pair, the image whose shooting time information is farther from the current time is determined as the target image, and the target image is removed from the candidate template images to determine the updated template image.
13. The method according to claim 9, wherein: The method further comprises: If the image difference information is greater than the preset image difference threshold, difference warning prompt information about the target area is output.
14. A device for determining image difference information, wherein: The device includes: A module for acquiring a drone image of a target area captured by a drone device and shooting posture information corresponding to the drone device when the drone image is captured; a first module and a second module, configured to determine a template image of the target area from an image database based on the shooting posture information, wherein the template shooting posture information of the template image matches the shooting posture information; Module 13 is configured to perform block processing on the drone image and the template image using a preset scale, determine a plurality of corresponding drone sub-images and a plurality of template sub-images, and determine corresponding sub-image pairs based on the plurality of drone sub-images and the plurality of template sub-images, wherein the sub-image pair includes a drone sub-image and a template sub-image corresponding to a pixel position of the drone sub-image; perform pixel difference average calculation on the two sub-images in each sub-image pair, and determine three pixel difference averages corresponding to three channels of the two sub-images in each sub-image pair; if the maximum pixel difference average among the three pixel difference averages of a sub-image pair is less than or equal to a preset pixel difference threshold, determine the sub-image pair as a matching sub-image pair, and determine a matching image based on the matching sub-image pair; if the maximum pixel difference average among the three pixel difference averages of a sub-image pair is greater than the preset pixel difference threshold, determine a drone feature vector of the drone sub-image in the sub-image pair and a template feature vector of the corresponding template sub-image; if the distance between the drone feature vector and the template feature vector is less than or equal to the preset distance threshold, determine the sub-image pair as a matching sub-image pair, and determine a matching image based on the matching sub-image pair; A fourth module is used to determine image difference information of the drone image based on the matching image, wherein the image difference information is used to indicate the degree of image difference between the drone image and the template image.
15. A computer device, wherein: The device includes: processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the steps of the method as claimed in any one of claims 1 to 13.
16. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: The computer program / instructions, when executed, cause the system to perform the steps of the method as claimed in any one of claims 1 to 13.
17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Billiard repositioning method based on image matching technology
CN101537251A
Video image processing method, device and system
CN107018352A
Unmanned aerial vehicle aerial image difference analysis method based on image similarity
CN110458845A
Illegal building identification method and system based on aerial image
CN113822247A