A method for automatically extracting water depth notes from raster charts with correct classification and accurate positioning of elements

By using a convolutional neural network-based method, combined with adaptive chart segmentation and connected component analysis, the accuracy and efficiency issues of automatic extraction of water depth annotations from raster charts were solved, achieving high-precision automatic extraction of water depth annotations.

CN115797685BActive Publication Date: 2025-10-17PLA DALIAN NAVAL ACADEMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211472317.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2025-10-17
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

In existing technologies, human-computer interaction methods are insufficient to meet the needs of efficient extraction of water depth annotations from raster charts, resulting in inadequate accuracy and efficiency in water depth annotation extraction.

Method used

A convolutional neural network-based approach was adopted to improve the model through adaptive chart segmentation, classification and coarse localization based on small target detection networks, element uniqueness determination, and connected component analysis, thereby achieving automatic extraction of water depth annotations.

Benefits of technology

It achieves high-precision automatic extraction of water depth annotations from raster nautical charts, ensuring correct classification and accurate positioning of elements, and improving extraction efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797685B_ABST
    Figure CN115797685B_ABST
Patent Text Reader

Abstract

The application provides a grid chart water depth annotation automatic extraction method considering correct classification and accurate positioning of elements, and belongs to the technical field of charting. The method is jointly constituted by a chart adaptive segmentation model, a classification and coarse positioning method based on a small target detection network model, an element uniqueness determination principle and an improved model based on connected domain analysis, and finally realizes correct classification and accurate positioning of grid chart water depth annotations.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of charting, and relates to a grid chart water depth annotation automatic extraction method considering correct classification and accurate positioning of elements. BACKGROUND

[0002] Water depth annotation is a basic element of a chart and an important method for representing seabed topography, and the numerical size and main point position thereof reflect the undulating changes of seabed topography. As a key link for converting original charting data from a grid to a vector and from simulation to digitization, chart digitization is a basic prerequisite for chart product production and making and a main means for establishing a chart database. Due to the large amount of information of water depth annotations in a navigation chart, the accuracy and efficiency of water depth annotation extraction have become an important basis for evaluating chart digitization work.

[0003] For a long time, the main means for water depth annotation extraction is human-computer interaction, which has once become a method with higher efficiency and more common use in the chart digitization work of China and has provided technical support for the establishment of a digital chart product database of China. It is worth noting that, with the great improvement of the digitalization demand for foreign edition paper charts, the digitization efficiency of grid charts has a higher requirement, and therefore, the extraction mode of human-computer interaction gradually cannot meet the current demand. In summary, it is of important practical significance to study the automatic extraction method of chart water depth annotations. SUMMARY

[0004] In view of the problem of automatic extraction of grid chart water depth annotations, the pattern recognition method has not yet been able to propose a better solution, and the application designs a grid chart water depth annotation automatic extraction method based on a convolutional neural network. The method is composed of a chart adaptive segmentation model, a classification and coarse positioning method based on a small target detection network model, an element uniqueness determination principle and an improved model based on connected domain analysis, and finally realizes high-precision automatic extraction of water depth annotations in a chart.

[0005] The technical scheme adopted by the application to achieve the above object is:

[0006] A grid chart water depth annotation automatic extraction method considering correct classification and accurate positioning of elements, comprising the following steps:

[0007] a. performing buffer-based segmentation on an original grid chart;

[0008] b. performing chart slice positioning on the segmented chart slice;

[0009] c. classifying and coarsely positioning the water depth annotations in the chart slice based on a small target detection network model;

[0010] d. removing the duplicate coarse positioning results;

[0011] e. For the de-duplication coarse positioning result, water depth annotation segmentation is realized according to the spatial distribution characteristics of water depth annotations;

[0012] f. Water depth annotation value extraction and accurate positioning are realized by relying on connected component analysis considering the geometric distribution characteristics of elements to improve the model.

[0013] The specific segmentation process of step a is as follows:

[0014] First, in order to reduce the input size of the CNN model in step c, improve the results of nautical chart water depth annotation recognition and consider the integrity of elements, a parameter adaptive uniform segmentation method is used to segment the original raster nautical chart into multiple nautical chart slices. The uniform segmentation method formula is as follows:

[0015]

[0016] In the formula: m and n represent the total number of rows and columns respectively, width and height represent the pixel values of the width and height of the original raster nautical chart respectively, [x] represents rounding down, and s represents the standard size of the CNN model (the length and width of the convolution layer of the CNN model are consistent).

[0017] Then, on the basis of the nautical chart slices segmented by the uniform segmentation method, a buffer zone is added to the original nautical chart slice range. The buffer zone width can ensure that the water depth annotations on the edge of the nautical chart slice are completely contained by at least one slice, thereby ensuring the integrity of the data. The calculation formula is as follows:

[0018]

[0019] In the formula: Buffer represents the buffer zone width, with units of pixels; dpi has units of pixels / inch; w represents the theoretical maximum width of the water depth annotation, with units of centimeters, and the present application sets it to 0.5; 0.394 is the conversion coefficient from centimeter measurement to inch.

[0020] In step b, the corner point positioning method is used to determine the spatial orientation of the nautical chart slice output by step a. The specific process is as follows: first, calculate the total number of rows and columns after segmentation by formula (1); then determine the row and column number of each nautical chart slice according to the segmentation order. At this time, take a nautical chart slice in the original raster nautical chart, and the row and column number are known. Combined with the width width and height height of formula (1), the coordinates of the top left corner point of the nautical chart slice can be calculated. The coordinate calculation formula is as follows:

[0021]

[0022] In the formula: X i and Y i(x, y) and (x, y) represent the horizontal and vertical coordinates of the upper left corner of the map slice, respectively, in pixels; i and j represent the column number and row number of the map slice, respectively.

[0023] Through step b, the relative position of each independent map slice on the original grid map can be obtained, and the spatial orientation of each map slice can be obtained after the registration of the original grid map is completed.

[0024] The specific process of step c is as follows: the segmented map slice is taken as a training set, which is labeled by labelme, and the label is divided into four categories: italic depth, straight depth, dry depth, and unmeasured bottom depth, forming a depth data set. Then, based on the prepared depth data set, a small target detection model is trained to obtain a grid map depth annotation classification and coarse positioning model, and the output result is the prediction box and classification result of the depth annotation, that is, the coarse positioning result.

[0025] In step d, the de-duplication method is divided into two steps: coarse screening based on the corner point discrimination method and fine screening based on the IoMin discrimination method. The specific process is as follows:

[0026] First, the corner point discrimination method is used to preliminarily determine whether there is an intersection relationship between the prediction boxes, and the discrimination formula is as follows:

[0027]

[0028] In the formula: (x a ,y a ), (x b ,y b ) are the coordinates of the upper left corner and the lower right corner of prediction box A; (x c ,y c ), (x d ,y d ) are the coordinates of the upper left corner and the lower right corner of prediction box B. If any condition in formula (4) is not met, it is determined as not intersecting.

[0029] After corner point discrimination, if it is determined that there is an intersection relationship between the two prediction boxes, it is necessary to further discriminate whether the two prediction boxes are repeated identification of the same depth annotation according to the IoMin discrimination method, and the discrimination formula is as follows:

[0030]

[0031] In the formula: S A , S B are the areas of prediction boxes A and B, respectively; I is the intersection area of the two prediction boxes; min(S A , S B) represents the smaller area of the prediction boxes A and B. If IoMin is greater than or equal to 0.6, it is determined that there is repeated identification, and S is deleted A 、S B the smaller prediction box in the area.

[0032] Step e is based on the spatial distribution characteristics of the water depth annotation, and the water depth annotation in the prediction box range is segmented based on the coarse positioning result (prediction box range).

[0033] The coarse positioning result of the known CNN model is the prediction box range, and there may be various unrelated elements in the range. In order to remove other elements in the prediction box range and achieve segmentation of the water depth annotation, the present application is based on connected domain analysis and further processes the coarse positioning result. In order to meet the requirements of connected domain analysis (the processing object of connected domain analysis is generally a binary image), the water depth annotation slice of the coarse positioning result is first grayed and binarized and inverted. Then, according to the water depth annotation area (connected domain unit area) statistical value, the noise and other interference items outside the statistical value range are screened out. Finally, according to the width-height ratio of the water depth annotation (connected domain unit width-height ratio), the line elements and other interference items outside the width-height ratio range are screened out. Thus, the connected domain unit of the water depth annotation is retained, and the remaining interference items are screened out. The screened connected domain unit is the water depth annotation, and extraction thereof completes the segmentation.

[0034] In step f, according to the height difference between the integer and decimal parts of the water depth annotation, the distinguishing method of the integer and decimal parts of the water depth annotation is as follows:

[0035]

[0036] In the formula: a represents the lower limit range of pixels in the discrimination condition, b represents the lower limit range of millimeters in the discrimination condition, c represents the upper limit range of pixels in the discrimination condition, and d represents the upper limit range of millimeters in the discrimination condition. dpi is the resolution of the image, and its unit is inch / pixel; is the floor value, is the ceiling value. The determination range of a and c is determined according to the integer and decimal height values of the water depth annotation in the actual image.

[0037] After distinguishing the integer and decimal parts, the upper left corner point horizontal coordinate of the connected domain unit of the water depth annotation is sorted to confirm the order of each number. Thus, the numerical value extraction of the water depth annotation is completed.

[0038] However, the automatic extraction of the water depth annotation needs to accurately position the main point position of the water depth value, and therefore, the application distinguishes the integer and decimal part of the water depth annotation, combines the coordinate information of the integer and decimal part connected domain unit, and designs the accurate positioning algorithm according to the special requirements of the main point position of the water depth annotation of the publishing organization in different countries in the world. According to the two requirements of the integer center and the geometric center, if the integer center is adopted, the center point of the maximum range of the integer part connected domain is adopted as the center point, if the geometric center is adopted, the center points of the maximum range of the integer and decimal part connected domain are adopted as the center points, so that the accurate positioning result is obtained.

[0039] The beneficial effects of the application: although the related art has applied the CNN model to the map annotation recognition problem and has achieved good results, due to the particularity of the main point position and symbol form of the water depth annotation of the chart, when only the CNN model is used to extract the water depth annotation, the problems of inaccurate positioning of the main point position of the annotation and difficult correct extraction of the water depth value may occur. Therefore, the application provides a grid chart water depth annotation automatic extraction method, which realizes the correct classification and accurate positioning of the grid chart water depth annotation. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 It is the total flow chart of the grid chart water depth annotation automatic extraction method.

[0041] Figure 2(a) is the original grid chart (14173x8577).

[0042] Figure 2(b) is the original grid chart uniformly divided into chart slices I and II and the existing problems.

[0043] Figure 3 It is a schematic diagram of the buffer range of the chart slice.

[0044] Figure 4 It is the flow chart of the element uniqueness determination principle for the airspace conflict.

[0045] Figure 5 is a prediction frame corner point discrimination schematic diagram; wherein, figure 5(a) is transverse and longitudinal non-intersection, figure 5(b) is longitudinal intersection and transverse non-intersection, and figure 5(c) is transverse intersection and longitudinal non-intersection.

[0046] Figure 6 is an IoMin threshold discrimination schematic diagram; wherein, figure 6(a) is water depth annotation repeated identification, figure 6(b) is water depth annotation repeated identification, and figure 6(c) is water depth annotation non-repeated identification.

[0047] Figure 7 is a flow chart of water depth annotation segmentation based on the coarse positioning result; wherein, figure 7(a) is the coarse positioning result, figure 7(b) is the gray scale, binary, and inverse result, figure 7(c) is the noise point screening result, and figure 7(d) is the line element screening result.

[0048] Figure 8 It is a method for sorting water depth annotations.

[0049] FIG9 is a schematic diagram of the method for confirming the position of the main point of the water depth annotation of the present invention; wherein FIG9(a) is a method for locating the geometric center of the water depth annotation, and FIG9(b) is a method for locating the integer center of the water depth annotation.

[0050] FIG10 is a diagram showing the effect of the present invention on the automatic extraction of water depth annotations from a grid chart; FIG10( a ) is the experimental area of ​​the British version of the chart 4031; FIG10( b ) is the experimental result of the British version of the chart 4031. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0052] like Figure 1 As shown in the figure, the present invention designs a method for automatically extracting bathymetric annotations from raster charts, balancing accurate feature classification and precise positioning. This method combines an adaptive chart segmentation model that considers feature integrity, a CNN model for classification and coarse positioning, a uniqueness determination principle for features addressing airspace conflicts, and an improved connected domain analysis model that considers feature geometric distribution characteristics. Ultimately, this method achieves high-precision extraction of bathymetric annotations from raster charts.

[0053] The present invention can better achieve the correct extraction and precise positioning of water depth annotations, and its specific implementation steps are as follows:

[0054] a. Divide the original raster chart into buffer zones with adaptive parameters;

[0055] b. Carry out chart slice positioning on the sliced ​​chart slices;

[0056] c. Classify and roughly locate the water depth annotations in the chart slices based on a small target detection model (using YOLOv3 as an example);

[0057] d. De-duplicate the coarse positioning results;

[0058] e. Based on the coarse positioning results after deduplication, the water depth annotations are segmented according to their spatial distribution characteristics;

[0059] f. Relying on the connected domain analysis model that takes into account the geometric distribution characteristics of the elements, the water depth annotation numerical extraction and precise positioning are realized.

[0060] In general, the resolution of the raster chart is 300 dpi, and the size is about 10000x14000 pixels according to the experience of digitizing the scanned paper chart. If the raster chart is directly used as the input of the CNN network, for example, the YOLOv3 network, the original raster chart needs to be resampled to the size of the first convolutional layer of the network model (416x416 pixels). Obviously, the large size difference between the two will result in a serious loss of detail information, which will further prevent the identification of the target elements. In step a, the original raster chart is divided into multiple chart slices by using the parameter adaptive segmentation method, and the input size of the CNN model is reduced to improve the recognition result of the chart depth note and consider the integrity of the elements. The formula of the uniform segmentation method is as formula (1).

[0061] However, directly using the uniform segmentation method may cause the problem that the depth note cannot be completely identified in the edge area of two adjacent chart slices, as shown in FIG. 2(b). The edge area of the two adjacent chart slices I and II in the original raster chart is enlarged, and it can be seen that the depth note 42 is divided into two parts by the edge area of the chart slices I and II. At this time, if the chart slices I and II are input into the CNN model for identification, the depth note will be identified as the depth note 4 in the slice I and the depth note 2 in the slice II, which is obviously inconsistent with the actual situation.

[0062] Therefore, in step a, the edge buffer is added on the basis of the uniform segmentation method, and the width of the buffer can ensure that the depth note in the edge part of the chart slice can be completely contained by at least one slice, thereby ensuring the integrity of the data. The calculation method of the buffer width is as formula (2).

[0063] The buffer segmentation method divides the original raster chart into chart slices, and only the coordinates of the depth note relative to the chart slice can be obtained, which cannot meet the demand. Therefore, to solve the above problem, step b first needs to obtain the position of the chart slice relative to the entire original raster chart, that is, to position the chart slice.

[0064] The corner point positioning method is used to realize the positioning of the chart slice, and the process is as follows: on the basis of step a, the row and column numbers of each chart slice are determined according to the chart slice segmentation order. At this time, a chart slice in the original raster chart is randomly selected, and the row and column numbers are known. Combined with the width width and the height height of the chart slice segmented by the uniform segmentation method, the coordinates of the corner point I of the chart slice can be calculated (as shown in FIG. 3), and the coordinate calculation formula is as formula (3). Figure 3

[0065] ​The present embodiment takes the British grid chart as an example. After the preprocessing steps a and b are completed, step c firstly takes the segmented chart slice as a training set, and labels it through labelme. The label is divided into four categories: italic depth, straight depth, dry depth, and unmeasured bottom depth, forming a water depth dataset with 1069 samples. Then different CNN models are used to classify and compare the coarse positioning effect of the preprocessing results. After comparison, the SSD model has a higher precision rate but a lower recall rate; the Faster RCNN model has a higher recall rate but a lower precision rate; and the YOLOv3 model and the YOLOv5 model have better performance in both precision and recall. Finally, through experiments, the precision and recall rates of the YOLOv3 model in the italic depth reach 94.96% and 99.63%, respectively. Therefore, the CNN model has certain effect in the classification and coarse positioning of depth annotations.

[0066] At the same time, the YOLO series network can achieve good results in the present embodiment. The reason is that the FPN structure is introduced in the YOLO series, which is a classic small target detection network. For the grid chart, the size of the depth annotation is much smaller than the size of the chart, which fully meets the basic characteristics of small targets, so the small target detection network has good adaptability in the present embodiment. In the present application, the CNN model uses the YOLO series or other small target detection networks. Therefore, the present application uses a large number of training sets for foreign edition charts and uses the YOLOv3 target detection network for training. The output result of the CNN network is a depth annotation prediction box, which is the coarse positioning box and the classification result of the depth annotation, and roughly judges the position of the depth annotation.

[0067] After coarse positioning, there is a problem of repeated identification of the same depth annotation due to the overlap between different slice buffers. In order to further process the coarse positioning result, a unique element determination principle for spatial conflict is designed in step d, as shown in formula (5). Figure 4 The de-duplication method in step d is divided into two steps. Firstly, the intersection relationship between the prediction boxes is determined by the corner point discrimination method, and the formula is as formula (4).

[0068] In Fig. 5, when the prediction boxes A and B do not intersect each other, there are three possible cases. The first case is shown in Fig. 5(a), the right bottom corner point b of the prediction box A has the maximum horizontal coordinate of the prediction box A, but the value is still less than the minimum horizontal coordinate of the prediction box B, i.e. the horizontal coordinate of the left top corner point c of the prediction box B. Therefore, the two do not intersect each other in the horizontal direction, and it can be proved in the same way that the two do not intersect each other in the vertical direction. The second case is shown in Fig. 5(b), according to the position relationship of A and B, it can be known from the coordinates of the corner points b and c that the two intersect each other in the horizontal direction, but the vertical coordinate of b is greater than that of c, and the two do not intersect each other in the vertical direction. As can be seen from the figure, the two do not intersect each other in this case. The third case is shown in Fig. 5(c), in the same way, the two intersect each other in the vertical direction, but do not intersect each other in the horizontal direction, and therefore the two do not intersect each other.

[0069] After the corner points are determined, if it is determined that the two prediction boxes intersect each other, it is further determined whether the two prediction boxes identify the same water depth label repeatedly according to the IoMin determination method, and the formula is as shown in formula (5).

[0070] In fact, when the two prediction boxes intersect each other, there are three possible cases of the same water depth label repeatedly identified by the two prediction boxes. The first case is shown in Fig. 6(a), the two prediction boxes A and B only identify the same water depth label 421 partially, and the area of the prediction box B is much smaller than that of the prediction box A. At this time, the IoMin value is about 0.8, and according to the practice, when the IoMin value is greater than or equal to 0.6 (i.e. the intersection area accounts for 60% of the area of the smaller prediction box), it can be determined that the two prediction boxes have the same water depth label repeatedly identified, and the prediction box B with a smaller area is deleted. The second case is shown in Fig. 6(b), the water depth label 42 is repeatedly identified by the prediction boxes A and B completely, and the areas of the two prediction boxes A and B are similar. At this time, the IoMin value is about 0.9, and according to the above method, the smaller prediction box B is deleted, and the prediction box A is retained as the coarse positioning result of the water depth label 42. Fig. 6(c) is the third case, the prediction boxes A and B intersect each other, but they identify the water depth labels 11 and 9 respectively, and there is no repeated identification. At this time, the IoMin value is about 0.2, which is less than 0.6, and therefore it is determined that the two intersecting prediction boxes do not have the same water depth label repeatedly identified.

[0071] After the above steps, the independent water depth label classification and coarse positioning result can be obtained. In step e, the water depth label in the prediction box range is segmented based on the coarse positioning result (prediction box range), and then the water depth value of the water depth label is correctly extracted and the main point position is accurately positioned according to the segmentation result.

[0072] The coarse positioning result of the CNN model is the range of the prediction frame, but there may be various irrelevant elements within this range. In order to eliminate other elements within the prediction frame and realize the segmentation of the water depth annotation, this embodiment is based on the connected domain analysis and further processes the coarse positioning result (as shown in Figure 7 (a)). In order to meet the requirements of the connected domain analysis (the connected domain analysis processing object is generally a binary image), the water depth annotation slices of the coarse positioning result must first be grayscaled, binarized and inverted (the digital annotation recognition in this embodiment uses the Resnet-18 network model obtained by transfer learning based on the MNIST training set pre-training model). After the above processing, the image is shown in Figure 7 (b). It can be seen from the figure that in addition to the water depth annotation, there are many other connected domain unit interference items such as noise points and line elements in this range. In order to screen out these interference items, this embodiment is based on the statistical value of the water depth annotation area (the area of ​​the water depth annotation connected domain unit is between 0.7 and 2.3 mm 2 Between, outside the range is determined as noise, filtered out), and interference items such as noise with a large area difference from the water depth annotation are filtered out, and the result is shown in Figure 7(c). It can be seen from the figure that although the noise interference items are filtered out, line element interference items still exist. In order to delete the line elements, this embodiment further filters out interference items with larger areas such as line elements based on the aspect ratio of the water depth annotation (the aspect ratio of the water depth annotation connected domain unit is between 0.3 and 0.9, and outside the range is filtered out). The result after screening is shown in Figure 7(d). At this time, only the connected domain units of the water depth annotation are retained in the area, and the remaining interference items are filtered out. The remaining connected domain units are used as the water depth annotation segmentation results.

[0073] In step f, the integer and decimal parts of the water depth annotation are distinguished, and the difference between the integer and decimal parts of the water depth annotation is distinguished (for example, the integer part of the water depth annotation in the British nautical chart is 1.7 mm high, and the decimal part is 1.3 mm high). The judgment condition is that the vertical height of the connected domain unit is judged as the integer part within the range of 1.7 ± 0.1 mm, and the decimal part is judged as the decimal part within the range of 1.3 ± 0.1 mm. The formula for converting the judgment range from centimeters to pixels is shown in formula (6).

[0074] After distinguishing the integer and decimal parts, the divided numbers need to be sorted. Figure 8 As shown, the upper left corners of the three connected domain units of the water depth annotation 18.8 have the horizontal coordinates X1, X2, and X3, respectively. Clearly, water depth annotation 1 has the smallest horizontal coordinate, so, based on the previous discussion, it has the highest number of digits. The three connected domain units 1, 8, and 8 of the water depth annotation can be sorted according to the relationship X1 < X2 < X3.

[0075] In addition to the extraction of the water depth value, the accurate positioning of the main point position of the water depth annotation is also needed. For this purpose, the embodiment designs the accurate positioning algorithm for the main point position of the water depth annotation according to the special requirements of the publishing organizations of different countries in the world on the main point position of the water depth annotation, on the basis of the distinction between the integer and decimal parts of the water depth annotation and in combination with the coordinate information of the connected domain units of the integer and decimal parts.

[0076] For any water depth annotation 14.3 (as shown in FIG. 9), in order to obtain the main point position of the water depth annotation, the integer and decimal part discrimination and the bit ordering result of the water depth annotation are combined to calculate the connected domain unit corner point coordinates (i.e. the minimum circumscribed rectangle corner point coordinates of each digit) of the integer part and the decimal part of the water depth annotation 14.3 in the figure. For the geometric center of the water depth annotation 14.3 in FIG. 9(a) (i.e. the geometric center of the whole water depth annotation), according to the ordering result of the connected domain units of each water depth annotation, the left upper corner point coordinate P1 of the minimum circumscribed rectangle of the connected domain unit of the highest digit (i.e. the digit 1 in the figure) of the integer part and the right lower corner point coordinate P2 of the minimum circumscribed rectangle of the connected domain unit of the decimal part (the digit 3 in the figure) are extracted, and the midpoint C1 of the line connecting P1 and P2 is extracted, which is the geometric center of the water depth annotation. Similarly, for the integer center (i.e. the geometric center of the integer part) of the water depth annotation shown in FIG. 9(b), the calculation method is similar to that of the geometric center, i.e. firstly, the left upper corner point coordinate P3 of the minimum circumscribed rectangle of the connected domain unit of the highest digit (i.e. the digit 1 in the figure) of the integer part and the right lower corner point coordinate P4 of the minimum circumscribed rectangle of the connected domain unit of the lowest digit (the digit 4 in the figure) of the integer part are obtained, and the midpoint C2 of the line connecting P3 and P4 is extracted, which is the integer center of the water depth annotation. Thus, the accurate main point position of the water depth annotation can be obtained. The overall effect of the embodiment is shown in FIG. 10.

Claims

1. A method for automatically extracting water depth annotations from raster charts that takes into account both correct classification and precise positioning of elements, characterized by: The following steps are involved: a. Split the original raster chart based on the buffer zone; b. Carry out chart slice positioning on the sliced ​​chart slices; c. Classify and roughly locate the water depth annotations in the chart slices based on the small target detection network model; d. De-duplicate the coarse positioning results; e. Based on the coarse positioning results after deduplication, the water depth annotations are segmented according to their spatial distribution characteristics; f. Relying on the connected domain analysis to improve the model considering the geometric distribution characteristics of the elements to achieve the extraction and precise positioning of water depth annotation values; In step b, the spatial orientation of the chart slice is determined using a corner point positioning method. The specific process is as follows: First, the total number of rows and columns after segmentation is calculated using formula (1); then, the row and column number of each chart slice is determined according to the segmentation order; at this point, any chart slice in the original raster chart with known row and column numbers is taken, and the coordinates of the upper left corner of the chart slice are calculated by combining the width and height of formula (1). The coordinate calculation formula is as follows: Where: X i and Y i The horizontal and vertical coordinates of the upper left corner of the chart slice are expressed in pixels. i and j represent the column and row numbers of the chart slice, respectively; In step f, according to the height difference between the integer and decimal parts of the water depth annotation, the method for distinguishing the integer and decimal parts of the water depth annotation is given as follows: Where: a represents the lower limit of the pixel range in the discrimination condition, b represents the lower limit of the millimeter range in the discrimination condition, c represents the upper limit of the pixel range in the discrimination condition, and d represents the upper limit of the millimeter range in the discrimination condition; dpi is the image resolution, and its unit is inches / pixel; To round down, The thresholds of a and c are determined by the integer and decimal height values ​​of the water depth in the actual map. After distinguishing the integer and decimal parts, sort the connected domain units according to the horizontal coordinates of the upper left corners of the water depth annotations to confirm the order of the numbers; According to the two requirements of integer center and geometric center, if the integer center is used, the center with the maximum range of the integer part of the connected domain is used as the center point; if the geometric center is used, the centers with the maximum range of the integer and decimal parts of the connected domain are used as the center points together to obtain accurate positioning results.

2. The method according to claim 1, characterized in that The specific process of step a is as follows: First, the original grid chart is divided into multiple chart slices using the parameter-adaptive uniform segmentation method. The uniform segmentation method formula is as follows: Where: m and n represent the total number of rows and columns, respectively; width and height represent the pixel values ​​of the width and height of the original raster chart, respectively; [x] represents rounding down without decimals; and s represents the standard size of the CNN model. Then, based on the chart slices obtained by the uniform segmentation method, a buffer zone is added to the original chart slice range. The buffer zone width can ensure that the water depth annotations at the edge of the chart slice can be completely included in at least one slice, thereby ensuring the integrity of the data. The calculation formula is: Where: Buffer represents the buffer width in pixels; dpi represents pixels / inch; w represents the theoretical maximum width of the water depth annotation in centimeters; 0.394 is the coefficient used to convert centimeters to inches.

3. The method according to claim 1 or 2, characterized in that The specific process of step c is as follows: the segmented chart slices are used as training sets and annotated using LabelMe. The labels are divided into four categories: italic water depth, straight water depth, dry water depth, and unmeasured bottom water depth, forming a water depth dataset. Then, a small target detection model is trained based on the prepared water depth dataset to obtain a raster chart water depth annotation classification and coarse positioning model. The output result is the prediction box and classification result of the water depth annotation, that is, the coarse positioning result.

4. The method according to claim 1 or 2, characterized in that In step d, the specific process of the deduplication method is as follows: First, the corner point discrimination method is used to preliminarily determine whether there is an intersection relationship between the prediction boxes. The discrimination formula is as follows: Where: (x a ,y a )、(x b ,y b ) are the coordinates of the upper left corner and lower right corner of the prediction box A respectively; (x c ,y c )、(x d ,y d ) are the coordinates of the upper left corner and lower right corner of the prediction box B respectively; if any of the conditions in formula (4) is not satisfied, it is judged as non-intersecting; After corner point discrimination, if it is determined that there is an intersection relationship between the two prediction frames, the IoMin discrimination method is used to further determine whether the two prediction frames repeatedly identify the same water depth annotation. The discrimination formula is as follows: Where: S A 、S B are the areas of prediction boxes A and B respectively; I is the intersection area of ​​the two prediction boxes; min(S A ,S B ) represents the smaller area of ​​the prediction box A and B; if IoMin is greater than or equal to 0.6, it is determined that there is repeated recognition and S is deleted. A 、S B The prediction box with a smaller area.

5. The method according to claim 1 or 2, characterized in that In step e, the specific process of segmenting the water depth annotation within the prediction frame is as follows: First, the water depth annotation slices of the coarse positioning results are grayscaled, binarized and inverted; then, the noise interference items outside the statistical value range are screened out according to the water depth annotation area statistics; finally, the line feature interference items outside the aspect ratio range are screened out according to the aspect ratio of the water depth annotation, thereby retaining the connected domain units of the water depth annotation and screening out the remaining interference items; the screened connected domain units are the water depth annotations, and extracting them completes the segmentation.