Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create a QImage from an average of ten others
Forum Updated to NodeBB v4.3 + New Features

How to create a QImage from an average of ten others

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    astodolski
    wrote on last edited by
    #1

    Is there method for creating 10 QImages and creating an average of them? The append method for QByteArray changes the size of the array. Has anyone done this within Qt? I know there may be a solution using perhaps the STL or even SIMD instructions. Just want to do it solely in Qt.

    Thanks

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      The QImage is able to return a color or pixel value for every pixel it contains. Think the math for the average you should do yourself. Then use the setPixel etc to create a new average QImage.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • A Offline
        A Offline
        astodolski
        wrote on last edited by
        #3

        [quote author="Jeroentje@home" date="1408517326"]The QImage is able to return a color or pixel value for every pixel it contains. Think the math for the average you should do yourself. Then use the setPixel etc to create a new average QImage.
        [/quote]

        Thanks.

        If I understand what you wrote, you are suggesting doing the average of all the pixels in one image at a time? That's not what I asked and the math is NOT the issue. It seems that the approach will be employing some vector methods or MMX (SIMD) calls.

        Thanks anyway for replying

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          Just for my curiosity, but what do you mean with average of 10 images?

          Greetz, Jeroen

          1 Reply Last reply
          0
          • A Offline
            A Offline
            astodolski
            wrote on last edited by
            #5

            [quote author="Jeroentje@home" date="1408540940"]Just for my curiosity, but what do you mean with average of 10 images?[/quote]

            10 frames captured on command from streaming video, each frame converted to QImage.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved