Amphibious self-adaptive segmentation method and system for electronic chart image
By performing color space transformation and adaptive threshold segmentation on electronic chart images, and combining gradient value calculation to process binary segmentation diagrams, the problems of poor noise sensitivity, high algorithm complexity and limited segmentation effect of automatic segmentation in the existing technology are solved, and a more accurate and reliable water and land segmentation effect is achieved.
Patent Information
- Application Number
- CN202411890371.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has problems in automatic segmentation of water and land, such as poor noise sensitivity, high algorithm complexity, and segmentation effect is limited by grayscale differences and landscape complexity.
By performing color space transformation on the electronic chart image, a hue, saturation and brightness channel diagram is obtained, combined with adaptive threshold segmentation and gradient value calculation, the binary segmentation diagram is processed to realize water and land segmentation.
It improves the accuracy and reliability of water and land segmentation, and can complete the water and land segmentation task more accurately in complex scenarios.
Smart Images

Figure CN119887818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a method and system for adaptively segmenting land and water in an electronic nautical chart image. Background Art
[0002] In the operation of underwater unmanned platforms, the automatic land and water segmentation technology of electronic nautical chart images occupies an extremely critical position. When unmanned submersibles operate underwater, they need to carry out operations based on electronic nautical charts generated by satellite remote sensing images. Timely and accurate land and water segmentation can effectively confirm the scope of the navigation waters and then reasonably plan the navigation route.
[0003] Automatic land and water segmentation is to use computers to automatically identify and distinguish between land and water. At present, the main research on automatic land and water segmentation focuses on three directions. The first is the segmentation method based on edge detection, which is based on detecting the edges of different regions to deal with image segmentation problems. However, the defect of this method is that it is extremely sensitive to noise and has poor robustness. The second is the classification method based on classifiers, which often uses classifiers such as support vector machines to classify water and land after training. However, this method has high algorithm complexity, which is not only demanding in terms of computing resources, but also has a high cost for obtaining samples. The third is the threshold-based segmentation method, which is the most studied type at present. Common methods are based on image grayscale images, using Kmeans and other methods to perform two-type differential clustering analysis, or performing histogram grayscale value statistics to determine the threshold to achieve segmentation. However, the image information contained in the grayscale image itself is relatively limited, and its segmentation effect is deeply affected by the grayscale difference of the boundary between water and land and the complexity of the image scene. When the boundary between water and land is unclear or the texture of the target water area is uneven, this method is difficult to accurately complete the land and water segmentation task.
[0004] Through searching patent documents, the invention patent with publication number CN116434065B was found, which disclosed a method for water body segmentation of full-color geometrically corrected remote sensing images. The method includes: obtaining the original full-color remote sensing image containing land and water and preprocessing it; determining the retained pixels according to the brightness and gradient of the preprocessed full-color remote sensing image; performing image erosion on the full-color remote sensing image after pixel processing according to the resolution; using the seed point region growth algorithm to grow the water region; and eliminating non-water body regions. This patent is mainly aimed at water body segmentation of full-color geometrically corrected remote sensing images, but does not fully utilize the color channel characteristics, and only focuses on brightness and gradient, which may limit the accuracy in the recognition of complex water and land scenes.
[0005] In summary, in view of the above-mentioned problems of the prior art, studying an adaptive land and water segmentation method and system for electronic nautical chart images has become a key task that needs to be solved urgently. Summary of the invention
[0006] In view of the defects in the prior art, the object of the present invention is to provide a method and system for adaptive land and water segmentation of electronic nautical chart images.
[0007] According to the present invention, a method for adaptively segmenting land and water in an electronic nautical chart image comprises the following steps:
[0008] Step S1, performing color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map;
[0009] Step S2, performing adaptive threshold segmentation on the hue channel image to obtain a binary segmentation image;
[0010] Step S3, calculating the gradient value of the brightness channel image to obtain a gradient low threshold and a gradient high threshold;
[0011] Step S4, combining the gradient value, the low gradient threshold and the high gradient threshold, processing the binary segmentation map to obtain a new binary segmentation map;
[0012] Step S5, processing the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
[0013] Preferably, in step S2, adaptive threshold segmentation is performed on the hue value of the hue channel map to obtain a binary segmentation map X1.
[0014] Preferably, in step S2, in the electronic nautical chart image, the water area and the land have differences in color distribution. The hue channel map obtained in step S1 is calculated using the maximum inter-class variance method to obtain an adaptive threshold, and then the hue value is segmented by an adaptive threshold to finally obtain a binary segmentation map X1.
[0015] Preferably, in step S2, the maximum inter-class variance method is used to calculate the adaptive threshold for the hue channel map, and then the hue value is segmented by the adaptive threshold, and finally a binary segmentation map X1 is obtained.
[0016] Preferably, step S3 includes the following sub-steps:
[0017] Step S3.1, for the brightness channel map, calculate the gradient value G at each pixel position m , the gradient value G m The expression is:
[0018]
[0019] Among them, g m,x and g m,y Respectively represent the horizontal and vertical gradients of the magnitude corresponding to the mth pixel position in the region, G m Represents the gradient value corresponding to the mth pixel position in the region;
[0020] Step S3.2, performing statistics on the gradient values, and calculating the gradient low threshold T1 and the gradient high threshold T2.
[0021] Preferably, in step S3.2, the average gradient value G of all pixel positions is first calculated. mean , then, through G mean Get the gradient low threshold T1, the expression is:
[0022] T1=G mean
[0023] At the same time, the gradient high threshold T2 is obtained, and the expression is:
[0024] T2=3.5*G mean
[0025] Preferably, step S4 includes the following sub-steps:
[0026] Step S4.1, correcting the positions of water pixels that are mistakenly classified as land on the binary segmentation map X1 according to the gradient value, to obtain a preliminarily corrected binary segmentation map;
[0027] Step S4.2, according to the gradient value, correct the positions of the land pixels that are wrongly classified as water areas on the initially corrected binary segmentation map to obtain a new binary segmentation map X2.
[0028] Preferably, in step S4.1, by finding the pixel position whose gradient value is lower than the gradient low threshold T1 and whose value is "0" on the binary segmentation map X1, the value of the same position on the binary segmentation map X1 is set to "1" to obtain a preliminary corrected binary segmentation map.
[0029] Preferably, in step S4.2, the pixel positions whose gradient values are higher than the gradient high threshold T2 and whose values are "1" on the binary segmentation map after preliminary correction are searched, and the values of the same positions on the binary segmentation map after preliminary correction are set to "0" to obtain a new binary segmentation map X2.
[0030] Preferably, step S5 includes the following sub-steps:
[0031] Step S5.1, for the new binary segmentation map X2, mark all connected areas of suspected water areas with pixel position values of "1". In order to exclude the interfering water areas with smaller areas, set the area threshold T3, set the area position value of the area smaller than T3 to "0", and obtain the water area initial screening segmentation map X3, where T3 is a constant value;
[0032] Step S5.2, for the water area initial screening segmentation map X3, mark all the connected areas of suspected land with pixel position value "0", set the area threshold T4 to exclude the interfering land areas with smaller area, set the area position value of the area smaller than T4 to "1", and obtain the water-land initial screening segmentation map X4, where T4 is a constant value;
[0033] In step S5.3, morphological processing is performed on the land-water preliminary screening segmentation map X4 to finally obtain the land-water segmentation map X5, thereby completely realizing the land-water adaptive segmentation of the electronic chart image.
[0034] The present invention also provides an electronic nautical chart image land and water adaptive segmentation system, comprising:
[0035] Module M1 performs color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map;
[0036] Module M2, performs adaptive threshold segmentation on the hue channel image to obtain a binary segmentation image;
[0037] Module M3 calculates the gradient value of the brightness channel image to obtain a low gradient threshold and a high gradient threshold;
[0038] Module M4, combining the gradient value, the low gradient threshold and the high gradient threshold, processes the binary segmentation map to obtain a new binary segmentation map;
[0039] Module M5 processes the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention can fully explore and effectively utilize the hue and brightness information of the image by converting the satellite remote sensing image from RGB space to HSV space. On this basis, the adaptive threshold segmentation method is combined to achieve segmentation, which helps to improve the accuracy of water and land segmentation and provides a more accurate and reliable solution for the water and land segmentation of electronic nautical chart images. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0043] Figure 1 It is a schematic diagram of the flow of a method for adaptively segmenting land and water in an electronic nautical chart image in an embodiment of the present invention;
[0044] Figure 2 This is a comparison chart of the water-land segmentation simulation of the present invention and other methods. DETAILED DESCRIPTION
[0045] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0046] The present invention proposes an adaptive water-land segmentation method for electronic charts based on the differences in color and brightness between water and land in electronic chart images. The core goal is to achieve accurate automatic segmentation of water and land. Specifically, the present invention transforms the color space of satellite remote sensing images, then adaptively thresholds the hue channel map obtained after the transformation, and calculates the gradient value of each pixel based on the brightness channel map. Then, the segmentation result of the hue channel map is processed in combination with the position gradient value of the pixel point, so as to process the connected areas of water and land, and finally obtain a water-land segmentation map to achieve effective segmentation of water and land.
[0047] Embodiment 1:
[0048] Figure 1 The figure is a flow chart of a method for adaptively segmenting land and water in an electronic nautical chart image in an embodiment of the present invention.
[0049] like Figure 1 As shown, this embodiment provides a method for adaptively segmenting land and water in an electronic nautical chart image, comprising the following steps:
[0050] Step S1, performing color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map.
[0051] Specifically, the electronic chart image is converted from the RGB color space to the HSV color space to obtain a hue channel map, a saturation channel map, and a brightness channel map.
[0052] Step S2, performing adaptive threshold segmentation on the hue channel image to obtain a binary segmentation image.
[0053] Specifically, adaptive threshold segmentation is performed on the hue value of the hue channel map to obtain a binary segmentation map X1.
[0054] In this embodiment, in the electronic nautical chart image, the water area and the land have differences in color distribution. The maximum inter-class variance method is used to calculate the adaptive threshold for the hue channel map obtained in step S1, and then the hue value is segmented by the adaptive threshold, and finally the binary segmentation map X1 is obtained.
[0055] The maximum inter-class variance method is a commonly used threshold calculation method, which has the characteristics of high calculation speed and efficiency.
[0056] Step S3, calculating the gradient value of the brightness channel image to obtain a gradient low threshold and a gradient high threshold.
[0057] Specifically, step S3 includes the following sub-steps:
[0058] Step S3.1, for the brightness channel image obtained in step S1, calculate the gradient value G at each pixel position m .
[0059] In this embodiment, the gradient value G m The expression is:
[0060]
[0061] Among them, g m,x and g m,y Respectively represent the horizontal and vertical gradients of the magnitude corresponding to the mth pixel position in the region, G m Represents the gradient value corresponding to the mth pixel position in the region.
[0062] Step S3.2, performing statistics on the gradient values obtained in step S3.1, and calculating the gradient low threshold T1 and the gradient high threshold T2.
[0063] In this embodiment, the average value of the gradient values of all pixel positions G is first calculated. mean , then, through G mean The expression of the gradient low threshold T1 is obtained as follows:
[0064] T1=G mean
[0065] At the same time, the expression of the gradient high threshold T2 is obtained as follows:
[0066] T2=3.5*G mean
[0067] Step S4, combining the gradient value, the low gradient threshold and the high gradient threshold, processing the binary segmentation map to obtain a new binary segmentation map.
[0068] Specifically, step S4 includes the following sub-steps:
[0069] Step S4.1, based on the gradient value, correct the positions of water pixels that are mistakenly classified as land on the binary segmentation map X1 to obtain a preliminarily corrected binary segmentation map.
[0070] In this embodiment, since the water area usually has a lower gradient value, by finding the pixel position whose gradient value is lower than the gradient low threshold T1 and whose value is "0" on the binary segmentation map X1, the value of the same position on the binary segmentation map X1 is set to "1" to obtain a preliminary corrected binary segmentation map.
[0071] Step S4.2, according to the gradient value, correct the positions of the land pixels that are wrongly classified as water areas on the initially corrected binary segmentation map to obtain a new binary segmentation map X2.
[0072] In this embodiment, specifically, since the boundary line between land and water and the complex terrain area on land both have higher gradient values, the pixel positions whose gradient values are higher than the gradient high threshold T2 and whose values are "1" on the binary segmentation map after preliminary correction are found, and the values of the same positions on the binary segmentation map after preliminary correction are set to "0" to obtain a new binary segmentation map X2.
[0073] Step S5, processing the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
[0074] Specifically, step S5 includes the following sub-steps:
[0075] Step S5.1, for the new binary segmentation map X2, mark the connected areas of all suspected water areas with pixel position values of "1". In order to exclude the smaller interfering water areas, set the regional threshold T3, and set the position value of the area smaller than T3 to "0" to obtain the initial screening segmentation map of the water area X3, where T3 is a constant value.
[0076] Step S5.2, for the water area initial screening segmentation map X3, mark all connected areas of suspected land with pixel position values of "0". In order to exclude smaller interfering land areas, set the regional threshold T4, and set the position value of the area smaller than T4 to "1" to obtain the water and land initial screening segmentation map X4, where T4 is a constant value.
[0077] In step S5.3, morphological processing is performed on the land-water preliminary screening segmentation map X4 to finally obtain the land-water segmentation map X5, thereby completely realizing the land-water adaptive segmentation of the electronic nautical chart image.
[0078] In this embodiment, the morphological processing method adopted in step S5.3 is: dilation followed by corrosion operation.
[0079] Embodiment 2:
[0080] The present invention also provides an electronic nautical chart image adaptive water and land segmentation system, which can be implemented by executing the process steps of the electronic nautical chart image adaptive water and land segmentation method, that is, those skilled in the art can understand the electronic nautical chart image adaptive water and land segmentation method as a preferred implementation of the electronic nautical chart image adaptive water and land segmentation system.
[0081] The electronic chart image land and water adaptive segmentation system includes:
[0082] Module M1 performs color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map;
[0083] Module M2, performs adaptive threshold segmentation on the hue channel image to obtain a binary segmentation image;
[0084] Module M3 calculates the gradient value of the brightness channel image to obtain a low gradient threshold and a high gradient threshold;
[0085] Module M4, combining the gradient value, the low gradient threshold and the high gradient threshold, processes the binary segmentation map to obtain a new binary segmentation map;
[0086] Module M5 processes the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
[0087] The following is a further description of the technical effects of the present invention in combination with simulation experiments:
[0088] 1. Simulation conditions: All simulation experiments were implemented using Matlab 2015b software under Windows 10 operating system;
[0089] 2. Simulation content and result analysis:
[0090] The method of the present invention is used in a land and water segmentation experiment together with a segmentation method based on edge detection using the Sobel operator and a maximum variance adaptive segmentation method based on grayscale images.
[0091] Figure 2 This is a comparison chart of the water-land segmentation simulation of the present invention and other methods.
[0092] like Figure 2 As shown, compared with the method using edge detection and the method using grayscale images for adaptive segmentation, the water and land segmentation boundaries of the method of the present invention are clearer, more accurate and continuous, which indicates that the present invention has higher reliability and accuracy for water and land segmentation of electronic nautical chart images.
[0093] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0094] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for adaptive land and water segmentation of electronic nautical chart images, characterized in that: The steps include: Step S1, performing color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map; Step S2, performing adaptive threshold segmentation on the tone channel map to obtain a binary segmentation map; Step S3, calculating the gradient value of the brightness channel image to obtain a gradient low threshold and a gradient high threshold; Step S4, combining the gradient value, the gradient low threshold and the gradient high threshold, processing the binary segmentation map to obtain a new binary segmentation map; Step S5, processing the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
2. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 1, characterized in that: In the step S2, adaptive threshold segmentation is performed on the hue value of the hue channel map to obtain a binary segmentation map X1.
3. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 2, characterized in that: In the step S2, the maximum inter-class variance method is used to calculate the adaptive threshold for the hue channel map, and then the hue value is segmented by the adaptive threshold, and finally a binary segmentation map X1 is obtained.
4. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 3, characterized in that: The step S3 includes the following sub-steps: Step S3.1, for the brightness channel map, calculate the gradient value G at each pixel position m , the gradient value G m The expression is: Among them, g m,x and g m,y Respectively represent the horizontal and vertical gradients of the magnitude corresponding to the mth pixel position in the region, G m Represents the gradient value corresponding to the mth pixel position in the region; Step S3.2, performing statistics on the gradient values, and calculating a gradient low threshold T1 and a gradient high threshold T2.
5. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 4, characterized in that: In step S3.2, the average gradient value G of all pixel positions is first calculated. mean , then, through G mean Get the gradient low threshold T1, the expression is: T1=G mean At the same time, the gradient high threshold T2 is obtained, and the expression is: T2=3.5*G mean 6. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 5, characterized in that: The step S4 includes the following sub-steps: Step S4.1, correcting the positions of water pixels that are mistakenly classified as land on the binary segmentation map X1 according to the gradient value, to obtain a preliminarily corrected binary segmentation map; Step S4.2, according to the gradient value, correct the positions of the land pixels that are wrongly classified as water areas on the initially corrected binary segmentation map to obtain a new binary segmentation map X2.
7. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 6, characterized in that: In step S4.1, by finding the pixel positions whose gradient values are lower than the gradient low threshold T1 and whose values are "0" on the binary segmentation map X1, the values of the same positions on the binary segmentation map X1 are set to "1" to obtain a preliminarily corrected binary segmentation map.
8. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 7, characterized in that: In the step S4.2, the pixel positions whose gradient values are higher than the gradient high threshold T2 and whose values are "1" on the binary segmentation map after preliminary correction are searched, and the values of the same positions on the binary segmentation map after preliminary correction are set to "0" to obtain a new binary segmentation map X2.
9. The method for adaptive land and water segmentation of electronic nautical chart images according to claim 8, characterized in that: The step S5 comprises the following sub-steps: Step S5.1, for the new binary segmentation map X2, mark all connected areas of suspected water areas with pixel position values of "1", set a region threshold T3 to exclude smaller interfering water areas, set the region position value of the area smaller than T3 to "0", and obtain the water area initial screening segmentation map X3, where T3 is a constant value; Step S5.2, for the water area initial screening segmentation map X3, mark all the connected areas of suspected land with pixel position values of "0", set the area threshold T4 to exclude the interfering land areas with smaller areas, set the area position value of the area smaller than T4 to "1", and obtain the water-land initial screening segmentation map X4, where T4 is a constant value; Step S5.3, morphological processing is performed on the land-water preliminary screening segmentation map X4, and finally the land-water segmentation map X5 is obtained, thereby completely realizing the land-water adaptive segmentation of the electronic nautical chart image.
10. An adaptive land and water segmentation system for electronic nautical chart images, characterized in that: include: Module M1 performs color space transformation on the electronic chart image to obtain a hue channel map, a saturation channel map and a brightness channel map; Module M2, performing adaptive threshold segmentation on the hue channel map to obtain a binary segmentation map; Module M3, calculates the gradient value of the brightness channel image, and obtains a gradient low threshold and a gradient high threshold; Module M4, combining the gradient value, the gradient low threshold and the gradient high threshold, processes the binary segmentation map to obtain a new binary segmentation map; Module M5 processes the connected areas of the new binary segmentation map to obtain a land and water segmentation map.
Citation Information
Patent Citations
Water segmentation method for panchromatic geometrically corrected remote sensing images
CN116434065B