Ask Your Question

Revision history [back]

Opencv3,openni2, on Winx64

Hi All,

I am building opencv3, with the opencv_contrib, with openni2 support, cuda, tbb on windows 7, x64 for microsoft visual vs2013

I run cmake and have identified my openni2 location for my .lib, and includes. CUDA has been identified. Tbb is found and built. However, I don't see an option for the primesensor modules. Regardless of this, I run cmake and it sets up the project. As expected,the primesensor module shows up as:

OpenNI:                      NO
OpenNI PrimeSensor Modules:  NO
OpenNI2:                     YES (ver 2.2.0, build 30)

I don't see an option anywhere for primesensor and reading the cmakelists in the sources folder, the option for primesensor module only happens with openni1

Ignoring this, and building the OpenCV project in vs2013, I run into the following "unresolved external symbol" errors (For a Debug x64 build)

13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniInitialize referenced in function "public: static enum openni::Status __cdecl openni::OpenNI::initialize(void)" (?initialize@OpenNI@openni@@SA?AW4Status@2@XZ)

13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniShutdown referenced in function "public: static void __cdecl openni::OpenNI::shutdown(void)" (?shutdown@OpenNI@openni@@SAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniWaitForAnyStream referenced in function "public: static enum openni::Status __cdecl openni::OpenNI::waitForAnyStream(class openni::VideoStream * *,int,int *,int)" (?waitForAnyStream@OpenNI@openni@@SA?AW4Status@2@PEAPEAVVideoStream@2@HPEAHH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniGetExtendedError referenced in function "public: static char const * __cdecl openni::OpenNI::getExtendedError(void)" (?getExtendedError@OpenNI@openni@@SAPEBDXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceOpen referenced in function "public: enum openni::Status __cdecl openni::Device::open(char const *)" (?open@Device@openni@@QEAA?AW4Status@2@PEBD@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceClose referenced in function "public: void __cdecl openni::Device::close(void)" (?close@Device@openni@@QEAAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceGetInfo referenced in function "private: enum openni::Status __cdecl openni::Device::_setHandle(struct _OniDevice *)" (?_setHandle@Device@openni@@AEAA?AW4Status@2@PEAU_OniDevice@@@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceCreateStream referenced in function "public: enum openni::Status __cdecl openni::VideoStream::create(class openni::Device const &,enum openni::SensorType)" (?create@VideoStream@openni@@QEAA?AW4Status@2@AEBVDevice@2@W4SensorType@2@@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceEnableDepthColorSync referenced in function "public: enum openni::Status __cdecl openni::Device::setDepthColorSyncEnabled(bool)" (?setDepthColorSyncEnabled@Device@openni@@QEAA?AW4Status@2@_N@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceDisableDepthColorSync referenced in function "public: enum openni::Status __cdecl openni::Device::setDepthColorSyncEnabled(bool)" (?setDepthColorSyncEnabled@Device@openni@@QEAA?AW4Status@2@_N@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceGetDepthColorSyncEnabled referenced in function "public: bool __cdecl openni::Device::getDepthColorSyncEnabled(void)" (?getDepthColorSyncEnabled@Device@openni@@QEAA_NXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceSetProperty referenced in function "public: enum openni::Status __cdecl openni::Device::setProperty(int,void const *,int)" (?setProperty@Device@openni@@QEAA?AW4Status@2@HPEBXH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceGetProperty referenced in function "public: enum openni::Status __cdecl openni::Device::getProperty(int,void *,int *)const " (?getProperty@Device@openni@@QEBA?AW4Status@2@HPEAXPEAH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceIsPropertySupported referenced in function "public: bool __cdecl openni::Device::isPropertySupported(int)const " (?isPropertySupported@Device@openni@@QEBA_NH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceIsCommandSupported referenced in function "public: bool __cdecl openni::Device::isCommandSupported(int)const " (?isCommandSupported@Device@openni@@QEBA_NH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniDeviceIsImageRegistrationModeSupported referenced in function "public: bool __cdecl openni::Device::isImageRegistrationModeSupported(enum openni::ImageRegistrationMode)const " (?isImageRegistrationModeSupported@Device@openni@@QEBA_NW4ImageRegistrationMode@2@@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamDestroy referenced in function "public: void __cdecl openni::VideoStream::destroy(void)" (?destroy@VideoStream@openni@@QEAAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamGetSensorInfo referenced in function "private: void __cdecl openni::VideoStream::_setHandle(struct _OniStream *)" (?_setHandle@VideoStream@openni@@AEAAXPEAU_OniStream@@@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamStart referenced in function "public: enum openni::Status __cdecl openni::VideoStream::start(void)" (?start@VideoStream@openni@@QEAA?AW4Status@2@XZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamStop referenced in function "public: void __cdecl openni::VideoStream::stop(void)" (?stop@VideoStream@openni@@QEAAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamReadFrame referenced in function "public: enum openni::Status __cdecl openni::VideoStream::readFrame(class openni::VideoFrameRef *)" (?readFrame@VideoStream@openni@@QEAA?AW4Status@2@PEAVVideoFrameRef@2@@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamSetProperty referenced in function "public: enum openni::Status __cdecl openni::VideoStream::setProperty(int,void const *,int)" (?setProperty@VideoStream@openni@@QEAA?AW4Status@2@HPEBXH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamGetProperty referenced in function "public: enum openni::Status __cdecl openni::VideoStream::getProperty(int,void *,int *)const " (?getProperty@VideoStream@openni@@QEBA?AW4Status@2@HPEAXPEAH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniStreamIsPropertySupported referenced in function "public: bool __cdecl openni::VideoStream::isPropertySupported(int)const " (?isPropertySupported@VideoStream@openni@@QEBA_NH@Z) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniFrameRelease referenced in function "public: void __cdecl openni::VideoFrameRef::release(void)" (?release@VideoFrameRef@openni@@QEAAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniRecorderDestroy referenced in function "public: void __cdecl openni::Recorder::destroy(void)" (?destroy@Recorder@openni@@QEAAXXZ) 13>cap_openni2.obj : error LNK2019: unresolved external symbol __imp_oniCoordinateConverterDepthToWorld referenced in function "public: static enum openni::Status __cdecl openni::CoordinateConverter::convertDepthToWorld(class openni::VideoStream const &,int,int,unsigned short,float *,float *,float *)" (?convertDepthToWorld@CoordinateConverter@openni@@SA?AW4Status@2@AEBVVideoStream@2@HHGPEAM11@Z)

They all occur for the opencv_videoio project, and seem to all deal with getting kinect data.

Can someone help me figure out what I am not including and IF i need to include the primesensor module in the cmake setup.