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. QImage to yCrCb image
Qt 6.11 is out! See what's new in the release blog

QImage to yCrCb image

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 428 Views 2 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    I need a way to fill a yCrCb image with a QImage object. How can I do this? How have I to fill the code below?

    /* Y */
    for (int y = 0; y < height; y+= 2) {
        for (int x = 0; x < width; x+= 2) {
            pict->data[0][y * pict->linesize[0] + x] = ???;
        }
    }
    /* Cb and Cr */
    for (int y = 0; y < height / 2; y++) {
        for (int x = 0; x < width / 2; x++) {
            pict->data[1][y * pict->linesize[1] + x] = ???;
            pict->data[2][y * pict->linesize[2] + x] = ???;
        }
    }
    

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What algorithm are you currently using for the color space conversion ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        None.
        I'm stop at

        QImage QITemp= Image.convertToFormat(QImage::Format_RGB888);
        

        An now?

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You have the math here.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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