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
a5836b9d
Commit
a5836b9d
authored
Jul 24, 2017
by
wester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
range
parent
7f3cf6f8
Pipeline
#266
passed with stage
in 21 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
example.pnts
3_PointCloud/example.pnts
+0
-0
glut.cpp
3_PointCloud/glut.cpp
+1
-0
main.cpp
3_PointCloud/main.cpp
+8
-3
No files found.
3_PointCloud/example.pnts
View file @
a5836b9d
No preview for this file type
3_PointCloud/glut.cpp
View file @
a5836b9d
...
@@ -14,6 +14,7 @@ bool init(int argc, char* argv[]) {
...
@@ -14,6 +14,7 @@ bool init(int argc, char* argv[]) {
glutInit
(
&
argc
,
argv
);
glutInit
(
&
argc
,
argv
);
glutInitDisplayMode
(
GLUT_DEPTH
|
GLUT_DOUBLE
|
GLUT_RGBA
);
glutInitDisplayMode
(
GLUT_DEPTH
|
GLUT_DOUBLE
|
GLUT_RGBA
);
glutInitWindowSize
(
width
,
height
);
glutInitWindowSize
(
width
,
height
);
glutInitWindowSize
(
1800
,
900
);
glutCreateWindow
(
"Kinect VR Point Cloud"
);
glutCreateWindow
(
"Kinect VR Point Cloud"
);
glEnable
(
GL_DEPTH_TEST
);
glEnable
(
GL_DEPTH_TEST
);
...
...
3_PointCloud/main.cpp
View file @
a5836b9d
...
@@ -65,6 +65,9 @@ float KinectSizeX = 0.249;
...
@@ -65,6 +65,9 @@ float KinectSizeX = 0.249;
float
KinectSizeY
=
0.042
;
// 42 mm, 66mm ist die gesammthhe
float
KinectSizeY
=
0.042
;
// 42 mm, 66mm ist die gesammthhe
float
KinectSizeZ
=
0.067
;
float
KinectSizeZ
=
0.067
;
float
minTrackingKinect
=
0.8
f
;
float
maxTrackingKinect
=
3.5
f
;
//Vive Tracking
//Vive Tracking
SteamTracking
*
steamTracking
=
nullptr
;
SteamTracking
*
steamTracking
=
nullptr
;
int
controllerID
=
1
;
int
controllerID
=
1
;
...
@@ -75,7 +78,7 @@ std::vector<glm::vec3> controllerPositions;
...
@@ -75,7 +78,7 @@ std::vector<glm::vec3> controllerPositions;
Camera
mainCam
;
Camera
mainCam
;
static
bool
trackControllerPos
=
fals
e
;
static
bool
trackControllerPos
=
tru
e
;
static
bool
writeFile
=
false
;
static
bool
writeFile
=
false
;
static
bool
captureFrame
=
false
;
static
bool
captureFrame
=
false
;
...
@@ -213,7 +216,7 @@ void getRgbData(IMultiSourceFrame* frame) {
...
@@ -213,7 +216,7 @@ void getRgbData(IMultiSourceFrame* frame) {
*
fvalid
++
=
false
;
*
fvalid
++
=
false
;
}
}
else
{
else
{
if
(
depth2xyz
[
i
].
Z
>
1.7
f
)
{
if
(
depth2xyz
[
i
].
Z
>
maxTrackingKinect
||
depth2xyz
[
i
].
Z
<
minTrackingKinect
)
{
*
fdest
++
=
0
;
*
fdest
++
=
0
;
*
fdest
++
=
255
;
*
fdest
++
=
255
;
*
fdest
++
=
0
;
*
fdest
++
=
0
;
...
@@ -395,6 +398,8 @@ void mainRenderLoop() {
...
@@ -395,6 +398,8 @@ void mainRenderLoop() {
//draw Controller Positions
//draw Controller Positions
if
(
trackControllerPos
&&
controllerPosData
.
size
>
1
){
if
(
trackControllerPos
&&
controllerPosData
.
size
>
1
){
glColor4f
(
0.0
f
,
0.0
f
,
1.0
f
,
1.0
f
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
controllerPosData
.
vboID
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
controllerPosData
.
vboID
);
glVertexPointer
(
3
,
GL_FLOAT
,
0
,
NULL
);
glVertexPointer
(
3
,
GL_FLOAT
,
0
,
NULL
);
glDrawArrays
(
GL_LINE_STRIP
,
0
,
controllerPosData
.
size
);
glDrawArrays
(
GL_LINE_STRIP
,
0
,
controllerPosData
.
size
);
...
@@ -541,7 +546,7 @@ int main(int argc, char* argv[]) {
...
@@ -541,7 +546,7 @@ int main(int argc, char* argv[]) {
controlerToKinect
=
glm
::
translate
(
glm
::
mat4x4
(),
(
glm
::
vec3
(
-
4.0
f
,
-
7.5
f
,
13.0
f
)
*
0.01
f
));
//
controlerToKinect = glm::translate(glm::mat4x4(), (glm::vec3(-4.0f, -7.5f, 13.0f)*0.01f));
float
dx
=
KinectOriginOffsetX
-
KinectSizeX
/
2
;
float
dx
=
KinectOriginOffsetX
-
KinectSizeX
/
2
;
float
dy
=
KinectSizeY
/
2.0
f
+
0.008
;
// dicke Halterung;
float
dy
=
KinectSizeY
/
2.0
f
+
0.008
;
// dicke Halterung;
...
...
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