A river channel extraction method, device and computer-readable storage medium

By intercepting the target image of the river area from the original image, performing binarization processing and edge detection, obtaining the river edge pixel points, calculating their geographical coordinates, and performing smoothing to generate a two-dimensional river model, the problem of inaccurate river extraction in the existing technology is solved and higher accuracy of river information extraction is achieved.

CN114255352BActive Publication Date: 2025-05-27PETROCHINA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010948742.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-10
Publication Date
2025-05-27
Estimated Expiration
2040-09-10

AI Technical Summary

Technical Problem

The existing river channel extraction methods are difficult to accurately extract river channel information, especially when the river channel is wide, shallow, scattered and volatile, and the flow is changing.

Method used

By intercepting the target image of the river channel area from the original image, performing binarization processing and edge detection, obtaining the river channel edge pixel points, computing their geographical coordinates, and performing smoothing processing to generate a two-dimensional river channel model.

Benefits of technology

This method reduces noise reduction and processes the edge of the river channel, which significantly improves the accuracy of extracting river channel information, and can extract river channel information more accurately than traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255352B_ABST
    Figure CN114255352B_ABST
Patent Text Reader

Abstract

The present application discloses a river channel extraction method, apparatus, and computer-readable storage medium, belonging to the field of image processing technology. The method includes: intercepting a target image including a river channel area; performing binarization processing on the target image to obtain a binary target image; obtaining the river channel edge pixel points in the binary target image; calculating the geographical coordinates of the river channel edge pixel points; obtaining river channel scatter data; and generating a two-dimensional river channel model. The river channel extraction method provided by the embodiments of the present application first obtains the river channel edge pixel points in the river channel area based on an edge detection algorithm, then performs smoothing processing on the river channel edge pixel points to obtain river channel scatter data, and further generates a two-dimensional river channel model according to the river channel scatter data. The river channel extraction method provided by the embodiments of the present application realizes noise reduction processing on the river channel edge by adopting a smoothing processing means, and can extract river channel information more accurately compared with traditional river channel extraction methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a river channel extraction method, apparatus, and computer-readable storage medium. Background Art

[0002] Image processing refers to the technology of analyzing images using computers and other technologies to achieve the desired results, also known as image processing. Image processing mainly includes image transformation, image coding and compression, image enhancement and restoration, image segmentation, and target extraction, etc. Among them, target extraction is an important aspect of image processing.

[0003] Target extraction refers to the operation of separating the target of interest from the background in a single image or a sequence of images, identifying and interpreting meaningful object entities in the image, and extracting different image features. Target extraction directly determines the quality of subsequent image recognition and tracking performance.

[0004] Target extraction is widely applied, such as face recognition and mapping remote sensing, etc., which also includes extracting river channel information from images, that is, river channel extraction. However, due to the wide, shallow, scattered, and variable flow of river channels, existing river channel extraction methods often cannot accurately extract river channel information. Summary of the Invention

[0005] In view of this, this application provides a river channel extraction method, apparatus, and computer-readable storage medium, which can improve the accuracy of extracting river channel information.

[0006] Specifically, it includes the following technical solutions:

[0007] According to one aspect of the embodiments of this application, a river channel extraction method is provided, including:

[0008] Intercept a target image including the river channel area from the original image;

[0009] Perform binarization processing on the target image to obtain a binary target image;

[0010] Based on the edge detection algorithm, obtain the river channel edge pixel points in the binary target image of the river channel area;

[0011] According to the pixel coordinates of the river channel edge pixel points, calculate the geographical coordinates of the river channel edge pixel points;

[0012] According to the geographical coordinates of the river channel edge pixel points, smooth the edge of the river channel area to obtain river channel scatter data;

[0013] According to the river channel scatter data, generate a two-dimensional river channel model of the river channel area.

[0014] Optionally, performing binarization processing on the target image to obtain a binary target image includes:

[0015] Setting the pixel values of the pixel points within the river channel area in the target image to a first pixel value;

[0016] Setting the pixel values of the pixel points outside the river channel area in the target image to a second pixel value;

[0017] Wherein, the first pixel value is 0 and the second pixel value is 255; or, the first pixel value is 255 and the second pixel value is 0.

[0018] Optionally, based on an edge detection algorithm, obtaining the river channel edge pixel points in the binary target image includes:

[0019] Performing smoothing processing on the binary target image using Gaussian filtering to obtain a smoothed binary target image;

[0020] Determining the gradient direction of the gray intensity in the smoothed binary target image, and retaining the pixel points corresponding to the maximum gradient intensity in the gradient direction to obtain the river channel edge pixel points.

[0021] Optionally, calculating the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points includes:

[0022] According to the scale of the binary target image and the number of pixel points within the scale length, magnifying the pixel coordinates of the river channel edge pixel points to obtain the geographical coordinates of the river channel edge pixel points.

[0023] Optionally, smoothing the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain the river channel scatter data includes:

[0024] Among the geographical coordinates of the river channel edge pixel points, extracting a number of river channel edge pixel points at a preset same interval of pixel points as the river channel scatter data.

[0025] Optionally, the edge detection algorithm includes at least one of Canny edge detection algorithm, Sobel edge detection algorithm, Laplace edge detection algorithm, and Scharr edge detection algorithm.

[0026] Optionally, generating the two-dimensional river channel model of the river channel area according to the river channel scatter data includes:

[0027] Generating the two-dimensional river channel model through computer-aided design according to the river channel scatter data.

[0028] According to another aspect of the embodiments of the present application, a river channel extraction device is provided, including:

[0029] A cropping module, configured to crop a target image including a river channel area from an original image;

[0030] A binarization module, configured to perform binarization processing on the target image to obtain a binary target image;

[0031] A first acquisition module, configured to obtain river channel edge pixel points in the binary target image of the river channel area based on an edge detection algorithm;

[0032] A calculation module, configured to calculate the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points;

[0033] A second acquisition module, configured to perform smoothing processing on the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data;

[0034] A generation module, configured to generate a two-dimensional river channel model of the river channel area according to the river channel scatter data.

[0035] According to still another aspect of the embodiments of the present application, a river channel extraction device is provided, including: a processor and a memory;

[0036] A computer program is stored on the memory, and the computer program is configured to be executed by the processor. When the computer program is executed by the processor, it can implement the river channel extraction method as described above.

[0037] According to still another aspect of the embodiments of the present application, a computer-readable storage medium is provided. A computer program is stored in the storage medium, and when the stored computer program is executed by a processor, it can implement the river channel extraction method as described above.

[0038] The beneficial effects of the technical solutions provided by the embodiments of the present application at least include:

[0039] The river channel extraction method provided by the embodiments of the present application first obtains river channel edge pixel points in the river channel area based on an edge detection algorithm, then performs smoothing processing on the river channel edge pixel points to obtain river channel scatter data, and further generates a two-dimensional river channel model according to the river channel scatter data. The river channel extraction method provided by the embodiments of the present application realizes noise reduction processing on the river channel edge by adopting a smoothing processing means. Compared with the traditional river channel extraction method, it can extract river channel information more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0041] Figure 1 It is a flowchart of a river channel extraction method provided by an embodiment of the present application;

[0042] Figure 2 It is a schematic diagram of a target image provided by an embodiment of the present application;

[0043] Figure 3 It is a schematic diagram of a binary target image provided by an embodiment of the present application;

[0044] Figure 4 It is a schematic diagram of river channel scatter data provided by an embodiment of the present application;

[0045] Figure 5 It is a schematic diagram of a two-dimensional river channel model provided by an embodiment of the present application;

[0046] Figure 6 It is a schematic diagram of a river channel extraction device provided by an embodiment of the present application.

[0047] Through the above drawings, the clear embodiments of the present application have been shown, and there will be more detailed descriptions later. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments

[0048] Unless otherwise defined, all technical terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the art. To make the technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the drawings.

[0049] The embodiments of the present application provide a river channel extraction method, as Figure 1 shown, the river channel extraction method includes:

[0050] Step 101, intercept a target image including the river channel area from the original image;

[0051] Step 102, perform binarization processing on the target image to obtain a binary target image;

[0052] Step 103, based on an edge detection algorithm, obtain the river channel edge pixel points of the river channel area in the binary target image;

[0053] Step 104: Calculate the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points;

[0054] Step 105: Smooth the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data;

[0055] Step 106: Generate a two-dimensional river channel model of the river channel area according to the river channel scatter data.

[0056] The river channel extraction method provided by the embodiment of the present application first obtains the river channel edge pixel points of the river channel area based on the edge detection algorithm, then smooths the river channel edge pixel points to obtain river channel scatter data, and further generates a two-dimensional river channel model according to the river channel scatter data. The river channel extraction method provided by the embodiment of the present application realizes the noise reduction processing of the river channel edge by adopting the smoothing processing means, and can extract the river channel information more accurately compared with the traditional river channel extraction method.

[0057] For step 101, to intercept the target image including the river channel area from the original image, it is first necessary to obtain the original image. Specifically, an image containing a river channel can be obtained from the network, or the original image can be obtained from a pre-set image database containing river channels. The pre-set image database includes a large number or even a vast amount of river channel map images. It can also be obtained from the map interface of the terminal device, such as the web map interface of the computer terminal or the map-based APP interface of the intelligent terminal, etc. to obtain the original map.

[0058] After obtaining the original map, in order to improve the efficiency and accuracy of river channel extraction, the original image can be intercepted and cropped to eliminate unnecessary interference and redundant information, and retain the river channel information, so as to obtain the target image only including the river channel area, as Figure 2 shown.

[0059] For step 102, after intercepting the target image, perform binarization processing on the target image to obtain the binarized target image after binarization processing. The binarized target image includes river channel information and background information. In order to highlight the river channel information, the river channel information and the background information can present an obvious black and white effect.

[0060] Specifically, the pixel value of the pixel points within the river channel area in the target image can be set as the first pixel value; the pixel value of the pixel points outside the river channel area in the target image can be set as the second pixel value; wherein, the first pixel value is 0 and the second pixel value is 255; or, the first pixel value is 255 and the second pixel value is 0.

[0061] Binarization means setting the pixel values of the target and the background in the image to 0 and 255 respectively, so that the target part and the background part show obvious black-and-white effects to distinguish the target part from the background part. In the embodiments of the present application, the river channel area in the target image is used as the target part, and the part outside the river channel area in the target image is used as the background part. The target image is binarized to obtain a binary target image, as Figure 3 shown.

[0062] In the embodiments of the present application, the pixel values of the pixel points in the river channel area and the pixel values of the pixel points outside the river channel area in the target image are respectively set to a first pixel value and a second pixel value. Among them, the first pixel value is 0 or 255. Correspondingly, the first pixel value is 255 or 0. Such a setting can improve the diversity of binarization processing.

[0063] For step 103, in order to improve the accuracy of edge detection and thus improve the accuracy of river channel extraction, after obtaining the binary target image, the river channel edge pixel points in the binary target image can be extracted by an edge detection algorithm. Among them, the edge detection algorithm includes at least one of the Canny edge detection algorithm, the Sobel edge detection algorithm, the Laplace edge detection algorithm, and the Scharr edge detection algorithm. The above edge detection algorithms are common edge detection algorithms in the prior art and will not be elaborated here in detail.

[0064] In a possible implementation manner, based on the edge detection algorithm, obtaining the river channel edge pixel points in the binary target image may include the following steps:

[0065] Use Gaussian filtering to smooth the binary target image to obtain a smoothed binary target image;

[0066] Determine the gradient direction of the gray intensity in the smoothed binary target image, and retain the pixel points corresponding to the maximum value of the gradient intensity in the gradient direction to obtain the river channel edge pixel points.

[0067] When performing edge detection, first use Gaussian filtering to smooth the binary target image to obtain a smoothed binary target image, and then extract the edge of the smoothed binary target image, that is, by determining the gradient direction of the gray intensity in the smoothed binary target image, retaining the pixel points corresponding to the maximum value of the gradient intensity in the gradient direction, and deleting other pixel points except the above maximum value to obtain the river channel edge pixel points.

[0068] In the embodiments of the present application, performing a denoising process on the binary target image by an edge detection algorithm can improve the accuracy of edge detection.

[0069] For step 104, after obtaining the river channel edge pixel points, the geographical coordinates of the river channel edge pixel points can be calculated based on the pixel coordinates of the river channel edge pixel points. Among them, the geographical coordinates can be the coordinates used to describe the relative geographical positions of each river channel edge pixel point, or the coordinates used to describe the actual geographical positions of each river channel edge pixel point.

[0070] Specifically, according to the scale of the binary target image and the number of pixel points within the scale length, the pixel coordinates of the river channel edge pixel points can be enlarged to obtain the geographical coordinates of the river channel edge pixel points.

[0071] When based on the river channel edge pixel points of the river channel area, according to the scale of the binary target image and the number of pixel points within the scale length, that is, by taking the ratio of the number of pixel points within the scale length to the scale length, the number of pixel points per unit length in the image can be obtained. Then, based on the number of pixel points per unit length in the image, the pixel coordinates of the river channel edge pixel points are enlarged proportionally, and the geographical coordinates of the river channel edge pixel points can be obtained.

[0072] For step 105, the river channel edge formed by the above-mentioned geographical coordinates of the river channel edge pixel points is not smooth enough. In order to obtain a smoother river channel edge for subsequent calculations and use, the river channel edge can be smoothed again according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data, as Figure 4 shown.

[0073] Specifically, among the geographical coordinates of the river channel edge pixel points, a number of river channel edge pixel points are extracted at a preset same interval of pixel points as the river channel scatter data.

[0074] When smoothing the river channel edge, the geographical coordinates of all the river channel edge pixel points are divided into multiple sets of geographical coordinates of river channel edge pixel points along the river channel direction. Each set of geographical coordinates of river channel edge pixel points contains the geographical coordinates of multiple adjacent river channel edge pixel points. For example, each set of geographical coordinates of river channel edge pixel points contains the geographical coordinates of 10 adjacent river channel edge pixel points. For each set of geographical coordinates of river channel edge pixel points, the geographical coordinate of the first river channel edge pixel point and the geographical coordinate of the last river channel edge pixel point in the set are retained as the river channel scatter data of the set of geographical coordinates of river channel edge pixel points. Accordingly, the river channel scatter data of each set of geographical coordinates of river channel edge pixel points are obtained in sequence, and the river channel scatter data of all sets of geographical coordinates of river channel edge pixel points form the river channel scatter data of the entire river channel area.

[0075] In the embodiment of the present application, through the above steps to perform another noise reduction process on the binary target image, the accuracy of river channel extraction can be further improved.

[0076] For step 106, after obtaining the river channel scatter data, a two-dimensional river channel model with smooth edges can be generated.

[0077] To improve the efficiency of river channel extraction, specifically, a two-dimensional river channel model can be generated according to the river channel scatter data through computer-aided design, as Figure 5 shown.

[0078] Among them, computer-aided design (English full name: Computer Aided Design, abbreviated as CAD) refers to using a computer and its graphic devices for design work. In the embodiment of the present application, after obtaining the river channel scatter data, the river channel scatter data is imported into CAD software, and a two-dimensional river channel model of the river channel can be generated.

[0079] The embodiment of the present application also provides a river channel extraction device, as Figure 6 shown. The river channel extraction device includes:

[0080] An intercepting module 201, configured to intercept a target image including a river channel area from an original image;

[0081] A binarization module 202, configured to perform binarization processing on the target image to obtain a binary target image;

[0082] A first obtaining module 203, configured to obtain river channel edge pixel points in the river channel area of the binary target image based on an edge detection algorithm;

[0083] A calculation module 204, configured to calculate the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points;

[0084] A second obtaining module 205, configured to smooth the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data;

[0085] A generation module 206, configured to generate a two-dimensional river channel model of the river channel area according to the river channel scatter data.

[0086] Optionally, the binarization module 202 includes:

[0087] A first setting unit, configured to set the pixel value of the pixel points in the river channel area of the target image to a first pixel value;

[0088] A second setting unit, configured to set the pixel value of the pixel points outside the river channel area of the target image to a second pixel value;

[0089] Among them, the first pixel value is 0, the second pixel value is 255; or, the first pixel value is 255, and the second pixel value is 0.

[0090] Optionally, the first acquisition module 203 includes:

[0091] A first processing unit, configured to perform smoothing processing on the binary target image by using Gaussian filtering to obtain a smoothed binary target image;

[0092] A determination unit, configured to determine the gradient direction of the gray intensity in the smoothed binary target image, and retain the pixel points corresponding to the maximum values of the gradient intensity in the gradient direction to obtain river channel edge pixel points.

[0093] Optionally, the calculation module 204 includes:

[0094] A calculation unit, configured to magnify the pixel coordinates of the river channel edge pixel points according to the scale of the binary target image and the number of pixel points within the scale length to obtain the geographical coordinates of the river channel edge pixel points.

[0095] Optionally, the second acquisition module 205 includes:

[0096] A second processing unit, configured to extract a plurality of river channel edge pixel points at a preset same interval of pixel points from the geographical coordinates of the river channel edge pixel points as river channel scatter data.

[0097] Optionally, the generation module 206 includes:

[0098] A generation unit, configured to generate a two-dimensional river channel model through computer-aided design according to the river channel scatter data.

[0099] The river channel extraction device provided by the embodiment of the present application first obtains river channel edge pixel points of a river channel area based on an edge detection algorithm, then performs smoothing processing on the river channel edge pixel points to obtain river channel scatter data, and further generates a two-dimensional river channel model according to the river channel scatter data. The river channel extraction method provided by the embodiment of the present application realizes noise reduction processing on the river channel edge by adopting a smoothing processing means. Compared with the traditional river channel extraction method, it can extract river channel information more accurately.

[0100] It should be noted that: when the river channel extraction device provided in the above embodiment extracts the river channel edge, only the above-mentioned division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the river channel extraction device provided in the above embodiment and the embodiment of the river channel extraction method belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0101] An embodiment of the present application also provides a river extraction device, including: a processor and a memory; a computer program is stored on the memory, and the computer program is configured to be executed by the processor. When the computer program is executed by the processor, it can implement any of the above river extraction methods.

[0102] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the stored computer program is executed by a processor, it can implement any of the above river extraction methods.

[0103] It should be noted that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.

[0105] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.

[0107] In this application, the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "plural" refers to two or more, unless otherwise clearly defined.

[0108] The above is only for the convenience of those skilled in the art to understand the technical solution of this application and is not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A river channel extraction method, characterized in that, it includes: Cropping a target image including the river channel area from the original image; Performing binarization processing on the target image to obtain a binary target image; Based on an edge detection algorithm, obtaining the river channel edge pixel points of the river channel area in the binary target image; Calculating the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points; Smoothing the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data; Generating a two-dimensional river channel model of the river channel area according to the river channel scatter data; Wherein, the performing binarization processing on the target image to obtain a binary target image includes: Setting the pixel value of the pixel points within the river channel area in the target image to a first pixel value; Setting the pixel value of the pixel points outside the river channel area in the target image to a second pixel value; Wherein, the first pixel value is 0 and the second pixel value is 255; or, the first pixel value is 255 and the second pixel value is 0; Wherein, the smoothing the edge of the river channel area according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data includes: When smoothing the river channel edge, dividing the geographical coordinates of all river channel edge pixel points along the river channel direction into multiple sets of geographical coordinates of river channel edge pixel points, and each set of geographical coordinates of river channel edge pixel points contains the geographical coordinates of multiple adjacent river channel edge pixel points; for each set of geographical coordinates of river channel edge pixel points, retaining the geographical coordinates of the first river channel edge pixel point and the last river channel edge pixel point in the set as the river channel scatter data of the set of geographical coordinates of river channel edge pixel points; successively obtaining the river channel scatter data of each set of geographical coordinates of river channel edge pixel points, and the river channel scatter data of all sets of geographical coordinates of river channel edge pixel points form the river channel scatter data of the entire river channel area.

2. The river channel extraction method according to claim 1, characterized in that, the obtaining the river channel edge pixel points of the river channel area in the binary target image based on an edge detection algorithm includes: Performing smoothing processing on the binary target image by using Gaussian filtering to obtain a smoothed binary target image; Determining the gradient direction of the gray intensity in the smoothed binary target image, and retaining the pixel points corresponding to the maximum gradient intensity in the gradient direction to obtain the river channel edge pixel points.

3. The river channel extraction method as claimed in claim 1, characterized in that, the calculating the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points includes: According to the scale of the binary target image and the number of pixel points within the scale length, magnifying the pixel coordinates of the river channel edge pixel points to obtain the geographical coordinates of the river channel edge pixel points.

4. The river channel extraction method as claimed in claim 1, characterized in that, The edge detection algorithm includes at least one of Canny edge detection algorithm, Sobel edge detection algorithm, Laplace edge detection algorithm and Scharr edge detection algorithm.

5. The river channel extraction method according to claim 1, characterized in that the generation of the two-dimensional river channel model of the river channel region according to the river channel scatter data includes: generating the two-dimensional river channel model by computer-aided design according to the river channel scatter data.

6. A river channel extraction device, characterized in that it includes: a truncation module for truncating a target image including a river channel region from an original image; a binarization module for performing binarization processing on the target image to obtain a binary target image; a first acquisition module for acquiring river channel edge pixel points in the river channel region of the binary target image based on an edge detection algorithm; a calculation module for calculating the geographical coordinates of the river channel edge pixel points according to the pixel coordinates of the river channel edge pixel points; a second acquisition module for smoothing the edge of the river channel region according to the geographical coordinates of the river channel edge pixel points to obtain river channel scatter data; a generation module for generating a two-dimensional river channel model of the river channel region according to the river channel scatter data; the binarization module includes: a first setting unit for setting the pixel value of the pixel points in the river channel region of the target image to a first pixel value; a second setting unit for setting the pixel value of the pixel points outside the river channel region of the target image to a second pixel value; wherein the first pixel value is 0 and the second pixel value is 255; or the first pixel value is 255 and the second pixel value is 0; wherein the generation module is used for: when smoothing the river channel edge, dividing the geographical coordinates of all river channel edge pixel points along the river channel direction into multiple sets of geographical coordinates of river channel edge pixel points, and each set of geographical coordinates of river channel edge pixel points contains the geographical coordinates of multiple adjacent river channel edge pixel points; for each set of geographical coordinates of river channel edge pixel points, retaining the geographical coordinates of the first river channel edge pixel point and the geographical coordinates of the last river channel edge pixel point in the set as the river channel scatter data of the set of geographical coordinates of river channel edge pixel points; sequentially obtaining the river channel scatter data of each set of geographical coordinates of river channel edge pixel points, and the river channel scatter data of all sets of geographical coordinates of river channel edge pixel points form the river channel scatter data of the entire river channel region.

7. A river channel extraction device, including: a processor and a memory; a computer program is stored on the memory, and the computer program is configured to be executed by the processor, and when the computer program is executed by the processor, it can implement the river channel extraction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, and when the stored computer program is executed by a processor, it can implement the river channel extraction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for detecting optical remote-sensing image ship with assistance of prior geographic information

    CN103886285A

  • Method for generating three-dimensional real scene road model of highway

    CN106355643A