Page 2 of 5

Re: .net wrappers for c++ SDK

Posted: Tue Dec 07, 2010 12:33 pm
by leith
Cool. I'm going to try to release today. I just have some appointments and errands that may get in the way.

Thanks Doug.

Re: .net wrappers for c++ SDK

Posted: Tue Dec 07, 2010 7:45 pm
by stevelancey
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

Re: .net wrappers for c++ SDK

Posted: Wed Dec 08, 2010 5:32 pm
by leith
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

Re: .net wrappers for c++ SDK

Posted: Wed Dec 08, 2010 9:37 pm
by stevelancey
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

Re: .net wrappers for c++ SDK

Posted: Wed Dec 08, 2010 11:13 pm
by leith
hehe. yea. I'm prone to that kind of thing :) Do keep checking for issues.

Re: .net wrappers for c++ SDK

Posted: Thu Feb 03, 2011 4:26 am
by beckdo
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.

Re: .net wrappers for c++ SDK

Posted: Mon Mar 07, 2011 7:03 pm
by cmapsystems
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!

Re: .net wrappers for c++ SDK

Posted: Tue Mar 08, 2011 12:03 pm
by cmapsystems
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

Re: .net wrappers for c++ SDK

Posted: Tue Mar 08, 2011 2:25 pm
by Birch
The cameralibrary.h file should be located in the "include" folder when you install the Camera SDK, try checking there.

Re: .net wrappers for c++ SDK

Posted: Tue Mar 22, 2011 6:55 am
by kelmer
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?