C# EMGU CV - Unable to capture from PS3eye
Posted: 24 January 2011 02:10 AM   [ Ignore ]
New Member
Total Posts:  1
Joined  2010-10-13


I cant seem to capture frames from the Ps3eye through the following

frameCam = captureFrame.QueryFrame();

it just gives me some error that its unable to capture from cam 0. I went through the c# example provided and tried to put some stuff together. It started to capture but its showing me weird stuff. Below are my codes.

  public Form1()
        framePtr = CLEyeCreateCamera(CameraUUID(0), CLEyeCameraColorMode.CLEYE_COLOR_RAW,  CLEyeCameraResolution.CLEYE_QVGA, 30);
        CLEyeCameraGetFrameDimensions(framePtr, ref w, ref h);
        _ptrBmpPixels = Marshal.AllocHGlobal(640 * 480);

private void timer1_Tick(object sender, EventArgs e)
        CLEyeCameraGetFrame(framePtr, _ptrBmpPixels, 500)
        Bitmap bmpGraph = new Bitmap(w, h, w, PixelFormat.Format32bppRgb, _ptrBmpPixels);
        pictureBox1.Image = bmpGrap;

May i know the simplest way to just capture and display ? also can i capture and store it in Image class object ? thanks

Posted: 29 January 2011 04:05 PM   [ Ignore ]   [ # 1 ]
New Member
Total Posts:  3
Joined  2011-01-27


I think that you´ve to take into account that EmguCV works internally with the IplImage Format of OpenCV while calling the QueryFrame. I´m not really sure but I think while using EmguCV´s QueryFrame you won´t address the CLEye Driver, it will capture the cam´s images with the build-in generic cam driver of opencv.
So the image retrieved is not a bmp. Instead of this it has it´s own BGR Color order in the IplImage format instead of RGB. So you need to take this into account while marshalling, you´ll need a stride for that.

Sadly I´m not that far into C# and the WPF´s. I´m currently working on an integration of some EmguCV functions within XNA.

Posted: 11 April 2011 11:21 PM   [ Ignore ]   [ # 2 ]
New Member
Total Posts:  2
Joined  2011-04-11

Can anyone tell me how to get data from kinect in emgu CV compatible format.
the IntPtr of NUIImage showns a blank when i cast it to emgu.CV.Image.



RSS 2.0     Atom Feed