Qt creator convertor



  • hi,

    i record with rosbag a viedeo. I want to viaualize the video in a gui, with a qt creator, but rosbag records only in the Format Mono_8, buti need a rgb format to play the video. How can i decode the video?
    I try with this:
    @
    QImage temp(&( qnode.getThermalImage().data[0]), 320, 240, QImage::Format_Mono);

    QImage image;

    image = temp;

    image = temp.convertToFormat(QImage::Format_RGB32);

    ui.lbl_video->setPixmap(QPixmap::fromImage(image));

    ui.lbl_video->update();
    @


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What is the format of the image ? raw ? png ? jpeg ?

    What output are you excepting ? What are you getting ?



  • hi

    the format of the image is mono_8 raw, because rosbag records in the format mono_8. I need another format to show the video in my qt gui, because qt cant visualize the format. I want to to convert from mono_8 to a rgb format


Log in to reply
 

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