ALVARWrapper.dll failing

Jan 28, 2010 at 11:34 PM

Okay, so now I've got something else that's baffling me. I'm trying to build and debug a project, all the code checks out fine, but every time I build the project, I get an error in ALVARMarkerTracker.cs.

This bit of code is highlighted:

                   int ret = ALVARDllBridge.alvar_init_camera(configFilename, img_width, img_height);

with an error message saying:

                   Unable to load DLL 'ALVARWrapper.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I've tried to add a reference to the ALVARWrapper.dll in my project, but it won't let me. It gives me this error when I try to import it:                  

                   A reference to 'C:\Users\Desktop\GoblinXNAv3.3\bin\ALVARWrapper.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

 

I really have no clue what's going on here. And help?

 

 

Jan 28, 2010 at 11:42 PM

Put the ALVARWrapper.dll and alvar120.dll in the same folder as your executable.. Actually you need almost all of the dlls from the /bin folder. It would be a good idea to change the output path of your project to the GoblinXNA bin folder so that you have all the needed dlls. Or just copy them to your output directory.

Coordinator
Jan 29, 2010 at 6:54 PM

You will also need (to be safe) all of the DLLs from your OpenCV 1.0 installation under the /bin directory (cxcore100.dll, cv100.dll, etc).

In addition to alvar120.dll, you will also need alvarplatform120.dll in your project's bin directory.

You won't be able to add any of these DLLs including ALVARWrapper.dll to your project under the Reference section since they are not managed DLLs.

Ohan

Jan 29, 2010 at 6:56 PM

okay, that fixed it. Thanks!

Apr 2, 2010 at 8:24 AM

i have another problem now. Newton library gives me a headache. In my solution explorer it was at first looked like a shortcut file. I removed it and added it again without the shortcut symbol.

It gave me error ever since.

Coordinator
Apr 2, 2010 at 3:08 PM

Make sure you set its "output" property to "copy if newer"

Ohan

Apr 4, 2010 at 6:57 PM
ohanoda wrote:

Make sure you set its "output" property to "copy if newer"

Ohan

Did that. But I hv another problem. Error "video capture device id xxxx is used by other applications , and cannot be accessed"

 

Coordinator
Apr 5, 2010 at 5:30 PM

The reason why it's complaining that it can't access the device is
probably due to slow access to the device. I set the connection trial
number to be 100, and if it can't access the device within this 100
trials, it'll assume that the device is used by another application,
and throws that exception. If you know that the device is not used by
another application, then increasing this trail number should fix the
problem. Try to change line # 87 of DirectShowCapture.cs under
GoblinXNA.Device.Capture to something larger (e.g., 1000), and then
recompile Goblin XNA.

Ohan

Apr 6, 2010 at 1:09 AM

not successful. maybe i need to buy a web cam.

I used my old digital camera and connect to my laptop as a webcam. I tried this camera with ARMirai previously and it worked.

Besides the resolution is not good. Without enough lighting everything will look blurry.