OpenNI2: prevent failure of setVideoMode() call with invalid parameters
Not all parameters are specified for openni::VideoMode, so "selected" mode can be unsupported for device. Replace default VideoMode constructor to result of getVideoMode() call.
This commit is contained in:
parent
4f2aeeffaa
commit
2981ee00d9
@ -646,7 +646,7 @@ bool CvCapture_OpenNI2::setImageGeneratorProperty(int propIdx, double propValue)
|
||||
{
|
||||
case CV_CAP_PROP_OPENNI_OUTPUT_MODE :
|
||||
{
|
||||
openni::VideoMode mode;
|
||||
openni::VideoMode mode = color.getVideoMode();
|
||||
|
||||
switch( cvRound(propValue) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user