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. Setting the resolution of Camera
Forum Updated to NodeBB v4.3 + New Features

Setting the resolution of Camera

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.3k 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.
  • KiraK Offline
    KiraK Offline
    Kira
    wrote on last edited by
    #1

    Hello All,
    Current i am using opencv and QT to capture image from the camera.
    I am using qtimer with timer.start(1) as one which captures the frame and refreshes the label at rate of one millisec.
    I just need to know what will be the refresh rate of the camera is it the same at which i am refreshing the label or is there any way i can get the frame from camera at its refresh rate and display on label.

    jsulmJ 1 Reply Last reply
    0
    • KiraK Kira

      Hello All,
      Current i am using opencv and QT to capture image from the camera.
      I am using qtimer with timer.start(1) as one which captures the frame and refreshes the label at rate of one millisec.
      I just need to know what will be the refresh rate of the camera is it the same at which i am refreshing the label or is there any way i can get the frame from camera at its refresh rate and display on label.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @Kira The title of your post and it content do not match.
      Refreshing 1000 times per second doesn't make sense. Neither your camera nor your monitor can handle that.
      The refresh rate of your camera is what your camera does and depends on the camera. it doesn't matter how often you read it out.
      Take a look at http://doc.qt.io/qt-5/qcamera.html#setViewfinderSettings

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • KiraK Offline
        KiraK Offline
        Kira
        wrote on last edited by
        #3

        @jsulm : thanks for the reply so is there any way in which i can match the refresh rate of the camera to the rate which i refresh the image of QLabel

        jsulmJ 1 Reply Last reply
        0
        • KiraK Kira

          @jsulm : thanks for the reply so is there any way in which i can match the refresh rate of the camera to the rate which i refresh the image of QLabel

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Kira Can't you use http://doc.qt.io/qt-5/qcameraviewfinder.html instead of manually drawing the frames on a label?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • KiraK Offline
            KiraK Offline
            Kira
            wrote on last edited by
            #5

            @jsulm : Currently as per the requirement i have to use opencv to interface with the camera.
            So i am getting images in form Mat and inorder to display it as a continuous image i am displaying it on label.

            jsulmJ 1 Reply Last reply
            0
            • KiraK Kira

              @jsulm : Currently as per the requirement i have to use opencv to interface with the camera.
              So i am getting images in form Mat and inorder to display it as a continuous image i am displaying it on label.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Kira I never used OpenCV - isn't there some kind of notification if there is a new frame? This way you would not need to synchronise anything.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bludger
                wrote on last edited by
                #7

                Recently I used OpenCV to grab frames from a USB camera. You can use cap.set(CV_CAP_PROP_FPS, 30.0); to set the framerate to what you like/need. That way you don't need to have a timer.

                I would strongly recommend to use Qt's Multimedia framework. It is really easy to use and you can even use OpenCV to process video frames.

                1 Reply Last reply
                1

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved