Results 1 to 3 of 3

Thread: Need Advice: How to import and handle masses of images for a image sequence

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question Need Advice: How to import and handle masses of images for a image sequence

    Hi everyone!
    I'm new to this forum because I got some (in my opinion) difficult questions concerning Qt (4.7) and I thought this forum could be the best way to get them answered.

    First of all: YES, I already used the mighty function "Search", but I'm not that satisfied with the answers.

    My goal is to implement a little tool for video editing and manipulation, but the main problem are my source files. They are stored in single *.pgm files and have about 20-30GB in total. For this I got two different approaches:

    First approach:
    1. convert all pgms (lossless) via video encoder to a single media source
    2. playback file using "QPhonon" classes
    3. extract a single image/sequence of images to use filters/manipulate them with plugins
    4. export to a single file


    progress & assessment
    Converting to a single video file is no big deal with external programms (ffmpeg).
    Playing and displaying the movie with Phonon is easy too.
    Export a images of the file manipulate them, and integrate them - NO IDEA
    >> It takes some time to cache the big file but when its loaded, it plays very smoothly.



    Second approach:
    1. import all images to the my application into a QList<QPixmap*>
    2. "play" them in a very atypical way (see below)
    3. manipulate one by one and reintegrate them into the "image sequence"


    progress & assessment
    Creating the QList and importing the pictures from a directory [check]
    To "play" them i used the following code snippet:

    Qt Code:
    1. void MainWindow::displayImage()
    2. {
    3. QPixmap *img = this->getNextImage();
    4. ui->imgLabel->setPixmap(*img);
    5. ui->imgLabel->show();
    6. timer->start(100);
    7. }
    To copy to clipboard, switch view to plain text mode 

    getNextImage() returns a reference to the next QPixmap, that has to be displayed.
    ui->imgLabel is of type QLabel and the timer is connected to displayImage().
    So if one image is displayed and 100 msecs passed, the next image will be displayed.
    This works fine for 20pictures ~ 100MB. When I try using it with 120 pictures ~720MB, its slows down significantly (inacceptable).
    I would prefer this solution because of the handling with filters/plugins/..., but if someone would teach me a better way to do it - I'm open minded!

    The final export has to work on lossless files, thats why I didn't compress them at the beginning. Should I split it up to export data and preview data and compress the preview images?

    Thanks for reading carefully & taking some time to think about it!
    Last edited by [?]jNs; 16th June 2011 at 14:18. Reason: Wrong title

Similar Threads

  1. Load images in a sequence in QML
    By anupama in forum Qt Quick
    Replies: 1
    Last Post: 1st December 2010, 08:24
  2. slot sequence to handle http signals
    By ask8y@yahoo.com in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2010, 17:23
  3. Sequence images player
    By hhe in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2010, 08:13
  4. problem in Display sequence of DICOM images
    By vincat in forum Qt Programming
    Replies: 0
    Last Post: 26th May 2009, 06:42
  5. import large number of images
    By sriluyarlagadda in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2008, 10:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.