Results 1 to 20 of 26

Thread: Image processing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing


  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Image processing

    Or may be QFileDialog::getOpenFileNames .
    QFileDialog::getOpenFileNames(this,"Select one or more files to open","/home","Images (*.png *.xpm *.jpg)");

  3. #3
    Join Date
    Aug 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Image processing

    Thanks guys for all your help, i'm making progress on my application. Next mission, I want to customize buttons by say linking the file browsing action with a button. The only options i can find is the ones preinstalled. should i define my own slots or is there a better way?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing

    Read a tutorial and browse Qt Assistant please

  5. The following user says thank you to wysota for this useful post:

    aurelius (30th October 2008)

  6. #5
    Join Date
    Aug 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Image processing

    Hi,

    i am trying to do a slideshow. I have the images load and everything else work i.e. next, back between the pictures.

    I would like to automate it with Qtimer, i call the method to start the slideshow in the method i use the Qtimer like this:


    Qt Code:
    1. QTimer *timer = new QTimer(this);
    2. connect(timer, SIGNAL(timeout()), this, SLOT(nextPicture()));
    3. timer->start(30000);
    To copy to clipboard, switch view to plain text mode 

    Is this the write way?

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing

    Yes, this is ok.

  8. #7
    Join Date
    Oct 2008
    Posts
    28
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Image processing

    Hi, I am a newbie in QT4, however really enthusiastic with all the capabilities of it.

    What I want to do is to have a grid of images, and display them, like this program

    http://www.youtube.com/watch?v=kVcTMAUr3Bw

    I mean, I want to display them in a grid and if possible, when I resize the window, the grid and the images contained in it to adjust. I guess I will have to follow

    these instructions:
    Quote Originally Posted by aamer4yu View Post
    Refer the Image Viewer example in Qt Demo.

    Otherwise, you can add QLabel in a layout and display multiple images

    Hope this helps
    Is this right? I guess, in order for the images to adjust, I will have to use grid layout. Because I can't really recall right now, is it possible to dynamically add widgets inside the QGridLayout, that is I check what images are contained in a directory and display them in a grid mode ? Is this right?

    Do you have any other advice or sample code that does sth similar?

    P.S. I just found this forum, which was a relief, because the tutorials in QT4 website are basic.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing

    I think this is dome using GraphicsView so take a look at QGraphicsView and QGraphicsScene.

  10. The following user says thank you to wysota for this useful post:

    aurelius (30th October 2008)

  11. #9
    Join Date
    Oct 2008
    Posts
    28
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Image processing

    Thanx for the quick answer.

    Do you know iff there is somewhere some demo code for QGraphcisScene etc ? Of course, I will try to figure out how it works, but it's kinda difficult by just reading the properties of it, since I am just a beginner.

    Ok, I just realized that there are some tutorials in QT4 site.
    Last edited by aurelius; 29th October 2008 at 17:24.

  12. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing

    Open a terminal and type in "assistant".

  13. The following user says thank you to wysota for this useful post:

    aurelius (30th October 2008)

  14. #11
    Join Date
    Oct 2008
    Posts
    28
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Image processing

    I use Ubuntu 8.04 and I program with just a text editor and console. Unfortunately the repositories don't have the latest version of Qt, so QGraphicsProxyWidget are not part of the library. Of course, I don't know if it's even useful, but ok, I just don't have access on it. Also, there are not the functions that are related to it, such as the addWidget in QGraphicsScene. This function I guess it's really important. I downloaded and compiled the newer version of Qt, however the makefile throws error. I use a modified qmake that I took from a QDevelop program and it has some include paths. I changed them and it suddenly started to throw some errors. Do you have any qmake that it would work properly?

    I think I will have to create my own makefiles with my own qmake, but that is a problem.

    Whatsoever, I tried to do sth with grid layout. I managed to put two images in a grid layout, so I guess I can do it for more images. However, I don't know how to do it, so as automatically to change for the position of those images acoording to the with of the main window. I will try to make QGraphics class work properly, but do you have any idea for this as well?
    Last edited by aurelius; 29th October 2008 at 20:13.

  15. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing

    Quote Originally Posted by aurelius View Post
    Of course, I don't know if it's even useful, but ok, I just don't have access on it.
    Not in your case. You need a plain graphicsview and QGraphicsPixmapItems.

    Do you have any qmake that it would work properly?
    Always use only the instance of qmake that comes with your installation, be it a binary or an own build originated.

    I think I will have to create my own makefiles with my own qmake, but that is a problem.
    No, you need to read a tutorial or two. Don't make things more complex than they are.

    Whatsoever, I tried to do sth with grid layout. I managed to put two images in a grid layout, so I guess I can do it for more images.
    Forget it. Read about QGraphicsView, pretty please.

Similar Threads

  1. Image processing via matrix
    By jones.79 in forum Qt Programming
    Replies: 10
    Last Post: 22nd September 2008, 00:42
  2. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  3. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 18:15
  4. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  5. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36

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
  •  
Qt is a trademark of The Qt Company.