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. Using QCamera WITHOUT Viewfinder
Forum Updated to NodeBB v4.3 + New Features

Using QCamera WITHOUT Viewfinder

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

    Alright, so I can update this later with code snippets, etc. if needed, but I'm hoping by describing the issues someone may have an idea of what I am doing wrong and so far searching for the solution many, many times hasn't yielded an answer.

    I have a program I am trying to write on a very basic older raspberry pi that won't even have a monitor connected in normal use and that will take pictures WITHOUT anyone needing to see the image beforehand. I have been trying to get it to use a QCamera object to take a single still image at a time. I've been trying to modify the https://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-camera-example.html Camera example and reading the documentation at https://doc.qt.io/qt-5/cameraoverview.html and getting nowhere.

    The QT5 camera example works perfectly in everyway. What I need is for the camera to stay on the way it does in the example, so that the hardware automatically focuses as scenery changes, and just take a picture every X seconds. I don't need a visible widget viewfinder. I just want to be able to take still images every X seconds, while leaving the camera technically on so that the hardware within the camera can constantly adjust focus, etc. while it just pauses to save an image when told to.

    Basically, just like in the QT5 camera example I just want the camera to sit there, reading image data, until it gets a function call, (rather than a mouse click) to take an image, and then go back to just sitting there ready for images, without actually displaying anything. I don't know why, but I can't figure out how to get that to work. I've gotten it to the point where it checks for a camera, even get a message along the lines of "Starting C920 with no viewfinder" or something very similar (not at main computer), but the lights never turn on and it never takes any images.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      In the camera example, I just comment

      //m_camera->setViewfinder(ui->viewfinder);
      

      So there is no preview, then the "Capture Photo" button still works as expect.
      I don't think with/without viewfinder is the problem.

      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