Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. My own viewfinder for QCamera

My own viewfinder for QCamera

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 562 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.
  • G Offline
    G Offline
    Gourmet
    wrote on 19 Nov 2019, 16:52 last edited by Gourmet
    #1

    I need implement in my app the still image capture. But it must not take and save entire image - but only even square from frame center. Therefore I need make visible only square part in viewfinder. Or at least draw yellow square over it. In docs I read next sentence:

    For advanced usage (like processing viewfinder frames as they come, to detect objects or patterns), you can also derive from QAbstractVideoSurface and set that as the viewfinder for the QCamera object. In this case you will need to render the viewfinder image yourself.

    I do not see quite clear - is this required if I just need draw something over QCameraViewfinder. If yes - then I need more description of how to "render the viewfinder image" by myself. Did anybody investigate this case? Is there any sample application showing how to render viewfinder? In supplied examples I only found simple apps with catching camera - but they do not render viewfinder.

    J 1 Reply Last reply 20 Nov 2019, 05:56
    0
    • G Gourmet
      19 Nov 2019, 16:52

      I need implement in my app the still image capture. But it must not take and save entire image - but only even square from frame center. Therefore I need make visible only square part in viewfinder. Or at least draw yellow square over it. In docs I read next sentence:

      For advanced usage (like processing viewfinder frames as they come, to detect objects or patterns), you can also derive from QAbstractVideoSurface and set that as the viewfinder for the QCamera object. In this case you will need to render the viewfinder image yourself.

      I do not see quite clear - is this required if I just need draw something over QCameraViewfinder. If yes - then I need more description of how to "render the viewfinder image" by myself. Did anybody investigate this case? Is there any sample application showing how to render viewfinder? In supplied examples I only found simple apps with catching camera - but they do not render viewfinder.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Nov 2019, 05:56 last edited by
      #2

      @Gourmet said in My own viewfinder for QCamera:

      I just need draw something over QCameraViewfinder

      You could simply put a transparent widget over view finder and draw on it.

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

      G 1 Reply Last reply 20 Nov 2019, 11:28
      0
      • J jsulm
        20 Nov 2019, 05:56

        @Gourmet said in My own viewfinder for QCamera:

        I just need draw something over QCameraViewfinder

        You could simply put a transparent widget over view finder and draw on it.

        G Offline
        G Offline
        Gourmet
        wrote on 20 Nov 2019, 11:28 last edited by
        #3

        @jsulm I thought about this. Did you implement this by yourself or just think too?

        Without visible result it QtDesigner it is not so easy to implement. Therefore I have another question. In camera example it has QCameraViewfinder widget on the UI form. But there is no such Designer plugin. It is not available in Designer widgets palette. How did they do this? Manually edited UI file? Or they... have this plugin but do not provide it with Qt?

        J 1 Reply Last reply 20 Nov 2019, 11:39
        0
        • G Gourmet
          20 Nov 2019, 11:28

          @jsulm I thought about this. Did you implement this by yourself or just think too?

          Without visible result it QtDesigner it is not so easy to implement. Therefore I have another question. In camera example it has QCameraViewfinder widget on the UI form. But there is no such Designer plugin. It is not available in Designer widgets palette. How did they do this? Manually edited UI file? Or they... have this plugin but do not provide it with Qt?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Nov 2019, 11:39 last edited by
          #4

          @Gourmet I guess they used the "Promote to ..." function in designer.

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

          G 1 Reply Last reply 20 Nov 2019, 11:43
          0
          • J jsulm
            20 Nov 2019, 11:39

            @Gourmet I guess they used the "Promote to ..." function in designer.

            G Offline
            G Offline
            Gourmet
            wrote on 20 Nov 2019, 11:43 last edited by Gourmet 12 Feb 2019, 15:07
            #5

            @jsulm hm... I have my own 25 Designer plugins with complex widgets but forget about this option.

            1 Reply Last reply
            0

            5/5

            20 Nov 2019, 11:43

            • Login

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