Results 1 to 14 of 14

Thread: Processing and Displaying Image on Widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Processing and Displaying Image on Widget

    For such high througput rendering you probably have to use a more direct rendering approach, e.g. OpenGL.

    It might be worthwhile to look into creating a QCamera backend and then use the existing video widget infrastructure.

    Cheers,
    _

  2. #2
    Join Date
    Mar 2016
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Processing and Displaying Image on Widget

    Do you know any tutorials that start from foundation and builds up to it?
    I don't have any experience with OpenGL.
    I found most tutorials to be about QGLWidget.
    But in the new versions of Qt 5, QOpenGLWidget is intended to be a modern replacement for QGLWidget.
    I haven't been able find a good tutorial for QOpenGLWidget.

    cheers

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Processing and Displaying Image on Widget

    No, sorry, I haven't had anything to do with that yet myself either.

    Cheers,
    _

  4. #4
    Join Date
    Mar 2016
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Processing and Displaying Image on Widget

    I was wondering if this would work?
    a function is getting a pointer to a QImage as a parameter.
    I want to copy the entire QImage to a buffer of that is going to hold 100 QImages.

    Qt Code:
    1. public:
    2. void function(QImage *frame);
    3.  
    4. protected:
    5. enum{size = 100};
    6. QImage *data[size];
    7. int front; // points to the front of the buffer
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void Buffer::function(QImage *frame)
    2. {
    3. ++front; // Increment front.
    4. if (front == size)
    5. front = 0; // Wrap around.
    6.  
    7. data[front] = frame;
    8. }
    To copy to clipboard, switch view to plain text mode 

    cheers

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Processing and Displaying Image on Widget

    Sure, why not.
    I assume you handle deletion of the QImage pointers somewhere else?

    Cheers,
    _

Similar Threads

  1. Replies: 7
    Last Post: 2nd December 2013, 16:06
  2. image processing
    By IRON_MAN in forum Qt Programming
    Replies: 4
    Last Post: 18th November 2009, 13:37
  3. Image processing
    By NicNac in forum Newbie
    Replies: 25
    Last Post: 2nd November 2008, 10:05
  4. Image processing via matrix
    By jones.79 in forum Qt Programming
    Replies: 10
    Last Post: 22nd September 2008, 00:42
  5. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 18:15

Tags for this Thread

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.