forums.naturalpoint.com

Discussion and Support for the OptiTrack, SmartNav and TrackIR brands by NaturalPoint

.net wrappers for c++ SDK

by leith » Tue Dec 07, 2010 12:33 pm

Cool. I'm going to try to release today. I just have some appointments and errands that may get in the way.

Thanks Doug.
leith
 
Posts: 192
Joined: Tue Jan 02, 2007 2:17 pm

by stevelancey » Tue Dec 07, 2010 7:45 pm

Hi Brad,

I've been following this thread since 3 days. I need to create a wrapper myself and am now wondering whether I should wait :).

Would you mind to share the code at this point in time already? I'd be more than happy to contribute.

Cheers,

Steve
stevelancey
 
Posts: 3
Joined: Wed Dec 01, 2010 6:51 pm

by leith » Wed Dec 08, 2010 5:32 pm

Its now up. Under the lGPL.

https://code.google.com/p/npcamerasdkdotnet/

Ugly as it is. It has been streaming frames for me for a week now. So while I have not exposed the entire SDK, the parts I have exposed do seem to work.

-brad
leith
 
Posts: 192
Joined: Tue Jan 02, 2007 2:17 pm

by stevelancey » Wed Dec 08, 2010 9:37 pm

Works great! I found one issue. The GetLatestFrame Method is wrapped incorrectly. It calls camera->GetFrame(). I will raise an issue on google code.

Thanks again,

Steve
stevelancey
 
Posts: 3
Joined: Wed Dec 01, 2010 6:51 pm

by leith » Wed Dec 08, 2010 11:13 pm

hehe. yea. I'm prone to that kind of thing :) Do keep checking for issues.
leith
 
Posts: 192
Joined: Tue Jan 02, 2007 2:17 pm

by beckdo » Thu Feb 03, 2011 4:26 am

Hey Brad, nice job with this. I looked through the code and it looks good. Thanks for putting this together. My only comment is that you might want to remove NPCameraSDKDotNet.ncb from the svn depot since it's unnecessary.

I hope this continues to grow and is useful for people looking for an easy way to access the Camera SDK via .NET. Also, I am continually trying to keep the interface to all cameras unified so that 99% of the functionality is obtained by only the wrapping of the primary base camera object.
beckdo
NaturalPoint Employee
NaturalPoint Employee
 
Posts: 517
Joined: Tue Jan 02, 2007 2:02 pm

by cmapsystems » Mon Mar 07, 2011 7:03 pm

Hi Brad,

I work with robotic submarines and my code base is c#

I am starting some stuff with head tracking and would love to take a look at your wrapper.

Maybe I am just stupid, but I can't seem to find a way to download this.

Could you give me a little guidance.

Thanks!
cmapsystems
 
Posts: 2
Joined: Mon Mar 07, 2011 6:56 pm
Location: Montana

by cmapsystems » Tue Mar 08, 2011 12:03 pm

Hi Doug,

I downloaded the source and am missing I am missing the file "cameralibrary.h". Do you have a source for this file?

Thanks
cmapsystems
 
Posts: 2
Joined: Mon Mar 07, 2011 6:56 pm
Location: Montana

by Birch » Tue Mar 08, 2011 2:25 pm

The cameralibrary.h file should be located in the "include" folder when you install the Camera SDK, try checking there.
Birch
NaturalPoint Employee
NaturalPoint Employee
 
Posts: 1140
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

by kelmer » Tue Mar 22, 2011 6:55 am

Hi

just tried to list all available devices translating the SimpleCameraTest demo using the .NET wrapper, with this code:

Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NPCameraSDKDotNet;

namespace pruebaCamaras
{
    class Program
    {
       
        static void Main(string[] args)
        {
            MCameraManager.WaitForInitialization();

            if (MCameraManager.AreCamerasInitialized())
                Console.Out.WriteLine("C�maras inicializadas");
            else
                Console.Out.WriteLine("No se pudieron inicializar las c�maras");

            List<MCamera> camaras = new List<MCamera>(MCameraManager.GetCameras());
            Console.Out.WriteLine("C�maras:");

            foreach (MCamera cam in camaras)
            {
                Console.Out.WriteLine("C�mara " + cam.UID());
            }

            if (camaras.Count == 0)
            {
                Console.Out.WriteLine("No hay c�maras");
            }

            Console.Read();
        }
    }
}



But got this error:

"Excepci�n no controlada del tipo 'System.IO.FileNotFoundException' en mscorlib.dll

Informaci�n adicional: No se puede cargar el archivo o ensamblado 'NPCameraSDKDotNet.dll' ni una de sus dependencias. No se puede encontrar el m�dulo especificado."

Which in Spanish says:

Uncontrolled exception of type 'System.IO.FileNotFoundException' in mscorlib.dll

Additional information: Assembly or file 'NPCameraSDKDotNet.dll' or any of its dependencies could not be loaded. Can't find the specified module".


What am I doing wrong?
kelmer
 
Posts: 9
Joined: Fri Feb 05, 2010 2:26 am

PreviousNext

Return to Camera SDK