none
Kinect Depth Cam

    General discussion

  • I've written a new version of KinectCam that makes extensive use of depth data and is fully configurable. You can position bitmaps at different depths, create masked areas and interpolate between depths to display depth data in the form of colours. As with KinectCam it appears as a capture device so the output can be used in Skype and other programs.

     

    Please download it from here:

     

    Now updated to use KinectSDK v1.0 Beta 2:

     

    https://docs.google.com/leaf?id=0B7bwfep71evGZDhhNDAzMTAtY2FhMi00MzUzLWIyNzMtNmJjNmY4NjM0YWRm&hl=en_US

     

    Also download the sample bmp file from here:

     

    https://docs.google.com/leaf?id=0B7bwfep71evGNWE5NzA4MDYtMGU0MS00ZDYzLWE0MWEtNzExY2Q2YmZjMWMz&hl=en_GB

     

    Instructions (more detailed this time to help beginners, sorry if it's too much detail)

     

    Go to "My Documents" and create a folder called "KinectDepthCam". Place both files in this folder. Go to your Start menu --> All Programs --> Accessories and right-click on "Command Prompt" and select "Run as administrator". A black window will appear. In this window enter the following commands:

     

    cd %USERPROFILE%

    cd Documents\KinectDepthCam

    c:\windows\system32\regsvr32.exe KinectDepthCam.ax

     

    You should see the following message:

     

     DllRegisterServer in KinectDepthCam.ax succeeded.

    You can now close the Command Prompt window.

    Download the AMCap program from here:

     

    http://www.videohelp.com/tools?d=amcap920.zip

     

    It's a lot easier to test your configuration changes using AMCap rather than Skype. Unzip, install and run it. Go to the Devices menu and select Kinect Depth Cam. Make sure you have already installed the Kinect SDK and have your Kinect plugged in and powered on before doing this.

     

    The first time the Kinect Depth Cam is used it will create the following file:

     

     C:\Users\<Your Name>\My Documents\KinectDepthCam\Config.ini

     

    The default ini file contains enough example config data to get you started. It looks like this:

     

    [Configuration]

    CameraElevationAngle= 0

    CameraShutdownAngle= 0

     

    [Calibration]

    Enabled= 0

    CutoffDepth= 1400

    OffsetX= 0

    ScaleX= 1

    OffsetY= 0

    ScaleY= 1

     

    [Bitmap1]

    Enabled= 1

    File= %USERPROFILE%\Documents\KinectDepthCam\Duck.bmp

    Depth= 1100

    Mask= 255,0,255

    OffsetX= 150

    OffsetY= 80

    ScaleX= 0.8

    ScaleY= 0.8

     

    [Bitmap2]

    Enabled= 1

    File= %USERPROFILE%\Documents\KinectDepthCam\Duck.bmp

    Depth= 0

    Mask= 255,0,255

    OffsetX= 450

    OffsetY= 280

    ScaleX= 0.5

    ScaleY= 0.5

     

    [Bitmap3]

    Enabled= 1

    Colour= 255,0,0

    Depth= 800

    GradientEnd= Bitmap4

     

    [Bitmap4]

    Enabled= 1

    Colour= 255,255,0

    Depth= 1200

    GradientEnd= Bitmap5

     

    [Bitmap5]

    Enabled= 0

    Colour= 0,0,255

    Depth= 1600

     

    If you change Config.ini you need to shutdown AMCap (or Skype) and restart it to pick up the changes. You will need to change the values in the Calibration section to match your depth data with your video data. This is a manual process (sorry) and is a case of trial and error. Change Enabled to 1 in this section and run AMCap. Modify the other values to get the depth data matching as closely as possible to the video data. The values that work best for me are:

     

    CutoffDepth= 1400

    OffsetX= 2

    ScaleX= 1.12

    OffsetY= -14

    ScaleY= 1.05

     

    Don't forget you must be at least 800mm away from the Kinect for the depth data to register. When you are happy with the values set Enabled to 0 in the Calibration section. You can now play with the Bitmap sections to see what the program does. Note that many of the parameters are optional. If you simply want to use a bmp as a backdrop try:

     

    [Bitmap1]

    Enabled= 1

    File= <Full path to your bitmap in 640 x 480 x 24-bit format>

    Depth= 1500

     

    Don't forget to set Enabled=0 in the Calibration section otherwise your Bitmap1 section will be ignored.

    Note that all bitmaps MUST be 640 x480 and must be 24-bit. Colours and masks are entered in RGB format, e.g. 255,255,0 represents yellow. Use a mask to allow bitmaps at larger depths to show through.  The mask should be painted on the bitmap. Colour can be specified instead of a filename and generates a solid colour 640 x 480 bitmap. Use Gradient End to interpolate colours between two depths.

     

    Enjoy!

     


    • Edited by ScottOrange Sunday, December 04, 2011 10:29 AM
    Sunday, June 26, 2011 7:25 PM

All replies

  • Nice, I will try it when I get to my PC, sounds very interesting, just from reading it, it sounds like it only has the depth cam, I guess it would be easily enough to change it to the video stream....
    Monday, June 27, 2011 2:14 AM
  • It uses both the depth and video cam. If you draw an object on a green background and set the mask to green you can effectively position an object in 3D space and can then walk in front of it and behind it. It's quite a cool effect.

     

    Monday, June 27, 2011 4:45 AM
  • Awesome!

    :)

    Monday, June 27, 2011 9:00 AM
  • would it be possible to assign the RGB image to the depth image? Then offset the depth layer and it would show two clones with one background.
    Monday, June 27, 2011 9:27 AM
  • Not sure what you mean. You can offset the images by changing the values in the Calibration section of the ini file.
    Tuesday, June 28, 2011 5:26 AM
  • Instead of assigning a color to the depth image, could you have the rgb image projected onto it?

    That way when you offset it, instead of having a solid color clone, you would have a more realistic one.

     

    Not sure if I am explaining it properly.

     

    Also..

     

    It would be really cool if I could use depthcam and kinectcam at the same time. So I could mix the two camera feeds together in other software.

    Tuesday, June 28, 2011 9:07 AM
  • Yes, you can use bitmaps instead of solid colours when interpolating between depths. In the above example, change the Bitmap4 section so that it has a File=xxx parameter instead of Colour=255,255,0. Do the same for Bitmap5 and now it will show the bitmaps but only where there is an object between the two depths. For Bitmap5 try experimenting with Enabled set to 0 and then 1 to see the difference.

    You can't use both cam programs at the same time because you can't have two different executables being fed the same Kinect data stream as far as I know.

    Tuesday, June 28, 2011 6:25 PM
  • Hi

     

    first I would like to thanks you for this simple and easy application you create

     

     

    it didi what i want

     

    is there any way to ceate a text file with the depth information form the camer.

    Sunday, July 03, 2011 1:35 AM
  • Great work!

    Do you think it will be possible to share the source code (codeplex?) for those of us interested in directshow filters programming?

    Thanks again and keep up the good work.

    Angelo

    Tuesday, July 12, 2011 9:19 AM
  • Any chance of getting this to work with google hangouts? I've tried nearly everything I can think of, but it still doesn't work

     

    EDIT: +1 to angelfly. Any chance of a source code release?

    Wednesday, July 13, 2011 3:10 AM
  • I was up all night last night trying to setup my Kinect on my Windows 7 (32bit).  I Have the new beta SDK for Kinect from Microsoft, and installed all of the drivers.  I then installed Kinect Cam just as you said but when I try to connect to it using my WebCam Viewer (tried 3 of them; manycam, windows, VCam) is doesn't get a connection.  I noticed the green light on the Kinect continues to flash the entire time.  The odd thing is that the Skeleton Viewer that comes with the Kinect SDK works just fine.

    I didn't get any errors when installing, so I don't know what could be the problem.  The power and usb are both connected... Also, I rebooted like 100 times, and even tried the install on a different PC.

    Wednesday, July 13, 2011 6:09 PM
  • How do you uninstall this?
    Sunday, July 17, 2011 3:38 AM
  • Wow, I'm glad I noticed this!  It was tucked way back in the forums.  Works perfectly, although it is slightly annoying to configure manually.  (Project for myself:  write an easy-to-use front-end.)

    Here are two feature requests that I don't imagine would be terribly difficult to implement:

    - Support for PNG format, including alpha channel.

    - How about the ability to specify a separate depth image, using a pixel's intensity to adjust the color image's apparent depth?  This would also need a depth scale factor, so you could translate 0-255 into, for example, 0-1500.

    Fantastic work nonetheless!  I'm gonna have some video chat fun with this.

    Friday, September 23, 2011 7:42 PM
  • No problem. Glad you like it.
    Saturday, October 15, 2011 6:22 PM
  • No way to get the code or binary of your Directshow filter working with Kinect SDK b2?

    Tuesday, November 08, 2011 12:15 PM
  • Now updated to use KinectSDK v1.0 Beta 2:

     

    https://docs.google.com/leaf?id=0B7bwfep71evGZDhhNDAzMTAtY2FhMi00MzUzLWIyNzMtNmJjNmY4NjM0YWRm&hl=en_US

     

    I've also updated the link on the original post.


    • Edited by ScottOrange Sunday, December 04, 2011 10:30 AM
    Sunday, December 04, 2011 10:30 AM
  • Hi ScottOrange

     

    This seems exactly what im looking forward to integrate into a university project i'm working on using the Depth sensor, do you have the source code so i can add in as a library? unsure what  .ax file type is.

    Running my project in C# using the SDK

     

     

    Saturday, December 10, 2011 10:40 PM
  • mine keeps saying "failed" -specific model could not be found. can anyone help me?

     

    Sunday, December 25, 2011 6:10 AM
  • question if anyone gets this or the normal camera feed KinectCam.ax working with expression encoder can you please post steps as i was going to try doing that for a project but thought i might ask first. Scott if you can get your kinect camera file to work with expression encoder and expression apps for that matter i know a lot of people that will be happy with you including me.


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda
    • Edited by The Thinker Thursday, December 29, 2011 4:56 PM
    Thursday, December 29, 2011 4:56 PM
  • @ScottOrange It would rock if you could update this one to use the SDK 1.0 like you did with the other kinect cam filter.
    Friday, March 02, 2012 3:25 AM
  • He stopped that I wish he would update both of the filters. I can prefer him to a wdk forum or directshow filter forum for help if he would just recreate the filter.

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://jefferycarlsonblog.blogspot.com/

    Wednesday, May 09, 2012 12:26 PM
  • would like it if you took a look at the main rgb kinect code for other kinect cam filter and update to v1.5 or at least attempt which seems to have fixed some bad data feeds.

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://jefferycarlsonblog.blogspot.com/

    Tuesday, May 29, 2012 1:25 PM
  • .ax is the extension used for directshow filters (activeX). There is some source code here: https://github.com/wildbillcat/KinectCam .
    Wednesday, October 17, 2012 6:48 PM
  • Thanks Illlskywalker the code can be slightly modified again above for v1.6 if need be. 

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://www.computerprofessions.co.nr

    Thursday, October 18, 2012 12:30 PM