A method for extracting magnetic pole reversal map information based on improved LSD

Through the improved edge detection method combined with the sobel operator, the problem of accuracy and inefficiency of line segment detection in the magnetic pole inversion diagram is solved, and more efficient edge segment detection of magnetic pole inversion region is achieved.

CN114862890BActive Publication Date: 2025-04-11NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210582218.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-04-11
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect line segments in magnetic pole inversion diagrams, especially in the presence of non-boundary line segment interference.

Method used

The improved line segment detection algorithm (LSD) is used, combined with the sobel operator for edge detection, and the detection of non-edge line segments is reduced by adding main direction angle constraints, which improves the accuracy and speed of the algorithm.

Benefits of technology

The detection accuracy of edge segments of the magnetic pole inverted area is improved, the detection time is reduced, and the problem of inefficiency in the prior art is effectively overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862890B_ABST
    Figure CN114862890B_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic pole reversal map information extraction method based on improved LSD, comprising acquiring a picture set; manually annotating depth information on the picture set; performing edge detection on the annotated picture set by using a sobel operator; performing line segment detection on the edge image by using an improved LSD algorithm; screening the line segments to obtain a boundary line segment set; sorting the boundary line segment sets by depth and combining them in pairs into magnetic pole reversal regions to obtain a magnetic pole reversal region set; traversing each pixel of the magnetic pole reversal region to obtain the magnetism of the magnetic pole reversal region; using the depth information and the boundary line segment coordinates of each magnetic pole reversal region to deduce the depth information of each magnetic pole reversal region; integrating the depth-magnetic data of the magnetic pole reversal map according to the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region, the invention improves the accuracy of edge line segment detection of the magnetic pole reversal region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for extracting magnetic pole reversal map information based on improved LSD, belonging to the technical field of image processing. Background Art

[0002] An important prerequisite for a deep understanding of geological history is to establish a high-precision chronological framework. Magnetostratigraphy is one of the important branches of paleomagnetism. It is a discipline based on the analysis of the changing characteristics of the residual magnetization intensity in rocks or sediments to determine the reversal of the polarity of the geomagnetic field in the stratigraphic record and to define the relative age of the strata. The direction of the geomagnetic field changes over time. Among them, the most extreme case is that the north and south poles of the geomagnetic field are reversed, that is, the polarity is reversed. The reversal of the geomagnetic field polarity is one of the most significant characteristics of the geomagnetic field, and a clear record of the reversal of the geomagnetic field polarity is left in the rocks. In the IODP voyage report, the magnetic pole reversal map records the alternation of magnetic poles in the geological history period. Using the magnetic pole reversal map, compared with the relevant rock layer age, it can be used for the construction of geological time table and stratigraphic comparison.

[0003] Line segment detection has a long history in computer vision. Early pioneering works relied on low-level clues of predefined features. Typically, line segment detection performs edge detection first and then perceptual grouping. The classic perceptual grouping framework aggregates low-level clues into line segments in a bottom-up manner, and divides the image into regions of line support by grouping similar pixel-level features. Line segments are approximately calculated from the line support regions and filtered through a verification step to remove false positives. Another popular line segment detection method is based on the Hough transform, which converts the pixel-level edge map of the image into a parameter space representation by collecting votes in the parameter space, where each point corresponds to a unique parameterized line. For the task of extracting information from the magnetic pole reversal map, it is necessary to solve the accurate detection of the boundary line segments of the magnetic pole reversal region. Due to the interference of other non-boundary line segments in the magnetic pole reversal map, the current line segment detection cannot effectively detect the line segments in the magnetic pole reversal map. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method for extracting magnetic pole reversal map information based on an improved LSD, thereby overcoming the problem of low efficiency in manually extracting magnetic pole reversal map information.

[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0006] The present invention provides a method for extracting magnetic pole reversal map information based on improved LSD, comprising:

[0007] Obtaining a set of images that are previously extracted and saved from a magnetic pole reversal map in an electronic document;

[0008] Manually annotating the image set with depth information to obtain an annotated image set;

[0009] Perform edge detection on the labeled picture set using a Sobel operator to obtain an edge image;

[0010] Performing line segment detection on the edge image by using an improved LSD algorithm to obtain the coordinates of the line segments in the magnetic pole reversal map;

[0011] Screening the line segments, excluding line segments at the boundaries of non-magnetic regions, and obtaining a boundary line segment set;

[0012] The boundary line segment sets are sorted by depth and combined in pairs to form magnetic pole reversal regions to obtain a magnetic pole reversal region set;

[0013] Traversing each pixel in the magnetic pole reversal region, counting the color of each pixel, and obtaining the magnetic properties of the magnetic pole reversal region;

[0014] Using the depth information and the coordinates of the boundary line segments of each magnetic pole reversal region, the depth information of each magnetic pole reversal region is calculated;

[0015] The depth-magnetic data of the magnetic pole reversal map is integrated according to the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region.

[0016] Furthermore, the step of obtaining a set of pictures pre-cut out and saved from the magnetic pole reversal diagram in the electronic document includes:

[0017] The magnetic pole reversal map in the electronic document is extracted, named after the voyage number, and saved as a png picture to obtain the magnetic pole reversal map set polarity.

[0018] Further, manually annotating the image set with depth information to obtain an annotated image set includes:

[0019] For each magnetic pole reversal map polarity in the magnetic pole reversal map set polarity i Depth information is annotated and marked as (polarity i ,depth s ,depth e ).

[0020] Furthermore, performing edge detection on the labeled picture set by using a Sobel operator to obtain an edge image includes:

[0021] The sobel edge detection operator is used to perform edge detection on the magnetic pole reversal image set polarity to obtain the edge image set edge.

[0022] Furthermore, the step of performing line segment detection on the edge image by using an improved LSD algorithm to obtain the coordinates of the line segments in the magnetic pole reversal map includes:

[0023] Calculate the gradient of each pixel in the image, for polarity i Each pixel in is traversed in turn, and the gradient is calculated using pixel i(x,y) and the pixels i(x+1,y), i(x,y+1), and i(x+1,y+1) adjacent to the pixel. The gradient formula is as follows:

[0024]

[0025]

[0026] where g x Represents the gradient in the horizontal direction, g y Represents the gradient in the vertical direction;

[0027] Calculate the gradient magnitude and horizontal angle of each pixel, and calculate the gradient magnitude G and horizontal angle g according to the horizontal and vertical gradients t , the formula is as follows:

[0028]

[0029]

[0030] Pixels with small gradient amplitudes correspond to smooth or slowly changing areas in the image. Therefore, points with large gradient amplitudes and UNUSED status are selected as seed points for region growing to generate line support regions. The horizontal line angle of the seed point is used as the initial angle θ of the region. region , and then search for the eight pixels adjacent to the seed point that match θ region The pixel whose deviation is less than the tolerance value τ is added to the region and the pixel status is set to USED. Each time a pixel is added to the region, the region angle θ needs to be updated. region , the update formula is as follows:

[0031]

[0032] where levellineangle j is the horizontal line angle of the pixels in the added area;

[0033] Perform region growth on the pixels adjacent to the pixels in the region and in the UNUSED state in turn until all the pixels in the region do not meet the angle θ with the region. regionWhen the deviation is less than the tolerance value τ, the region growing is stopped. Since the line segments that need to be detected in the magnetic pole reversal map are all horizontal line segments, in the region growing, if θ region When the deviation from 0 or 180 degrees is greater than 5 degrees, the region growing is stopped. After the region growing is completed, the detected line segment set line is obtained.

[0034] Furthermore, the line segments are screened to exclude line segments at the boundaries of the non-magnetic regions, and a boundary line segment set is obtained, including:

[0035] For non-horizontal line segments in the magnetically unknown area, traverse the line segment set line and take each line segment line i The starting point coordinates (x1, y1) and the end point coordinates (x2, y2) are used to calculate the line segment angle using the inverse tangent formula. If the line segment angle deviates from 0 or 180 degrees by more than 5 degrees, the line segment is removed from the line segment set line. The inverse tangent formula for calculating the line segment angle is as follows:

[0036]

[0037] Arrange the line segments in the line segment set line in ascending order according to the ordinate of the starting point, traverse the arranged line segment set line, and if the next line segment meets the three conditions with the current line segment, the two line segments are merged;

[0038] The three conditions are:

[0039] 1. The vertical coordinate deviation between the two line segments is less than 2 pixels;

[0040] 2. The horizontal coordinate deviation between the two line segments is less than 5 pixels;

[0041] 3. The horizontal coordinate ranges of the starting points and end points of the two line segments do not overlap;

[0042] If two line segments meet the merging requirements, the start point of the horizontally forward line segment and the end point of the horizontally backward line segment are used as the start point and end point of the merged line segment, and the two line segments used for merging are deleted, and finally the boundary line segment set boundary is obtained.

[0043] Furthermore, the boundary line segment sets are sorted by depth and combined into magnetic pole reversal regions in pairs to obtain a magnetic pole reversal region set, including:

[0044] The line segments in the boundary line segment set are traversed in sequence to obtain the coordinates of the starting points of the boundary line segments, and the ordinate of the starting point is used as the top boundary top of the magnetic pole reversal region, and the ordinate of the starting point of the next boundary line segment is used as the bottom boundary bottom of the magnetic pole reversal region, and finally the magnetic pole reversal region set reversal = {(top1, bottom1), ..., (top n , bottom n )}.

[0045] Furthermore, traversing each pixel in the magnetic pole reversal region, counting the color of each pixel, and obtaining the magnetic properties of the magnetic pole reversal region include:

[0046] Traverse the magnetic pole reversal area set reversal, traverse each pixel in the magnetic pole reversal area, and count the colors of the pixels. If the total number of black pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be positive magnetism. If the total number of white pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be negative magnetism. If both the black pixels and the white pixels do not reach 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be unknown. Integrate the magnetic and magnetic pole reversal area boundary data to obtain the magnetic set magnetic = {(top1, bottom1, magnetic1), ..., (top n , bottom n , magnetic n )}.

[0047] Further, using the depth information and the boundary line segment coordinates of each magnetic pole reversal region, the depth information of each magnetic pole reversal region is calculated, including:

[0048] Through the height height of the magnetic pole reversal map and the depth information depth s and depth e The proportional relationship between pixels and depth is obtained, and then the top boundary top and the boundary bottom of the magnetic pole reversal area are substituted to obtain the top depth information and the bottom depth information of the magnetic pole reversal area. The calculation formula is as follows:

[0049]

[0050]

[0051] Where top_depth is the top depth information of the magnetic pole reversal area, bottom_depth is the bottom depth information of the magnetic pole reversal area, and the depth information is integrated with the boundary data to obtain the depth information set depth = {(top1, bottom1, top_d1, bottom_d1), ..., (top n ,bottom n ,top_d n ,bottom_d n )}.

[0052] Furthermore, the depth-magnetic data of the magnetic pole reversal map is integrated based on the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region, including:

[0053] The depth-pole data {(top_d i ,bottom_d i ,magnetic i )}.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] The present invention provides a magnetic pole reversal map information extraction method based on improved LSD. Based on the characteristics of the magnetic pole reversal map, the edge detection of the sobel operator derived in the y direction is used to highlight the horizontal line segment characteristics of the magnetic pole reversal map, and the accuracy of edge line segment detection in the magnetic pole reversal area is improved. In addition, the present invention changes the regional growth process in the LSD algorithm, and reduces the detection of non-edge line segments in the magnetic pole reversal area by increasing the main direction angle constraint, thereby improving the algorithm speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flow chart of a method for extracting magnetic pole reversal map information based on improved LSD provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0058] Example 1

[0059] This embodiment introduces a method for extracting magnetic pole reversal map information based on improved LSD, including:

[0060] Obtaining a set of images that are previously extracted and saved from a magnetic pole reversal map in an electronic document;

[0061] Manually annotating the image set with depth information to obtain an annotated image set;

[0062] Perform edge detection on the labeled picture set using a Sobel operator to obtain an edge image;

[0063] Performing line segment detection on the edge image by using an improved LSD algorithm to obtain the coordinates of the line segments in the magnetic pole reversal map;

[0064] Screening the line segments, excluding line segments at the boundaries of non-magnetic regions, and obtaining a boundary line segment set;

[0065] The boundary line segment sets are sorted by depth and combined in pairs to form magnetic pole reversal regions to obtain a magnetic pole reversal region set;

[0066] Traversing each pixel in the magnetic pole reversal region, counting the color of each pixel, and obtaining the magnetic properties of the magnetic pole reversal region;

[0067] Using the depth information and the coordinates of the boundary line segments of each magnetic pole reversal region, the depth information of each magnetic pole reversal region is calculated;

[0068] The depth-magnetic data of the magnetic pole reversal map is integrated according to the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region.

[0069] The application process of the magnetic pole reversal map information extraction method based on the improved LSD provided in this embodiment specifically involves the following steps:

[0070] Step 1: Extract the magnetic pole reversal map from the electronic document, name it according to the voyage number, and save it as a png picture to obtain the magnetic pole reversal map set polarity.

[0071] Step 2: For each magnetic pole reversal map in the magnetic pole reversal map set polarity i Depth information is annotated and marked as (polarity i ,depth s ,depth e ).

[0072] Step 3: Use the Sobel edge detection operator to perform edge detection on the magnetic pole reversal image set polarity to obtain the edge image set edge.

[0073] Step 4: Calculate the gradient of each pixel in the image and the polarity iEach pixel in is traversed in turn, and the gradient is calculated using pixel i(x,y) and the pixels i(x+1,y), i(x,y+1), and i(x+1,y+1) adjacent to the pixel. The gradient formula is as follows:

[0074]

[0075]

[0076] where g x Represents the gradient in the horizontal direction, g y Represents the gradient in the vertical direction;

[0077] Calculate the gradient magnitude and horizontal angle of each pixel, and calculate the gradient magnitude G and horizontal angle g according to the horizontal and vertical gradients t , the formula is as follows:

[0078]

[0079]

[0080] Pixels with small gradient magnitudes correspond to smooth or slowly changing areas in the image, so points with large gradient magnitudes and UNUSED status are selected as seed points for region growing to generate line support regions. The horizontal line angle of the seed point is used as the initial angle θ of the region. region , and then search for the eight pixels adjacent to the seed point that match θ region The pixel whose deviation is less than the tolerance value τ is added to the region and the pixel status is set to USED. Each time a pixel is added to the region, the region angle θ needs to be updated. region , the update formula is as follows:

[0081]

[0082] where levellineangle j is the horizontal line angle of the pixels joining the region.

[0083] Perform region growth on the pixels adjacent to the pixels in the region and in the UNUSED state in turn until all the pixels in the region do not meet the angle θ with the region. region When the deviation of is less than the tolerance value τ, the region growing stops. Since the line segments that need to be detected in the magnetic pole reversal map are all horizontal line segments, in the region growing, if θ region When the deviation from 0 or 180 degrees is greater than 5 degrees, the region growing is stopped. After the region growing is completed, the detected line segment set line is obtained.

[0084] Step 5: Since there are some non-horizontal line segments in the magnetic pole reversal map that are used to mark areas with unknown magnetism, as well as broken line segments caused by some LSD defects, which are ineffective in defining the boundary position of the magnetic pole reversal area, it is necessary to integrate the line segment set line.

[0085] Since all the line segments that need to be detected in the magnetic pole reversal map are horizontal line segments, for the many non-horizontal line segments in the magnetic unknown area, we traverse the line segment set line and take each line segment line i The starting point coordinates (x1, y1) and the end point coordinates (x2, y2) are used to calculate the line segment angle using the inverse tangent formula. If the line segment angle deviates from 0 or 180 degrees by more than 5 degrees, the line segment is removed from the line segment set line. The inverse tangent formula for calculating the line segment angle is as follows:

[0086]

[0087] In the magnetically unclear area of ​​the magnetic pole reversal map, many line segments intersect with the boundary line segments of the magnetic pole reversal area, which makes the boundary line segments detected by LSD easy to break. In order to merge the broken line segments, first sort the line segments in the line segment set line in ascending order according to the ordinate of the starting point. Traverse the arranged line segment set line, and if the next line segment meets the three conditions between the current line segment, the two line segments are merged. The three conditions are: 1. The ordinate deviation between the two line segments is less than 2 pixels. 2. The abscissa deviation between the two line segments is less than 5 pixels. 3. The abscissa ranges of the start and end points of the two line segments do not overlap. If the two line segments meet the merging requirements, the start point of the horizontally forward line segment and the end point of the horizontally backward line segment are used as the start and end points of the merged line segment, and the two line segments used for merging are deleted to obtain the boundary line segment set boundary.

[0088] Step 6: Traverse the line segments in the boundary line segment set in turn to obtain the coordinates of the starting point of the boundary line segment, use the ordinate of the starting point as the top boundary top of the magnetic pole reversal region, and use the ordinate of the starting point of the next boundary line segment as the bottom boundary bottom of the magnetic pole reversal region, and finally obtain the magnetic pole reversal region set reversal = {(top1, bottom1), ..., (top n ,bottom n )}.

[0089] Step 7: Traverse the magnetic pole reversal area set reversal, traverse each pixel in the magnetic pole reversal area, and count the colors of the pixels. If the total number of black pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be positive magnetism. If the total number of white pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be reverse magnetism. If neither the black pixels nor the white pixels reach 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be unknown. Integrate the magnetic and magnetic pole reversal area boundary data to obtain the magnetic set magnetic={(top1,bottom1,magnetic1),……,(top n ,bottom n ,magnetic n )}.

[0090] Step 8: Since the magnetic pole reversal map is linearly related to the depth scale, the height of the magnetic pole reversal map and the depth information depth are used to calculate the magnetic pole reversal map. s and depth e The proportional relationship between pixels and depth can be obtained. Then substitute the top boundary top and the boundary bottom of the magnetic pole reversal area to obtain the top depth information and bottom depth information of the magnetic pole reversal area. The calculation formula is as follows:

[0091]

[0092]

[0093] Where top_depth is the top depth information of the magnetic pole reversal area, and bottom_depth is the bottom depth information of the magnetic pole reversal area. By integrating the depth information with the boundary data, we can get the depth information set depth=

[0094] {(top1,bottom1,top_d1,bottom_d1),……,(top n ,bottom n ,top_d n ,bottom_d n )}.

[0095] Step 9: Combine the magnetic set magnetic of the magnetic pole reversal map with the depth information set depth of the magnetic pole reversal map to integrate the depth-magnetic data of the magnetic pole reversal map {(top_d i ,bottom_d i ,magnetic i )}.

[0096] This embodiment provides a method for extracting magnetic pole reversal map information based on improved LSD. Based on the characteristics of the magnetic pole reversal map, edge detection using the derivative of the Sobel operator in the y direction is used to highlight the horizontal line segment features of the magnetic pole reversal map and improve the accuracy of edge line segment detection in the magnetic pole reversal area. In addition, the present invention changes the regional growing process in the LSD algorithm and reduces the detection of non-edge line segments in the magnetic pole reversal area by adding main direction angle constraints, thereby improving the algorithm speed.

[0097] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for extracting magnetic pole reversal map information based on improved LSD, characterized in that: include: Obtaining a set of images that are previously extracted and saved from a magnetic pole reversal map in an electronic document; Manually annotating the image set with depth information to obtain an annotated image set; Perform edge detection on the labeled picture set using a Sobel operator to obtain an edge image; Performing line segment detection on the edge image by using an improved LSD algorithm to obtain the coordinates of the line segments in the magnetic pole reversal map specifically includes: Calculate the gradient of each pixel in the image. Each pixel in is traversed in turn, using pixel and the pixels adjacent to that pixel Calculate the gradient. The gradient formula is as follows: ; ; in Represents the gradient in the horizontal direction, Represents the gradient in the vertical direction; Calculate the gradient magnitude and horizontal angle of each pixel, and calculate the gradient magnitude based on the horizontal and vertical gradients Angle to the horizontal , the formula is as follows: ; ; Pixels with small gradient amplitudes correspond to smooth or slowly changing areas in the image. Therefore, points with large gradient amplitudes and UNUSED status are selected as seed points for region growing to generate line support regions. The horizontal line angle of the seed point is used as the initial angle of the region. , and then search for the eight pixels adjacent to the seed point The deviation is less than the tolerance value The pixel point is added to the region and the pixel state is set to USED. Each time a pixel is added to the region, the region angle needs to be updated. , the update formula is as follows: ; in is the horizontal line angle of the pixels in the added area; Perform regional growth on the pixels adjacent to the pixels in the region and in the UNUSED state in turn until all the pixels in the region do not meet the angle with the region. The deviation is less than the tolerance value When , stop region growing. Since the line segments that need to be detected in the magnetic pole reversal map are all horizontal line segments, in region growing, if When the deviation from 0 or 180 degrees is greater than 5 degrees, the region growing is stopped. After the region growing is completed, the detected line segment set is obtained. ; Screening the line segments, excluding line segments at the boundaries of non-magnetic regions, and obtaining a boundary line segment set; The boundary line segment sets are sorted by depth and combined in pairs to form magnetic pole reversal regions to obtain a magnetic pole reversal region set; Traversing each pixel in the magnetic pole reversal region, counting the color of each pixel, and obtaining the magnetic properties of the magnetic pole reversal region; Using the depth information and the coordinates of the boundary line segments of each magnetic pole reversal region, the depth information of each magnetic pole reversal region is calculated; The depth-magnetic data of the magnetic pole reversal map is integrated according to the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region.

2. The method for extracting magnetic pole reversal information based on improved LSD according to claim 1, characterized in that: The step of obtaining a picture set pre-cut out and saved from a magnetic pole reversal map in an electronic document comprises: Extract the magnetic pole reversal map from the electronic document, name it according to the voyage number, and save it as a png image to obtain a collection of magnetic pole reversal maps. .

3. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 2, characterized in that: Manually annotating the image set with depth information to obtain an annotated image set includes: Pole reversal diagram collection Each magnetic pole reversal diagram in Perform depth information annotation, annotated as .

4. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 3, characterized in that: The step of performing edge detection on the labeled picture set by using a Sobel operator to obtain an edge image includes: Using the Sobel edge detection operator to detect the magnetic pole reversal map set Perform edge detection to obtain edge image set .

5. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 4, characterized in that: The line segments are screened to exclude line segments at the boundaries of the non-magnetic regions, and a boundary line segment set is obtained, including: For non-horizontal line segments in the magnetically unknown area, by traversing the line segment set , take each line segment The starting point coordinates and the end point coordinates , calculate the line segment angle using the inverse tangent formula. If the line segment angle deviates from 0 or 180 degrees by more than 5 degrees, remove the line segment from the line segment set. Remove it, and the inverse tangent formula for the line segment angle is as follows: ; Line segment collection The line segments in are arranged in ascending order according to the vertical coordinates of the starting points, and the arranged line segments are traversed. , if the next line segment meets the three conditions with the current line segment, the two line segments are merged; The three conditions are: The vertical coordinate deviation between the two line segments is less than 2 pixels; The horizontal coordinate deviation between the two line segments is less than 5 pixels; The horizontal coordinate ranges of the starting points and end points of the two line segments do not overlap; If two line segments meet the merging requirements, the starting point of the horizontally forward line segment and the end point of the horizontally backward line segment are used as the starting point and end point of the merged line segment, and the two line segments used for merging are deleted at the same time, and finally the boundary line segment set is obtained. .

6. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 5, characterized in that: The boundary line segment sets are sorted by depth and combined into magnetic pole reversal regions in pairs, to obtain a magnetic pole reversal region set, including: Traverse the line segments in the boundary line segment set in turn to obtain the coordinates of the starting point of the boundary line segment, and use the ordinate of the starting point as the top boundary of the magnetic pole reversal area , using the ordinate of the starting point of the next boundary segment as the bottom boundary of the magnetic pole reversal region , and finally we get the magnetic pole reversal region set composed of magnetic pole reversal regions .

7. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 6, characterized in that: Traversing each pixel in the magnetic pole reversal region, counting the color of each pixel, and obtaining the magnetic properties of the magnetic pole reversal region, including: Traverse the magnetic pole reversal region set , traverse each pixel in the magnetic pole reversal area, and count the colors of the pixels. If the total number of black pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be positive magnetism. If the total number of white pixels accounts for 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be reverse magnetism. If both black pixels and white pixels do not reach 90% of the total pixels in the magnetic pole reversal area, the magnetism of the magnetic pole reversal area is determined to be unknown. The magnetic field is integrated with the boundary data of the magnetic pole reversal area to obtain the magnetic set .

8. The method for extracting magnetic pole reversal information based on improved LSD according to claim 7, characterized in that: Using the depth information and the coordinates of the boundary segments of each magnetic pole reversal region, the depth information of each magnetic pole reversal region is calculated, including: Altitude through magnetic pole reversal diagram With the depth information and Get the proportional relationship between pixels and depth, and then the top boundary of the magnetic pole reversal area With border Substitute it in to obtain the top depth information and bottom depth information of the magnetic pole reversal area. The calculation formula is as follows: ; ; in is the top depth information of the magnetic pole reversal area, The bottom depth information of the magnetic pole reversal area is obtained by integrating the depth information with the boundary data to obtain the depth information set .

9. The method for extracting magnetic pole reversal map information based on improved LSD according to claim 8, characterized in that: The depth-magnetic data of the magnetic pole reversal map is integrated according to the magnetism of the magnetic pole reversal region and the depth information of each magnetic pole reversal region, including: The magnetic collection of the magnetic pole reversal diagram Depth information collection with the magnetic pole reversal map , integrating the depth-pole data of the magnetic pole reversal map .

Citation Information

Patent Citations

  • LSD-based color image line segment detection method and system

    CN109978878A

  • Unmanned aerial vehicle oblique aerial photography right-angle image control point target detection method based on LSD algorithm

    CN112669280A