Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MasterArbeit
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
MasterArbeit
Commits
a6e10ef5
Commit
a6e10ef5
authored
Sep 27, 2017
by
wester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filter
parent
aeb89804
Pipeline
#277
passed with stage
in 25 seconds
Changes
3
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
example.pnts
3_PointCloud/example.pnts
+0
-0
main.cpp
3_PointCloud/main.cpp
+19
-7
vive 2.stl
Halterungen/vive 2.stl
+0
-0
No files found.
3_PointCloud/example.pnts
View file @
a6e10ef5
No preview for this file type
3_PointCloud/main.cpp
View file @
a6e10ef5
...
@@ -227,20 +227,30 @@ void getDepthData(IMultiSourceFrame* frame) {
...
@@ -227,20 +227,30 @@ void getDepthData(IMultiSourceFrame* frame) {
//bilateralFilterOwn(buf, filterd, 5, 12.0, 16.0);
//bilateralFilterOwn(buf, filterd, 5, 12.0, 16.0);
//const unsigned short* curr = (const unsigned short*)filterd;
//const unsigned short* curr = (const unsigned short*)filterd;
cv
::
Mat
OriginalDepthFrame
=
cv
::
Mat
(
width
,
height
,
CV_16UC1
,
&
buf
);
cv
::
Mat
OriginalDepthFrame
(
height
,
width
,
CV_16UC1
);
// , &buf);
const
unsigned
short
*
curr
=
(
const
unsigned
short
*
)
buf
;
for
(
unsigned
int
y
=
0
;
y
<
height
;
y
++
)
{
for
(
unsigned
int
x
=
0
;
x
<
width
;
x
++
)
{
OriginalDepthFrame
.
ptr
<
unsigned
short
>
(
y
)[
x
]
=
curr
[
x
+
y
*
width
];
}
}
cv
::
Mat
FilerdDepth
;
cv
::
Mat
FilerdDepth
;
FilerdDepth
.
create
(
OriginalDepthFrame
.
size
(),
OriginalDepthFrame
.
type
());
FilerdDepth
.
create
(
OriginalDepthFrame
.
size
(),
OriginalDepthFrame
.
type
());
FastDepthNoiseRemoval
filter
(
3
,
0.0
f
,
3
,
1.0
f
);
FastDepthNoiseRemoval
filter
(
3
,
0.0
f
,
3
,
1
00
.0
f
);
filter
.
setKillBorder
(
true
);
filter
.
setKillBorder
(
true
);
filter
.
setInput
(
OriginalDepthFrame
);
filter
.
setInput
(
OriginalDepthFrame
);
//
filter.filter(OriginalDepthFrame);
filter
.
filter
(
OriginalDepthFrame
);
// cv::imshow("Input", OriginalDepthFrame);
//cv::bilateralFilter(OriginalDepthFrame, FilerdDepth, 15, 80, 80);
//cv::bilateralFilter(OriginalDepthFrame, FilerdDepth, 15, 80, 80);
//const unsigned short* curr = (const unsigned short*)buf;
//const unsigned short* curr = (const unsigned short*)buf;
c
onst
unsigned
short
*
c
urr
=
(
const
unsigned
short
*
)
OriginalDepthFrame
.
data
;
curr
=
(
const
unsigned
short
*
)
OriginalDepthFrame
.
data
;
// Write vertex coordinates
// Write vertex coordinates
mapper
->
MapDepthFrameToCameraSpace
(
width
*
height
,
curr
,
width
*
height
,
depth2xyz
);
mapper
->
MapDepthFrameToCameraSpace
(
width
*
height
,
curr
,
width
*
height
,
depth2xyz
);
...
@@ -335,7 +345,8 @@ void getRgbData(IMultiSourceFrame* frame) {
...
@@ -335,7 +345,8 @@ void getRgbData(IMultiSourceFrame* frame) {
continue
;
continue
;
}
}
if
(
enableCustomCloudFilter
&&
frameDepthDifference
[
i
]
>
100.0
)
{
if
(
enableCustomCloudFilter
)
{
if
(
frameDepthDifference
[
i
]
>
100.0
)
{
*
fdest
++
=
255
;
*
fdest
++
=
255
;
*
fdest
++
=
140
;
*
fdest
++
=
140
;
*
fdest
++
=
0
;
*
fdest
++
=
0
;
...
@@ -345,7 +356,7 @@ void getRgbData(IMultiSourceFrame* frame) {
...
@@ -345,7 +356,7 @@ void getRgbData(IMultiSourceFrame* frame) {
}
}
float
angle
=
dot
(
frameNormals
[
i
],
glm
::
vec3
(
0.0
,
0.0
,
1.0
));
float
angle
=
dot
(
frameNormals
[
i
],
glm
::
vec3
(
0.0
,
0.0
,
1.0
));
if
(
enableCustomCloudFilter
&&
angle
<
0.05
)
{
if
(
angle
<
0.05
)
{
*
fdest
++
=
0
;
*
fdest
++
=
0
;
*
fdest
++
=
0
;
*
fdest
++
=
0
;
*
fdest
++
=
255
;
*
fdest
++
=
255
;
...
@@ -354,6 +365,7 @@ void getRgbData(IMultiSourceFrame* frame) {
...
@@ -354,6 +365,7 @@ void getRgbData(IMultiSourceFrame* frame) {
continue
;
continue
;
}
}
}
int
idx
=
(
int
)
p
.
X
+
colorwidth
*
(
int
)
p
.
Y
;
int
idx
=
(
int
)
p
.
X
+
colorwidth
*
(
int
)
p
.
Y
;
*
fdest
++
=
rgbimage
[
4
*
idx
+
0
];
*
fdest
++
=
rgbimage
[
4
*
idx
+
0
];
*
fdest
++
=
rgbimage
[
4
*
idx
+
1
];
*
fdest
++
=
rgbimage
[
4
*
idx
+
1
];
...
...
Halterungen/vive 2.stl
0 → 100644
View file @
a6e10ef5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment