Magnetic anomaly detection method based on image processing
Through the magnetic abnormality detection method based on image processing, the problems of low detection accuracy of magnetic foreign matter in large-scale areas and high prior knowledge requirements in the prior art are solved, and automated, multi-scene adaptation and high-precision magnetic foreign matter detection are realized.
Patent Information
- Application Number
- CN202411619595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-18
AI Technical Summary
The existing magnetic anomaly detection technology has low accuracy when analyzing a large area and has high prior knowledge requirements, making it difficult to accurately identify magnetic foreign objects in non-Gaussian noise environments, and has low manual discrimination efficiency.
The magnetic anomaly detection method based on image processing is adopted, and the abnormal module is located and detected through data acquisition, preprocessing, image construction and filtering processing, and classification and cause analysis are used for neural networks.
It improves the efficiency and accuracy of magnetic foreign matter detection, and can automatically detect and identify magnetic foreign matter without a large amount of prior knowledge. It is suitable for multiple scenarios and large areas.
Smart Images

Figure CN119649090A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of anomaly detection applications, and in particular to a magnetic anomaly detection method based on image processing. Background Art
[0002] Magnetic anomaly refers to the fact that a ferromagnetic target in the geomagnetic field will change the distribution of the original magnetic field. This anomaly contains important information about the target to be measured. Target magnetic detection technology uses this anomaly phenomenon to measure the magnetic field to perform non-contact measurement of the target. At present, magnetic anomaly detection is widely used in both civil and military applications, such as mineral exploration, environmental testing, and train track anomaly detection.
[0003] However, when analyzing the presence or absence of magnetic foreign bodies over a large area, since ferromagnetic materials are usually at a certain distance from the measurement point, due to the electromagnetic skin effect, the magnetic anomaly signal is usually hidden in the environmental magnetic noise and cannot be accurately identified. At present, the accuracy of magnetic anomaly detection technology is generally low, among which the magnetic detection technology based on orthogonal basis functions has higher accuracy. However, this method requires high prior knowledge, such as the need to know the distance of the magnetic foreign body from the measurement point, and the scheme is not suitable for non-Gaussian noise. Moreover, for large areas, the efficiency of manually determining whether there is a target magnetic foreign body is too low.
[0004] Therefore, in order to conduct high-precision exploration of possible magnetic anomalies in large areas, it is necessary to propose a magnetic anomaly detection algorithm that is applicable to multiple scenarios, automatic discrimination, and does not require a lot of prior knowledge. Summary of the invention
[0005] In view of the above problems existing in the prior art, an embodiment of the present invention provides a magnetic anomaly detection method based on image processing. First, data collection is performed and outliers and abnormal values are identified and eliminated according to actual experimental conditions, and it is verified whether the remaining data meets the data density requirements; then, the image constructed according to the data is filtered, the image is smoothed, the image noise is filtered out, the module with abnormalities is located, and abnormality detection is performed on the located module; finally, the detected anomalies are classified, and the possible causes of the anomalies are analyzed.
[0006] The embodiment of the present invention provides a magnetic anomaly detection method based on image processing, comprising:
[0007] Step 1: Fix the magnetic measurement equipment on the ship, collect magnetic field data in the set area, obtain the magnetic field data set, and perform data preprocessing on the magnetic field data set;
[0008] Step 2: Based on the magnetic field data set, a data set from which Gaussian noise is filtered out is obtained, and an image is constructed according to the data set from which Gaussian noise is filtered out; based on the set after image slicing, a magnetic field grayscale image set that needs to be focused on is intercepted; grayscale value compensation is performed on the images in the image set, and the grayscale value difference between the magnetic anomaly and the background is used to obtain an image set of the magnetic anomaly part;
[0009] Step 3: Combine the image set of the magnetic anomaly part and use empirical data or a neural network trained based on past data sets to determine whether the magnetic anomaly in the image is the target to be found.
[0010] In some embodiments of the present invention, in step 1, collecting magnetic field data of a set area to obtain a magnetic field data set specifically includes:
[0011] Step 11: According to the predetermined action trajectory, magnetic field data is collected in a large area to obtain data N = {n1, n2, ... n s},
[0012] Among them, s points are the total amount of collected data, n i =(x i ,y i ,t i ,c i ) is the data of the i-th point, (x i ,y i ) is the measured coordinate, t i To measure the time at this point, c i is the magnetic field value at that point.
[0013] In some embodiments of the present invention, in step 1, the method further comprises:
[0014] Step 12: While collecting magnetic field data, set up a geomagnetic daily variation monitoring sensor to measure the geomagnetic data set M = {m1, m2, ...m s}, where m i =(t im ,c im );
[0015] Subtract the geomagnetic data at the corresponding time from the magnetic field data measured in data set N to obtain n' i =(x i ,y i ,t i ,c' i ),
[0016] When t i =t im When c' i =c i -c im, and obtain the data set N1 that excludes the daily variation of the geomagnetic field.
[0017] In some embodiments of the present invention, in step 1, the method further comprises:
[0018] Step 13: Eliminate the measurement points caused by measurement errors according to the specific situation during measurement;
[0019] After elimination, Gaussian filtering is performed on data set N1 to remove Gaussian noise and obtain data set N2;
[0020] If the data density meets the measurement requirements at this time, go to step 2. If it does not meet the requirements, return to step 1 for data re-measurement.
[0021] In some embodiments of the present invention, in step 2, obtaining a data set from which Gaussian noise is filtered out based on the magnetic field data set, and constructing an image according to the data set from which Gaussian noise is filtered out, specifically comprises:
[0022] Step 21: Construct a grayscale image Fig based on the data set N2, and slice the large-scale image into grayscale atlas N3 of Number small areas according to the actual situation.
[0023] In some embodiments of the present invention, in step 2, based on the image sliced set, a magnetic field grayscale image set that needs to be focused on is extracted, specifically:
[0024] Step 22: For the i-th graph f i ∈N3 to traverse and record the maximum grayscale value OB_max and the minimum grayscale value OB_min, where i=1,2,...,Number;
[0025] Calculate the grayscale change OB_ch = OB_max - OB_min, and set a threshold t. If the grayscale change exceeds the threshold t, it is considered that the image may have magnetic anomalies; if the grayscale change does not exceed the threshold t, it is considered that the image does not have magnetic anomalies;
[0026] All images that may have magnetic anomalies are recorded as set N4.
[0027] In some embodiments of the present invention, in step 2, gray value compensation is performed on the images in the image set, and the gray value difference between the magnetic anomaly and the background is used to obtain an image set of the magnetic anomaly part, specifically:
[0028] Step 23: For the i-th graph f i ∈N4 performs gray value compensation so that the background gray value of each image tends to be the same; among them,
[0029] Gray value compensation adopts column compensation, the gray value Cap of row i and column j is ij =cij *B j ,
[0030] Among them, c ij To change the original gray value, B j is the compensation coefficient of the jth column;
[0031] Compensation coefficient B j =g / A[j], g is a self-set constant, A[j] is the grayscale mean of the j-th column image, and the compensated image set is recorded as N5.
[0032] In some embodiments of the present invention, in step 2, after step 23, the method further includes:
[0033] Step 24: For the i-th graph f i ∈N5, set a 7×7 convolution kernel, perform a closed operation, remove noise, and set the threshold t' to convert the image f i Processed into binary image;
[0034] If there is an abnormal light spot at this time, then the light spot is the magnetic anomaly position; if there is no abnormal light spot, then there is no magnetic anomaly at this position;
[0035] The set of images with all abnormalities is denoted as N6.
[0036] In some embodiments of the present invention, in step 3, the method is specifically:
[0037] For the i-th graph f i ∈N5, using artificial experience or a neural network trained based on past data sets to judge f i Whether the magnetic foreign matter is the target to be found.
[0038] Compared with the prior art, the beneficial effect of the magnetic anomaly detection method based on image processing provided by the embodiment of the present invention is that it is a magnetic anomaly detection algorithm for detecting magnetic targets in a geomagnetic environment, and the algorithm applies the image processing algorithm to a wide range of magnetic foreign body detection. Compared with the traditional magnetic foreign body detection algorithm, the image information is analyzed and utilized, and there is no need to predict the vertical distance to the magnetic foreign body in advance. Through image processing technology, objects and features in the image can be automatically detected, identified and quantified, greatly improving the efficiency and accuracy of magnetic foreign body detection.
[0039] Compared with the traditional magnetic foreign body detection algorithm, the present invention enhances and analyzes a large range of magnetic field grayscale images through image processing technology, uses the mean threshold method to locate the area where magnetic foreign bodies may exist, performs different processing on the gradual and sudden changes of grayscale values in the detection area, distinguishes the influence of magnetic foreign bodies and environmental noise, and improves the accuracy of magnetic foreign bodies.
[0040] For magnetic foreign bodies within the measurement range, image processing algorithms can be used to extract various types of features and objects from the image, so that multiple information can be used in the analysis process, improving the depth and breadth of the analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flow chart of a magnetic anomaly determination algorithm in a magnetic anomaly detection method based on image processing provided by an embodiment of the present invention;
[0042] Figure 2 A flowchart of a magnetic anomaly detection method based on image processing provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0044] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0045] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0046] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0047] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0048] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to determine the true intent based on the user's historical operations and to avoid unnecessary or redundant details that make the present application unclear. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but are merely used as the basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0049] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0050] The embodiment of the present invention provides a magnetic anomaly detection method based on image processing, such as Figure 1 and Figure 2 As shown, the method includes:
[0051] Step 1: Fix the magnetic measurement equipment on the ship, collect magnetic field data in the set area, obtain the magnetic field data set, and perform data preprocessing on the magnetic field data set;
[0052] Step 2: Based on the magnetic field data set, a data set from which Gaussian noise is filtered out is obtained, and an image is constructed according to the data set from which Gaussian noise is filtered out; based on the set after image slicing, a magnetic field grayscale image set that needs to be focused on is intercepted; grayscale value compensation is performed on the images in the image set, and the grayscale value difference between the magnetic anomaly and the background is used to obtain an image set of the magnetic anomaly part;
[0053] Step 3: Combine the image set of the magnetic anomaly part and use empirical data or a neural network trained based on past data sets to determine whether the magnetic anomaly in the image is the target to be found.
[0054] In order to facilitate a detailed understanding of the above technical solution, the following is a detailed description with reference to the accompanying drawings and specific examples, as follows:
[0055] The magnetic anomaly detection method based on image processing specifically comprises the following steps:
[0056] Step 1: Fix the magnetic measurement equipment on the ship, collect magnetic field data in a large area, and obtain data set N. Perform data preprocessing on the collected magnetic field data set N.
[0057] Step 11: Fix the magnetic measurement equipment on the ship and collect magnetic field data in a large area according to the predetermined action trajectory to obtain data N = {n1, n2, ... n s}, where s points are the total amount of collected data, and n i =(x i ,y i ,t i ,c i ) is the data of the i-th point, (x i ,y i ) is the measured coordinate, t i To measure the time at this point, c i is the magnetic field value at that point.
[0058] Step 12: While collecting magnetic field data, set up a geomagnetic daily variation monitoring sensor to measure the geomagnetic data set M = {m1, m2, ...m s}, where m i =(t im ,c im). Subtract the geomagnetic data at the corresponding time from the magnetic field data measured in the data set N to obtain n' i =(x i ,y i ,t i ,c' i ), when t i =t im When c' i =c i -c im The dataset N1 is obtained excluding the daily variation of geomagnetic field.
[0059] Step 13: According to the specific situation during measurement, the measurement points caused by measurement errors are eliminated. After elimination, Gaussian filtering is performed on data set N1 to filter out Gaussian noise and obtain data set N2. If the data density meets the measurement requirements at this time, go to step 2. If it does not meet the requirements, return to step 1 for data supplementation.
[0060] Step 2: Construct an image based on the dataset N2, and extract the magnetic field grayscale image set N4 that needs to be focused on for the image sliced set N3. Perform grayscale value compensation on the images in the image set N4, and use the grayscale value difference between the magnetic anomaly and the background to obtain the magnetic anomaly part N5.
[0061] Step 21: Construct a grayscale image Fig based on the data set N2, and slice the large-scale image into grayscale atlas N3 of Number small areas according to the actual situation.
[0062] Step 22: For the i-th graph f i ∈N3 to traverse and record the maximum grayscale value OB_max and the minimum grayscale value OB_min, where i = 1, 2, ..., Number. Calculate the grayscale change OB_ch = OB_max-OB_min, and set the threshold t. If the grayscale change exceeds the threshold t, it is considered that the image may have magnetic anomalies; if the grayscale change does not exceed the threshold t, it is considered that the image does not have magnetic anomalies. All images that may have magnetic anomalies are recorded as set n4.
[0063] Step 23: For the i-th graph f i ∈N4 performs grayscale value compensation so that the background grayscale value of each image tends to be the same. Specifically, grayscale value compensation adopts column compensation, and the grayscale value Cap of the i-th row and j-th column is ij =c ij *B j , where c ij To change the original gray value, B j is the compensation coefficient of the jth column. Compensation coefficient B j=g / A[j], g is a self-set constant, A[j] is the grayscale mean of the j-th column image, and the compensated image set is recorded as N5.
[0064] Step 24: For the i-th graph f i ∈N5, set a 7×7 convolution kernel, perform a closed operation, remove noise, and set the threshold t' to convert the image f i Processed into a binary image. If there is an abnormal light spot at this time, the light spot is the magnetic anomaly position; if there is no abnormal light spot, there is no magnetic anomaly at this position. The image set with all abnormalities is recorded as N6.
[0065] Step 3: For the i-th graph f i ∈N5, using artificial experience or a neural network trained based on past data sets to judge f i Whether the magnetic foreign matter is the target to be found.
[0066] It can be seen from the above technical solution that the beneficial effect of the magnetic anomaly detection method based on image processing provided by the above embodiment of the present invention is that it is a magnetic anomaly detection algorithm for detecting magnetic targets in a geomagnetic environment, which applies the image processing algorithm to a wide range of magnetic foreign body detection. Compared with the traditional magnetic foreign body detection algorithm, the image information is analyzed and utilized, and there is no need to predict the vertical distance to the magnetic foreign body in advance. Through image processing technology, objects and features in the image can be automatically detected, identified and quantified, greatly improving the efficiency and accuracy of magnetic foreign body detection.
[0067] Compared with the traditional magnetic foreign body detection algorithm, the present invention enhances and analyzes a large range of magnetic field grayscale images through image processing technology, uses the mean threshold method to locate the area where magnetic foreign bodies may exist, performs different processing on the gradual and sudden changes of grayscale values in the detection area, distinguishes the influence of magnetic foreign bodies and environmental noise, and improves the accuracy of magnetic foreign bodies.
[0068] For magnetic foreign bodies within the measurement range, image processing algorithms can be used to extract various types of features and objects from the image, so that multiple information can be used in the analysis process, improving the depth and breadth of the analysis.
[0069] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A magnetic anomaly detection method based on image processing, characterized in that: include: Step 1: Fix the magnetic measurement equipment on the ship, collect magnetic field data in the set area, obtain the magnetic field data set, and perform data preprocessing on the magnetic field data set; Step 2: Based on the magnetic field data set, a data set from which Gaussian noise is filtered out is obtained, and an image is constructed according to the data set from which Gaussian noise is filtered out; based on the image sliced set, a magnetic field grayscale image set that needs to be focused on is cut out; Perform gray value compensation on the images in the image set, and use the gray value difference between the magnetic anomaly and the background to obtain the image set of the magnetic anomaly part; Step 3: Combine the image set of the magnetic anomaly part and use empirical data or a neural network trained based on past data sets to determine whether the magnetic anomaly in the image is the target to be found.
2. The magnetic anomaly detection method based on image processing according to claim 1, characterized in that: In step 1, collecting magnetic field data of a set area to obtain a magnetic field data set specifically includes: Step 11: According to the predetermined action trajectory, magnetic field data is collected in a large area to obtain data N = {n1, n2, ... n s }, Among them, s points are the total amount of collected data, n i =(x i ,y i ,t i ,c i ) is the data of the i-th point, (x i ,y i ) is the measured coordinate, t i To measure the time at this point, c i is the magnetic field value at that point.
3. The magnetic anomaly detection method based on image processing according to claim 2, characterized in that: In step 1, the method further comprises: Step 12: While collecting magnetic field data, set up a geomagnetic daily variation monitoring sensor to measure the geomagnetic data set M = {m1, m2, ...m s }, where m i =(t im ,c im ); Subtract the geomagnetic data at the corresponding time from the magnetic field data measured in data set N to obtain n' i =(x i ,y i ,t i ,c' i ), When t i =t im When c' i =c i -c im , and obtain the data set N1 that excludes the daily changes in the geomagnetic field.
4. The magnetic anomaly detection method based on image processing according to claim 3 is characterized in that: In step 1, the method further comprises: Step 13: Eliminate the measurement points caused by measurement errors according to the specific situation during measurement; After elimination, Gaussian filtering is performed on data set N1 to remove Gaussian noise and obtain data set N2; If the data density meets the measurement requirements at this time, go to step 2. If it does not meet the requirements, return to step 1 for data re-measurement.
5. The magnetic anomaly detection method based on image processing according to claim 4 is characterized in that: In step 2, based on the magnetic field data set, a data set from which Gaussian noise is filtered out is obtained, and an image is constructed according to the data set from which Gaussian noise is filtered out, specifically: Step 21: Construct a grayscale image Fig based on the data set N2, and slice the large-scale image into grayscale atlas N3 of Number small areas according to the actual situation.
6. The magnetic anomaly detection method based on image processing according to claim 5, characterized in that: In step 2, based on the image slice set, a magnetic field grayscale image set that needs to be focused on is extracted, specifically: Step 22: For the i-th graph f i ∈N3 to traverse and record the maximum grayscale value OB_max and the minimum grayscale value OB_min, where i=1,2,...,Number; Calculate the grayscale change OB_ch = OB_max - OB_min, and set a threshold t. If the grayscale change exceeds the threshold t, it is considered that the image may have magnetic anomalies; if the grayscale change does not exceed the threshold t, it is considered that the image does not have magnetic anomalies; All images that may have magnetic anomalies are recorded as set N4.
7. The magnetic anomaly detection method based on image processing according to claim 6, characterized in that: In step 2, grayscale value compensation is performed on the images in the image set, and the grayscale value difference between the magnetic anomaly and the background is used to obtain an image set of the magnetic anomaly part, specifically: Step 23: For the i-th graph f i ∈N4 performs gray value compensation so that the background gray value of each image tends to be the same; among them, Gray value compensation adopts column compensation, the gray value Cap of row i and column j is ij =c ij *B j , Among them, c ij To change the original gray value, B j is the compensation coefficient of the jth column; Compensation coefficient B j =g / A[j], g is a self-set constant, A[j] is the grayscale mean of the j-th column image, and the compensated image set is recorded as N5.
8. The magnetic anomaly detection method based on image processing according to claim 7, characterized in that: In step 2, after step 23, the method further includes: Step 24: For the i-th graph f i ∈N5, set a 7×7 convolution kernel, perform a closed operation, remove noise, and set the threshold t' to convert the image f i Processed into binary image; If there is an abnormal light spot at this time, then the light spot is the magnetic anomaly position; if there is no abnormal light spot, then there is no magnetic anomaly at this position; The set of images with all abnormalities is denoted as N6.
9. The magnetic anomaly detection method based on image processing according to claim 8, characterized in that: In step 3, the method is specifically: For the i-th graph f i ∈N5, using artificial experience or a neural network trained based on past data sets to judge f i Whether the magnetic foreign matter is the target to be found.