Page 17 - 中国仿真学会通讯2020第1期
P. 17
3. Extracting lines from the image based on the LSD Then we extract and sort different values by
traversing the point set PFB. By slicing the point
[17] algorithm sets PFB along the Y⁃axis direction, we can get
the set of the left and right layers. Then we model
4. Removing the lines with a horizontal or vertical angle it based on Algorithm 1 and Algorithm 2, thus we
can get the left and right layered model PLR and
greater than the threshold ki , leaving only the the set of triangle patch TLR. The result is shown
in Figure 4 ( l ) . We extract and sort different z
approximate horizontal or vertical line. Here we let kl values by traversing the point set PFB. By slicing
= 0.175 the point sets PFB along the Z⁃axis direction, we
can get the set of the upper and lower layers. Then
5. Establishing the polar coordinate system and we model it based on Algorithm 1 and Algorithm 2,
thus we can get the upper and lower layered model
calculating the coordinates of each line based on PUD and the set of triangle patch PUD. The result is
shown in Figure 4( n). Then, we merge the front
equation ( 4 ) , the straight lines whose polar and back layered model,the left and right layered
model and the upper and lower layered model. The
coordinate difference satisfies the threshold, which result is shown in Figure 4(o).
3.3 Roof Modeling Based on the Block
is shown in equation(5) , are merged
Reconstruction
k = b - dc,( a ≠ c,b ≠ d) We reconstruct the building roof based on the
a - block reconstruction method, which is shown as
the Algorithm 3. Algorithm 3 obtains a number of
( )θ = arctan - 1 quadrilateral sets by projecting the point cloud
k onto a plane and using the color information of the
point cloud to block. For each quadrilateral, the
r = a·rcosθ + b·sinθ (4) geometric information of the point cloud is used
for reconstruction. The method of building the roof
If a = c, it represents the vertical line. If b = d, it model with the quadrilateral as the basic unit not
only can simplify the complexity of the model but
represents the horizontal line. Where, ( a,b) and also can facilitate texture mapping.
( c, d ) represent the coordinates of the two Algorithm3 : Roof Modeling Based on the Block
Reconstruction
endpoints of the line in the image coordinate
Input: The roof point cloud of the building
system.
1. Projecting the roof point cloud onto the XOY plane,
dθ < Δθ and resampling and interpolating the projected point
cloud into a picture ( Figure 4( p) ) .2. Detecting the
dr < Δr (5) contour of the image based on Canny operator.
Where,dθ is the angular difference between the two 3. Dividing the roof into blocks based on Hough⁃based
line extraction method ( Figure 4( q) ) .
lines, dr is the radius difference between the two
4. Reconstructing the 3D model of the roof based on the
lines. Δθ and Δr are the thresholds of the angular method of block reconstruction ( Figure 4( r) ) .
difference and the radius difference. This method
takes Δr = 5,Δθ = 10 °
6. Dividing the lines into a group of horizontal lines and
a group of vertical lines based on ( r, θ ) , and
segmenting the image into ( m+ 1) ×( n+ 1) blocks,
where m,n represent the number of horizontal lines
and vertical lines
7. Traversing all blocks and counting the number of
black pixel and white pixel in each block.
if the number of white pixel > the threshold kw
and the number of white pixel is much larger than
the number of black pixel
Marking the block as an effective block
Adding the four vertices to the set of output
model points PFB
else
continue
8. Triangulating the point set PFB , and obtaining the
triangular patch TFB of the model of the front and
back layers. The result is shown in Figure 4( j)
14