Display Iplimage in Openframeworks

I have a Openframeworks program that uses OpenCV.

The idea is that I am using Flycapture grayscale camera to capture video, and I just want to display the image.

In the test.h file I just declared two variables :

  
  
        ofxLampVideoGrabber vidGrabber;  
        ofxCvGrayscaleImage 	grayImage;  
  

And in the test.cpp file, I do

  
  
void ofTestApp::setup()  
{  
    ofSetLogLevel( OF_LOG_VERBOSE );  
  
    ofSetVerticalSync(true);  
  
    vidGrabber.initGrabber(1280,960,15.0f); // this connect to the camera and get image frames from the camera  
                                                             // the resolution is 1280*960 and the frame rate is 15fps  
    grayImage.allocate(1280,960);  
  
}  
  
void ofTestApp::update()  
{  
    ofBackground(255,0,0);  
    vidGrabber.update();  
    grayImage = *(vidGrabber.Image()); // vidGrabber.Image returns *IplImage   
}  
  
void ofTestApp::draw()  
{  
	grayImage.draw(0,0);  //draw the image  
}  
  

Such a simple program, but it just display a black rectangle of the size 1280*960, and I don’t see the camera image. I am not sure if this is the problem of “grayImage = *(vidGrabber.Image());”, I actually just want to convert the Iplimage to ofxCvImage, and draw it. I don’t why I can only see black rectangle with no images.

I think I have the same issue. see this thread and see if there are any common traits.

http://forum.openframeworks.cc/t/ofxcvcolorimage-draw-produces-blank-white-image-/11304/0