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 + OpenCV lib for IOS first configuration failed
Forum Updated to NodeBB v4.3 + New Features

Qt + OpenCV lib for IOS first configuration failed

Scheduled Pinned Locked Moved Solved Mobile and Embedded
24 Posts 4 Posters 6.4k 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.
  • kybernetesK Offline
    kybernetesK Offline
    kybernetes
    wrote on last edited by kybernetes
    #12

    how can i add it to my main.cpp

    0_1531198471916_Ekran Resmi 2018-07-10 07.54.16.png

    as you see when i tried to add by include there is no opencv or opencv2, i appears only opencl-c.h and it is not about me.

    for example "Mat image = imread("/Users/kontrolog/Desktop/test1.png");" if i play this code, what i can add my main.cpp file and how.

    0_1531200071406_Ekran Resmi 2018-07-10 08.21.03.png

    0_1531199422381_Ekran Resmi 2018-07-10 08.10.09.png

    as you see i put opencv2.framework file in opencv dir where is here "/Users/kontrolog/opencv/" and inside of it

    and i put my pri file is also opencv dir

    0_1531200014855_Ekran Resmi 2018-07-10 08.19.55.png

    and inside of my pri file is i add headers line now and i make qmake again project file but it didnt work

    0_1531200131763_Ekran Resmi 2018-07-10 08.21.46.png

    and after it i cleared headers line in pri file and by right click on source add existing file

    0_1531202820037_Ekran Resmi 2018-07-10 09.06.47.png

    i add headers opencv.hpp file from that path "/Users/kontrolog/opencv/opencv2.framework/Versions/A/Headers"

    but it also doesnt work and i take same error again.

    0_1531202947341_Ekran Resmi 2018-07-10 09.08.53.png

    best regards.

    jsulmJ 1 Reply Last reply
    0
    • kybernetesK kybernetes

      how can i add it to my main.cpp

      0_1531198471916_Ekran Resmi 2018-07-10 07.54.16.png

      as you see when i tried to add by include there is no opencv or opencv2, i appears only opencl-c.h and it is not about me.

      for example "Mat image = imread("/Users/kontrolog/Desktop/test1.png");" if i play this code, what i can add my main.cpp file and how.

      0_1531200071406_Ekran Resmi 2018-07-10 08.21.03.png

      0_1531199422381_Ekran Resmi 2018-07-10 08.10.09.png

      as you see i put opencv2.framework file in opencv dir where is here "/Users/kontrolog/opencv/" and inside of it

      and i put my pri file is also opencv dir

      0_1531200014855_Ekran Resmi 2018-07-10 08.19.55.png

      and inside of my pri file is i add headers line now and i make qmake again project file but it didnt work

      0_1531200131763_Ekran Resmi 2018-07-10 08.21.46.png

      and after it i cleared headers line in pri file and by right click on source add existing file

      0_1531202820037_Ekran Resmi 2018-07-10 09.06.47.png

      i add headers opencv.hpp file from that path "/Users/kontrolog/opencv/opencv2.framework/Versions/A/Headers"

      but it also doesnt work and i take same error again.

      0_1531202947341_Ekran Resmi 2018-07-10 09.08.53.png

      best regards.

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

      @kybernetes You should NOT add header files from OpenCV via "Add Existing Files..."!
      You just need to find out where needed header files are. To use Mat you need mat.hpp. It should be somewhere inside Headers directory, simply search for it.

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

      1 Reply Last reply
      0
      • kybernetesK Offline
        kybernetesK Offline
        kybernetes
        wrote on last edited by kybernetes
        #14

        i really thanks to trying help me but i dont know how to add it.

        in my book there is a sample code. so i tried to add "opencv2/opencv.hpp" and writer used this hpp files for OSX, he first qmake the opencv source file than add his program. in my problem it is not for MacOSX for IOS and i download ios pack from opencv website so i couldnt add my project the framework or header files as you see. i think opencv.hpp header is enough for Mat function because of the book. But i can find mat.hpp file it doesnt matter. after i find the file what should i do how can i add header file to my project by not being right click add existing file.

        should i copy the mat.hpp file inside from framework and paste to my project file?

        i really didnt understand how can i add file and this basic program work on ios simulator :)

        thanks.

        0_1531204199142_Ekran Resmi 2018-07-10 09.29.31.png

        i couldnt find mat.hpp file inside of opencv dir. but i find opencv.hpp and copy paste to my project file than i build it.

        0_1531205231607_Ekran Resmi 2018-07-10 09.47.00.png

        ios simulator is worked but it gives an error lite this and i didnt see the picture, program is now worked.

        0_1531205306990_Ekran Resmi 2018-07-10 09.48.14.png

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

          As the error suggest, imshow's backend is not implemented for iOS but that's something you'd have to look with the OpenCV folks.

          On a side note, if you want to show something with your Qt application then QCoreApplication is not the right tool as it doesn't start any graphical backend. It's for command line tools.

          On a side note, loading a file from your main machine Desktop folder also won't work on your device as the file won't be accessible.

          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
          1
          • kybernetesK Offline
            kybernetesK Offline
            kybernetes
            wrote on last edited by
            #16

            about error suggest, i just download opencv ios pack from opencv website as i told so i didnt understand that.

            side note 1: i will change QCoreApplication, i just copied the sample code from the book.

            Side note 2: i thought also as you, i think if i show a picture i should add it to my project file at least. maybe this can be a solution for access the photo

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

              Building OpenCV for iOS by hand or using their pre-built package won't change anything: the highgui doesn't seem to have backend for iOS.

              What exact book are you using ?
              What are you going to use OpenCV for exactly ?

              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
              • kybernetesK Offline
                kybernetesK Offline
                kybernetes
                wrote on last edited by kybernetes
                #18

                this is the book which i use

                https://www.amazon.com/Computer-Vision-OpenCV-multithreaded-cross-platform/dp/178847239X/ref=asap_bc?ie=UTF8

                and i want to use it just because of fast and useful about image proccesing.

                İmage processing is not to much i just want to reach my phone's photo lib, choose photo, crop, rotate and contras it. than make its size smaller but not much effect photo than upload my webserver. that is all i want to. I want to use qml for pages.

                Maybe opencv is too much for my needs but i just dont want to effect photo too much when i resize its size.

                if you advice any other solution i can give up opencv now :) for ios and android at least

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

                  Why not use QImage ?

                  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
                  • kybernetesK Offline
                    kybernetesK Offline
                    kybernetes
                    wrote on last edited by kybernetes
                    #20

                    at the and i will. as i say i was trying to study step by step from book, and i like study from book now the problem how can i use QImage how i can reach file system, how i crop as i want and how i resize etc...

                    where can i learn, i check but not use too much time, there is no qt ios book or there is not a unity education. so how can i learn proffesional and ask only the necessary question.

                    you are so helpful and thank you for that but as you know it is impossible to ask everthing to you, and i am write a game for ios and android before 2 years ago i am not an expert, i have to take help every step of the program to learn good and make a good program.

                    Now i will use QImage we can think that, and i need to use qml to make apperiance more usefull for app.

                    i am asking Qml + QImage + IOS + Android for documantation. I need take photo from iphone photo library, crop it, rotate it, change contras and upload webserver, at this time program has to be flexible for all phones, apperiance has to be same iphone 4 5 6 7 8 10 or android device and it was hard to do 2 years ago when i was trying to write a game.

                    Thanks. please give me an advice than, and i will ask any other problems here.
                    Best regards.

                    jsulmJ 1 Reply Last reply
                    0
                    • kybernetesK kybernetes

                      at the and i will. as i say i was trying to study step by step from book, and i like study from book now the problem how can i use QImage how i can reach file system, how i crop as i want and how i resize etc...

                      where can i learn, i check but not use too much time, there is no qt ios book or there is not a unity education. so how can i learn proffesional and ask only the necessary question.

                      you are so helpful and thank you for that but as you know it is impossible to ask everthing to you, and i am write a game for ios and android before 2 years ago i am not an expert, i have to take help every step of the program to learn good and make a good program.

                      Now i will use QImage we can think that, and i need to use qml to make apperiance more usefull for app.

                      i am asking Qml + QImage + IOS + Android for documantation. I need take photo from iphone photo library, crop it, rotate it, change contras and upload webserver, at this time program has to be flexible for all phones, apperiance has to be same iphone 4 5 6 7 8 10 or android device and it was hard to do 2 years ago when i was trying to write a game.

                      Thanks. please give me an advice than, and i will ask any other problems here.
                      Best regards.

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

                      @kybernetes Take a look at http://doc.qt.io/qt-5/ios-support.html
                      To learn how to develop for iOS you can get a book about iOS development, it is outside of Qt.

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

                      1 Reply Last reply
                      0
                      • kybernetesK Offline
                        kybernetesK Offline
                        kybernetes
                        wrote on last edited by
                        #22

                        no i dont want to write code with xcode, i want to use qt so i need document about Qt ios android, if and advice of a book i preciate it.

                        you are speaking every day with qt developper on mobile systems, i think you can better choose a book, or heared a book name which is so easy and usefull,
                        if you can give advice i will be so happy.

                        Thanks for all

                        jsulmJ 1 Reply Last reply
                        0
                        • kybernetesK kybernetes

                          no i dont want to write code with xcode, i want to use qt so i need document about Qt ios android, if and advice of a book i preciate it.

                          you are speaking every day with qt developper on mobile systems, i think you can better choose a book, or heared a book name which is so easy and usefull,
                          if you can give advice i will be so happy.

                          Thanks for all

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

                          @kybernetes I did not say you have to use XCode. What I mean is: to know all that platform specific details (like plist, file access, ...) you could get a book about iOS development.
                          I don't know any book specifically related to Qt development for iOS.

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

                          1 Reply Last reply
                          0
                          • kybernetesK Offline
                            kybernetesK Offline
                            kybernetes
                            wrote on last edited by kybernetes
                            #24

                            ok than we couldnt find a way to make it usefull qt + opencv for ios and i will change solved the title because there is no way to make me this :)

                            Please let me know if there is a good book for qt mobile especially for ios but also android let me know.

                            Best regards.

                            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