CN117828737A - Digital twin landscape design method - Google Patents

Digital twin landscape design method Download PDF

Info

Publication number
CN117828737A
CN117828737A CN202410020442.6A CN202410020442A CN117828737A CN 117828737 A CN117828737 A CN 117828737A CN 202410020442 A CN202410020442 A CN 202410020442A CN 117828737 A CN117828737 A CN 117828737A
Authority
CN
China
Prior art keywords
point cloud
cloud data
landscape
garden
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410020442.6A
Other languages
Chinese (zh)
Other versions
CN117828737B (en
Inventor
董春晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Landscaping Engineering Quality And Safety Center
Original Assignee
Jinan Landscaping Engineering Quality And Safety Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Landscaping Engineering Quality And Safety Center filed Critical Jinan Landscaping Engineering Quality And Safety Center
Priority to CN202410020442.6A priority Critical patent/CN117828737B/en
Publication of CN117828737A publication Critical patent/CN117828737A/en
Application granted granted Critical
Publication of CN117828737B publication Critical patent/CN117828737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of landscape design, and discloses a digital twin landscape design method, which comprises the following steps: extracting point cloud data from the garden depth image, and performing filtering noise reduction treatment on the point cloud data; performing reference surface fitting on the noise-reduced point cloud data; classifying and aggregating the noise-reduced point cloud data; performing terrain information sensing on the landscape view cloud set to obtain landscape information; and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image. According to the invention, the self-adaptive threshold value and the self-adaptive iteration times are set for iterating the garden reference surface, so that the iterated garden reference surface contains as many low-frequency point cloud data with unobvious gradient change as possible, and the landscape position coordinate reconstruction, the landscape color rendering processing and the seasonal color compensation are carried out according to the recognized garden reference surface and the landscape information, so that the digital twin result corresponding to the garden depth image is obtained.

Description

Digital twin landscape design method
Technical Field
The invention relates to the technical field of landscape design, in particular to a digital twin landscape design method.
Background
Traditional landscape design requires troublesome operations such as drawing paper, model making and the like, and requires a designer to repeatedly push and modify, and then build a model to view the effect. The repeated iterative process greatly prolongs the period and difficulty of landscape design and consumes a great deal of time and effort for the designers to redraw the unsatisfactory places. Aiming at the problem, the invention provides a digital twin landscape design method, which rapidly generates different design schemes according to preset parameters and templates through a digital twin technology, and rapidly modifies and optimizes the design schemes, thereby greatly shortening the design period, improving the design efficiency, simultaneously intuitively presenting the design schemes to users through a visual technology, and rapidly modifying and optimizing the design schemes through feedback of the users, so as to achieve the purpose of improving the design efficiency and the user satisfaction.
Disclosure of Invention
In view of this, the invention provides a digital twin landscape design method, which aims at: 1) The method comprises the steps of shooting a garden depth image, extracting pixel point information representing the edge of a garden landscape to form point cloud data, realizing filtering processing of outlier point cloud data based on distance information of coordinates corresponding to the point cloud data, setting a self-adaptive threshold value and self-adaptive iteration times, iterating a garden reference surface, enabling the iterated garden reference surface to contain low-frequency point cloud data with unobvious gradient change, and realizing construction of the garden reference surface; 2) And calculating a distance information entropy by combining a distance proportion between high-frequency point cloud data to obtain distance information between the high-frequency point cloud data, calculating the density of the high-frequency point cloud data by combining the distance information to realize density clustering processing, constructing a plurality of landscape point cloud sets, respectively carrying out landscape central coordinate position calculation and landscape contour envelope information extraction on each landscape point cloud set, and carrying out garden digital reconstruction according to the identified garden reference surface and landscape information, wherein the digital reconstruction process comprises landscape position coordinate reconstruction and landscape color rendering processing to obtain a digital twin result corresponding to a garden depth image, carrying out color compensation on different landscapes by combining seasonal information, and constructing a garden landscape digital twin result under different seasons.
The invention provides a digital twin landscape design method, which comprises the following steps:
s1: obtaining a garden depth image, extracting point cloud data from the garden depth image, and performing filtering noise reduction treatment on the point cloud data to obtain noise-reduced point cloud data;
s2: performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface, wherein an improved random sampling consistency algorithm is a main implementation method of the reference surface fitting;
s3: classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set of the landscape;
s4: performing terrain information sensing on the landscape view cloud set to obtain landscape information, wherein the landscape information comprises landscape center coordinate positions and landscape contour envelope information;
s5: and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image.
As a further improvement of the present invention:
optionally, the step S1 of acquiring a garden depth image, extracting point cloud data from the garden depth image includes:
shooting gardens by using a depth camera to obtain a garden depth image I, extracting point cloud data from the garden depth image, wherein the information of each pixel in the garden depth image comprises the color values of the pixels in different color channels and the depth information representing the distance from the garden landscape corresponding to the pixels to the camera, and the extracting process of the point cloud data is as follows:
Carrying out differential representation processing of combining depth information on any pixel in the garden depth image I, wherein the differential representation processing result of the x-th row and y-th column pixels I (x, y) in the garden depth image I is as follows:
H(x,y)=H 1 (x,y,d x,y )-H 2 (x,y,d x,y )
wherein:
h (x, y) represents the differential processing result of the pixel I (x, y);
d x,y depth information representing the pixel I (x, y); in the embodiment of the invention, the depth of the pixel is as followsThe degree information is also referred to as the depth value of the pixel;
I k (x, y) represents the color value of pixel I (x, y) in the k color channel;
e represents a natural constant, σ 12 Representing the standard deviation of the scale; in the embodiment of the invention, sigma is 12 Set to 2 and 4, respectively;
c 1 ,c 2 respectively representing the lengths of the unit pixels in the horizontal direction and the vertical direction;
f X represents the focal length of the depth camera in the horizontal direction, f Y Representing the focal length of the depth camera in the vertical direction;
in a 3×3 pixel region centered on a pixel I (x, y), if the differential representation result of the pixel I (x, y) is maximum, the pixel coordinates (x, y) of the pixel I (x, y) and depth information d are obtained x,y And the color values of the pixels in the RGB color channels form a group of point cloud data in the garden depth image I, and the point cloud data set U of the garden depth image I is:
wherein:
u n represents the U-th group of point cloud data in the point cloud data set U, (x) n ,y n ) Representing point cloud data u n In (a) the pixel coordinates of the pixel,
representing point cloud data u n Depth information of (a);
I R (x n ,y n ),I G (x n ,y n ),I B (x n ,y n ) Respectively representing point cloud data u n Color values of the middle RGB color channel;
and filtering and denoising the point cloud data to obtain the denoised point cloud data.
Optionally, filtering and denoising the point cloud data in the step S1 to obtain denoised point cloud data, including:
performing filtering noise reduction processing on the point cloud data to obtain noise-reduced point cloud data, wherein the filtering noise reduction processing flow of the point cloud data is as follows:
s11: and converting pixel coordinates in the point cloud data by combining the depth information to obtain three-dimensional coordinates of the point cloud data, wherein a point cloud data coordinate conversion formula of the n-th group of point cloud data is as follows:
wherein:
(X n ,Y n ,Z n ) A point cloud data three-dimensional coordinate representing an nth set of point cloud data;
s12: calculating to obtain a gray value, a gray gradient value and a gray gradient direction of a pixel corresponding to each group of point cloud data, marking point cloud data with the gray gradient value smaller than a preset gradient threshold value as low-frequency point cloud data, marking other point cloud data as high-frequency point cloud data, and respectively forming a low-frequency point cloud data set and a high-frequency point cloud data set; in the embodiment of the invention, the gray gradient value calculation flow of the pixels is to carry out gray processing on the garden depth image I and calculate the pixel gradient value of the garden depth image I after gray processing;
S13: selecting three-dimensional coordinates of point cloud data from any point cloud data set, calculating to obtain Euclidean distances from the three-dimensional coordinates of the selected point cloud data to three-dimensional coordinates of other point cloud data in the set, selecting S minimum Euclidean distances to form Euclidean distance sets of the three-dimensional coordinates of the selected point cloud data, and respectively calculating to obtain a mean value and a standard deviation in the Euclidean distance sets, wherein the three-dimensional coordinates (X n ,Y n ,Z n ) Mean in corresponding Euclidean distance set n Standard deviation std n Mean respectively n ,std n
S14: the Euclidean distances from the three-dimensional coordinates of the selected point cloud data to the three-dimensional coordinates of other point cloud data are obtained through calculationIf the Euclidean distance average value is greater than the preset distance threshold value, marking the point cloud data corresponding to the three-dimensional coordinate of the point cloud data as an outlier point cloud, and filtering, wherein the three-dimensional coordinate (X n ,Y n ,Z n ) The corresponding distance threshold is:
dis n =mean n +τstd n
wherein:
dis n representing three-dimensional coordinates (X) of point cloud data n ,Y n ,Z n ) A corresponding distance threshold, τ representing a control parameter;
s15: repeating the steps S13-S14 to obtain a low-frequency point cloud data set and a high-frequency point cloud data set after noise reduction:
wherein:
U 1 representing the denoised low frequency point cloud data set,representing a low frequency point cloud data set U 1 I-th point cloud data of +.>Representing Point cloud data->Three-dimensional coordinates of point cloud data in +.>Representing Point cloud data->Corresponding pixelGray value->Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 1 Representing the number of low-frequency point cloud data in the low-frequency point cloud data set;
U 2 representing the denoised high frequency point cloud data set,representing a high frequency point cloud data set U 2 J-th point cloud data of +.>Representing Point cloud data->Three-dimensional coordinates of point cloud data in +.>Representing Point cloud data->Gray value of corresponding pixel, +.>Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 2 Representing the number of high-frequency point cloud data in the high-frequency point cloud data set;
and taking the low-frequency point cloud data set and the high-frequency point cloud data set after noise reduction as the point cloud data after noise reduction.
Optionally, in the step S2, performing a reference plane fitting on the noise-reduced point cloud data includes:
and performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface, wherein the reference surface fitting flow is as follows:
s21: extracting a low-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
S22: initializing a garden reference plane P 0 (A 0 X+B 0 Y+C 0 Z+D 0 =0), wherein a 0 ,B 0 ,C 0 ,D 0 All are initial coefficients of plane parameters, and X, Y and Z represent independent variables of three-dimensional coordinates of point cloud data;
s23: setting the current iteration number of the garden reference surface as t and the maximum iteration number as Max, and setting the t-th iteration result of the garden reference surface as P t (A t X+B t Y+C t Z+D t =0), wherein a t ,B t ,C t ,D t The iteration coefficients of the t times are all plane parameters, and the initial value of t is 0; in the embodiment of the invention, A t X+B t Y+C t Z+D t =0 represents a plane equation of a garden reference plane;
s24: calculating to obtain the three-dimensional coordinates of the point cloud data corresponding to any low-frequency point cloud data in the low-frequency point cloud data set to the garden reference plane P t (A t X+B t Y+C t Z+D t =0), wherein the low frequency point cloud dataCorresponding point cloud data three-dimensional coordinates +.>To garden reference plane P t (A t X+B t Y+C t Z+D t Vertical distance =0) is +.>
S25: calculating to obtain the self-adaptive threshold epsilon t
Wherein:
ε t representing a fitting effect for quantifying a t-th iteration result of the garden reference plane;
s26: the vertical distance is smaller than the adaptive threshold epsilon t Is taken as a garden reference plane P t (A t X+
B t Y+C t Z+D t =0), statistics of garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0):
wherein:
Sum t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Number of inliers=0);
p t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0);
S27: for maximum iteration number Max t And (3) dynamically adjusting:
wherein:
Max t representing a dynamic adjustment result of the maximum iteration number in the t-th iteration;
p represents a desired ratio, p being set to 0.95;
s28: if t>Max t Terminating the iteration of the reference plane to obtain a garden reference plane P t (A t X+B t Y+C t Z+D t =0) as a final reference plane iteration result, otherwise generating the t-th of the garden reference plane+1 iteration result, wherein the t+1st iteration result of the garden reference plane is generated by randomly selecting Sum t Fitting the three-dimensional coordinates of +1 point cloud data to obtain a plane equation, and taking the plane equation obtained by fitting as a t+1st iteration result P of a garden reference plane t+1 (A t+1 X+B t+1 Y+
C t+1 Z+D t+1 =0), let t=t+1, return to step S25.
Optionally, in the step S3, classification and aggregation are performed on the point cloud data after noise reduction to obtain a landscape point cloud set, including:
classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set, wherein the classifying and aggregating process of the landscape point cloud set comprises the following steps:
s31: extracting a high-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
s32: calculating to obtain distance information of any two groups of high-frequency point cloud data in the high-frequency point cloud data set, whereinThe distance information between the two is:
Wherein:
representing high frequency point cloud data->Distance information between them;
representing high frequency point cloud data->The Euclidean distance between the three-dimensional coordinates of the corresponding point cloud data;
are distance information parameters;
s33: based on the distance information, calculating to obtain the density of the high-frequency point cloud data, wherein the high-frequency point cloud dataThe density of (2) is:
wherein:
representing high frequency point cloud data->Is a density of (3);
exp (·) represents an exponential function that bases on the natural constant;
i represent L1 norm;
s34: sorting the high-frequency point cloud data according to the descending order of density, selecting the first-ranked high-frequency point cloud data as central point cloud data of a landscape point cloud set according to the sorting result, and dividing by taking the three-dimensional coordinates of the point cloud data corresponding to the central point cloud data as the center and mean as the radius to obtain a landscape area range;
s34: adding all the high-frequency point cloud data in the area range into a landscape point cloud set corresponding to the selected central point cloud data, deleting all the point cloud data in the landscape point cloud set in the current pair of high-frequency point cloud data sets, returning to the step S33 until the high-frequency point cloud data does not exist in the current landscape point cloud set, and forming W landscape point cloud sets, wherein the determination formula of W is as follows:
Wherein:
sum (w) represents the Sum of distance information of any two high-frequency point cloud data in the w-th landscape point cloud set.
Optionally, in the step S4, terrain information sensing is performed on the landscape view cloud set to obtain landscape information, which includes:
the landscape information sensing process of the w-th landscape point cloud set is as follows:
randomly selecting three-dimensional coordinates of point cloud data of four point cloud data from a w-th landscape point cloud set, forming a tetrahedron by the three-dimensional coordinates of the point cloud data, taking edges of the tetrahedron as contour envelopes of the w-th landscape if the three-dimensional coordinates of the point cloud data of other point cloud data do not exist in the tetrahedron, otherwise, reserving the three-dimensional coordinates of the point cloud data inside the tetrahedron as tetrahedron vertexes, deleting the point cloud data corresponding to the tetrahedron vertexes nearest to the reserved point cloud data three-dimensional coordinates, and repeating the steps to obtain a plurality of contour envelopes of the w-th landscape;
and calculating to obtain the average value of the vertex coordinates in the contour envelope, and taking the average value as the landscape center coordinate position of the w-th landscape.
Optionally, in the step S5, a garden is digitally reconstructed according to the identified garden reference plane and the landscape information, and a digital twin result corresponding to the garden depth image is generated, which includes:
according to the recognized garden reference plane and the landscape information, the digital twin results corresponding to the garden depth image are obtained, in the embodiment of the invention, the digital twin results of the landscape can be constructed by shooting a single landscape depth image, the digital twin results of the landscape are combined with the data twin results of the landscape, and the parameter adjustment can be carried out on the landscape information, so that the rapid modification and optimization of the design result of the landscape are realized, wherein the digital reconstruction flow of the garden is as follows:
s51: initializing a landscape plane based on a landscape reference plane, and determining the terrain center positions of W landscapes on the terrain plane according to the landscape center coordinate positions of the W landscapes;
s52: constructing and obtaining W landscape contour envelopes based on vertexes in the contour envelopes in the landscape information;
s53: taking pixel values of point cloud data corresponding to the three-dimensional coordinates of the point cloud data in RGB color channels as color information of contour envelope vertices, and carrying out color rendering on edges formed by the contour envelopes in combination with the color information to obtain digital twin results corresponding to garden depth images, wherein a color rendering formula is as follows:
Wherein:
color DIS (k) Representing the color value of the DIS at any position in the k color channel in the tetrahedron corresponding to the contour envelope;
DIS (q) represents the distance of the position DIS from the qth vertex of the tetrahedron, color q (k) Representing the color value of the qth vertex of the tetrahedron in the k color channel, dis representing a preset maximum distance;
sigma (k) represents the standard deviation of the color values of the four vertexes in the tetrahedron in the k color channel, and mu (k) represents the average value of the color values of the four vertexes in the tetrahedron in the k color channel;
s54: randomly selecting garden seasons, carrying out color compensation processing by combining seasonal factors on the contour envelope of the area above the landscape, and constructing a garden landscape digital twin result under different seasons, wherein a color compensation formula in spring and summer is as follows:
color * (R)=color(R)+(μ GR )[1-color(R)]color(G)
wherein:
color (R) represents the color value of the R color channel before color compensation, color * (R) represents a color value of the R color channel after color compensation, and color (G) represents a color value of the G color channel before color compensation;
μ GR representing the average value of the color values of the region above the landscape in the G color channel and the R color channel;
the color compensation formula in autumn and winter is as follows:
color * (B)=color(B)+(μ GB )[1-color(B)]color(G)
wherein:
color (B) represents the color value of the B color channel before color compensation, color * (B) Representing color values of the color-compensated B color channel;
μ B Representing the average of the color values of the area above the landscape in the B color channel.
In order to solve the above-described problems, the present invention provides an electronic apparatus including:
a memory storing at least one instruction;
the communication interface is used for realizing the communication of the electronic equipment; and
And the processor executes the instructions stored in the memory to realize the digital twin landscape design method.
In order to solve the above problems, the present invention also provides a computer-readable storage medium having at least one instruction stored therein, the at least one instruction being executed by a processor in an electronic device to implement the digital twin landscape design method described above.
Compared with the prior art, the invention provides a digital twin landscape design method, which has the following advantages:
firstly, the scheme provides a landscape reference surface extraction mode, and reference surface fitting is carried out on point cloud data after noise reduction to obtain a garden reference surface, wherein the reference surface fitting flow is as follows: extracting a low-frequency point cloud data set after noise reduction from the point cloud data after noise reduction; initializing a garden reference plane P 0 (A 0 X+B 0 Y+C 0 Z+D 0 =0), wherein a 0 ,B 0 ,C 0 ,D 0 All are initial coefficients of plane parameters, and X, Y and Z represent independent variables of three-dimensional coordinates of point cloud data; setting the current iteration number of the garden reference surface as t and the maximum iteration number as Max, and setting the t-th iteration result of the garden reference surface as P t (A t X+B t Y+C t Z+
D t =0), wherein a t ,B t ,C t ,D t The iteration coefficients of the t times are all plane parameters, and the initial value of t is 0; calculating to obtain the three-dimensional coordinates of the point cloud data corresponding to any low-frequency point cloud data in the low-frequency point cloud data set to the garden reference plane P t (A t X+
B t Y+C t Z+D t =0), wherein the low frequency point cloud dataCorresponding point cloud data three-dimensional coordinatesTo garden reference plane P t (A t X+B t Y+C t Z+D t Vertical distance =0) is +.>Calculating to obtain the self-adaptive threshold epsilon t
Wherein: epsilon t Representing a fitting effect for quantifying a t-th iteration result of the garden reference plane; the vertical distance is smaller than the adaptive threshold epsilon t Is taken as a garden reference plane P t (A t X+B t Y+C t Z+D t =0), statistics of garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0):
wherein: sum (Sum) t Represents a garden reference plane P t (A t X+B t Y+C t Z+D t Number of inliers=0); p is p t Represents a garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0); for maximum iteration number Max t And (3) dynamically adjusting:
wherein: max (Max) t Representing a dynamic adjustment result of the maximum iteration number in the t-th iteration; p represents a desired ratio, p being set to 0.95; if t >Max t Terminating the iteration of the reference plane to obtain a garden reference plane P t (A t X+B t Y+C t Z+D t =0) as the final reference plane iteration result, otherwise, generating the t+1st iteration result of the garden reference plane, wherein the t+1st iteration result of the garden reference plane is generated by randomly selecting Sum t Fitting the three-dimensional coordinates of +1 point cloud data to obtain a plane equation, and taking the plane equation obtained by fitting as a t+1st iteration result P of a garden reference plane t+1 (A t+1 X+B t+1 Y+
C t+1 Z+D t+1 =0), let t=t+1 iterate. According to the scheme, the garden depth image is shot, the pixel point information representing the edge of the garden landscape is extracted to form point cloud data, and the point cloud data are based on the point cloudThe distance information of the coordinates corresponding to the data realizes the filtering processing of the outlier point cloud data, and the self-adaptive threshold value and the self-adaptive iteration times are set to iterate the garden reference surface, so that the iterated garden reference surface contains low-frequency point cloud data with unobvious gradient change as much as possible, and the construction of the garden reference surface is realized.
Meanwhile, the scheme provides a point cloud data clustering and digital twin processing mode, and the point cloud data after noise reduction is classified and aggregated to obtain a landscape point cloud set, wherein the classification and aggregation flow of the landscape point cloud set is as follows: extracting a high-frequency point cloud data set after noise reduction from the point cloud data after noise reduction; calculating to obtain distance information of any two groups of high-frequency point cloud data in the high-frequency point cloud data set, wherein The distance information between the two is:
wherein:representing high frequency point cloud data->Distance information between them; />Representing high frequency point cloud data->The Euclidean distance between the three-dimensional coordinates of the corresponding point cloud data; />Are distance information parameters; based on the distance information, calculating to obtain the density of the high-frequency point cloud data, wherein the high-frequency point cloud data +.>The density of (2) is:
wherein:representing high frequency point cloud data->Is a density of (3); exp (·) represents an exponential function that bases on the natural constant; i represent L1 norm; sorting the high-frequency point cloud data according to the descending order of density, selecting the first-ranked high-frequency point cloud data as central point cloud data of a landscape point cloud set according to the sorting result, and dividing by taking the three-dimensional coordinates of the point cloud data corresponding to the central point cloud data as the center and mean as the radius to obtain a landscape area range; adding all high-frequency point cloud data in the area range into a landscape point cloud set corresponding to the selected central point cloud data, deleting all point cloud data in the landscape point cloud set in the current pair of high-frequency point cloud data sets until the high-frequency point cloud data does not exist in the current landscape point cloud set, and forming W landscape point cloud sets, wherein the determination formula of W is as follows:
Wherein: sum (w) represents the Sum of distance information of any two high-frequency point cloud data in the w-th landscape point cloud set. Initializing a landscape plane based on a landscape reference plane, and determining the terrain center positions of W landscapes on the terrain plane according to the landscape center coordinate positions of the W landscapes; constructing and obtaining W landscape contour envelopes based on vertexes in the contour envelopes in the landscape information; taking pixel values of point cloud data corresponding to the three-dimensional coordinates of the point cloud data in RGB color channels as color information of contour envelope vertices, and carrying out color rendering on edges formed by the contour envelopes in combination with the color information to obtain digital twin results corresponding to garden depth images, wherein a color rendering formula is as follows:
wherein: color device DIS (k) Representing the color value of the DIS at any position in the k color channel in the tetrahedron corresponding to the contour envelope; DIS (q) represents the distance of the position DIS from the qth vertex of the tetrahedron, color q (k) Representing the color value of the qth vertex of the tetrahedron in the k color channel, dis representing a preset maximum distance; sigma (k) represents the standard deviation of the color values of the four vertexes in the tetrahedron in the k color channel, and mu (k) represents the average value of the color values of the four vertexes in the tetrahedron in the k color channel; randomly selecting garden seasons, carrying out color compensation processing by combining seasonal factors on the contour envelope of the area above the landscape, and constructing a garden landscape digital twin result under different seasons, wherein a color compensation formula in spring and summer is as follows:
color * (R)=color(R)+(μ GR )[1-color(R)]color(G)
Wherein: color (R) represents the color value of the R color channel before color compensation, color * (R) represents a color value of the R color channel after color compensation, and color (G) represents a color value of the G color channel before color compensation; mu (mu) GR Indicating that the area above the landscape is in the G color channel and the R color channelIs a color value average value of (1); the color compensation formula in autumn and winter is as follows:
color * (B)=color(B)+(μ GB )[1-color(B)]color(G)
wherein: color (B) represents the color value of the B color channel before color compensation, color * (B) Representing color values of the color-compensated B color channel; mu (mu) B Representing the average of the color values of the area above the landscape in the B color channel. According to the scheme, distance information entropy is obtained by combining distance proportion calculation between high-frequency point cloud data, the distance entropy is used as distance information between the high-frequency point cloud data, density clustering processing is achieved by combining the distance information to obtain density of the high-frequency point cloud data, a plurality of landscape point cloud sets are constructed, landscape center coordinate position calculation and landscape contour envelope information extraction are respectively carried out on each landscape point cloud set, garden digital reconstruction is carried out according to a landscape reference plane and landscape information obtained through recognition, the digital reconstruction process comprises landscape position coordinate reconstruction and landscape color rendering processing, digital twin results corresponding to garden depth images are obtained, color compensation is carried out on different landscapes by combining season information, and garden landscape digital twin results under different seasons are constructed.
Drawings
Fig. 1 is a schematic flow chart of a digital twin landscape design method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device for implementing a digital twin landscape design method according to an embodiment of the present invention.
In the figure: 1 an electronic device, 10 a processor, 11 a memory, 12 a program, 13 a communication interface.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides a digital twin landscape design method. The execution subject of the digital twin landscape architecture design method includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiments of the present application. In other words, the digital twin landscape design method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Example 1:
s1: and obtaining a garden depth image, extracting point cloud data from the garden depth image, and performing filtering noise reduction treatment on the point cloud data to obtain the noise-reduced point cloud data.
The step S1 of obtaining a garden depth image, extracting point cloud data from the garden depth image, includes:
shooting gardens by using a depth camera to obtain a garden depth image I, extracting point cloud data from the garden depth image, wherein the information of each pixel in the garden depth image comprises the color values of the pixels in different color channels and the depth information representing the distance from the garden landscape corresponding to the pixels to the camera, and the extracting process of the point cloud data is as follows:
carrying out differential representation processing of combining depth information on any pixel in the garden depth image I, wherein the differential representation processing result of the x-th row and y-th column pixels I (x, y) in the garden depth image I is as follows:
H(x,y)=H 1 (x,y,d x,y )-H 2 (x,y,d x,y )
wherein:
h (x, y) represents the differential processing result of the pixel I (x, y);
d x,y depth information representing the pixel I (x, y); in the embodiment of the present invention, the depth information of the pixel is also referred to as a depth value of the pixel;
I k (x, y) represents the color value of pixel I (x, y) in the k color channel;
e represents a natural constant, σ 12 Representing the standard deviation of the scale; in the embodiment of the invention, sigma is 12 Set to 2 and 4, respectively;
c 1 ,c 2 respectively representing the lengths of the unit pixels in the horizontal direction and the vertical direction;
f X represents the focal length of the depth camera in the horizontal direction, f Y Representing the focal length of the depth camera in the vertical direction;
in a 3×3 pixel region centered on a pixel I (x, y), if the differential representation result of the pixel I (x, y) is maximum, the pixel coordinates (x, y) of the pixel I (x, y) and depth information d are obtained x,y And the color values of the pixels in the RGB color channels form a group of point cloud data in the garden depth image I, and the point cloud data set U of the garden depth image I is:
wherein:
u n represents the U-th group of point cloud data in the point cloud data set U, (x) n ,y n ) Representing point cloud data u n In (a) the pixel coordinates of the pixel,
representing point cloud data u n Depth information of (a);
I R (x n ,y n ),I G (x n ,y n ),I B (x n ,y n ) Respectively representing point cloud data u n Color values of the middle RGB color channel;
and filtering and denoising the point cloud data to obtain the denoised point cloud data.
In the step S1, filtering and denoising the point cloud data to obtain denoised point cloud data, including:
performing filtering noise reduction processing on the point cloud data to obtain noise-reduced point cloud data, wherein the filtering noise reduction processing flow of the point cloud data is as follows:
s11: and converting pixel coordinates in the point cloud data by combining the depth information to obtain three-dimensional coordinates of the point cloud data, wherein a point cloud data coordinate conversion formula of the n-th group of point cloud data is as follows:
/>
Wherein:
(X n ,Y n ,Z n ) A point cloud data three-dimensional coordinate representing an nth set of point cloud data;
s12: calculating to obtain a gray value, a gray gradient value and a gray gradient direction of a pixel corresponding to each group of point cloud data, marking point cloud data with the gray gradient value smaller than a preset gradient threshold value as low-frequency point cloud data, marking other point cloud data as high-frequency point cloud data, and respectively forming a low-frequency point cloud data set and a high-frequency point cloud data set; in the embodiment of the invention, the gray gradient value calculation flow of the pixels is to carry out gray processing on the garden depth image I and calculate the pixel gradient value of the garden depth image I after gray processing;
s13: selecting three-dimensional coordinates of point cloud data from any point cloud data set, calculating to obtain Euclidean distances from the three-dimensional coordinates of the selected point cloud data to three-dimensional coordinates of other point cloud data in the set, selecting S minimum Euclidean distances to form Euclidean distance sets of the three-dimensional coordinates of the selected point cloud data, and respectively calculating to obtain a mean value and a standard deviation in the Euclidean distance sets, wherein the three-dimensional coordinates (X n ,Y n ,Z n ) Mean in corresponding Euclidean distance set n Standard deviation std n Mean respectively n ,std n
S14: calculating to obtain the selected Taking Euclidean distance average value from the three-dimensional coordinates of the point cloud data to the three-dimensional coordinates of other point cloud data, and if the Euclidean distance average value is larger than a preset distance threshold value, marking the point cloud data corresponding to the three-dimensional coordinates of the point cloud data as outlier point clouds, and filtering, wherein the three-dimensional coordinates (X n ,Y n ,Z n ) The corresponding distance threshold is:
dis n =mean n +τstd n
wherein:
dis n representing three-dimensional coordinates (X) of point cloud data n ,Y n ,Z n ) A corresponding distance threshold, τ representing a control parameter;
s15: repeating the steps S13-S14 to obtain a low-frequency point cloud data set and a high-frequency point cloud data set after noise reduction:
wherein:
U 1 representing the denoised low frequency point cloud data set,representing a low frequency point cloud data set U 1 I-th point cloud data of +.>Representing Point cloud data->Three-dimensional coordinates of point cloud data in +.>Representing Point cloud data->Gray value of corresponding pixel, +.>Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 1 Representing the number of low-frequency point cloud data in the low-frequency point cloud data set;
U 2 representing the denoised high frequency point cloud data set,representing a high frequency point cloud data set U 2 J-th point cloud data of +.>Representing Point cloud data->Three-dimensional coordinates of point cloud data in +. >Representing Point cloud data->Gray value of corresponding pixel, +.>Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 2 Representing the number of high-frequency point cloud data in the high-frequency point cloud data set;
and taking the low-frequency point cloud data set and the high-frequency point cloud data set after noise reduction as the point cloud data after noise reduction.
S2: and performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface.
In the step S2, performing a reference plane fitting on the noise-reduced point cloud data, including:
and performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface, wherein the reference surface fitting flow is as follows:
s21: extracting a low-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
s22: initializing a garden reference plane P 0 (A 0 X+B 0 Y+C 0 Z+D 0 =0), wherein a 0 ,B 0 ,C 0 ,D 0 All are initial coefficients of plane parameters, and X, Y and Z represent independent variables of three-dimensional coordinates of point cloud data;
s23: setting the current iteration number of the garden reference surface as t and the maximum iteration number as Max, and setting the t-th iteration result of the garden reference surface as P t (A t X+B t Y+C t Z+D t =0), wherein a t ,B t ,C t ,D t The iteration coefficients of the t times are all plane parameters, and the initial value of t is 0; in the embodiment of the invention, A t X+B t Y+C t Z+D t =0 represents a plane equation of a garden reference plane;
s24: calculating to obtain the three-dimensional coordinates of the point cloud data corresponding to any low-frequency point cloud data in the low-frequency point cloud data set to the garden reference plane P t (A t X+B t Y+C t Z+D t =0), wherein the low frequency point cloud dataCorresponding point cloud data three-dimensional coordinates +.>To garden reference plane P t (A t X+B t Y+C t Z+D t Vertical distance =0) is +.>
S25: calculating to obtain the self-adaptive threshold epsilon t
Wherein:
ε t representing a fitting effect for quantifying a t-th iteration result of the garden reference plane;
s26: the vertical distance is smaller than the adaptive threshold epsilon t Is taken as a garden reference plane P t (A t X+
B t Y+C t Z+D t =0), statistics of garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0):
wherein:
Sum t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Number of inliers=0);
p t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0);
s27: for maximum iteration number Max t And (3) dynamically adjusting:
wherein:
Max t representing a dynamic adjustment result of the maximum iteration number in the t-th iteration;
p represents a desired ratio, p being set to 0.95;
s28: if t>Max t TerminatingIterating the reference plane to obtain a garden reference plane P t (A t X+B t Y+C t Z+D t =0) as the final reference plane iteration result, otherwise, generating the t+1st iteration result of the garden reference plane, wherein the t+1st iteration result of the garden reference plane is generated by randomly selecting Sum t Fitting the three-dimensional coordinates of +1 point cloud data to obtain a plane equation, and taking the plane equation obtained by fitting as a t+1st iteration result P of a garden reference plane t+1 (A t+1 X+B t+1 Y+
C t+1 Z+D t+1 =0), let t=t+1, return to step S25.
S3: and classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set of the landscape.
In the step S3, classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set, which comprises the following steps:
classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set, wherein the classifying and aggregating process of the landscape point cloud set comprises the following steps:
s31: extracting a high-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
s32: calculating to obtain distance information of any two groups of high-frequency point cloud data in the high-frequency point cloud data set, whereinThe distance information between the two is: />
Wherein:
representing high frequency point cloud data->Distance information between them;
representing high frequency point cloud data->The Euclidean distance between the three-dimensional coordinates of the corresponding point cloud data;
are distance information parameters;
s33: based on the distance information, calculating to obtain the density of the high-frequency point cloud data, wherein the high-frequency point cloud dataThe density of (2) is:
wherein:
representing high frequency point cloud data- >Is a density of (3);
exp (·) represents an exponential function that bases on the natural constant;
i represent L1 norm;
s34: sorting the high-frequency point cloud data according to the descending order of density, selecting the first-ranked high-frequency point cloud data as central point cloud data of a landscape point cloud set according to the sorting result, and dividing by taking the three-dimensional coordinates of the point cloud data corresponding to the central point cloud data as the center and mean as the radius to obtain a landscape area range;
s34: adding all the high-frequency point cloud data in the area range into a landscape point cloud set corresponding to the selected central point cloud data, deleting all the point cloud data in the landscape point cloud set in the current pair of high-frequency point cloud data sets, returning to the step S33 until the high-frequency point cloud data does not exist in the current landscape point cloud set, and forming W landscape point cloud sets, wherein the determination formula of W is as follows:
wherein:
sum (w) represents the Sum of distance information of any two high-frequency point cloud data in the w-th landscape point cloud set.
S4: and performing terrain information sensing on the landscape view cloud set to obtain landscape information, wherein the landscape information comprises landscape center coordinate positions and landscape contour envelope information.
And S4, performing terrain information sensing on the landscape view cloud set to obtain landscape information, wherein the step comprises the following steps:
The landscape information sensing process of the w-th landscape point cloud set is as follows:
randomly selecting three-dimensional coordinates of point cloud data of four point cloud data from a w-th landscape point cloud set, forming a tetrahedron by the three-dimensional coordinates of the point cloud data, taking edges of the tetrahedron as contour envelopes of the w-th landscape if the three-dimensional coordinates of the point cloud data of other point cloud data do not exist in the tetrahedron, otherwise, reserving the three-dimensional coordinates of the point cloud data inside the tetrahedron as tetrahedron vertexes, deleting the point cloud data corresponding to the tetrahedron vertexes nearest to the reserved point cloud data three-dimensional coordinates, and repeating the steps to obtain a plurality of contour envelopes of the w-th landscape;
and calculating to obtain the average value of the vertex coordinates in the contour envelope, and taking the average value as the landscape center coordinate position of the w-th landscape.
S5: and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image.
In the step S5, garden digital reconstruction is carried out according to the identified garden reference surface and the landscape information, and a digital twin result corresponding to the garden depth image is generated, which comprises the following steps:
And carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image, wherein the garden digital reconstruction flow is as follows:
s51: initializing a landscape plane based on a landscape reference plane, and determining the terrain center positions of W landscapes on the terrain plane according to the landscape center coordinate positions of the W landscapes;
s52: constructing and obtaining W landscape contour envelopes based on vertexes in the contour envelopes in the landscape information;
s53: taking pixel values of point cloud data corresponding to the three-dimensional coordinates of the point cloud data in RGB color channels as color information of contour envelope vertices, and carrying out color rendering on edges formed by the contour envelopes in combination with the color information to obtain digital twin results corresponding to garden depth images, wherein a color rendering formula is as follows:
wherein:
color DIS (k) Representing the color value of the DIS at any position in the k color channel in the tetrahedron corresponding to the contour envelope;
DIS (q) represents the position DIS distanceDistance of the q-th vertex of tetrahedron, color q (k) Representing the color value of the qth vertex of the tetrahedron in the k color channel, dis representing a preset maximum distance;
sigma (k) represents the standard deviation of the color values of the four vertexes in the tetrahedron in the k color channel, and mu (k) represents the average value of the color values of the four vertexes in the tetrahedron in the k color channel;
S54: randomly selecting garden seasons, carrying out color compensation processing by combining seasonal factors on the contour envelope of the area above the landscape, and constructing a garden landscape digital twin result under different seasons, wherein a color compensation formula in spring and summer is as follows:
color * (R)=color(R)+(μ GR )[1-color(R)]color(G)
wherein:
color (R) represents the color value of the R color channel before color compensation, color * (R) represents a color value of the R color channel after color compensation, and color (G) represents a color value of the G color channel before color compensation;
μ GR representing the average value of the color values of the region above the landscape in the G color channel and the R color channel;
the color compensation formula in autumn and winter is as follows:
color * (B)=color(B)+(μ GB )[1-color(B)]color(G)
wherein:
color (B) represents the color value of the B color channel before color compensation, color * (B) Representing color values of the color-compensated B color channel;
μ B representing the average of the color values of the area above the landscape in the B color channel.
Example 2:
fig. 2 is a schematic structural diagram of an electronic device for implementing the digital twin landscape design method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication interface 13 and a bus, and may further comprise a computer program, such as program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of the program 12, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects respective parts of the entire electronic device using various interfaces and lines, executes various functions of the electronic device 1 and processes data by running or executing programs or modules (a program 12 for realizing digital twin landscape design, etc.) stored in the memory 11, and calling data stored in the memory 11.
The communication interface 13 may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device 1 and other electronic devices and to enable connection communication between internal components of the electronic device.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 2 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 2 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
obtaining a garden depth image, extracting point cloud data from the garden depth image, and performing filtering noise reduction treatment on the point cloud data to obtain noise-reduced point cloud data;
performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface;
Classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set of the landscape;
performing terrain information sensing on the landscape view cloud set to obtain landscape information;
and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image.
Specifically, the specific implementation method of the above instruction by the processor 10 may refer to descriptions of related steps in the corresponding embodiments of fig. 1 to 2, which are not repeated herein.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. A digital twin landscape design method, the method comprising:
S1: obtaining a garden depth image, extracting point cloud data from the garden depth image, and performing filtering noise reduction treatment on the point cloud data to obtain noise-reduced point cloud data;
s2: performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface;
s3: classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set of the landscape;
s4: performing terrain information sensing on the landscape view cloud set to obtain landscape information, wherein the landscape information comprises landscape center coordinate positions and landscape contour envelope information;
s5: and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image.
2. The digital twin landscape design method according to claim 1, wherein the step S1 of obtaining a garden depth image, extracting point cloud data from the garden depth image, comprises:
shooting gardens by using a depth camera to obtain a garden depth image I, extracting point cloud data from the garden depth image, wherein the information of each pixel in the garden depth image comprises the color values of the pixels in different color channels and the depth information representing the distance from the garden landscape corresponding to the pixels to the camera, and the extracting process of the point cloud data is as follows:
Carrying out differential representation processing of combining depth information on any pixel in the garden depth image I, wherein the differential representation processing result of the x-th row and y-th column pixels I (x, y) in the garden depth image I is as follows:
H(x,y)=H 1 (x,y,d x,y )-H 2 (x,y,d x,y )
wherein:
h (x, y) represents the differential processing result of the pixel I (x, y);
d x,y depth information representing the pixel I (x, y);
I k (x, y) represents the color value of pixel I (x, y) in the k color channel;
e represents a natural constant, σ 12 Representing the standard deviation of the scale;
c 1 ,c 2 respectively representing the lengths of the unit pixels in the horizontal direction and the vertical direction;
f X represents the focal length of the depth camera in the horizontal direction, f Y Representing the focal length of the depth camera in the vertical direction;
in a 3×3 pixel region centered on a pixel I (x, y), if the differential representation result of the pixel I (x, y) is maximum, the pixel coordinates (x, y) of the pixel I (x, y) and depth information d are obtained x,y And the color values of the pixels in the RGB color channels form a group of point cloud data in the garden depth image I, and the point cloud data set U of the garden depth image I is:
wherein:
u n represents the U-th group of point cloud data in the point cloud data set U, (x) n ,y n ) Representing point cloud data u n In (a) the pixel coordinates of the pixel,representing point cloud data u n Depth information of (a);
I R (x n ,y n ),I G (x n ,y n ),I B (x n ,y n ) Respectively representing point cloud data u n Color values of the middle RGB color channel;
And filtering and denoising the point cloud data to obtain the denoised point cloud data.
3. The method for designing the digital twin landscape as claimed in claim 2, wherein the step S1 of filtering and denoising the point cloud data to obtain the denoised point cloud data includes:
performing filtering noise reduction processing on the point cloud data to obtain noise-reduced point cloud data, wherein the filtering noise reduction processing flow of the point cloud data is as follows:
s11: and converting pixel coordinates in the point cloud data by combining the depth information to obtain three-dimensional coordinates of the point cloud data, wherein a point cloud data coordinate conversion formula of the n-th group of point cloud data is as follows:
wherein:
(X n ,Y n ,Z n ) A point cloud data three-dimensional coordinate representing an nth set of point cloud data;
s12: calculating to obtain a gray value, a gray gradient value and a gray gradient direction of a pixel corresponding to each group of point cloud data, marking point cloud data with the gray gradient value smaller than a preset gradient threshold value as low-frequency point cloud data, marking other point cloud data as high-frequency point cloud data, and respectively forming a low-frequency point cloud data set and a high-frequency point cloud data set;
s13: selecting three-dimensional coordinates of point cloud data from any point cloud data set, calculating to obtain Euclidean distances from the three-dimensional coordinates of the selected point cloud data to three-dimensional coordinates of other point cloud data in the set, selecting S minimum Euclidean distances to form Euclidean distance sets of the three-dimensional coordinates of the selected point cloud data, and respectively calculating to obtain a mean value and a standard deviation in the Euclidean distance sets, wherein the three-dimensional coordinates (X n ,Y n ,Z n ) Mean in corresponding Euclidean distance set n Standard deviation std n Mean respectively n ,std n
S14: calculating to obtain Euclidean distance average value from the three-dimensional coordinates of the selected point cloud data to the three-dimensional coordinates of other point cloud data, if the Euclidean distance average value is larger than a preset distance threshold value, marking the point cloud data corresponding to the three-dimensional coordinates of the point cloud data as outlier point clouds, filtering, wherein the three-dimensional coordinates (X n ,Y n ,Z n ) The corresponding distance threshold is:
dis n =mean n +τstd n
wherein:
dis n representing three-dimensional coordinates (X) of point cloud data n ,Y n ,Z n ) A corresponding distance threshold, τ representing a control parameter;
s15: repeating the steps S13-S14 to obtain a low-frequency point cloud data set and a high-frequency point cloud data set after noise reduction:
wherein:
U 1 representing the denoised low frequency point cloud data set,representing a low frequency point cloud data set U 1 Is the i-th point cloud data in (a),representing Point cloud data->Three-dimensional coordinates of point cloud data in +.>Representing Point cloud data->Gray value of corresponding pixel, +.>Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 1 Representing the number of low-frequency point cloud data in the low-frequency point cloud data set;
U 2 representing the denoised high frequency point cloud data set,representing a high frequency point cloud data set U 2 Is the j-th point cloud data in (a),representing Point cloud data->Three-dimensional coordinates of point cloud data in +.>Representing Point cloud data->Gray value of corresponding pixel, +.>Respectively represent point cloud data->Gradation gradient value and gradation gradient direction, num of the corresponding pixel 2 Representing the number of high-frequency point cloud data in the high-frequency point cloud data set;
and taking the low-frequency point cloud data set and the high-frequency point cloud data set after noise reduction as the point cloud data after noise reduction.
4. The digital twin landscape design method according to claim 1, wherein the step S2 of performing a reference plane fitting on the noise-reduced point cloud data includes:
and performing reference surface fitting on the noise-reduced point cloud data to obtain a garden reference surface, wherein the reference surface fitting flow is as follows:
s21: extracting a low-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
s22: initializing a garden reference plane P 0 (A 0 X+B 0 Y+C 0 Z+D 0 =0), wherein a 0 ,B 0 ,C 0 ,D 0 All are initial coefficients of plane parameters, and X, Y and Z represent independent variables of three-dimensional coordinates of point cloud data;
s23: setting the current iteration number of the garden reference surface as t and the maximum iteration number as Max, and setting the t-th iteration result of the garden reference surfaceIs P t (A t X+B t Y+C t Z+D t =0), wherein a t ,B t ,C t ,D t The iteration coefficients of the t times are all plane parameters, and the initial value of t is 0;
s24: calculating to obtain the three-dimensional coordinates of the point cloud data corresponding to any low-frequency point cloud data in the low-frequency point cloud data set to the garden reference plane P t (A t X+B t Y+C t Z+D t =0), wherein the low frequency point cloud dataCorresponding point cloud data three-dimensional coordinates +.>To garden reference plane P t (A t X+B t Y+C t Z+D t Vertical distance =0) is +.>
S25: calculating to obtain the self-adaptive threshold epsilon t
Wherein:
ε t representing a fitting effect for quantifying a t-th iteration result of the garden reference plane;
s26: the vertical distance is smaller than the adaptive threshold epsilon t Is taken as a garden reference plane P t (A t X+
B t Y+C t Z+D t =0), statistics of garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0):
wherein:
Sum t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Number of inliers=0);
p t represents a garden reference plane P t (A t X+B t Y+C t Z+D t Interior point ratio of =0);
s27: for maximum iteration number Max t And (3) dynamically adjusting:
wherein:
Max t representing a dynamic adjustment result of the maximum iteration number in the t-th iteration;
p represents a desired ratio, p being set to 0.95;
s28: if t>Max t Terminating the iteration of the reference plane to obtain a garden reference plane P t (A t X+B t Y+C t Z+D t =0) as the final reference plane iteration result, otherwise, generating the t+1st iteration result of the garden reference plane, wherein the t+1st iteration result of the garden reference plane is generated by randomly selecting Sum t Fitting the three-dimensional coordinates of +1 point cloud data to obtain a plane equation, and taking the plane equation obtained by fitting as a t+1st iteration result P of a garden reference plane t+1 (A t+1 X+B t+1 Y+
C t+1 Z+D t+1 =0), let t=t+1, return to step S25.
5. The method for designing digital twin landscape architecture according to claim 1, wherein the step S3 of classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set includes:
classifying and aggregating the noise-reduced point cloud data to obtain a landscape point cloud set, wherein the classifying and aggregating process of the landscape point cloud set comprises the following steps:
s31: extracting a high-frequency point cloud data set after noise reduction from the point cloud data after noise reduction;
s32: calculating to obtain distance information of any two groups of high-frequency point cloud data in the high-frequency point cloud data set, whereinThe distance information between the two is:
wherein:
representing high frequency point cloud data->Distance information between them;
representing high frequency point cloud data->The Euclidean distance between the three-dimensional coordinates of the corresponding point cloud data;
are distance information parameters;
s33: based on the distance information, calculating to obtain the density of the high-frequency point cloud data, wherein the high-frequency point cloud dataThe density of (2) is:
wherein:
representing high frequency point cloud data->Is a density of (3);
exp (·) represents an exponential function that bases on the natural constant;
i represent L1 norm;
s34: sorting the high-frequency point cloud data according to the descending order of density, selecting the first-ranked high-frequency point cloud data as central point cloud data of a landscape point cloud set according to the sorting result, and dividing by taking the three-dimensional coordinates of the point cloud data corresponding to the central point cloud data as the center and mean as the radius to obtain a landscape area range;
s34: adding all the high-frequency point cloud data in the area range into a landscape point cloud set corresponding to the selected central point cloud data, deleting all the point cloud data in the landscape point cloud set in the current pair of high-frequency point cloud data sets, returning to the step S33 until the high-frequency point cloud data does not exist in the current landscape point cloud set, and forming W landscape point cloud sets, wherein the determination formula of W is as follows:
wherein:
sum (w) represents the Sum of distance information of any two high-frequency point cloud data in the w-th landscape point cloud set.
6. The method for designing digital twin landscape architecture according to claim 5, wherein in the step S4, the landscape information is obtained by performing terrain information sensing on the landscape view cloud set, and the method comprises the steps of:
the landscape information sensing process of the w-th landscape point cloud set is as follows:
Randomly selecting three-dimensional coordinates of point cloud data of four point cloud data from a w-th landscape point cloud set, forming a tetrahedron by the three-dimensional coordinates of the point cloud data, taking edges of the tetrahedron as contour envelopes of the w-th landscape if the three-dimensional coordinates of the point cloud data of other point cloud data do not exist in the tetrahedron, otherwise, reserving the three-dimensional coordinates of the point cloud data inside the tetrahedron as tetrahedron vertexes, deleting the point cloud data corresponding to the tetrahedron vertexes nearest to the reserved point cloud data three-dimensional coordinates, and repeating the steps to obtain a plurality of contour envelopes of the w-th landscape;
and calculating to obtain the average value of the vertex coordinates in the contour envelope, and taking the average value as the landscape center coordinate position of the w-th landscape.
7. The method of claim 1, wherein in the step S5, the digital reconstruction of gardens is performed according to the identified garden reference plane and the landscape information, and the digital twinning result corresponding to the garden depth image is generated, which comprises:
and carrying out garden digital reconstruction according to the recognized garden reference plane and the landscape information to obtain a digital twin result corresponding to the garden depth image, wherein the garden digital reconstruction flow is as follows:
S51: initializing a landscape plane based on a landscape reference plane, and determining the terrain center positions of W landscapes on the terrain plane according to the landscape center coordinate positions of the W landscapes;
s52: constructing and obtaining W landscape contour envelopes based on vertexes in the contour envelopes in the landscape information;
s53: taking pixel values of point cloud data corresponding to the three-dimensional coordinates of the point cloud data in RGB color channels as color information of contour envelope vertices, and carrying out color rendering on edges formed by the contour envelopes in combination with the color information to obtain digital twin results corresponding to garden depth images, wherein a color rendering formula is as follows:
wherein:
color DIS (k) Representing the color value of the DIS at any position in the k color channel in the tetrahedron corresponding to the contour envelope;
DIS (q) represents the distance of the position DIS from the qth vertex of the tetrahedron, color q (k) Representing the color value of the qth vertex of the tetrahedron in the k color channel, dis representing a preset maximum distance;
sigma (k) represents the standard deviation of the color values of the four vertexes in the tetrahedron in the k color channel, and mu (k) represents the average value of the color values of the four vertexes in the tetrahedron in the k color channel;
s54: randomly selecting garden seasons, carrying out color compensation processing by combining seasonal factors on the contour envelope of the area above the landscape, and constructing a garden landscape digital twin result under different seasons, wherein a color compensation formula in spring and summer is as follows:
color * (R)=color(R)+(μ GR )[1-color(R)]color(G)
Wherein:
color (R) represents the color value of the R color channel before color compensation, color * (R) represents a color value of the R color channel after color compensation, and color (G) represents a color value of the G color channel before color compensation;
μ GR colors representing the area above the landscape in the G color channel and the R color channelValue average;
the color compensation formula in autumn and winter is as follows:
color * (B)=color(B)+(μ GB )[1-color(B)]color(G)
wherein:
color (B) represents the color value of the B color channel before color compensation, color * (B) Representing color values of the color-compensated B color channel;
μ B representing the average of the color values of the area above the landscape in the B color channel.
CN202410020442.6A 2024-01-04 2024-01-04 Digital twin landscape design method Active CN117828737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410020442.6A CN117828737B (en) 2024-01-04 2024-01-04 Digital twin landscape design method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410020442.6A CN117828737B (en) 2024-01-04 2024-01-04 Digital twin landscape design method

Publications (2)

Publication Number Publication Date
CN117828737A true CN117828737A (en) 2024-04-05
CN117828737B CN117828737B (en) 2024-07-12

Family

ID=90520734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410020442.6A Active CN117828737B (en) 2024-01-04 2024-01-04 Digital twin landscape design method

Country Status (1)

Country Link
CN (1) CN117828737B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003259137A (en) * 2002-02-28 2003-09-12 Seiko Epson Corp Image color correction device and method thereof, and computer program
US20190026938A1 (en) * 2017-07-18 2019-01-24 Fuscoe Engineering, Inc. Three-dimensional modeling from optical capture
CN110246092A (en) * 2019-05-02 2019-09-17 江西理工大学 A kind of three-dimensional laser point cloud denoising method for taking neighborhood point mean distance and slope into account
CN110298136A (en) * 2019-07-05 2019-10-01 广东金雄城工程项目管理有限公司 Application based on BIM technology scene method of construction and system and in garden landscape digital modeling
CN111091614A (en) * 2019-11-04 2020-05-01 国网内蒙古东部电力有限公司检修分公司 Method and system for establishing three-dimensional live-action model of transformer substation
CN113658077A (en) * 2021-08-19 2021-11-16 成都永峰科技有限公司 Curvature-based regional bilateral mass point cloud noise reduction method
CN116070321A (en) * 2023-01-09 2023-05-05 武汉乡创科技有限公司 Rural landscape design method, device, equipment and storage medium
CN116452852A (en) * 2023-03-20 2023-07-18 华南理工大学 Automatic generation method of high-precision vector map
CN116468873A (en) * 2023-03-29 2023-07-21 北京理工大学 Building model reconstruction method based on airborne TomoSAR point cloud
CN117274453A (en) * 2023-08-22 2023-12-22 武汉光庭信息技术股份有限公司 Three-dimensional reconstruction and real scene restoration method based on image and point cloud depth fusion

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003259137A (en) * 2002-02-28 2003-09-12 Seiko Epson Corp Image color correction device and method thereof, and computer program
US20190026938A1 (en) * 2017-07-18 2019-01-24 Fuscoe Engineering, Inc. Three-dimensional modeling from optical capture
CN110246092A (en) * 2019-05-02 2019-09-17 江西理工大学 A kind of three-dimensional laser point cloud denoising method for taking neighborhood point mean distance and slope into account
CN110298136A (en) * 2019-07-05 2019-10-01 广东金雄城工程项目管理有限公司 Application based on BIM technology scene method of construction and system and in garden landscape digital modeling
CN111091614A (en) * 2019-11-04 2020-05-01 国网内蒙古东部电力有限公司检修分公司 Method and system for establishing three-dimensional live-action model of transformer substation
CN113658077A (en) * 2021-08-19 2021-11-16 成都永峰科技有限公司 Curvature-based regional bilateral mass point cloud noise reduction method
CN116070321A (en) * 2023-01-09 2023-05-05 武汉乡创科技有限公司 Rural landscape design method, device, equipment and storage medium
CN116452852A (en) * 2023-03-20 2023-07-18 华南理工大学 Automatic generation method of high-precision vector map
CN116468873A (en) * 2023-03-29 2023-07-21 北京理工大学 Building model reconstruction method based on airborne TomoSAR point cloud
CN117274453A (en) * 2023-08-22 2023-12-22 武汉光庭信息技术股份有限公司 Three-dimensional reconstruction and real scene restoration method based on image and point cloud depth fusion

Also Published As

Publication number Publication date
CN117828737B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN108875935B (en) Natural image target material visual characteristic mapping method based on generation countermeasure network
CN112614077B (en) Unsupervised low-illumination image enhancement method based on generation countermeasure network
WO2022199583A1 (en) Image processing method and apparatus, computer device, and storage medium
CN108416745B (en) Image self-adaptive defogging enhancement method with color constancy
CN110097609B (en) Sample domain-based refined embroidery texture migration method
CN110222722A (en) Interactive image stylization processing method, calculates equipment and storage medium at system
US11288783B2 (en) Method and system for image enhancement
CN106709964B (en) Sketch generation method and device based on gradient correction and multidirectional texture extraction
CN110717953B (en) Coloring method and system for black-and-white pictures based on CNN-LSTM (computer-aided three-dimensional network-link) combination model
CN105354248A (en) Gray based distributed image bottom-layer feature identification method and system
CN107506792B (en) Semi-supervised salient object detection method
CN108510562B (en) Digital camouflage pattern generation method based on image fractal texture
US20210248729A1 (en) Superpixel merging
CN110399812B (en) Intelligent face feature extraction method and device and computer readable storage medium
CN114066871B (en) Method for training new coronal pneumonia focus area segmentation model
CN113012068B (en) Image denoising method, image denoising device, electronic equipment and computer-readable storage medium
CN108596992B (en) Rapid real-time lip gloss makeup method
CN108829692B (en) Flower image retrieval method based on convolutional neural network
CN112416293A (en) Neural network enhancement method, system and application thereof
CN110956201B (en) Convolutional neural network-based image distortion type classification method
CN110675463A (en) Local color pencil drawing generation method and device
CN114359269A (en) Virtual food box defect generation method and system based on neural network
CN117828737B (en) Digital twin landscape design method
CN115239746B (en) Object-oriented remote sensing image segmentation method, device, equipment and medium
US20110052059A1 (en) Generating image histogram by parallel processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant