I have source code like this:
#include "stdafx.h"
#include "opencv2\highgui\highgui.hpp"
#include "cv.h"
#include "OpenNI.h"
#include <stdio.h>
#include <iostream>
using namespace std;
using namespace cv;
using namespace openni;
int main()
{
openni::Device device;
openni::VideoStream depth, color,ir;
openni::OpenNI::initialize();
device.open(openni::ANY_DEVICE);
ir.create(device,openni::SENSOR_IR);
depth.create(device, openni::SENSOR_DEPTH);
color.create(device, openni::SENSOR_COLOR);
openni::VideoMode vm=depth.getVideoMode();
int cols,rows;
cols=vm.getResolutionX();
rows=vm.getResolutionY();
VideoStream* streams[]={&depth,&color,&ir};
openni::VideoFrameRef frame;
depth.readFrame(&frame);
depth.start();
color.readFrame(&frame);
color.start();
ir.readFrame(&frame);
ir.start();
depth.stop();
color.stop();
ir.stop();
openni::DepthPixel* dData = (openni::DepthPixel*)frame.getData();
cv::Mat depthImage(rows, cols, CV_16UC1, dData);
openni::OpenNI::shutdown();
}
when i was compilling there's openNI2.dll is missing from your computer i haved configured propertyies directory in visual studio 2012
i use openNI2, NiTE2, opencv249, visual studio 2012 c++
please help me to fix this problem,, thanks :)