list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa")
endif()
-if(HAVE_OPENNI2)
- list(APPEND highgui_srcs src/cap_openni2.cpp)
- ocv_include_directories(${OPENNI2_INCLUDE_DIR})
- list(APPEND HIGHGUI_LIBRARIES ${OPENNI2_LIBRARY})
-endif(HAVE_OPENNI2)
-
if(UNIX)
#these variables are set by CHECK_MODULE macro
foreach(P ${HIGHGUI_INCLUDE_DIRS})
bool initial_button_state = false);
} // cv
-
- CAP_OPENNI2 = 1600 // OpenNI2 (for Kinect)
- CAP_PROP_OPENNI_OUTPUT_MODE = 100,
- CAP_PROP_OPENNI2_SYNC = 110,
- CAP_PROP_OPENNI2_MIRROR = 111
#endif
/****************************************************************************************\
-
- CV_CAP_OPENNI2 = 1600 // OpenNI2 (for Kinect)
- CV_CAP_PROP_OPENNI2_SYNC = 110,
- CV_CAP_PROP_OPENNI2_MIRROR = 111,
* Obsolete functions/synonyms *
\****************************************************************************************/
list(APPEND VIDEOIO_LIBRARIES ${OPENNI_LIBRARY})
endif(HAVE_OPENNI)
+if(HAVE_OPENNI2)
+ list(APPEND videoio_srcs src/cap_openni2.cpp)
+ ocv_include_directories(${OPENNI2_INCLUDE_DIR})
+ list(APPEND VIDEOIO_LIBRARIES ${OPENNI2_LIBRARY})
+endif(HAVE_OPENNI2)
+
if(HAVE_opencv_androidcamera)
list(APPEND videoio_srcs src/cap_android.cpp)
add_definitions(-DHAVE_ANDROID_NATIVE_CAMERA)#TODO: remove this line
CAP_AVFOUNDATION = 1200, // AVFoundation framework for iOS (OS X Lion will have the same API)
CAP_GIGANETIX = 1300, // Smartek Giganetix GigEVisionSDK
CAP_MSMF = 1400, // Microsoft Media Foundation (via videoInput)
- CAP_INTELPERC = 1500 // Intel Perceptual Computing SDK
+ CAP_INTELPERC = 1500, // Intel Perceptual Computing SDK
+ CAP_OPENNI2 = 1600 // OpenNI2 (for Kinect)
};
// generic properties (based on DC1394 properties)
CAP_PROP_OPENNI_MAX_BUFFER_SIZE = 106,
CAP_PROP_OPENNI_CIRCLE_BUFFER = 107,
CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,
- CAP_PROP_OPENNI_GENERATOR_PRESENT = 109
+ CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,
+ CAP_PROP_OPENNI2_SYNC = 110,
+ CAP_PROP_OPENNI2_MIRROR = 111
};
// OpenNI shortcats
CV_CAP_GIGANETIX = 1300, // Smartek Giganetix GigEVisionSDK
- CV_CAP_INTELPERC = 1500 // Intel Perceptual Computing SDK
+ CV_CAP_INTELPERC = 1500, // Intel Perceptual Computing
+
+ CV_CAP_OPENNI2 = 1600 // OpenNI2 (for Kinect)
};
/* start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*) */
CV_CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,
CV_CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,
+ CV_CAP_PROP_OPENNI2_SYNC = 110,
+ CV_CAP_PROP_OPENNI2_MIRROR = 111,
CV_CAP_OPENNI_IMAGE_GENERATOR_PRESENT = CV_CAP_OPENNI_IMAGE_GENERATOR + CV_CAP_PROP_OPENNI_GENERATOR_PRESENT,
CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE = CV_CAP_OPENNI_IMAGE_GENERATOR + CV_CAP_PROP_OPENNI_OUTPUT_MODE,
{
case CV_CAP_PROP_OPENNI2_MIRROR:
{
- bool mirror = propValue > 0 ? true : false;
+ bool mirror = propValue > 0.0 ? true : false;
isSet = color.setMirroringEnabled(mirror) == openni::STATUS_OK;
isSet = depth.setMirroringEnabled(mirror) == openni::STATUS_OK;
}
isSet = setDepthGeneratorProperty( propIdx, propValue );
break;
case CV_CAP_PROP_OPENNI2_SYNC:
- isSet = device.setDepthColorSyncEnabled(propValue) == openni::STATUS_OK;
+ isSet = device.setDepthColorSyncEnabled(propValue > 0.0) == openni::STATUS_OK;
break;
default:
CV_Error( CV_StsBadArg, cv::format("Such parameter (propIdx=%d) isn't supported for setting.\n", propIdx) );