openni

Change resolution on openni2 not working

佐手、 提交于 2019-12-11 08:46:39
问题 I want to read depth frame at 640x480. I am using windows 8.1 64bit, openni2 32bit, kinect:PSMP05000,PSCM04900(PrimeSense) I take code reference from here: cannot set VGA resolution Simple Read Combined to this code: main.cpp OniSampleUtilities.h SimpleRead.vcxproj should be compiled if you install openni2 32bit from here: OpeniNI 2 #include "iostream" #include "OpenNI.h" #include "OniSampleUtilities.h" #define SAMPLE_READ_WAIT_TIMEOUT 2000 //2000ms using namespace openni; using namespace std

The angle between an object and Kinect's optic axis

て烟熏妆下的殇ゞ 提交于 2019-12-10 10:35:24
问题 Here's my Setup: Kinect mounted on an actuator for horizontal movement. Here's a short demo of what I am doing. http://www.youtube.com/watch?v=X1aSMvDQhDM Here's my Scenario: Please refer to above figure. Assume the distance between the center of the Actuator,'M', and the Center of the optic axis of Kinect, 'C', is 'dx'(millimeters), the depth information 'D'(millimeters) obtained from Kinect is relative to the optic axis. Since I now have a actuator mounted onto the Center of Kinect, the

Measuring distance between 2 points with OpenCV and OpenNI

送分小仙女□ 提交于 2019-12-09 23:47:50
问题 I'm playing with the built in OpenNI access within OpenCV 2.4.0 and I'm trying to measure the distance between two points in the depth map. I've tried this so far: #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; Point startPt(0,0); Point endPt(0,0); void onMouse( int event, int x, int y, int flags, void* ) { if( event == CV_EVENT_LBUTTONUP) startPt = Point(x,y); if(

How to read oni file in Processing 2?

流过昼夜 提交于 2019-12-09 13:53:13
问题 I have a Kinect program in Processing 2 that I would like to test or simulate by passing it saved skeletons from an .oni file rather than taking input from the Kinect. Is it possible to do this, i.e. to get Processing 2 instead of using the Kinect it should read values from the .oni file and produce an output? 回答1: I recommend using the SimpleOpenNI library: import SimpleOpenNI.*; SimpleOpenNI ni; void setup(){ size(640,480); ni = new SimpleOpenNI(this); if(SimpleOpenNI.deviceCount() == 0) ni

PCL with Kinect (OpenNI Grabber)

為{幸葍}努か 提交于 2019-12-08 11:22:10
问题 **Hi , I just want a point cloud from kinect device. I followed the below link to do so. http://pointclouds.org/documentation/tutorials/openni_grabber.php#openni-grabber But I am getting the following error . Please suggest me , what I am doing wrong ? :( Your help is highly appreciable !! #include <pcl/console/parse.h> #include <pcl\console\time.h> #include <pcl\io\io.h> #include <pcl\point_types.h> #include<pcl\io\pcd_io.h> #include <pcl\io\openni_grabber.h> #include <pcl-1.7\pcl\io\openni

“Function was not implemented” when trying to use ONI recording

烂漫一生 提交于 2019-12-08 10:43:50
问题 I'm trying to use an oni recording in my application using OpenNI. Here is my xml file: <OpenNI> <Licenses> <!-- Add application-specific licenses here <License vendor="vendor" key="key"/> --> </Licenses> <Log writeToConsole="false" writeToFile="false"> <!-- 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default) --> <LogLevel value="3"/> <Masks> <Mask name="ALL" on="true"/> </Masks> <Dumps> </Dumps> </Log> <ProductionNodes> <Recording file="Recording.oni" /> <!-- Set global mirror -->

Workaround to get codes to work in MSVC++ 2010 due to “Type name is not allowed”

左心房为你撑大大i 提交于 2019-12-08 09:19:32
问题 I am trying to implement a finger detection, which link is given here. Am I am going through the code in MSVC2010, it gives me error as shown in Figure as shown below. Could someone tell me why the following codes gives me error? Is this related to these following questions; 1, 2, 3? Is there a possible workaround? I already included: #include <cstdint> #include <stdint.h> I also tried: unsigned short depth = (unsigned short) (v[2] * 1000.0f); // hand depth unsigned short near = (unsigned

Convertion Between cv::Mat and XnDepthPixel*

◇◆丶佛笑我妖孽 提交于 2019-12-08 08:24:52
问题 i am working with OpenNI 1.5.4.0 and OpenCV 2.4.5, plus Qt for visualization purpose (only RGB images). Basically, i am retrieving the depth and rgb frames from a Kinect and store them on the hard drive, using the conversion: /* Depth conversion */ cv::Mat depth = cv::Mat(2, sizes, CV_16UC1, (void*) pDepthMap); //XnDepthPixel *pDepthMap /* RGB conversion */ ///image is a QImage* , pImageMap is a XnUInt8* for(int i = 0; i < height; ++i) { for (unsigned y = 0; y < height; ++y) { uchar *imagePtr

How should binding.gyp be written to build a Node.js addon with OpenNI?

烂漫一生 提交于 2019-12-07 19:25:03
问题 I'm trying to build a Node.js addon that makes use of OpenNI. I haven't used Node-gyp before so I'm trying to set up the binding.gyp file so that it includes the OpenNI library as part of the build. The code I'm actually compiling is just the Hello World example. The binding.gyp file I'm using is based on the one from NUIMotion on Github, which is doing something similar. Here's mine: { "targets": [ { "target_name": "onijs", "sources": [ "src/main.cpp" ], "include_dirs": [ "./src/Include" ],

Convertion Between cv::Mat and XnDepthPixel*

孤街浪徒 提交于 2019-12-07 17:49:28
i am working with OpenNI 1.5.4.0 and OpenCV 2.4.5, plus Qt for visualization purpose (only RGB images). Basically, i am retrieving the depth and rgb frames from a Kinect and store them on the hard drive, using the conversion: /* Depth conversion */ cv::Mat depth = cv::Mat(2, sizes, CV_16UC1, (void*) pDepthMap); //XnDepthPixel *pDepthMap /* RGB conversion */ ///image is a QImage* , pImageMap is a XnUInt8* for(int i = 0; i < height; ++i) { for (unsigned y = 0; y < height; ++y) { uchar *imagePtr = (*image).scanLine(y); for (unsigned x=0; x < width; ++x) { imagePtr[0] = pImageMap[2]; imagePtr[1] =