CLEye SDK C#
Posted: 04 January 2011 05:38 PM   [ Ignore ]
New Member
Rank
Total Posts:  10
Joined  2010-12-20

Hi, im writing a C# plugin for vvvv to select one of the available cameras on my pc, actually i just got 4 small frames in a row instead of a full frame, doing this :

private CLEyeCameraResolution resolution CLEyeCameraResolution.CLEYE_VGA;
private 
CLEyeCameraColorMode colorMode CLEyeCameraColorMode.CLEYE_MONO_PROCESSED;
private 
float framerate 60f;
private 
int bpp 1;

texW 640;
texH 480;

this.imageBuffer Marshal.AllocCoTaskMem(texW texH bpp);

Guid camId =CLEyeCameraDevice.CLEyeGetCameraUUID(cameraIndex);
cameraPointer CLEyeCameraDevice.CLEyeCreateCamera(camIdthis.colorModethis.resolutionthis.framerate);
CLEyeCameraDevice.CLEyeCameraStart(cameraPointer); 

then to copy into texture :

var rect texture.LockRectangle(0LockFlags.Discard).Data;
CLEyeCameraDevice.CLEyeCameraGetFrame(cameraPointerimageBuffer100);
rect.WriteRange(imageBuffer640 480bpp);
texture.UnlockRectangle(0); 

 

is it wrong the bufferSize ?

Image Attachments
PS3MultiCam-DirectX Renderer.png
Profile
 
 
Posted: 05 January 2011 05:57 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  6
Joined  2010-11-11

solved , texture format was objously wrong for a mono image smile

Profile
 
 
 
 


RSS 2.0     Atom Feed