loading
 
Kinect
Duncan from New Zealand  [1 posts]
7 years
STeven,

Have you been following the progress on the Kinect open drivers? It would be pretty sweet to get a Roborealm module for it. I imagine it would also sell you a few copies and get you quite a bit of publicity on the hacker forums..!

http://www.adafruit.com/blog/2010/11/10/we-have-a-winner-open-kinect-drivers-released-winner-will-use-3k-for-more-hacking-plus-an-additional-2k-goes-to-the-eff/

Cheers
Duncan
Anonymous 7 years
Duncan,

Yes, we agree. It is a nice sensor and quite useful in RoboRealm related projects ... that's why we just released a module to connect to that camera.

http://www.roborealm.com/help/Microsoft_Kinect.php

Thanks for the tip!

STeven.
Anonymous 7 years
Go STeven!

Nice work on that! Thinking I may have to pick up a Kinect, even though I don't have an XBox...!

Hopefully you can pick up some more users, I believe your software gives one of the lowest barriers to entry into the world of pc vision systems.

Cheers
Duncan
Danh from United States  [79 posts] 7 years
Nice! You guys can impress us again by adding gesture recognition ;-)
Win Heagy from United States  [31 posts] 7 years
Anyone have any luck getting the drivers installed and RR working with the Kinect module in Windows 7?  I'm not getting any prompts to enter driver locations and when I try to change them manually, nothing related to the drivers appears to change.  If I launch RR it complains about the lib and then crashes.  Any ideas?

Thanks...Win
Guenter Wendel from Germany  [13 posts] 7 years
I don’t have any experience with Windows 7, but may be that my Vista experience will be helpful.
After you have unzipped libusb-win32-bin-1.2.2.0.zip file you will find in the \???\libusb-win32-bin-1.2.2.0\bin-folder the  excecutable program inf-wizard.exe. With this program you can install the drivers. The Kinect should be connected to the PC. At the moment you have plugged in the Kinect into the PC the Windows driver install dialog will start. Ignore that and follow the dialog of the inf-wizard.exe. The inf-wizard make its own .inf and .cat files. After that you push the “Install now” button and the driver will be installed. It starts with the Xbox NUI Motor driver. You have to repeat this for the Camera and the Audio driver. In the device manager then you can see in the “libusb-win32 devices” folder all three Xbox drivers. In my case only a little problem remains: RR does not show the depth-image. But I can move the motor, change the LED-color and I have a nice RGB-image from the Kinect….

Good luck
Gunter
Win Heagy from United States  [31 posts] 7 years
Thanks, this worked.  After installing as you described, and a few false starts, it seems to be working now in Win 7, including the depth image.  However, I get lots of flicker in both the RGB and depth images.  Just wondering if anyone else is experiencing this?  I've been using the open drivers in other software on this machine and other machines, and don't get the flicker, so I'm wondering if I don't have something quite right yet. Also, should the Kinect variables appear in other modules that have variable access?  I don't see Kinect variables anywhere.

Thanks...Win
Anonymous 7 years
We did find that there were some complications on Vista and Win7. The solution is relatively similar. Apparently after XP Windows does not like it when the .inf and the .sys files are in different locations (or at least does not provide a popup to specify where the .sys file is). Because of this the driver installation fails.

So an easy way around this is to just copy the Kinect_Driver.zip contents into the bin folder of libusb and specify the bin path as the one and only path when it complains about not seeing a driver for the Kinect. This appears to work readily on both Win7 and Vista and successully brings up both the depth map and RGB Image on BOTH OSs.

We've updated the documentation to reflect the different installs for the 3 OS solutions. You will ideally have to uninstall the current drivers (see Manage Computer->Drvices->Right click->Uninstall) and download the Kinect_Drivers.zip again. What most likely happened is that the lib-wizard when run on Win7 or Vista did not generate the right file to use and/or its install proceedure is not quite the same as what the OS does.

Either way we have it operating fine on both Win7 and Vista.

Also, we're in the middle of an update for this module. It seems that the module currently requires a bit of CPU to get those images. The next version should reduce this by quite a bit.

Can you give things a try? Note that the version of RR you have should be fine and you don't need to update that.

STeven.
Win Heagy from United States  [31 posts] 7 years
Ok, I'll try it, but I'm not sure how to just update a module?

Win
Win Heagy from United States  [31 posts] 7 years
I went ahead and just downloaded 29.1 and no luck.  It crashed every time I launched RR with the Kinect plugged in.

Win
Win Heagy from United States  [31 posts] 7 years
My bad.  Turns out some of the USB ports on my machine don't want to play nice with the Kinect + RR.  I moved to another port  and it's working now without crashing.  The performance of this version is much better than the previous.  No flicker.  It definitely pegs the CPU, but for the most part it runs fine.

So next question.  How do I access the depth image data?  Is there any way to see the raw depth data?  I can save the depth image as a marker, but how do I access the data?

Thanks,

Win
Anonymous 7 years
Win,

If you notice all the radio buttons in the interface they provide multiple options in terms of what you see and what gets saved as a marker. Note that the grayscale image is depth from 0 to 255 whereas the Raw mode stores 0-2047 in two bytes (red and green channels) but would probably need to be consumed outside of RR in order to utilize that.

Otherwise many of the other modules can be used with the grayscale image to segment foreground from background. This can also be partially accomplished in the Kinect module itself through the use of the min and max thresholds.

Most of the other modules will allow you to access the marker images or simply use the marker module to bring out the image into the main GUI interface (assuming it was saved as a marker), Write Image, Webcam, etc. modules can then be used to send that image externally too if needed.

Did you have something in mind?

STeven.
Win Heagy from United States  [31 posts] 7 years
STeven,

This may have more to do with my lack of understanding what can be done with marker images.  I'm just wondering if there is a way, either through scripting or the API or variables or whatever, to access the raw image data from the depth image?  I'd like to be able to see the numeric data that represents the image.  Is this accessible in any way?

Thanks,

Win
Anonymous 7 years
Win,

There isn't really a display that shows actual numbers since that interface is significantly harder to understand/visualize than pixel intensities. But to answer your question:

1. API - you can use the API to execute a GetImage and specify the current image (if you specified the depth image as the main image) or the marker name KINECT_DEPTH which the Kinect module will set as the depth image (again, depending on the radio buttons of the Kinect GUI). When you use the GetImage you will be returned the RGB triplet values for the image which contain the depth information.

2. You can use the Scripting modules and the GetPixels function to get access to the raw pixels within those modules. See

http://www.roborealm.com/help/VBScript_Program.php

for more information about that.

3. You can use the Write Image module to save the Depth image (whether it is a marker or the current image). Then use your own appliction to load in the image and gain access to the raw data ... if you use PPM that's a nice and easy image format that can be readily loaded (an example of saving/loading PPM images is in the API source).

4. A couple more techniques ... but they are all stated in

http://www.roborealm.com/help/Integration.php

Perhaps using the clipboard may be a good way too?

The problem with RoboRealm is there are 100's of ways to do this so the best technique will depend on what your project is and how you want to gain access to the raw pixels.

STeven.
Guenter Wendel from Germany  [13 posts] 7 years
Win,

as an example how to get the depth values with the API a little example in C#.


Gunter


A little C# example.zip
Win Heagy from United States  [31 posts] 7 years
Great...thanks STeven and Gunther.  I think this gives me enough to work with.  It's what I needed to know.

Win'
Guenter Wendel from Germany  [13 posts] 7 years
Sorry!

The equation in A little C# example.zip for the RAWdepth value is wrong!

It should be:
RAWdepth = G*256 + R

in C#:
RAWdepth = G_value * 256 + R_value;

To apologize for any inconvenience here a new equation to convert the RAWdepth-value into distance [cm]:

distance_cm = ((311.22 + 0.02877 * RAWdepth - 0.000022845 * _
                 Math.Pow(RAWdepth, 2)) / (1 - 0.00091344 * RAWdepth))/10;

I have found this (with the little help of  TurboPlot from MathGraph) from a series of 50 measurements comparing the RAWdepth values with the measurements of a laser range finder. The graph of the equation fits nicely with the measurement results.

Gunter


 

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index