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. Efficient way to extract pixels from image
Forum Updated to NodeBB v4.3 + New Features

Efficient way to extract pixels from image

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.0k 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.
  • C Offline
    C Offline
    chandrasekhar.embedded
    wrote on last edited by
    #1

    what is the efficient way to extract pixels from image and need to find greatest pixel intensity value and mark that point with red colour from the mouse selected region

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      I would start from QImage, and maybe use the QtConcurrent namespace to extract the intensity for instance. Then a simple max search should allow to determine the pixel you're interested in.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chandrasekhar.embedded
        wrote on last edited by
        #3

        Thank you.

        QPixmap bw = QPixmap(":/dialog/C:/Users/123/Desktop/28-11-2015/crop.png");
        QImage image = bw.toImage();
        ui->dialog_crop->setPixmap(QPixmap::fromImage(image));
        image = image.convertToFormat(QImage::Format_RGB888);
        uchar *bits = image.bits();
        for (int i = 0; i < (image.width() * image.height() * 3); i++)
        {
        if(bits[0]<bits[i])
        {
        bits[0]=bits[i];
        }
        }
        qDebug()<<"maximum intensity pixel="<<bits[0];

        Here in bits[0] is having entire image maximum intensity pixel ,now i need to select with mouse one perticuler region in that region i need to find greatest intensity pixel can anyone please suggest .

        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