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. Flipping the live feed using QCamera

Flipping the live feed using QCamera

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 693 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.
  • S Offline
    S Offline
    sulabh
    wrote on last edited by
    #1

    I have the Qlabel widget(object name = label_2) on the mainwindow. I display the live feed from camera on this widget. Everything is working fine. However i am wondering how can i change the orientation of live feed (say i want to flip it by 90°).

        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
    foreach (const QCameraInfo &cameraInfo, cameras)
    {
        if (cameraInfo.deviceName() == "@device:pnp:\\\\?\\pci#ven_109e&dev_036e&subsys_00000000&rev_11#5&12a6b002&0&000008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global")
            cM2 = new QCamera(cameraInfo, this);
    }
    cV2 = new QCameraViewfinder(this);
    cM2->setViewfinder(cV2);
    cBox2 = new QVBoxLayout();
    cBox2->addWidget(cV2);
    ui->label_2->setLayout(cBox2);
    cM2->start();
    
    J.HilkJ 1 Reply Last reply
    0
    • S sulabh

      I have the Qlabel widget(object name = label_2) on the mainwindow. I display the live feed from camera on this widget. Everything is working fine. However i am wondering how can i change the orientation of live feed (say i want to flip it by 90°).

          QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
      foreach (const QCameraInfo &cameraInfo, cameras)
      {
          if (cameraInfo.deviceName() == "@device:pnp:\\\\?\\pci#ven_109e&dev_036e&subsys_00000000&rev_11#5&12a6b002&0&000008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global")
              cM2 = new QCamera(cameraInfo, this);
      }
      cV2 = new QCameraViewfinder(this);
      cM2->setViewfinder(cV2);
      cBox2 = new QVBoxLayout();
      cBox2->addWidget(cV2);
      ui->label_2->setLayout(cBox2);
      cM2->start();
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @sulabh
      Have you taken a look into the docu yet?

      QCameraViewfinder

      Search for "rotation"


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      S 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @sulabh
        Have you taken a look into the docu yet?

        QCameraViewfinder

        Search for "rotation"

        S Offline
        S Offline
        sulabh
        wrote on last edited by
        #3

        @J.Hilk HIii. yes i have gone through the class it does not support any kind of rotation or transformation

        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