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. QCamera, Manual exposure not effective even if available
Forum Updated to NodeBB v4.3 + New Features

QCamera, Manual exposure not effective even if available

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 353 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.
  • P Offline
    P Offline
    Pax_1601
    wrote on last edited by
    #1

    Hello everyone!

    I'm writing a software to perform head tracking using IR LEDs and gyro/accelerometers. To capture the IR LEDs, I've modified a webcam, removing the IR filter and adding a visible light filter. Since the picture is mostly black with only three white spots, autoexposure must be disabled. I can successfully disable autoexposure with other software (I've used this setup for years for head tracking with an other software called FreeTrack), but I can't achieved it with Qt and a QCamera object. My code is the following:

        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
        foreach (const QCameraInfo &cameraInfo, cameras) {
            qDebug() << cameraInfo.deviceName();
            camera = new QCamera(cameraInfo);
        }
    
        viewfinder = new QCameraViewfinder();
    
        camera->setViewfinder(viewfinder);
        setCentralWidget(viewfinder);
    
        viewfinder->show();
    
        camera->exposure()->setExposureMode(QCameraExposure::ExposureManual);
        camera->exposure()->setManualShutterSpeed(32);   
        camera->start();
    

    I know that right now the iterator is useless but I'm in early testing stage and I only have one webcam connected.

    I have tested that manual exposure is available, and the shutter speed I have set is among the supported ones.
    The strange thing is that if I disable autoexposure from FreeTrack and then run my software, it remains disabled (I guess the webcam retains the settings). If I query the current shutter speed after performing this operation, I get a value of 32. But if I try to run the code above without first using FreeTrack, exposure remains automatic. Moreover, if I enable manual exposure from FreeTrack and then run the code above setting any shutter speed different from 32 (even if among the supported ones) the webcam starts behaving oddly with extremely long shutter speed (in the order of seconds).

    Can anybody help me understand if I'm doing something wrong? It looks like manual exposure is available but somehow I am not able to access it. I have not found many examples of working manual exposure. I have also tested the provided camera example, but I can not access the video settings page.

    Thank you for your help!

    Kind regards,
    Davide

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

      Hi and welcome to devnet,

      What OS are you on ?
      What version of Qt are you using ?
      Did you check that the exposure control is available ?

      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