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. Camera usb

Camera usb

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 2 Posters 934 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.
  • DQUY05D Offline
    DQUY05D Offline
    DQUY05
    wrote on last edited by
    #1

    Hi !

    I try to find out and connect the external camera via usb hub on android, but the device is not detected, while I use some apps on Google play, it still opens this external camera, this topic has a lot of questions. Many people ask, but so far there is no solution, I hope everyone can help me

        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
        foreach (const QCameraInfo &cameraInfo, cameras)
        {
            ui->textEdit->setText(ui->textEdit->toPlainText()+","+cameraInfo.deviceName()+":"+cameraInfo.orientation()+"\n");
        }
    

    Thanks!

    DQUY05D 1 Reply Last reply
    0
    • DQUY05D DQUY05

      Hi !

      I try to find out and connect the external camera via usb hub on android, but the device is not detected, while I use some apps on Google play, it still opens this external camera, this topic has a lot of questions. Many people ask, but so far there is no solution, I hope everyone can help me

          QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
          foreach (const QCameraInfo &cameraInfo, cameras)
          {
              ui->textEdit->setText(ui->textEdit->toPlainText()+","+cameraInfo.deviceName()+":"+cameraInfo.orientation()+"\n");
          }
      

      Thanks!

      DQUY05D Offline
      DQUY05D Offline
      DQUY05
      wrote on last edited by
      #2

      Hi,

      During my research, I found that there is a Libuvc library (https://github.com/libuvc/libuvc) that solves the problem, but the build process is quite complicated, because I use MinGw-64bit, there is a possibility of incompatibility (in the example, MSVC2019), there is who has worked on this topic please help me

      Many thanks!

      Pablo J. RoginaP 1 Reply Last reply
      0
      • DQUY05D DQUY05

        Hi,

        During my research, I found that there is a Libuvc library (https://github.com/libuvc/libuvc) that solves the problem, but the build process is quite complicated, because I use MinGw-64bit, there is a possibility of incompatibility (in the example, MSVC2019), there is who has worked on this topic please help me

        Many thanks!

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @DQUY05 said in Camera usb:

        but the build process is quite complicated, because I use MinGw-64bit

        Mmm, it looks like your mixing things here.
        If you look to build this library libuvc for Android, you'll need to use Android NDK

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        DQUY05D 1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @DQUY05 said in Camera usb:

          but the build process is quite complicated, because I use MinGw-64bit

          Mmm, it looks like your mixing things here.
          If you look to build this library libuvc for Android, you'll need to use Android NDK

          DQUY05D Offline
          DQUY05D Offline
          DQUY05
          wrote on last edited by DQUY05
          #4

          @Pablo-J-Rogina said in Camera usb:

          Mmm, it looks like your mixing things here.
          If you look to build this library libuvc for Android, you'll need to use Android NDK

          Thanks for your support
          yes, I am confused with MinGw, I have android NDK as shown below,

          ![alt text](e2a6a93b-bf12-498e-a28a-b50e48c66d3f-image.png image url)

          But with libuvc, when building with cmake, there is part of MSVC2019 request, like in cmakeError file, while my MSVC is getting some impossible errors fix, also i want to ask, is there any other way to reach 1 camera outside the phone? i need to use it with openCV, is IP camera possible?

          Build started 16/10/2021 10:48:10 AM.
          Project "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
          PrepareForBuild:
            Creating directory "Debug\".
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(449,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
            Creating directory "Debug\CompilerIdC.tlog\".
          InitializeBuildStatus:
            Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
          ClCompile:
            C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
            CMakeCCompilerId.c
          Link:
            C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
          LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
          Done Building Project "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
          
          Build FAILED.
          
          "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
          (PrepareForBuild target) -> 
            C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(449,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
          
          
          "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
          (Link target) -> 
            LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
          
              1 Warning(s)
              1 Error(s)
          

          Many thanks !

          Pablo J. RoginaP 1 Reply Last reply
          0
          • DQUY05D DQUY05

            @Pablo-J-Rogina said in Camera usb:

            Mmm, it looks like your mixing things here.
            If you look to build this library libuvc for Android, you'll need to use Android NDK

            Thanks for your support
            yes, I am confused with MinGw, I have android NDK as shown below,

            ![alt text](e2a6a93b-bf12-498e-a28a-b50e48c66d3f-image.png image url)

            But with libuvc, when building with cmake, there is part of MSVC2019 request, like in cmakeError file, while my MSVC is getting some impossible errors fix, also i want to ask, is there any other way to reach 1 camera outside the phone? i need to use it with openCV, is IP camera possible?

            Build started 16/10/2021 10:48:10 AM.
            Project "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
            PrepareForBuild:
              Creating directory "Debug\".
            C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(449,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
              Creating directory "Debug\CompilerIdC.tlog\".
            InitializeBuildStatus:
              Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
            ClCompile:
              C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
              CMakeCCompilerId.c
            Link:
              C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
            LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
            Done Building Project "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
            
            Build FAILED.
            
            "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
            (PrepareForBuild target) -> 
              C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(449,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
            
            
            "C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
            (Link target) -> 
              LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\libuvc\libuvc\build\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj]
            
                1 Warning(s)
                1 Error(s)
            

            Many thanks !

            Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by Pablo J. Rogina
            #5

            @DQUY05 said in Camera usb:

            there is part of MSVC2019 request

            I'm not familiar with building Android libraries under Windows OS, sorry.
            However, it looks like you're not building for Android anyway, see from the build output you posted:

             /MACHINE:X64
            

            is there any other way to reach 1 camera outside the phone?

            You may want to look at this project UVCCamera

            i need to use it with openCV

            You may want to look at this project OpenCVwithUVC

            Upvote the answer(s) that helped you solve the issue
            Use "Topic Tools" button to mark your post as Solved
            Add screenshots via postimage.org
            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

            DQUY05D 2 Replies Last reply
            0
            • Pablo J. RoginaP Pablo J. Rogina

              @DQUY05 said in Camera usb:

              there is part of MSVC2019 request

              I'm not familiar with building Android libraries under Windows OS, sorry.
              However, it looks like you're not building for Android anyway, see from the build output you posted:

               /MACHINE:X64
              

              is there any other way to reach 1 camera outside the phone?

              You may want to look at this project UVCCamera

              i need to use it with openCV

              You may want to look at this project OpenCVwithUVC

              DQUY05D Offline
              DQUY05D Offline
              DQUY05
              wrote on last edited by
              #6

              @Pablo-J-Rogina said in Camera usb:

              @DQUY05 said in Camera usb:

              there is part of MSVC2019 request

              I'm not familiar with building Android libraries under Windows OS, sorry.
              However, it looks like you're not building for Android anyway, see from the build output you posted:

               /MACHINE:X64
              

              is there any other way to reach 1 camera outside the phone?

              You may want to look at this project UVCCamera

              i need to use it with openCV

              You may want to look at this project OpenCVwithUVC

              hi
              Thank you for your support
              About android app, I still use it normally
              About OpenCVwithUVC, I will try it and let you know when I have the results
              Many thanks!

              1 Reply Last reply
              0
              • Pablo J. RoginaP Pablo J. Rogina

                @DQUY05 said in Camera usb:

                there is part of MSVC2019 request

                I'm not familiar with building Android libraries under Windows OS, sorry.
                However, it looks like you're not building for Android anyway, see from the build output you posted:

                 /MACHINE:X64
                

                is there any other way to reach 1 camera outside the phone?

                You may want to look at this project UVCCamera

                i need to use it with openCV

                You may want to look at this project OpenCVwithUVC

                DQUY05D Offline
                DQUY05D Offline
                DQUY05
                wrote on last edited by
                #7

                @Pablo-J-Rogina said in Camera usb:

                @DQUY05 said in Camera usb:

                there is part of MSVC2019 request

                I'm not familiar with building Android libraries under Windows OS, sorry.
                However, it looks like you're not building for Android anyway, see from the build output you posted:

                 /MACHINE:X64
                

                is there any other way to reach 1 camera outside the phone?

                You may want to look at this project UVCCamera

                i need to use it with openCV

                You may want to look at this project OpenCVwithUVC

                hi,
                Sorry, because this project path is android studio java, I don't have knowledge in this field, still looking forward to Qt example

                Many thanks!

                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