Converting flycapture2 image to Qimage



  • Dear All,
    Anybody used flycapture from Point Grey Research.
    I am trying to convert the flycapure2 image to Qimage to display in QGraphicsView.
    What I did was
    @
    error = cam.RetrieveBuffer( &rawImage );
    // Convert the raw image
    error = rawImage.Convert(PIXEL_FORMAT_RGB8, &img.imageframe);
    //Convert to QImage
    QImage Img(img.imageframe,1280, 960, QImage::Format_RGB888);
    scene->addPixmap(QPixmap::fromImage(Img));@

    But the compiler complains as
    No matching function for call to "QImage::QImage(Flycapture2::Image&,...)
    What is the correct way?
    Thanks



  • Better show us some more code. Unclear types, esp. the type you are feeding to QImage (see QImage "types":http://qt-project.org/doc/qt-4.8/qimage.html#Format-enum).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.