AlexP
I finally achieve to complile the CLEyeMulticamTest.cpp in VC2008. I think the API lack of information.
The problem trying to compile the CLEyeMulticamTest.cpp in Visual Studio 2008 was because the OpenCV versión. I was using V2.0 where the libraries are .dll’s. The CLEyeMulticamTest.cpp calls cxcore.lib, but it doesn’t exist, instead there is cxcore200.dll.a . The solution for me was uninstall OpenCV v2.0 and install OpenCV v1.1.
Any ideas to make it work with OpenCV v2.0?
——————————————
Talking about the CLEyeMulticam API, we have achieve the following:
from ctypes import cdll, c_int
lib = "/Program Files/Code Laboratories/CL-Eye Platform SDK/Bin/CLEyeMulticam.dll"
dll=cdll.LoadLibrary(lib)
print dll.CLEyeGetCameraCount()
from ctypes import oledll, Structure, byref
from ctypes.wintypes import BYTE, WORD, DWORD
class GUID(Structure):
_fields_ = [("Data1", DWORD),
("Data2", WORD),
("Data3", WORD),
("Data4", BYTE * 8)]
guid = GUID()
oledll.ole32.CoCreateGuid(byref(guid))
guid.Data1=0xc4072a9d
guid.Data2=0xf0c2
guid.Data3=0x266f
guid.Data4[0]=0xbe
guid.Data4[1]=0xae
guid.Data4[2]=0x3a
guid.Data4[3]=0x5d
guid.Data4[4]=0x43
guid.Data4[5]=0x75
guid.Data4[6]=0x97
guid.Data4[7]=0x0d
cam=dll.CLEyeCreateCamera(guid,1,1,30)
import cv
import ctypes
cv.NamedWindow( "camara", 1 )
imagen=cv.CreateImage((640,480),8,4)
dll.CLEyeCameraStart(cam)
p2=imagen.origin
while True:
dll.CLEyeCameraGetFrame(cam,p2)
cv.ShowImage( "camara", imagen )
c = cv.WaitKey(7)
if c == 27:
break
I don’t know if the guid data is well defined, I tried that because the uuid native data from python doesn’t work. Do you know how to get the guid data from cámeras in python?
When I execute the code, the window opens, but in doesn’t shows the image from the cámera. What I’m doing wrong?
Thanks