Image change detection method, device, storage medium and unmanned aerial vehicle system
By using the ORB algorithm and quadtree feature point selection, the problem of feature point aggregation in the SIFT algorithm is solved, improving the accuracy and robustness of image change detection, and making it suitable for low computing resource environments of UAV platforms.
Patent Information
- Application Number
- CN202211032664.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-08-26
AI Technical Summary
When using the SIFT algorithm for image feature point matching in existing technologies, feature point clustering is prone to occur, leading to incorrect image comparison results.
The ORB algorithm is used to extract initial feature points, and the quadtree method is used for region division and feature point screening. Combined with Hamming distance matching and histogram filtering, feature point clustering is reduced and matching accuracy is improved.
It effectively reduces feature point aggregation, improves the accuracy and robustness of image change detection, adapts to displacement, rotation and scaling between images, and meets the low computing resource configuration of UAV platforms.
Smart Images

Figure CN115601665B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an image change detection method and device, a storage medium and a UAV system. BACKGROUND
[0002] With the rapid development of image processing and flight control technology, UAVs are widely used in power inspection, border patrol, environmental monitoring, road inspection, water conservancy monitoring, port management, accident investigation, fire command, rescue and disaster relief and other fields. UAVs have many advantages in dealing with daily operations and emergency tasks: rapid and efficient deployment capabilities and flexible spatial solutions. In addition, using UAVs to replace human work is more secure.
[0003] As an important application of UAVs in the energy and security fields, intelligent inspection mainly realizes the function of collecting images according to pre-set GPS coordinates and gimbal attitude information when the UAV performs periodic inspection tasks, and calibrating and comparing the collected images with the corresponding template images to output the areas with obvious differences between the two images.
[0004] Currently, when performing image change detection, the feature points obtained by directly extracting feature points using the SIFT algorithm are matched. However, the feature points extracted using this method may be clustered, resulting in errors in the image comparison result. SUMMARY
[0005] The present application provides at least an image change detection method, device, storage medium and UAV system.
[0006] The present application provides an image change detection method, comprising: detecting a to-be-detected image and a template image respectively to obtain a plurality of first initial feature points of the to-be-detected image and a plurality of second initial feature points of the template image; screening the first initial feature points based on their positions in the to-be-detected image to obtain a plurality of first target feature points, and screening the second initial feature points based on their positions in the template image to obtain a plurality of second target feature points; matching the first target feature points and the second target feature points to obtain a feature point matching result; and determining a change detection result between the to-be-detected image and the template image based on the feature point matching result.
[0007] The application provides an image change detection device, comprising: a detection module, configured to detect a to-be-detected image and a template image respectively to obtain a plurality of first initial feature points of the to-be-detected image and a plurality of second initial feature points of the template image; a screening module, configured to screen each first initial feature point based on a position of the first initial feature point in the to-be-detected image to obtain a plurality of first target feature points, and screen each second initial feature point based on a position of the second initial feature point in the template image to obtain a plurality of second target feature points; a matching module, configured to match each first target feature point with each second target feature point to obtain a feature point matching result; and a determination module, configured to determine a change detection result between the to-be-detected image and the template image based on the feature point matching result.
[0008] The application provides an electronic device, comprising a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the image change detection method.
[0009] The application provides a computer-readable storage medium, wherein program instructions are stored in the computer-readable storage medium, and the program instructions are executed by a processor to implement the image change detection method.
[0010] The application provides an unmanned aerial vehicle system, comprising the electronic device or the computer-readable storage medium.
[0011] The above scheme can reduce the feature point aggregation and improve the accuracy of the feature point matching result by screening the feature points based on the positions of the initial feature points after the initial feature points in the two images are obtained, so that the change detection result between the two images obtained is more accurate.
[0012] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, rather than limiting the application. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings are incorporated into the specification and form a part of the specification, which illustrate embodiments consistent with the application, and together with the specification, serve to explain the technical solutions of the application.
[0014] Figure 1 is a flowchart of an embodiment of the image change detection method of the application;
[0015] Figure 2 is another flowchart of an embodiment of the image change detection method of the application;
[0016] Figure 3 is a sub-flowchart of step S14 of an embodiment of the image change detection method of the application;
[0017] Figure 4 is a change detection result of the template image side shown by an embodiment of the image change detection method of the present application;
[0018] Figure 5 is a change detection result of the to-be-detected image side shown by an embodiment of the image change detection method of the present application;
[0019] Figure 6 is a structural schematic diagram of an embodiment of the image change detection apparatus of the present application;
[0020] Figure 7 is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0021] Figure 8 is a structural schematic diagram of an embodiment of the computer readable storage medium of the present application;
[0022] Figure 9 is a structural schematic diagram of an embodiment of the unmanned aerial vehicle system of the present application. DETAILED DESCRIPTION
[0023] The scheme of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0024] In the following description, specific details such as specific system structures, interfaces, techniques, etc. are presented in order to thoroughly understand the present application, but are not intended to limit the present application.
[0025] The term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents that the front and rear associated objects are in an "or" relationship. In addition, "multiple" herein means two or more than two. In addition, the term "at least one" herein means any one of multiple or any combination of at least two of multiple, for example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0026] Please refer to Figure 1 , Figure 1 is a flow schematic diagram of an embodiment of the image change detection method of the present application. Specifically, the image change detection method provided by the embodiment of the present disclosure can include the following steps:
[0027] Step S11: detecting the to-be-detected image and the template image respectively to obtain a plurality of first initial feature points about the to-be-detected image and a plurality of second initial feature points about the template image.
[0028] The detection of the to-be-detected image and the template image can be performed using a feature extraction algorithm or a feature extraction model. Exemplarily, the feature extraction algorithm can be an ORB (Oriented FAST and Rotated BRIEF) algorithm, a SIFT (Scale-invariant feature transform) algorithm, or the like. In this embodiment of this disclosure, the detection of the to-be-detected image and the template image using the ORB algorithm is taken as an example.
[0029] The plurality of first initial feature points refer to one or more. Exemplarily, the plurality of first initial feature points refer to one or more first initial feature points.
[0030] Step S12: Based on the positions of the first initial feature points in the to-be-detected image, the first initial feature points are screened to obtain a plurality of first target feature points, and based on the positions of the second initial feature points in the template image, the second initial feature points are screened to obtain a plurality of second target feature points.
[0031] The screening of the first initial feature points based on the positions of the first initial feature points in the to-be-detected image can specifically be screening of the initial feature points in a region with a dense distribution of feature points in the to-be-detected image, which can reduce the clustering of feature points. The screening of the second initial feature points can be the same as the screening of the first initial feature points, which will not be described herein again.
[0032] Step S13: The first target feature points and the second target feature points are matched to obtain a feature point matching result.
[0033] The matching of the first target feature points and the second target feature points can be based on the Hamming distances between the feature points. For a first target feature point, the second target feature point with the smallest Hamming distance is taken as the matching feature point of the first target feature point. In some application scenarios, if the Hamming distances between a first target feature point and each second target feature point are greater than a preset Hamming distance, the first target feature point does not have a matching second target feature point. Similarly, for a second target feature point, the Hamming distances between the second target feature point and each first target feature point are greater than a preset Hamming distance, and the second target feature point does not have a matching first target feature point. As described above, this embodiment of this disclosure takes the detection of the to-be-detected image and the template image using the ORB algorithm as an example, and therefore the matching between the feature points can be based on the Hamming distances between the descriptors of the feature points. For example, the descriptor of each feature point is a 256-bit binary code, the number of different code bits of each descriptor is calculated to obtain the Hamming distance.
[0034] Step S14: determining the change detection result between the to-be-detected image and the template image based on the feature point matching result.
[0035] Exemplarily, the difference between the to-be-detected image and the template image is determined through the feature point matching result, and the change detection result of the to-be-detected image relative to the template image is determined based on the difference.
[0036] The above scheme can alleviate the feature point aggregation and improve the accuracy of the feature point matching result by performing feature point screening based on the positions of the initial feature points in the two images, so that the change detection result between the two images obtained is more accurate.
[0037] In some disclosed embodiments, the step S12 can include the following steps:
[0038] Taking the to-be-detected image as the target image, the first initial feature point as the candidate feature point, and the first target feature point as the target feature point, the target image is regionally divided to obtain a plurality of first target regions. Each target region contains at least one candidate feature point. Exemplarily, the target image is evenly divided into four regions. If each region contains at least one candidate feature point, each region can be a first target region. If a region does not contain a candidate feature point, the region is not a first target region. After the target image is regionally divided to obtain a plurality of first target regions, candidate feature points meeting a first preset requirement are selected from each first target region as the target feature point corresponding to the first target region. The set of target feature points corresponding to each first target region is a plurality of target feature points corresponding to the target image. Optionally, the first preset requirement is the highest response value in the first target region. The response value of the feature point can be determined according to conventional technology, which will not be described here.
[0039] Using the ORB feature extraction method based on the quadtree can make full use of the global information of the image, thereby effectively reducing the phenomenon of feature point clustering.
[0040] Or the template image is the target image, the second initial feature point is the candidate feature point, and the second target feature point is the target feature point. The target image is regionally divided to obtain a plurality of first target regions. Each target region contains at least one candidate feature point. For example, the target image is divided into four regions on average. If each region contains at least one candidate feature point, each region can be a first target region. If a region does not contain a candidate feature point, the region is not a first target region. After the target image is regionally divided to obtain a plurality of first target regions, the candidate feature points that meet the first preset requirement are selected from each first target region as the target feature points corresponding to each first target region. The set of target feature points corresponding to each first target region is a plurality of target feature points corresponding to the target image. Optionally, the first preset requirement is the highest response value in the first target region. The response value of the feature point can be determined by referring to conventional technology, which will not be described in detail here.
[0041] By using the ORB feature extraction method based on the quadtree, the global information of the image can be fully utilized, and the phenomenon of feature point clustering can be effectively reduced.
[0042] In some disclosed embodiments, the way to regionally divide the target image to obtain a plurality of first target regions can be: dividing the target image into a first number of candidate regions on average. For example, the first number can be two or more, such as 2, 4, 8, etc. The candidate regions that meet the second preset requirement are used as candidate target regions, each candidate target region is divided into a first number of new candidate regions on average, and the step of using the candidate regions that meet the second preset requirement as candidate target regions and dividing each candidate target region into a first number of new candidate regions is continued. The cycle is repeated until the stop cycle condition is met. The second preset requirement includes that the number of candidate feature points contained in the candidate region is greater than a second number. The second number can be 1, and in other application scenarios, the second number can be set by the user as needed, such as 2, etc.
[0043] The stopping cycle condition includes that the number of the first target regions obtained by the division is not less than the fourth number, and / or the number of the candidate feature points in each candidate region obtained by the division is less than or equal to the second number. In some application scenarios, the stopping cycle condition includes that the number of the first target regions obtained by the division is not less than the fourth number. In some application scenarios, the stopping cycle condition includes that the number of the candidate feature points in each candidate region obtained by the division is less than or equal to the second number. In some application scenarios, the stopping cycle condition includes that the number of the first target regions obtained by the division is not less than the fourth number and the number of the candidate feature points in each candidate region obtained by the division is less than or equal to the second number, that is, when the number of the first target regions obtained by the division is not less than the fourth number and the number of the candidate feature points in each candidate region obtained by the division is not more than the second number, it is determined that the stopping cycle condition is met.
[0044] The third preset requirement is that the number of candidate feature points contained in the region is greater than or equal to the third number. The first number, the second number, the third number, the fourth number and the like provided in the embodiments of the present disclosure can be customized by a user.
[0045] Exemplarily, the target image is divided into 4 blocks (the first number), and 4 candidate regions are obtained. If the number of candidate feature points in a candidate region is greater than 1 (the second number), the candidate region is taken as a candidate target region, that is, if the number of candidate feature points in a candidate region is less than or equal to 1, the candidate region is retained and is not taken as a candidate target region for a new round of division. All the candidate target regions obtained by this division are subjected to a second round of division, and each candidate target region corresponds to 4 new candidate regions. Then, the candidate regions in which the number of candidate feature points is greater than 1 are taken as target candidate regions for a third round of region division. The cycle is continued until the number of the first target regions obtained by the division is not less than n (the fourth number), and / or the number of candidate feature points contained in the candidate region obtained by the kth round of division is less than or equal to 1. The first target region refers to a region in which the number of candidate feature points contained is greater than or equal to 1 (the third number). When the first number is 4, it can be considered that the ORB feature extraction method of the quadtree is used to extract and screen features from the to-be-detected image and the template image.
[0046] Following the previous example, in the first round of region division, one of the four candidate regions contains four candidate feature points, two candidate regions do not contain any candidate feature points, and one candidate region contains one candidate feature point. Therefore, the candidate region containing four candidate feature points is a candidate target region and also a first target region. The two candidate regions containing one candidate feature point are not candidate target regions but are first target regions. The region containing no candidate feature points is neither a candidate target region nor a first target region. That is, the first round of region division yields one candidate target region and three first target regions. If the fourth quantity is three, and the stopping loop condition includes that the number of first target regions obtained is not less than the fourth quantity, then after the first round of region division, no second round of region division is performed. If the fourth quantity is four, then a second round of division is needed on the candidate target regions obtained in the first round, yielding four candidate regions. Two of these four candidate regions contain two candidate feature points, and two contain one candidate feature point. Therefore, for the second round of region division alone, two candidate target regions and four first target regions are obtained. Therefore, the first and second rounds of region division yield a total of 6 first target regions. Since 6 > 4, a third round of region division is not performed. However, if, for the Nth round, the total number of first target regions obtained from the previous N rounds is less than the fourth number, and all candidate feature points contained in the candidate regions obtained in the Nth round are less than or equal to the second number, making it impossible to perform N+1 rounds of division, then the division is stopped, and the candidate regions obtained from the 1st to the Nth rounds, whose number of candidate feature points is greater than or equal to the third number, are taken as the first target regions.
[0047] In some disclosed embodiments, the feature point matching result includes several pairs of matching points. Each pair of matching points includes a first target feature point and a second target feature point. Please also refer to... Figure 2 , Figure 2 This is another schematic flowchart of an embodiment of the image change detection method of this application. Figure 2 As shown, before performing step S14 above, the following steps may also be performed:
[0048] Step S21: Obtain the orientation of the connecting line between the first target feature point and the second target feature point in each matching point pair.
[0049] That is, if the feature point matching result includes ten sets of matching point pairs, then it includes the orientation of the ten connecting lines.
[0050] Step S22: Determine the target orientation range corresponding to each orientation.
[0051] The target orientation region is determined by the mean value and error range corresponding to each orientation. The error range can be determined by the standard deviation. Exemplarily, the number of matched point pairs corresponding to each orientation is obtained, and the matched point pairs are statistically fitted into a one-dimensional Gaussian distribution N(μ a ,σ a ) based on the histogram of the orientations, where (μ a ,σ a ) respectively represent the mean value and the standard deviation of the one-dimensional Gaussian distribution, and the target orientation interval is [μ a -σ a ,μ a +σ a ].
[0052] Step S23: Remove the matched point pairs corresponding to the connection lines outside the target orientation interval from the feature point matching result to obtain a new feature point matching result.
[0053] Exemplarily, the matched point pairs outside the interval [μ a -σ a ,μ a +σ a ] are determined as singular values, i.e., the mismatched feature point pairs. The matched feature points are screened based on the histogram filtering to filter out the mismatched feature points generated by the weak texture and repeated texture scenes.
[0054] By filtering the matched point pairs before step S14, the change detection result between the to-be-detected image and the template image is determined based on the new feature point matching result in step S14, so as to improve the accuracy of the change detection result.
[0055] As described above, the feature point matching result includes a plurality of matched point pairs, which can be the new feature point matching result filtered by the above filtering method. Please refer to Figure 3 , Figure 3 FIG. 2 is a sub-flowchart diagram illustrating step S14 of the embodiment of the image change detection method. As shown in FIG. 2, step S14 can include the following steps: Figure 3
[0056] Step S141: Determine the homography matrix between the to-be-detected image and the template image based on each matched point pair.
[0057] Wherein, the way of determining the homography matrix between two images according to the matched point pairs between the two images can refer to the conventional technology, which will not be described in detail here.
[0058] Step S142: Map the template image to the initial mask image by using the homography matrix to obtain a target mask image.
[0059] The pixel coordinate system of the initial mask image is the same as that of the image to be detected. Optionally, the pixel value of each pixel in the initial mask image is 255.
[0060] Specifically, the homography matrix is used to determine the pixel position and pixel number of each pixel on the template image on the initial mask image. Each pixel position can be represented by coordinates.
[0061] Among them, the coordinates (x, y) of the pixels on the template image t ,y t ) mapped to the coordinates (x) of the pixel in the initial mask image m ,y m The method can be referenced from formula (1):
[0062]
[0063] Where H represents the homography matrix.
[0064] Set the template image pixel coordinates (x) t ,y t The pixel value at position (x) is assigned to the pixel coordinates (x) of the initial mask image. m ,y m The pixel value at () is used. Additionally, for holes in the initial mask image, a preset interpolation method is used to obtain the pixel values of the holes in the initial mask image, thus obtaining the target mask image. A hole refers to a pixel location that does not have a corresponding pixel in the template image. The preset interpolation method can be any interpolation method such as bilinear interpolation.
[0065] Step S143: Determine the target difference between the target mask image and the image to be detected.
[0066] Specifically, step S143 may include the following steps: determining a second target region in the target mask image that overlaps with the template image. Then, based on the pixel differences between each pixel in the second target region of the target mask image and the corresponding pixel in the image to be detected, a difference binarized image is determined. The difference binarized image is used to represent the target difference. For example, a difference image is determined based on the differences between each pixel, and then the difference image is filtered and morphologically processed to obtain the difference binarized image. For instance, pixel differences greater than a preset difference are set to 1, and pixel differences less than or equal to a preset difference are set to 0, thus obtaining the difference binarized image. The target difference can be considered as the pixel value difference at each pixel location.
[0067] Step S144: Obtain the change detection results based on the target differences.
[0068] The maximum connected region extraction is performed on the difference binary image, and the area of the maximum connected region is obtained. The change detection result is obtained based on the ratio between the area of the maximum connected region and the area of the difference binary image. Exemplarily, the ratio between the area of the maximum connected region and the area of the difference binary image can represent the similarity before the to-be-detected image and the template image, or represent the difference between the to-be-detected image and the template image. In some application scenarios, the change level corresponding to the ratio is determined to obtain the deviation between the to-be-detected image and the template image. In some application scenarios, the change detection result can also be the region with difference in the two images. For example, if the maximum connected region is used to represent the region with large pixel difference, after the maximum connected region is obtained, the ratio is not calculated, and the to-be-detected image and / or the template image marked with the region where the maximum connected region is located is directly output. Or, in some application scenarios, in the case where the ratio is greater than or equal to a preset ratio, the to-be-detected image and / or the template image marked with the region where the maximum connected region is located is output.
[0069] Please refer to Figure 4 and Figure 5 , Figure 4 is the change detection result of the template image side in the embodiment of the image change detection method of the present application, Figure 5 is the change detection result of the to-be-detected image side in the embodiment of the image change detection method of the present application. Figure 4 In the embodiment, the region where the maximum connected region is located is the region where the rectangular bounding box is located. Figure 5 In the embodiment, the region where the maximum connected region is located is the region where the rectangular bounding box is located. Obviously, Figure 4 In the embodiment, there is no car on the road surface photographed. Figure 5 In the embodiment, there is a car on the road surface photographed. In this way, it is convenient for the user to view the difference between the two images.
[0070] In some application scenarios, the image change detection method provided by the embodiment of the present application can be applied to the fields of electric power inspection, border patrol, environmental monitoring, road inspection, water conservancy monitoring, port management, accident investigation, fire command, rescue and disaster relief, etc. When the unmanned aerial vehicle performs a periodic inspection task, the image (to-be-detected image) is collected according to the pre-set GPS coordinates and the gimbal attitude information, and the collected image is calibrated and compared with the corresponding template image, and the region with obvious difference between the two images is output.
[0071] By performing feature point screening based on the positions of the initial feature points in the two images after the initial feature points in the two images are obtained, the feature point aggregation can be reduced, the accuracy of the feature point matching result can be improved, and thus the change detection result between the two images obtained is more accurate.
[0072] In addition, the image change detection method provided by the embodiment of the disclosure can adapt to the displacement, rotation and scale between input images by means of more effective feature point extraction and screening strategies, and improve the robustness of the change detection method.
[0073] In addition, the feature point extraction is performed based on the ORB algorithm of the quadtree, global information of the images is fully utilized, the phenomenon of feature point clustering is effectively reduced, and the robustness of the image change detection method to the displacement, rotation and scale between input images is improved.
[0074] In addition, the scheme does not need to use a network model, does not depend on GPU computing power and training data, and can meet the low computing resource configuration of a UAV platform.
[0075] The execution subject of the image change detection method can be an image change detection apparatus, for example, the image change detection apparatus can be a terminal device or a server or other processing device, wherein the terminal device can be a monitoring device in a security system, a network video recorder, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and the like. In some possible implementation manners, the image change detection method can be realized by a processor calling computer readable instructions stored in a memory.
[0076] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of an embodiment of an image change detection apparatus of the disclosure. The image change detection apparatus 40 includes a detection module 41, a screening module 42, a matching module 43 and a determination module 44. The detection module 41 is configured to detect a to-be-detected image and a template image respectively to obtain a plurality of first initial feature points of the to-be-detected image and a plurality of second initial feature points of the template image; the screening module 42 is configured to screen the first initial feature points based on positions of the first initial feature points in the to-be-detected image to obtain a plurality of first target feature points, and screen the second initial feature points based on positions of the second initial feature points in the template image to obtain a plurality of second target feature points; the matching module 43 is configured to match the first target feature points and the second target feature points to obtain a feature point matching result; and the determination module 44 is configured to determine a change detection result between the to-be-detected image and the template image based on the feature point matching result.
[0077] The scheme can reduce the aggregation of feature points, improve the accuracy of the feature point matching result, and thus make the change detection result between the two images more accurate.
[0078] The functions of the modules can be referred to the embodiments of the image change detection method, which will not be repeated here.
[0079] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of an embodiment of an electronic device. The electronic device 50 includes a memory 51 and a processor 52. The processor 52 is configured to execute program instructions stored in the memory 51 to implement the steps in any of the above image change detection method embodiments. In a specific implementation scenario, the electronic device 50 can include but is not limited to a microcomputer, a server, and in addition, the electronic device 50 can also include a notebook computer, a tablet computer, and other mobile devices, which are not limited here.
[0080] Specifically, the processor 52 is configured to control itself and the memory 51 to implement the steps in any of the above image change detection method embodiments. The processor 52 can also be referred to as a CPU (Central Processing Unit). The processor 52 can be an integrated circuit chip with a signal processing capability. The processor 52 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 52 can be implemented by an integrated circuit chip together.
[0081] The scheme can reduce the aggregation of feature points, improve the accuracy of the feature point matching result, and thus make the change detection result between the two images more accurate.
[0082] Please refer to Figure 8 , Figure 8is a structural schematic diagram of an embodiment of the computer readable storage medium of the present application. The computer readable storage medium 60 stores program instructions 61 capable of being run by a processor, and the program instructions 61 are used to implement the steps in any of the image change detection method embodiments described above.
[0083] The above scheme, by performing feature point screening based on the positions of the initial feature points in the two images after the initial feature points in the two images are acquired, can alleviate the situation of feature point aggregation, improve the accuracy of the feature point matching result, and thus make the change detection result between the two images acquired more accurate.
[0084] In some embodiments, the apparatus provided by the embodiments of the present disclosure has functions or contains modules that can be used to execute the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For brevity, details are not repeated here.
[0085] Please refer to Figure 9 , Figure 9 is a structural schematic diagram of an embodiment of the unmanned aerial vehicle system of the present application. As shown in Figure 9 , the unmanned aerial vehicle system 70 includes the electronic device 71 provided by the above electronic device embodiment or includes the computer readable storage medium 71 provided by the above computer readable storage medium embodiment.
[0086] In some disclosed embodiments, the computer readable storage medium 71 can be used in a computer or the like, so that when the program instructions in the computer readable storage medium 71 are run by a processor, the steps in any of the image change detection method embodiments described above are implemented.
[0087] In some disclosed embodiments, the unmanned aerial vehicle system includes at least one unmanned aerial vehicle (not shown in the figure), and the unmanned aerial vehicle establishes a connection with the electronic device 71 or the device installed with the computer readable storage medium 71, so that the unmanned aerial vehicle transmits the to-be-detected image acquired to the electronic device 71 or the device, so as to perform image change detection on the to-be-detected image.
[0088] The above scheme, by performing feature point screening based on the positions of the initial feature points in the two images after the initial feature points in the two images are acquired, can alleviate the situation of feature point aggregation, improve the accuracy of the feature point matching result, and thus make the change detection result between the two images acquired more accurate.
[0089] The above description of each embodiment tends to emphasize the differences between the embodiments, and the same or similar parts can be mutually referred to. For brevity, details are not repeated here.
[0090] In several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other manners. For example, the division of the apparatus embodiments described above is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0091] In addition, each function unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software function unit. If the integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various other media that can store program codes.
Claims
1. A method of image change detection, characterized in that, The method comprises the following steps: respectively detecting a to-be-detected image and a template image to obtain a plurality of first initial feature points of the to-be-detected image and a plurality of second initial feature points of the template image; screening each of the first initial feature points based on the position of each of the first initial feature points in the to-be-detected image to obtain a plurality of first target feature points, and screening each of the second initial feature points based on the position of each of the second initial feature points in the template image to obtain a plurality of second target feature points; matching each of the first target feature points and each of the second target feature points to obtain a feature point matching result, wherein the feature point matching result comprises a plurality of matching point pairs, and each of the matching point pairs comprises one of the first target feature points and one of the second target feature points; obtaining the orientation of the connecting line between the first target feature point and the second target feature point in each of the matching point pairs; determining a target orientation interval corresponding to each of the orientations, wherein the target orientation interval is determined by the mean value and the error range corresponding to each of the orientations; removing the matching point pairs corresponding to the connecting lines outside the target orientation interval from the feature point matching result to obtain a new feature point matching result; and determining a change detection result between the to-be-detected image and the template image based on the new feature point matching result.
2. The method of claim 1, wherein, The screening of each of the first initial feature points based on the position of each of the first initial feature points in the to-be-detected image to obtain a plurality of first target feature points comprises: taking the to-be-detected image as a target image, the first initial feature points as candidate feature points, and the first target feature points as target feature points; dividing the target image into a plurality of first target regions, each of which contains at least one of the candidate feature points; selecting candidate feature points meeting a first preset requirement from each of the first target regions as target feature points corresponding to each of the first target regions, wherein the set of target feature points corresponding to each of the first target regions is a plurality of target feature points corresponding to the target image. Alternatively, the screening of each of the second initial feature points based on the position of each of the second initial feature points in the template image to obtain a plurality of second target feature points comprises: taking the template image as a target image, the second initial feature points as candidate feature points, and the second target feature points as target feature points; dividing the target image into a plurality of first target regions, each of which contains at least one of the candidate feature points; selecting candidate feature points meeting a first preset requirement from each of the first target regions as target feature points corresponding to each of the first target regions, wherein the set of target feature points corresponding to each of the first target regions is a plurality of target feature points corresponding to the target image.
3. The method of claim 2, wherein, The first preset requirement is the highest response value in the first target region. And / or, the dividing of the target image into a plurality of first target regions comprises: average the target image into a first number of candidate regions; regard a candidate region satisfying a second preset requirement as a candidate target region, average each candidate target region into a first number of new candidate regions, and continue to perform the step of regarding a candidate region satisfying a second preset requirement as a candidate target region and average each candidate target region into a first number of new candidate regions on the new candidate regions, and so on until a stop loop condition is met, the second preset requirement including that the number of candidate feature points contained in the candidate region is greater than a second number; wherein all candidate regions obtained after the stop loop and satisfying a third preset requirement are regarded as final first target regions, the third preset requirement being that the number of candidate feature points contained in the region is greater than or equal to a third number.
4. The method of claim 3, wherein, The stop loop condition includes that the number of first target regions obtained by division is not less than a fourth number, and / or the number of candidate feature points in each candidate region obtained by division is less than or equal to the second number.
5. The method according to any one of claims 1 to 4, characterized in that, The feature point matching result includes a plurality of matching point pairs, and the change detection result between the to-be-detected image and the template image is determined based on the feature point matching result, including: determining a homography matrix between the to-be-detected image and the template image based on each matching point pair; mapping the template image to an initial mask image using the homography matrix to obtain a target mask image; determining a target difference between the target mask image and the to-be-detected image; obtaining the change detection result based on the target difference.
6. The method of claim 5, wherein, The pixel coordinate system of the initial mask image is the same as that of the to-be-detected image, and the target mask image is obtained by mapping the template image to the initial mask image using the homography matrix, including: determining the pixel position and pixel value of each pixel point on the template image on the initial mask image using the homography matrix; obtaining the pixel value of the hole on the initial mask image using a preset interpolation method to obtain the target mask image, the hole being a pixel position that has no corresponding relationship with the pixel point of the template image.
7. The method of claim 5, wherein, The target difference between the target mask image and the to-be-detected image is determined, including: determining a second target region of the target mask image that overlaps with the template image; determining a difference value binary image based on the pixel difference value between each pixel point in the second target region of the target mask image and the corresponding pixel point in the to-be-detected image, the difference value binary image being used to represent the target difference; The change detection result is obtained based on the target difference, including: obtaining the change detection result based on the ratio between the area of the largest connected region in the difference value binary image and the area of the difference value binary image.
8. An electronic device, comprising: The program instructions are executed by the processor to implement the method of any one of claims 1 to 7.
9. A computer-readable storage medium having stored thereon program instructions, wherein, The program instructions are executed by the processor to implement the method of any one of claims 1 to 7.
10. An unmanned aerial system, characterized by The electronic device of claim 8 or the computer readable storage medium of claim 9.
Citation Information
Patent Citations
Method for detecting image feature points and server cluster
CN107689048A
Railway electric locomotive fault detection method based on image feature registration
CN112767358A
Multi-source remote sensing image matching method and device based on feature point fine adjustment
CN113223066A
Method for evaluating wetland ecological condition based on bird integrity
CN114742378A