A method and system for generating a digital twin lake
By generating digital twin lakes through remote sensing image processing and iterative normal vector generation using a small amount of water depth data, the generation challenges in existing technologies are solved, providing efficient support for water conservancy governance.
Patent Information
- Application Number
- CN202210912332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-07-29
AI Technical Summary
Existing technologies make it difficult to efficiently generate digital twin lakes based on a small amount of real lake data, leading to problems in timely response to flood control scheduling and water resource management in water conservancy governance.
By acquiring remote sensing images of lakes, extracting lake boundaries and preprocessing them to form black and white images, sorting them to form closed vector curves, inserting vector points to form a grid plane, and using a small amount of real water depth data to iterate the normal vectors to generate a lakebed topographic structure map.
It has enabled the generation of real-time lake topographic structure maps based on a small amount of data, providing strong data support for water conservancy management and reducing manpower and material costs, with an error rate of less than 8%.
Smart Images

Figure CN115797594B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a method and system for generating a digital twin lake. BACKGROUND
[0002] Water, as the source of human life and the basis of survival, nurtures all life on earth. In recent years, due to overdevelopment of cities by humans and superimposed climate anomalies, flood disasters have become more frequent, and the annual water level of rivers and lakes has been rising. Using technological means is an effective response direction to enable a calm response when natural disasters occur.
[0003] With the development of science and technology, digital twin technology has emerged. Digital twin, also known as digital mapping and digital mirror, is a simulation process that fully utilizes physical models, sensor updates, and operation history data, integrates multi-disciplinary, multi-physical, multi-scale, and multi-probability, and completes mapping in a virtual space to reflect the full life cycle of the corresponding entity equipment. It can be seen that applying digital twin technology to water management and governance fields based on a digital version of a river lake clone can master the latest state of the river lake and thus conduct scientific governance. However, how to generate a digital twin lake based on a small amount of real lake data has become a technical problem to be solved. SUMMARY
[0004] In view of the problems in the prior art, the present application provides a method for generating a digital twin lake, comprising:
[0005] Step S1, obtaining a lake remote sensing image of a lake to be generated, and extracting a lake boundary from the lake remote sensing image to obtain an initial image containing the lake boundary;
[0006] Step S2, preprocessing the initial image to obtain a black and white image, and the lake boundary in the initial image is converted into a black and white boundary in the black and white image;
[0007] Step S3, sorting each pixel point on the black and white boundary according to the pixel coordinates of each pixel point in the black and white image, and connecting adjacent pixel points as vector points according to a preset direction to form a closed vector curve;
[0008] Step S4, inserting a plurality of new vector points into a lake region enclosed by the closed vector curve, and connecting all the vector points to form a grid plane containing a plurality of triangles;
[0009] Step S5, according to the first water depth, the first longitude and latitude of the deepest part of the lake to be generated and the second water depth, the second longitude and latitude of the plurality of arbitrary positions except the deepest part and the preset tensor associated with each line in the grid plane, iteratively processing the initial downward normal vector pre-configured for each vector point in the grid plane to obtain an iterated downward normal vector of each vector point, and generating a lake bed topographic structure map of the lake to be generated according to the iterated downward normal vector and the grid plane as a digital twin lake generation result of the lake to be generated.
[0010] Preferably, the step S1 comprises:
[0011] Step S11, acquiring the lake remote sensing image of the lake to be generated, and performing RGB color layering processing on the lake remote sensing image to obtain a red channel layering image, a green channel layering image and a blue channel layering image respectively;
[0012] Step S12, inputting the red channel layering image, the green channel layering image and the blue channel layering image into a boundary segmentation model pre-trained to obtain corresponding red channel segmentation map, green channel segmentation map and blue channel segmentation map respectively;
[0013] Step S13, merging the red channel segmentation map, the green channel segmentation map and the blue channel segmentation map to obtain the initial image containing the lake boundary.
[0014] Preferably, the step S2 comprises:
[0015] Step S21, performing normalization processing on the initial image to obtain a corresponding normalized image;
[0016] Step S22, calculating the pixel difference absolute value between adjacent two pixel points in each pixel point forming the lake boundary in the normalized image, and retaining each pixel point with a non-zero pixel difference absolute value to form the black and white image with the lake boundary as a black and white boundary.
[0017] Preferably, the step S4 comprises:
[0018] Step S41, sequentially grouping each vector point forming the closed vector curve according to the sorting result to form a plurality of combinations, each combination containing three vector points;
[0019] Step S42, taking the projection of the vector point in the middle of each combination on the line between the other two vector points as the new vector point corresponding to each combination;
[0020] Step S43, connecting the adjacent new vector points in sequence to form a plurality of vectors according to the corresponding combined sorting results, calculating the Euler angle between each two connected vectors, and determining whether the Euler angle is within a preset range:
[0021] If yes, each new vector point forming the two vectors is retained, and then step S44 is turned to;
[0022] If no, each new vector point forming the two vectors is discarded, and then step S44 is turned to;
[0023] Step S44, determining whether the total number of the retained new vector points is less than a threshold value:
[0024] If no, for each retained new vector point, a new line is established between the new vector point and the remaining two vector points in the corresponding combination, and each retained new vector point is sequentially grouped according to the sorting results to form a plurality of combinations, and then the step S42 is returned;
[0025] If yes, lines are established between the retained new vector points and between the new vector points and other vector points to form the mesh plane containing a plurality of mutually non-overlapping triangles.
[0026] Preferably, in the step S43, the preset range is (0°, 180°).
[0027] Preferably, in the step S44, the lines between the retained new vector points and between the new vector points and other vector points are established by using a triangulation algorithm.
[0028] Preferably, in the step S44, the threshold value is 5.
[0029] Preferably, in the step S5, a random gradient descent algorithm is used to iteratively process each initial downward normal vector, and the iterative downward normal vector of each vector point is iterated.
[0030] The application also provides a generation system of a digital twin lake, which applies the above generation method, and the generation system comprises:
[0031] A boundary extraction module is configured to obtain a lake remote sensing image of a lake to be generated, and perform lake boundary extraction on the lake remote sensing image to obtain an initial image containing a lake boundary.
[0032] The first processing module is connected with the boundary extraction module and is configured to pre-process the initial image to obtain a black-and-white image, and the lake boundary in the initial image is converted into a black-and-white boundary in the black-and-white image.
[0033] The second processing module is connected with the first processing module and is configured to sort each pixel point on the black-and-white boundary according to the pixel coordinates of the pixel point in the black-and-white image, and form a closed vector curve by connecting adjacent pixel points as vector points in a preset direction according to the sorting result.
[0034] The third processing module is connected with the second processing module and is configured to insert a plurality of new vector points into a lake region enclosed by the closed vector curve, and form a grid plane comprising a plurality of triangles by connecting all the vector points.
[0035] The image generation module is connected with the third processing module and is configured to perform iterative processing on an initial downward normal vector pre-configured for each vector point in the grid plane according to a first water depth, a first longitude and latitude of a deepest part of the lake to be generated, a second water depth, a second longitude and latitude of an arbitrary position other than the deepest part, and a preset tensor associated with each connection line in the grid plane, to obtain an iterative downward normal vector of each vector point, and generate a lake bed topographic structure map of the lake to be generated according to the iterative downward normal vector and the grid plane, as a digital twin lake generation result of the lake to be generated.
[0036] Preferably, the third processing module comprises:
[0037] The vector point grouping unit is configured to sequentially group each vector point forming the closed vector curve according to the sorting result to form a plurality of combinations, and each combination comprises three vector points.
[0038] The new vector point generation unit is connected with the vector point grouping unit and is configured to take a projection of a vector point located in the middle of each combination on a connection line between the other two vector points as a new vector point corresponding to each combination.
[0039] The new vector point screening unit is connected with the new vector point generation unit and is configured to sequentially connect adjacent new vector points according to the sorting result of the corresponding combination to form a plurality of vectors, calculate the Euler angle between each two connected vectors, and retain the new vector points forming the two vectors when the Euler angle is within a preset range.
[0040] A judging unit is connected to the new vector point screening unit, configured to generate a first signal when the total number of the reserved new vector points is less than a threshold value, and generate a second signal when the total number is not less than the threshold value;
[0041] A first connection unit is connected to the judging unit and the new vector point generating unit, configured to establish a connection between the new vector point and the remaining two vector points in the corresponding combination according to the first signal for each new vector point, and sequentially group the reserved new vector points according to the sorting result to form a plurality of combinations until the total number is less than the threshold value.
[0042] A second connection unit is connected to the judging unit, configured to establish a connection between the reserved new vector points and between the new vector points and other vector points according to the second signal to form the grid plane containing a plurality of mutually non-overlapping triangles.
[0043] The above technical solution has the following advantages or beneficial effects:
[0044] 1) A small amount of real water depth data of the lake and lake remote sensing image can be used to generate a lake bed topographic structure map in real time, which provides strong data support for water conservancy management such as calculation of lake water capacity, estimation of impact flood peak in flood control treatment, and flood storage capacity, saves manpower and material resources, and effectively solves the problem of weak water conservancy informatization in flood control scheduling and water resources management.
[0045] 2) The technical solution can be applied to rough capacity determination and fluctuation prediction of urban water conservancy facilities and natural water bodies, and is essentially an algorithm model with an error rate of less than 8%. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 For the preferred embodiment of the present application, a flowchart of a method for generating a digital twin lake is shown.
[0047] Figure 2 For the preferred embodiment of the present application, a sub-flowchart of step S1 is shown.
[0048] Figure 3 For the preferred embodiment of the present application, a sub-flowchart of step S2 is shown.
[0049] Figure 4 For the preferred embodiment of the present application, a sub-flowchart of step S4 is shown.
[0050] Figure 5 For the preferred embodiment of the present application, a structural diagram of a generation system of a digital twin lake is shown. DETAILED DESCRIPTION
[0051] The present application will be described in detail below with reference to the drawings and specific embodiments. The present application is not limited to this embodiment, and other embodiments can also fall within the scope of the present application as long as they meet the main idea of the present application.
[0052] In the preferred embodiment of the present application, based on the above-mentioned problems existing in the prior art, a method for generating a digital twin lake is provided, as shown in Figure 1 The method comprises the following steps:
[0053] Step S1, a lake remote sensing image of a to-be-generated lake is obtained, and lake boundary extraction is performed on the lake remote sensing image to obtain an initial image containing the lake boundary;
[0054] Step S2, the initial image is preprocessed to obtain a black and white image, and the lake boundary in the initial image is converted into a black and white boundary in the black and white image;
[0055] Step S3, according to the pixel coordinates of each pixel point on the black and white boundary in the black and white image, each pixel point is sorted, and according to the sorting result, adjacent each pixel point is taken as a vector point and connected in a preset direction to form a closed vector curve;
[0056] Step S4, a plurality of new vector points are inserted into a lake area enclosed by the closed vector curve, and all the vector points are connected to form a grid plane containing a plurality of triangles;
[0057] Step S5, according to the first water depth, the first longitude and latitude of the deepest part of the to-be-generated lake, the second water depth, the second longitude and latitude of a plurality of arbitrary positions except the deepest part, and the preset tensor associated with each connection line in the grid plane, an initial downward normal vector pre-configured for each vector point in the grid plane is iteratively processed to obtain an iterated downward normal vector of each vector point, and a lakebed topographic structure diagram of the to-be-generated lake is generated according to the iterated downward normal vector and the grid plane, serving as a digital twin lake generation result of the to-be-generated lake.
[0058] Specifically, in this embodiment, when generating the digital twin lake, at least two factors need to be considered, one is the lake boundary, and the other is the depth of the lake at each place. Based on the lake boundary and the depth of the lake at each place, the digital twin lake can be simulated. For the factor of the lake boundary, this embodiment extracts the lake boundary by recognizing and segmenting based on the remote sensing image. Considering that the lake boundary obtained by the recognition and segmentation method may not be smooth, such as being jagged or containing black, white, and gray colors, in order to facilitate subsequent data processing, after obtaining the lake boundary based on the remote sensing image, the lake boundary needs to be preprocessed to make the boundary smooth and contain only black and white colors, and to filter points that are too close to each other.
[0059] Further, after preprocessing the lake boundary, the pixels on the obtained black and white boundary can be sorted and connected to form a closed vector curve. Preferably, a grid point matrix can be generated based on the black and white image. Each pixel on the black and white image is distributed at the corresponding position of the grid point matrix, and the pixel coordinates in the black and white image can be represented based on the grid index of each pixel. The pixel point closest to the upper left corner of the image in the black and white image is selected as the starting point, and the nearest pixel points are searched in the clockwise direction to form a sorting result. Adjacent pixel points are connected as vector points to form a closed vector curve according to the sorting result. It can be understood that the starting point and the preset direction described above can be configured according to requirements and are not limited thereto. For example, the starting point can be selected arbitrarily, and the pixel points can be searched in the clockwise or counterclockwise direction. In analytic geometry, the expression of a vector is (x, y, z), and the expression of a point point(x, y, z) with the origin as the reference system are equivalent. Both are three groups of variables involved. In order to distinguish from the expression of a pixel point, the similar objects are expressed as vector points.
[0060] After forming the closed vector curve, the lake boundary is determined, but the lake area enclosed by the lake boundary is blank, and the lake area needs to be filled with vector points for lake surface simulation to form a grid plane containing multiple triangles. The grid plane is a two-dimensional plane, and at this time, the factor of the depth of the lake at each place needs to be further considered. Since the lake area is relatively large, if the depth of the lake at each place is obtained in detail, it will consume huge human and material resources, and the amount of data obtained is large and inconvenient to process. In this embodiment, the depth of the lake at each place can be simulated based on a small amount of real water depth data of the lake. The real water depth data of the lake includes the first water depth, the first latitude and longitude of the deepest part of the lake to be generated, and the second water depth, the second latitude and longitude of multiple arbitrary positions except the deepest part. The above-mentioned multiple arbitrary positions are preferably more than 6 positions. The above-mentioned small amount of real water depth data of the lake can be obtained directly from the water conservancy department or the river management system. The data is easy to obtain and does not need additional data collection.
[0061] Preferably, the process of forming a three-dimensional lakebed topographic structure map based on the two-dimensional grid plane can be understood as configuring a downward normal vector to each vector point on the grid plane, configuring a preset tensor representing the stretchability to the connecting line between two vector points, and continuously iterating the downward normal vector to make the grid plane continuously concave to form a lake basin. Since a small amount of real water depth data of the lake is obtained in advance, including a first water depth, a first longitude and latitude of the deepest part of the lake to be generated, and a second water depth, a second longitude and latitude of multiple arbitrary positions except the deepest part, during the continuous iteration of the downward normal vector, the grid plane is continuously concaved, and the difference between the concave depth of the vector point on the grid plane corresponding to the position of each of the small amount of real water depth data and the corresponding real water depth is formed. By continuously iterating the downward normal vector, the downward normal vector under the minimum value of each difference is obtained as the iterative downward normal vector, and then the lakebed topographic structure map of the lake to be generated can be generated according to the iterative downward normal vector and the grid plane, as the digital twin lake generation result of the lake to be generated. The preset tensor can be adaptively adjusted according to the actual lake area and lake depth. The larger the lake area and the deeper the lake depth, the smaller the value of the preset tensor.
[0062] In a preferred embodiment of the present application, as shown in Figure 2 Step S1 comprises:
[0063] Step S11, obtaining a lake remote sensing image of a lake to be generated, and performing RGB color layering processing on the lake remote sensing image to obtain a red channel layering image, a green channel layering image and a blue channel layering image respectively;
[0064] Step S12, inputting the red channel layering image, the green channel layering image and the blue channel layering image into a boundary segmentation model trained in advance to obtain corresponding red channel segmentation map, green channel segmentation map and blue channel segmentation map respectively;
[0065] Step S13, merging the red channel segmentation map, the green channel segmentation map and the blue channel segmentation map to obtain an initial image containing the lake boundary.
[0066] Specifically, in the embodiment, the boundary segmentation model preferably selects a Unet neural network model, which includes multiple convolution layers and up-sampling layers. Specifically, a 6*6 convolution layer is used to convolve the input image to extract features; then a 3*3 convolution layer is used to convolve the 6*6 feature values to extract feature values; then a 2*2 convolution layer is used to convolve the 3*3 feature values to extract feature values; then a 1*1 convolution layer is used to convolve the 2*2 feature values to extract feature values; then a 2*2 feature map is used to up-sample the 1*1 convolution layer to construct a feature map; then a 3*3 feature map is used to up-sample the 2*2 convolution layer to construct a feature map; then a 6*6 feature map is used to up-sample the 3*3 convolution layer to construct a feature map; then the feature maps obtained by the above up-sampling are superimposed to form a full image feature map, and the full image feature map is up-sampled by a 6*6 convolution layer to construct a segmentation map. For the red channel layered image as the input image, the finally constructed segmentation map is a red channel segmentation map, and the rest is sequentially similar. The processing processes of the red channel layered image, the green channel layered image and the blue channel layered image can be operated in parallel to improve the image processing efficiency.
[0067] In a preferred embodiment of the present application, as shown in Figure 3 Step S2 includes:
[0068] Step S21, normalizing the initial image to obtain a corresponding normalized image;
[0069] Step S22, calculating the absolute value of the pixel difference between adjacent two pixel points in each pixel point forming the lake boundary in the normalized image, and retaining each pixel point with a non-zero absolute value of the pixel difference to form a black and white image with a black and white boundary of the lake boundary.
[0070] In a preferred embodiment of the present application, as shown in Figure 4 Step S4 includes:
[0071] Step S41, sequentially grouping a plurality of combinations according to the sorting result of each vector point forming a closed vector curve, each combination including three vector points;
[0072] Step S42, taking the projection of the vector point in the middle of each combination on the line between the other two vector points as a new vector point corresponding to each combination;
[0073] Step S43, sequentially connecting the adjacent new vector points according to the sorting result of the corresponding combination to form a plurality of vectors, and calculating the Euler angle between each two connected vectors, and determining whether the Euler angle is within a preset range:
[0074] If yes, the new vector points forming the two vectors are retained, and then step S44 is turned to;
[0075] If no, the new vector points forming two vectors are discarded, and then turn to step S44;
[0076] Step S44, judge whether the total number of the reserved new vector points is less than a threshold value:
[0077] If no, for each new vector point reserved, a connection line between the new vector point and the remaining two vector points in the corresponding combination is established respectively, and the reserved new vector points are sequentially grouped into a plurality of combinations according to the sorting result, and then return to step S42;
[0078] If yes, the connection lines between the reserved new vector points and between the new vector points and other vector points are established respectively to form a grid plane containing a plurality of mutually non-overlapping triangles.
[0079] Specifically, in the embodiment, taking the sorting result as vector point 1, vector point 2, vector point 3, vector point 4 and vector point 5 for example, the plurality of combinations formed by the sequential grouping can be combination one (vector point 1, vector point 2, vector point 3), combination two (vector point 2, vector point 3, vector point 4), and combination three (vector point 3, vector point 4, vector point 5). For combination one, vector point 2 is the intermediate vector point, a connection line between vector point 1 and vector point 3 is established, and the projection of vector point 2 on the connection line is new vector point 1, and in turn, combination two obtains new vector point 2, and combination three obtains new vector point 3, and the new vector points are sequentially connected according to the sorting result of the corresponding combination to form vector one by connecting new vector point 1 and new vector point 2, and the vector direction is the direction towards new vector point 2, and vector two is formed by connecting new vector point 2 and new vector point 3, and the vector direction is the direction towards new vector point 3, and then the Euler angle between vector one and vector two is calculated to determine whether the inserted new vector point is reserved. It can be understood that the above-mentioned insertion of new vector points is to insert new vector points into the inside of the closed vector curve, that is, to converge inward, and gradually form a woven structure similar to a bed sheet. However, the above-mentioned projection of the connection line may exist outside the closed vector curve, and therefore, it is necessary to remove the new vector points outside the closed vector curve by whether the Euler angle is within the preset range.
[0080] The above process only obtains a series of new vector points, and to form a woven structure, the connection of points is needed. In the embodiment, the connection is realized by establishing a connection between the new vector points and the vector points of the adjacent outer circle.
[0081] It can be seen that only one circle of new vector points can be obtained by performing the above new vector point formation, screening and connection process once, and the above process needs to be repeated until the number of new vector points is less than the threshold value. Since the innermost circle of vector points not only needs to be connected with the outer circle of vector points adjacent thereto, but also needs to be connected with each other, otherwise the weaving structure of the middle region will be missing, and the corresponding connection between the new vector points and the adjacent outer circle of vector points cannot be realized, therefore, for the new vector points of the innermost circle, the triangulation algorithm is preferably used to establish the connection between the reserved new vector points and the connection between the new vector points and other vector points.
[0082] In the preferred embodiment of the application, in step S43, the preset range is [0°, 180°].
[0083] In the preferred embodiment of the application, in step S44, the threshold value is 5.
[0084] In the preferred embodiment of the application, in step S5, the random gradient descent algorithm is used to iteratively process each initial downward normal vector, and the iteratively processed downward normal vector of each vector point is iterated.
[0085] The application also provides a digital twin lake generation system, which applies the above generation method. Figure 5 As shown in the figure, the generation system comprises:
[0086] A boundary extraction module 1 is configured to obtain a lake remote sensing image of a lake to be generated, and perform lake boundary extraction on the lake remote sensing image to obtain an initial image containing the lake boundary.
[0087] A first processing module 2 is connected to the boundary extraction module 1 and configured to pre-process the initial image to obtain a black and white image, wherein the corresponding lake boundary in the black and white image is a black and white boundary.
[0088] A second processing module 3 is connected to the first processing module 2 and configured to sort the pixel points on the black and white boundary according to the pixel coordinates of the pixel points in the black and white image, and connect adjacent pixel points as vector points in a preset direction to form a closed vector curve.
[0089] A third processing module 4 is connected to the second processing module 3 and configured to insert a plurality of new vector points into a lake region enclosed by the closed vector curve, and connect all the vector points to form a grid plane containing a plurality of triangles.
[0090] The image generation module 5 is connected to the third processing module 4, and is configured to perform iterative processing on an initial downward normal vector of each vector point in the grid plane according to a first water depth of a deepest part of a lake to be generated, a first longitude and latitude of the deepest part, and a second water depth, a second longitude and latitude of a plurality of arbitrary positions except the deepest part, and a preset tensor associated with each line in the grid plane, to obtain an iterative downward normal vector of each vector point, and generate a lakebed topographic structure diagram of the lake to be generated according to the iterative downward normal vector and the grid plane, as a digital twin lake generation result of the lake to be generated.
[0091] In a preferred embodiment of the present application, the third processing module 4 comprises:
[0092] The vector point grouping unit 41 is configured to sequentially group each vector point forming a closed vector curve into a plurality of combinations according to the sorting result, and each combination contains three vector points.
[0093] The new vector point generation unit 42 is connected to the vector point grouping unit 41, and is configured to take a projection of a vector point located in the middle of each combination on a line between the other two vector points as a new vector point corresponding to each combination.
[0094] The new vector point screening unit 43 is connected to the new vector point generation unit 42, and is configured to sequentially connect adjacent new vector points according to the sorting result of the corresponding combination to form a plurality of vectors, calculate the Euler angle between each two connected vectors, and retain each new vector point forming the two vectors when the Euler angle is within a preset range.
[0095] The judging unit 44 is connected to the new vector point screening unit 43, and is configured to generate a first signal when the total number of retained new vector points is less than a threshold, and generate a second signal when the total number is not less than the threshold.
[0096] The first connecting unit 45 is connected to the judging unit 44 and the new vector point generation unit 43, respectively, and is configured to establish a connection between the new vector point and the other two vector points in the corresponding combination for each new vector point retained according to the first signal, and sequentially group the retained new vector points into a plurality of combinations according to the sorting result until the total number is less than the threshold.
[0097] The second connecting unit 46 is connected to the judging unit 44, and is configured to establish a connection between the retained new vector points and between the new vector points and other vector points according to the second signal, to form a grid plane containing a plurality of mutually non-overlapping triangles.
[0098] The above merely describes preferred embodiments of the present application, and is not intended to limit the implementation and protection scope of the present application. Those skilled in the art should be able to understand that any equivalent substitutions and obvious changes made according to the present application and drawings should be included in the protection scope of the present application.
Claims
1. A method for generating a digital twin lake, characterized in that, The method comprises the following steps: Step S1, obtaining a lake remote sensing image of a to-be-generated lake, and performing lake boundary extraction on the lake remote sensing image to obtain an initial image containing a lake boundary; Step S2, preprocessing the initial image to obtain a black and white image, and converting the lake boundary in the initial image into a black and white boundary in the black and white image; Step S3, sorting each pixel point on the black and white boundary according to the pixel coordinates of each pixel point in the black and white image, and connecting adjacent pixel points as vector points according to a preset direction to form a closed vector curve; Step S4, inserting a plurality of new vector points into a lake region enclosed by the closed vector curve, and connecting all the vector points to form a grid plane containing a plurality of triangles; Step S5, according to the first water depth, the first longitude and latitude of the deepest part of the to-be-generated lake, the second water depth, the second longitude and latitude of a plurality of arbitrary positions except the deepest part, and the preset tensor associated with each line in the grid plane, performing iterative processing on an initial downward normal vector pre-configured for each vector point in the grid plane to obtain an iterated downward normal vector of each vector point, and generating a lake bed topographic structure map of the to-be-generated lake according to the iterated downward normal vector and the grid plane as a digital twin lake generation result of the to-be-generated lake.
2. The generation method of claim 1, wherein, The step S1 comprises: Step S11, obtaining the lake remote sensing image of the to-be-generated lake, and performing RGB color layering processing on the lake remote sensing image to obtain a red channel layering image, a green channel layering image and a blue channel layering image respectively; Step S12, inputting the red channel layering image, the green channel layering image and the blue channel layering image into a boundary segmentation model pre-trained to obtain corresponding red channel segmentation map, green channel segmentation map and blue channel segmentation map respectively; Step S13, merging the red channel segmentation map, the green channel segmentation map and the blue channel segmentation map to obtain the initial image containing the lake boundary.
3. The generation method of claim 1, wherein, The step S2 comprises: Step S21, performing normalization processing on the initial image to obtain a corresponding normalized image; Step S22, calculating the pixel difference absolute value between adjacent two pixel points forming the lake boundary in the normalized image, and retaining each pixel point with a non-zero pixel difference absolute value to form the black and white image with the lake boundary as a black and white boundary.
4. The generation method of claim 1, wherein, The step S4 comprises: Step S41, sequentially grouping each vector point forming the closed vector curve according to the sorting result to form a plurality of combinations, each combination containing three vector points; Step S42, taking the projection of the vector point located in the middle of each combination on the line between the other two vector points as the new vector point corresponding to each combination; Step S43, connecting each of the new vector points in sequence to form a plurality of vectors according to the sorting result of the corresponding combination, calculating the Euler angle between each two vectors, and determining whether the Euler angle is within a preset range: If yes, each of the new vector points forming the two vectors is retained, and then step S44 is turned to; If no, each of the new vector points forming the two vectors is discarded, and then step S44 is turned to; Step S44, determining whether the total number of the retained new vector points is less than a threshold value: If no, a line is established between each new vector point and the remaining two vector points in the corresponding combination, and each new vector point is sequentially grouped according to the sorting result to form a plurality of combinations, and then the step S42 is returned; If yes, lines are established between each new vector point and other vector points to form the mesh plane containing a plurality of non-overlapping triangles.
5. The generation method of claim 4, wherein, In the step S43, the preset range is (0°, 180°).
6. The generation method of claim 4, wherein, In the step S44, the lines between each new vector point and other vector points are established by using a triangulation algorithm.
7. The generation method of claim 4, wherein, In the step S44, the threshold value is 5.
8. The generation method of claim 1, wherein, In the step S5, the random gradient descent algorithm is used to iteratively process each initial downward normal vector, and the iterative downward normal vector of each vector point is iterated.
9. A system for generating a digital twin lake, the system comprising: The generation system comprises: a boundary extraction module configured to obtain a lake remote sensing image of a lake to be generated, and perform lake boundary extraction on the lake remote sensing image to obtain an initial image containing a lake boundary; a first processing module connected to the boundary extraction module and configured to perform preprocessing on the initial image to obtain a black-and-white image, wherein the corresponding lake boundary in the black-and-white image is a black-and-white boundary; a second processing module connected to the first processing module and configured to sort each vector point according to the pixel coordinates of the vector point in the black-and-white image, and connect each adjacent vector point in a preset direction to form a closed vector curve according to the sorting result; a third processing module connected to the second processing module and configured to insert a plurality of new vector points into a lake region enclosed by the closed vector curve, and connect all the vector points to form a mesh plane containing a plurality of triangles; and a fourth processing module connected to the third processing module and configured to generate a plurality of lakes according to the mesh plane. An image generation module connected to the third processing module is configured to perform iterative processing on an initial downward normal vector pre-configured for each vector point in the grid plane according to a first water depth of the deepest part of the lake to be generated, a first longitude and latitude of the deepest part, and a second water depth, a second longitude and latitude of multiple arbitrary positions other than the deepest part, and a preset tensor associated with each line in the grid plane, to obtain an iterative downward normal vector of each vector point, and generate a lakebed topographic structure map of the lake to be generated according to the iterative downward normal vector and the grid plane, as a digital twin lake generation result of the lake to be generated.
10. The generation system of claim 9, wherein, The third processing module comprises: A vector point grouping unit configured to sequentially group each vector point forming the closed vector curve into multiple combinations according to the sorting result, each combination containing three vector points; A new vector point generation unit connected to the vector point grouping unit and configured to take a projection of the vector point in the middle of each combination on a line between the other two vector points as a new vector point corresponding to each combination; A new vector point screening unit connected to the new vector point generation unit and configured to sequentially connect adjacent new vector points according to the sorting result of the corresponding combination to form multiple vectors, calculate Euler angles between each two vectors, and retain the new vector points forming the two vectors when the Euler angles are within a preset range; A judging unit connected to the new vector point screening unit and configured to generate a first signal when the total number of retained new vector points is less than a threshold, and generate a second signal when the total number is not less than the threshold; A first connection unit connected to the judging unit and the new vector point generation unit respectively and configured to establish a connection between the new vector point and the other two vector points in the corresponding combination according to the first signal for each new vector point, and sequentially group the retained new vector points according to the sorting result to form multiple combinations until the total number is less than the threshold; A second connection unit connected to the judging unit and configured to establish a connection between the retained new vector points and between the new vector points and other vector points according to the second signal to form the grid plane containing several mutually non-overlapping triangles.
Citation Information
Patent Citations
Method for automatically calculating water surface height of large shallow lake
CN110335355A
Water body change detection method and system based on deep convolutional neural network
CN113269028A