.net wrappers for c++ SDK

leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post 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.
stevelancey
Posts: 3
Joined: Wed Dec 01, 2010 6:51 pm

Re: .net wrappers for c++ SDK

Post 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
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post 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
stevelancey
Posts: 3
Joined: Wed Dec 01, 2010 6:51 pm

Re: .net wrappers for c++ SDK

Post 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
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

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

Re: .net wrappers for c++ SDK

Post 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.
cmapsystems
Posts: 2
Joined: Mon Mar 07, 2011 6:56 pm
Location: Montana

Re: .net wrappers for c++ SDK

Post 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!
cmapsystems
Posts: 2
Joined: Mon Mar 07, 2011 6:56 pm
Location: Montana

Re: .net wrappers for c++ SDK

Post 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
Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: .net wrappers for c++ SDK

Post by Birch »

The cameralibrary.h file should be located in the "include" folder when you install the Camera SDK, try checking there.
kelmer
Posts: 9
Joined: Fri Feb 05, 2010 2:26 am

Re: .net wrappers for c++ SDK

Post 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?
Post Reply