Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
School_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
encinass1u
School_project
Merge requests
!2
Update README.md
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update README.md
Student
into
main
Overview
0
Commits
51
Pipelines
0
Changes
1
Merged
encinass1u
requested to merge
Student
into
main
3 years ago
Overview
0
Commits
51
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
fb66824d
Prev
Next
Show latest version
1 file
+
40
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
fb66824d
SMATed surface file
· fb66824d
encinass1u
authored
3 years ago
Plotting.py
0 → 100644
+
40
−
0
Options
#This code will provide the calcultaion to obtain dicretead data, in order to have coordintes
#and the values inside them corresponding to their height.
import
numpy
as
np
import
open3d
as
o3d
import
copy
# Read .ply file, this file contains guassian filter for the surface saved
input_file
=
"
tata_filtered.ply
"
pcd
=
o3d
.
io
.
read_point_cloud
(
input_file
)
# Read the point cloud
# Convert open3d format to numpy array, the format here is point cloud in numpy format
Pc
=
np
.
asarray
(
pcd
.
points
)
#
Sf
=
copy
.
deepcopy
(
Pc
)
L
=
len
(
Pc
)
iter
=
1
#M is the media of surface rugossity, values under it will be 0, over this 1
M
=
3.17661
while
iter
<=
L
:
for
i
in
range
(
0
,
L
):
for
j
in
range
(
2
,
3
):
if
Pc
[
i
,
j
]
>
M
:
Sf
[
i
,
j
]
=
1
else
:
Sf
[
i
,
j
]
=
0
iter
+=
1
#Treatment of coordinate to convert them from measurements to coordinates value for a 2D plane.
#For Y
Dt
=
copy
.
deepcopy
(
Sf
)
for
i
in
range
(
0
,
L
):
for
j
in
range
(
1
,
2
):
Dt
[
i
,
j
]
=
-
int
((
Sf
[
i
,
j
]
+
21.8168
)
/
0.0052
)
#For X
for
i
in
range
(
0
,
L
):
for
j
in
range
(
0
,
1
):
Dt
[
i
,
j
]
=
-
int
((
Sf
[
i
,
j
]
+
8.445706367
)
/
0.005214
)
data
=
np
.
flip
(
Dt
,
axis
=
0
)
print
(
data
)
Loading