Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
7d4f06b7
Commit
7d4f06b7
authored
Jun 07, 2011
by
Ethan Rublee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempting to add support for openni depth registration.
parent
a87d12eb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+2
-0
cap_openni.cpp
modules/highgui/src/cap_openni.cpp
+21
-0
No files found.
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
7d4f06b7
...
...
@@ -360,9 +360,11 @@ enum
CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH
=
101
,
// in mm
CV_CAP_PROP_OPENNI_BASELINE
=
102
,
// in mm
CV_CAP_PROP_OPENNI_FOCAL_LENGTH
=
103
,
// in pixels
CV_CAP_PROP_OPENNI_REGISTRATION_ON
=
104
,
// flag
CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE
=
CV_CAP_OPENNI_IMAGE_GENERATOR
+
CV_CAP_PROP_OPENNI_OUTPUT_MODE
,
CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE
=
CV_CAP_OPENNI_DEPTH_GENERATOR
+
CV_CAP_PROP_OPENNI_BASELINE
,
CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH
=
CV_CAP_OPENNI_DEPTH_GENERATOR
+
CV_CAP_PROP_OPENNI_FOCAL_LENGTH
,
CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON
=
CV_CAP_OPENNI_DEPTH_GENERATOR
+
CV_CAP_PROP_OPENNI_REGISTRATION_ON
,
// Properties of cameras available through GStreamer interface
CV_CAP_GSTREAMER_QUEUE_LENGTH
=
200
,
// default is 1
...
...
modules/highgui/src/cap_openni.cpp
View file @
7d4f06b7
...
...
@@ -344,7 +344,28 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
bool
CvCapture_OpenNI
::
setDepthGeneratorProperty
(
int
propIdx
,
double
propValue
)
{
CV_Assert
(
depthGenerator
.
IsValid
()
);
switch
(
propIdx
)
{
case
CV_CAP_PROP_OPENNI_REGISTRATION_ON
:
{
CV_Assert
(
imageGenerator
.
IsValid
()
);
if
(
!
depthGenerator
.
GetAlternativeViewPointCap
().
IsViewPointAs
(
imageGenerator
))
{
if
(
depthGenerator
.
GetAlternativeViewPointCap
().
IsViewPointSupported
(
imageGenerator
))
{
XnStatus
status
=
depthGenerator
.
GetAlternativeViewPointCap
().
SetViewPoint
(
imageGenerator
);
if
(
status
!=
XN_STATUS_OK
)
CV_Error
(
CV_StsError
,
std
::
string
(
"turning registration on failed. Reason: "
)
+
xnGetStatusString
(
status
));
}
else
CV_Error
(
CV_StsError
,
"turning registration on failed. Reason: unsupported viewpoint"
);
}
}
return
true
;
break
;
default
:
CV_Error
(
CV_StsBadArg
,
"Depth generator does not support such parameter for setting.
\n
"
);
}
return
false
;
}
...
...
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