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
30888089
Commit
30888089
authored
Mar 22, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build of various backends
parent
29cfeb7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
68 deletions
+33
-68
gl_core_3_1.cpp
modules/core/src/gl_core_3_1.cpp
+1
-0
cap_openni.cpp
modules/highgui/src/cap_openni.cpp
+31
-67
window_QT.cpp
modules/highgui/src/window_QT.cpp
+1
-1
No files found.
modules/core/src/gl_core_3_1.cpp
View file @
30888089
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include <sstream>
#include <sstream>
#include "cvconfig.h"
#include "cvconfig.h"
#include "opencv2/core.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "gl_core_3_1.hpp"
#include "gl_core_3_1.hpp"
#ifdef HAVE_OPENGL
#ifdef HAVE_OPENGL
...
...
modules/highgui/src/cap_openni.cpp
View file @
30888089
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
# undef HAVE_TBB
# undef HAVE_TBB
#endif
#endif
#include <iostream>
#include <queue>
#include <queue>
#ifndef i386
#ifndef i386
...
@@ -558,8 +557,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -558,8 +557,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
Init
();
status
=
context
.
Init
();
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to initialize the context: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to initialize the context: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -568,17 +566,16 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -568,17 +566,16 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
EnumerateProductionTrees
(
XN_NODE_TYPE_DEVICE
,
NULL
,
devicesList
,
0
);
status
=
context
.
EnumerateProductionTrees
(
XN_NODE_TYPE_DEVICE
,
NULL
,
devicesList
,
0
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate production trees: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate production trees: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
// Chose device according to index
// Chose device according to index
xn
::
NodeInfoList
::
Iterator
it
=
devicesList
.
Begin
();
xn
::
NodeInfoList
::
Iterator
it
=
devicesList
.
Begin
();
for
(
int
i
=
0
;
i
<
index
&&
it
!=
devicesList
.
End
();
++
i
)
it
++
;
for
(
int
i
=
0
;
i
<
index
&&
it
!=
devicesList
.
End
();
++
i
)
it
++
;
if
(
it
==
devicesList
.
End
()
)
if
(
it
==
devicesList
.
End
()
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed device with index "
<<
index
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed device with index %d
\n
"
,
index
)
;
return
;
return
;
}
}
...
@@ -586,8 +583,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -586,8 +583,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
CreateProductionTree
(
deviceNode
,
productionNode
);
status
=
context
.
CreateProductionTree
(
deviceNode
,
productionNode
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create production tree: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create production tree: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -595,8 +591,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -595,8 +591,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
RunXmlScript
(
XMLConfig
.
c_str
(),
scriptNode
);
status
=
context
.
RunXmlScript
(
XMLConfig
.
c_str
(),
scriptNode
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to run xml script: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to run xml script: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -606,20 +601,18 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -606,20 +601,18 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
EnumerateExistingNodes
(
depthList
,
XN_NODE_TYPE_DEPTH
);
status
=
context
.
EnumerateExistingNodes
(
depthList
,
XN_NODE_TYPE_DEPTH
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate depth generators: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate depth generators: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
if
(
depthList
.
IsEmpty
()
)
if
(
depthList
.
IsEmpty
()
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : The device doesn't have depth generator. Such devices aren't supported now."
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : The device doesn't have depth generator. Such devices aren't supported now.
\n
"
)
;
return
;
return
;
}
}
status
=
depthGenerator
.
Create
(
context
);
status
=
depthGenerator
.
Create
(
context
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create depth generator: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create depth generator: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -628,8 +621,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -628,8 +621,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
EnumerateExistingNodes
(
imageList
,
XN_NODE_TYPE_IMAGE
);
status
=
context
.
EnumerateExistingNodes
(
imageList
,
XN_NODE_TYPE_IMAGE
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate image generators: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate image generators: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -638,8 +630,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -638,8 +630,7 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
imageGenerator
.
Create
(
context
);
status
=
imageGenerator
.
Create
(
context
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create image generator: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to create image generator: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
}
}
...
@@ -666,14 +657,13 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
...
@@ -666,14 +657,13 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
status
=
context
.
StartGeneratingAll
();
status
=
context
.
StartGeneratingAll
();
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to start generating OpenNI data: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to start generating OpenNI data: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
if
(
!
readCamerasParams
()
)
if
(
!
readCamerasParams
()
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Could not read cameras parameters"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Could not read cameras parameters
\n
"
)
;
return
;
return
;
}
}
...
@@ -697,8 +687,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
...
@@ -697,8 +687,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
status
=
context
.
Init
();
status
=
context
.
Init
();
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to initialize the context: "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to initialize the context: %s
\n
"
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -706,8 +695,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
...
@@ -706,8 +695,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
status
=
context
.
OpenFileRecording
(
filename
,
productionNode
);
status
=
context
.
OpenFileRecording
(
filename
,
productionNode
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file ("
<<
filename
<<
"): "
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file (%s): %s
\n
"
,
filename
,
xnGetStatusString
(
status
));
<<
cv
::
String
(
xnGetStatusString
(
status
))
<<
std
::
endl
;
return
;
return
;
}
}
...
@@ -716,7 +704,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
...
@@ -716,7 +704,7 @@ CvCapture_OpenNI::CvCapture_OpenNI(const char * filename)
if
(
!
readCamerasParams
()
)
if
(
!
readCamerasParams
()
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::CvCapture_OpenNI : Could not read cameras parameters"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::CvCapture_OpenNI : Could not read cameras parameters
\n
"
)
;
return
;
return
;
}
}
...
@@ -736,7 +724,7 @@ bool CvCapture_OpenNI::readCamerasParams()
...
@@ -736,7 +724,7 @@ bool CvCapture_OpenNI::readCamerasParams()
XnDouble
pixelSize
=
0
;
XnDouble
pixelSize
=
0
;
if
(
depthGenerator
.
GetRealProperty
(
"ZPPS"
,
pixelSize
)
!=
XN_STATUS_OK
)
if
(
depthGenerator
.
GetRealProperty
(
"ZPPS"
,
pixelSize
)
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::readCamerasParams : Could not read pixel size!"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::readCamerasParams : Could not read pixel size!
\n
"
)
;
return
false
;
return
false
;
}
}
...
@@ -747,13 +735,13 @@ bool CvCapture_OpenNI::readCamerasParams()
...
@@ -747,13 +735,13 @@ bool CvCapture_OpenNI::readCamerasParams()
XnUInt64
zeroPlanDistance
;
// in mm
XnUInt64
zeroPlanDistance
;
// in mm
if
(
depthGenerator
.
GetIntProperty
(
"ZPD"
,
zeroPlanDistance
)
!=
XN_STATUS_OK
)
if
(
depthGenerator
.
GetIntProperty
(
"ZPD"
,
zeroPlanDistance
)
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::readCamerasParams : Could not read virtual plane distance!"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::readCamerasParams : Could not read virtual plane distance!
\n
"
)
;
return
false
;
return
false
;
}
}
if
(
depthGenerator
.
GetRealProperty
(
"LDDIS"
,
baseline
)
!=
XN_STATUS_OK
)
if
(
depthGenerator
.
GetRealProperty
(
"LDDIS"
,
baseline
)
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::readCamerasParams : Could not read base line!"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::readCamerasParams : Could not read base line!
\n
"
)
;
return
false
;
return
false
;
}
}
...
@@ -765,13 +753,13 @@ bool CvCapture_OpenNI::readCamerasParams()
...
@@ -765,13 +753,13 @@ bool CvCapture_OpenNI::readCamerasParams()
if
(
depthGenerator
.
GetIntProperty
(
"ShadowValue"
,
shadowValue
)
!=
XN_STATUS_OK
)
if
(
depthGenerator
.
GetIntProperty
(
"ShadowValue"
,
shadowValue
)
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::readCamerasParams : Could not read property
\"
ShadowValue
\"
!"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::readCamerasParams : Could not read property
\"
ShadowValue
\"
!
\n
"
)
;
return
false
;
return
false
;
}
}
if
(
depthGenerator
.
GetIntProperty
(
"NoSampleValue"
,
noSampleValue
)
!=
XN_STATUS_OK
)
if
(
depthGenerator
.
GetIntProperty
(
"NoSampleValue"
,
noSampleValue
)
!=
XN_STATUS_OK
)
{
{
std
::
cerr
<<
"CvCapture_OpenNI::readCamerasParams : Could not read property
\"
NoSampleValue
\"
!"
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::readCamerasParams : Could not read property
\"
NoSampleValue
\"
!
\n
"
)
;
return
false
;
return
false
;
}
}
...
@@ -861,11 +849,7 @@ double CvCapture_OpenNI::getCommonProperty( int propIdx )
...
@@ -861,11 +849,7 @@ double CvCapture_OpenNI::getCommonProperty( int propIdx )
propValue
=
maxTimeDuration
;
propValue
=
maxTimeDuration
;
break
;
break
;
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Such parameter (propIdx=%d) isn't supported for getting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Such parameter (propIdx="
<<
propIdx
<<
") isn't supported for getting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
propValue
;
return
propValue
;
...
@@ -922,11 +906,7 @@ bool CvCapture_OpenNI::setCommonProperty( int propIdx, double propValue )
...
@@ -922,11 +906,7 @@ bool CvCapture_OpenNI::setCommonProperty( int propIdx, double propValue )
approxSyncGrabber
->
setMaxTimeDuration
(
maxTimeDuration
);
approxSyncGrabber
->
setMaxTimeDuration
(
maxTimeDuration
);
break
;
break
;
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Such parameter (propIdx=%d) isn't supported for setting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Such parameter (propIdx="
<<
propIdx
<<
") isn't supported for setting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
isSet
;
return
isSet
;
...
@@ -977,11 +957,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
...
@@ -977,11 +957,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
propValue
=
depthGenerator
.
GetFrameID
();
propValue
=
depthGenerator
.
GetFrameID
();
break
;
break
;
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Depth generator does not support such parameter (propIdx=%d) for getting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Depth generator does not support such parameter (propIdx="
<<
propIdx
<<
") for getting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
propValue
;
return
propValue
;
...
@@ -1009,12 +985,12 @@ bool CvCapture_OpenNI::setDepthGeneratorProperty( int propIdx, double propValue
...
@@ -1009,12 +985,12 @@ bool CvCapture_OpenNI::setDepthGeneratorProperty( int propIdx, double propValue
{
{
XnStatus
status
=
depthGenerator
.
GetAlternativeViewPointCap
().
SetViewPoint
(
imageGenerator
);
XnStatus
status
=
depthGenerator
.
GetAlternativeViewPointCap
().
SetViewPoint
(
imageGenerator
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
std
::
cerr
<<
"CvCapture_OpenNI::setDepthGeneratorProperty : "
<<
xnGetStatusString
(
status
)
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::setDepthGeneratorProperty : %s
\n
"
,
xnGetStatusString
(
status
))
;
else
else
isSet
=
true
;
isSet
=
true
;
}
}
else
else
std
::
cerr
<<
"CvCapture_OpenNI::setDepthGeneratorProperty : Unsupported viewpoint."
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::setDepthGeneratorProperty : Unsupported viewpoint.
\n
"
)
;
}
}
else
else
isSet
=
true
;
isSet
=
true
;
...
@@ -1024,18 +1000,14 @@ bool CvCapture_OpenNI::setDepthGeneratorProperty( int propIdx, double propValue
...
@@ -1024,18 +1000,14 @@ bool CvCapture_OpenNI::setDepthGeneratorProperty( int propIdx, double propValue
{
{
XnStatus
status
=
depthGenerator
.
GetAlternativeViewPointCap
().
ResetViewPoint
();
XnStatus
status
=
depthGenerator
.
GetAlternativeViewPointCap
().
ResetViewPoint
();
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
std
::
cerr
<<
"CvCapture_OpenNI::setDepthGeneratorProperty : "
<<
xnGetStatusString
(
status
)
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::setDepthGeneratorProperty : %s
\n
"
,
xnGetStatusString
(
status
))
;
else
else
isSet
=
true
;
isSet
=
true
;
}
}
}
}
break
;
break
;
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Depth generator does not support such parameter (propIdx=%d) for setting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Depth generator does not support such parameter (propIdx="
<<
propIdx
<<
") for setting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
isSet
;
return
isSet
;
...
@@ -1073,11 +1045,7 @@ double CvCapture_OpenNI::getImageGeneratorProperty( int propIdx )
...
@@ -1073,11 +1045,7 @@ double CvCapture_OpenNI::getImageGeneratorProperty( int propIdx )
propValue
=
imageGenerator
.
GetFrameID
();
propValue
=
imageGenerator
.
GetFrameID
();
break
;
break
;
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Image generator does not support such parameter (propIdx=%d) for getting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Image generator does not support such parameter (propIdx="
<<
propIdx
<<
") for getting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
propValue
;
return
propValue
;
...
@@ -1128,17 +1096,13 @@ bool CvCapture_OpenNI::setImageGeneratorProperty( int propIdx, double propValue
...
@@ -1128,17 +1096,13 @@ bool CvCapture_OpenNI::setImageGeneratorProperty( int propIdx, double propValue
XnStatus
status
=
imageGenerator
.
SetMapOutputMode
(
mode
);
XnStatus
status
=
imageGenerator
.
SetMapOutputMode
(
mode
);
if
(
status
!=
XN_STATUS_OK
)
if
(
status
!=
XN_STATUS_OK
)
std
::
cerr
<<
"CvCapture_OpenNI::setImageGeneratorProperty : "
<<
xnGetStatusString
(
status
)
<<
std
::
endl
;
fprintf
(
stderr
,
"CvCapture_OpenNI::setImageGeneratorProperty : %s
\n
"
,
xnGetStatusString
(
status
))
;
else
else
isSet
=
true
;
isSet
=
true
;
break
;
break
;
}
}
default
:
default
:
{
CV_Error
(
CV_StsBadArg
,
cv
::
format
(
"Image generator does not support such parameter (propIdx=%d) for setting.
\n
"
,
propIdx
)
);
cv
::
Stringstream
ss
;
ss
<<
"Image generator does not support such parameter (propIdx="
<<
propIdx
<<
") for setting.
\n
"
;
CV_Error
(
CV_StsBadArg
,
ss
.
str
().
c_str
()
);
}
}
}
return
isSet
;
return
isSet
;
...
...
modules/highgui/src/window_QT.cpp
View file @
30888089
...
@@ -949,7 +949,7 @@ void GuiReceiver::showImage(QString name, void* arr)
...
@@ -949,7 +949,7 @@ void GuiReceiver::showImage(QString name, void* arr)
mat
=
cvGetMat
(
arr
,
&
stub
);
mat
=
cvGetMat
(
arr
,
&
stub
);
cv
::
Mat
im
(
mat
);
cv
::
Mat
im
(
mat
);
cv
::
imshow
(
name
.
to
StdString
(),
im
);
cv
::
imshow
(
name
.
to
Utf8
().
data
(),
im
);
}
}
else
else
{
{
...
...
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