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. QT using OpenCV and camera with mobile phone
Forum Updated to NodeBB v4.3 + New Features

QT using OpenCV and camera with mobile phone

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
16 Posts 5 Posters 5.5k Views 3 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.
  • GTDevG Offline
    GTDevG Offline
    GTDev
    wrote on last edited by
    #4

    You can add configuration blocks to the .pro file of your project for platform-specific settings, e.g. like this:

    android {
      # put settings here for Android configuration
    }
    
    ios {
      # put settings here for iOS configuration
    }
    

    You can use this feature to link different libraries for each platform (there are also conditions for other platforms, e.g. win32, macx, ...)

    Best,
    GT

    Senior Developer at Felgo - https://felgo.com/qt

    Develop mobile Apps for iOS & Android with Qt
    Felgo is an official Qt Technology Partner

    1 Reply Last reply
    3
    • D Offline
      D Offline
      Domididongo
      wrote on last edited by Domididongo
      #5

      I have now added this:

      osx{

      INCLUDEPATH += /usr/local/Cellar/opencv3/3.2.0/include/
      LIBS += -L/usr/local/Cellar/opencv3/3.2.0/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_flann -lopencv_features2d -lopencv_imgcodecs -lopencv_ml -lopencv_video -lopencv_videoio
      }

      ios{
      LIBS +=
      -F /usr/local/Frameworks/ios
      -framework opencv2

      }

      for the OS X part it works fine. But for the IOS it tells me:
      .../opencv2 does not contain bitcode.Your must rebuild it with bitcode enabled (Xcode setting EBALE_BITCODE).

      I tried to open the gilded Xcode project and set the Enable Bitcode to NO. But it won't help

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

        Hi,

        Did you compile OpenCV for iOS ?

        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
        • D Offline
          D Offline
          Domididongo
          wrote on last edited by
          #7

          I builded the framework like it was said here.

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

            Which version of Xcode are you using ?

            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
            • D Offline
              D Offline
              Domididongo
              wrote on last edited by Domididongo
              #9

              I am using Xcode version 8.2.1 and cmake version 3.6.2

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

                cmake or qmake ?

                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
                • D Offline
                  D Offline
                  Domididongo
                  wrote on last edited by
                  #11

                  cmake! for building the framework. The QT version I am using is QT5.8.0

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

                    Ok

                    As for the bitcode problem, I'd modify their python script to ensure that it's building with bitcode enabled.

                    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
                    • D Offline
                      D Offline
                      Domididongo
                      wrote on last edited by
                      #13

                      I looked in the '.../opencv/platforms/ios/build_framework.py' file. But which line should I change to enable Bitcode.

                      In line 47 is the class Builder, if I change 'self.bitcodedisabled = bitcodedisabled' to 'self.bitcodedisabled = 0' should that work?

                      jsulmJ 1 Reply Last reply
                      0
                      • D Domididongo

                        I looked in the '.../opencv/platforms/ios/build_framework.py' file. But which line should I change to enable Bitcode.

                        In line 47 is the class Builder, if I change 'self.bitcodedisabled = bitcodedisabled' to 'self.bitcodedisabled = 0' should that work?

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

                        @Domididongo said in QT using OpenCV and camera with mobile phone:

                        self.bitcodedisabled = 0

                        self.bitcodedisabled = False
                        

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

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          Domididongo
                          wrote on last edited by
                          #15

                          So I changed now in line 276:
                          parser.add_argument('--disable-bitcode', default=False, dest='bitcodedisabled', action='store_false', help='disable bitcode (enabled by default)')

                          the action='store_true' to action='store_false',

                          and in line 58:
                          self.bitcodedisabled = bitcodedisabled to self.bitcodedisabled = False

                          but still getting the same error:
                          does not contain bitcode...

                          is there somewhere else something i have to change?

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

                            Try adding set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode") to the iOS.cmake file.

                            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