神刀安全网

Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

Following up onyesterday’s post, I don’t seem to be having much luck with the Intel SR300 camera and the current RealSense SDK. I’m starting to think that I’ve got some kind of driver mismatch or similar or maybe I just don’t have any hardware that’s compatible with the camera.

Based on yesterday’s experimenting, it seems like the Surface Book is the best chance I’ve got of making things work so I thought that I would try a ‘hello world’ for the new person tracking feature of the SDK, staying away from the UWP preview part of the SDK because;

  1. I couldn’t get much of that to work.
  2. It doesn’t have support for many functional areas including this new one of person tracking.

I went off into the world of .NET Framework and made a new, blank WPF application.

As usual, I added a reference to the 64-bit libpxcclr.cs.dll assembly and I made sure that I had the 64-bit version of the libpxccpp2c.dll DLL in my project as ‘content’ so that it would appear in the output folder and be able to be loaded via PInvoke when the app ran.

I then wrote this code behind a blank XAML window;

using System.Windows;  namespace WpfApplication1 {   public partial class MainWindow : Window   {     public MainWindow()     {       InitializeComponent();       this.Loaded += OnLoaded;     }     void OnLoaded(object sender, RoutedEventArgs e)     {       this.senseManager = PXCMSenseManager.CreateInstance();       pxcmStatus status = this.senseManager.EnablePersonTracking();        if (status == pxcmStatus.PXCM_STATUS_NO_ERROR)       {        }     }     PXCMSenseManager senseManager;   } }

Unfortunately, the call to PXCMSenseManager.EnablePersonTracking doesn’t seem to work – I get a PXCM_STATUS_ITEM_UNAVAILABLE return value from the SDK which I don’t get if I try some of the other modules that I’m familiar with – e.g. I made sure that calls to EnableHand() , EnableFace() , EnableHandCursor() all returned a no error status but EnablePersonTracking() just doesn’t seem to want to work for me.

I suspect that there’s something wrong with my installations of the SR300 although I’ve installed it onto 3 PCs so far and found that it seems to have different characteristics on all 3 of them. I’m still finding that if I run a sample like the long-established (from the F200) Hands Viewer sample on my Surface Book then it gets stuck at the initialisation stage as below;

Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

and I don’t usually seem to be able to get past there. I tried disabling the secondary graphics card on the Surface Book. I also tried disabling the driver for the built-in 3D camera on the Surface Book in case that was getting in the way but it didn’t seem to make much difference.

I also tried disabling the depth camera manager service that appeared to be linked to the non-SR300 camera as in the picture below and I’m unsure whether it can happily co-exist with the SR300 one;

Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

but that didn’t seem to help me either and I found that every time I tried the Hands Viewer sample that service (i.e. the non SR300 one) would restart which makes me think that it’s perhaps necessary for the SR300 camera.

So far then, none of this has seemed to work very well and I had a lot more success with the F200 camera than I’ve had with the SR300.

I thought I’d make one more attempt with the new Hand Cursor module and so, again, I wrote some ‘hello world’ code to see if I could get that going inside of my WPF application;

using System; using System.Diagnostics; using System.Windows;  namespace WpfApplication1 {   public partial class MainWindow : Window   {     public MainWindow()     {       InitializeComponent();       this.Loaded += OnLoaded;     }     void OnLoaded(object sender, RoutedEventArgs e)     {       this.senseManager = PXCMSenseManager.CreateInstance();        pxcmStatus status = this.senseManager.EnableHandCursor();        if (status == pxcmStatus.PXCM_STATUS_NO_ERROR)       {         // This line of code either;         // a) Hangs.         // b) Crashes.         status = this.senseManager.Init(           new PXCMSenseManager.Handler()           {             onModuleProcessedFrame = this.OnModuleProcessedFrame           }         );          if (status == pxcmStatus.PXCM_STATUS_NO_ERROR)         {           this.senseManager.StreamFrames(false);         }       }     }     pxcmStatus OnModuleProcessedFrame(int mid, PXCMBase module, PXCMCapture.Sample sample)     {       // Do we ever get here?       Debugger.Break();       return (pxcmStatus.PXCM_STATUS_NO_ERROR);     }      PXCMSenseManager senseManager;   } }

but I found (as the comment suggests) that the call to PXCMSenseManager.Init() either hangs or crashes and so I got no further with this.

I also found that running the ‘Camera Explorer’ tool from the SDK gives me an initial screenshot of;

Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

followed by an endless;

Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

and so that doesn’t seem to work for me either.

I think I’m broken on the SR300 camera for the moment which is a shame as I wanted to try it out but, to date, I can get it installed but things don’t progress much beyond that.

If you’ve got one and can make it work, please let me know. I’m asking on Intel Forums at the time of writing…

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Mike Taulty's Blog: Windows 10, RealSense SR300, Person Tracking

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址