- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello there,
Recently got the chance to (finally) try out the camera, and while nice so far, I've been having trouble with getting events to work. My code can be found over on my Github (https://github.com/gemisis/Pinch-Me), and when trying an event based approach, I modify the mainForm_Load method in mainForm.cs to look like this:
private void mainForm_Load(object sender, EventArgs e) { session = PXCMSession.CreateInstance(); manager = session.CreateSenseManager(); if (manager == null) { Console.WriteLine("Failed"); } manager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, 1920, 1080, 30); manager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH, 640, 480, 60); manager.EnableHand(); PXCMSenseManager.Handler handler = new PXCMSenseManager.Handler(); handler.onNewSample = this.newColorFrame; manager.Init(handler); manager.StreamFrames(true); }
According to the SDK Documentation, that should work, but I receive the following error :
An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayTypeMismatchException' occurred in libpxcclr.cs.dll
Any ideas what could be causing this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need implement onNewSample. You can find details @https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/index.html?manuals_color_and_depth_picture_alignment.html

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page