FLIR One Developer / Blog / Topics / iOS / FLIR One iOS SDK and OpenCV

FLIR One iOS SDK and OpenCV

Home Forums FLIR One developer community General discussion FLIR One iOS SDK and OpenCV

Tagged: 

This topic contains 10 replies, has 8 voices, and was last updated by Profile photo of tayadil tayadil 3 weeks, 1 day ago.

Viewing 11 posts - 1 through 11 (of 11 total)

  • Author

    Posts

  • #3700

    Profile photo of John Jackson
    John Jackson

    Participant

    This might be beating a dead horse, but I’m interested in a workaround for using the OpenCV Framework with the FLIR One iOS SDK. I’ve been told by FLIR that a workaround exists that involves fixing namespace conflicts in OpenCV and recompiling, but what those namespaces are I do not know.

    My app crashes only when two things are true: 1) I build my project with the OpenCV Framework, and 2) The FLIR One dongle is connected and powered on to my device. I do not get any compilation-time errors or warnings. Here are pastebins of the crashlogs:

    http://pastebin.com/gQ9bLMJq – iap2d process
    http://pastebin.com/rNWU0abt – application process

    If anyone has any knowledge of workarounds, please share it with the community. Modifying and recompiling OpenCV is possible only if we know the culprit namespaces. Thanks!

    #3820

    Profile photo of Shamus
    Shamus

    Participant

    Hi. I have OpenCV working with my FLIR ONE. I tried (and gave up) trying to integrate the FLIR framework into OpenCv but have succeeded by taking the FLIR ONE iOS example and adding in the OpenCV framework. As for namespaces, I have the following in my viewcontroller.h
    #import <opencv2/imgcodecs/ios.h>
    #import <opencv2/videoio/cap_ios.h>
    #import <opencv2/opencv.hpp>
    using namespace cv;

    Shamus

    #3821

    Profile photo of John Jackson
    John Jackson

    Participant

    Hi Shamus,

    Your solution didn’t work for me, but I messed around a bit more and found such an easy temporary fix:

    Make sure the OpenCV Framework is lower in the Linked Frameworks and Libraries List than the FLIROneSDK Framework.

    I am able to perform image processing just fine using the FLIR SDK and the OpenCV library. Hope this works for everyone else.

    #3826

    I spent some time with this and the opencv-demo. Thats an hour of my life i will never get back…
    iOS simulator doesn’t build
    it doesn’t matter which version, all fail to compile
    I tried it on iPod and iPhone5 and iPhone5s and iPhone6 plus and iPhone6s and iPad air 2 and iPad pro… all crashed

    temporary fix

    WADR, why is it temporary?

    #3840

    Profile photo of John Jackson
    John Jackson

    Participant

    IJ, because I believe that the order of the included Frameworks in the Linked Frameworks and Libraries List doesn’t normally affect the build (at least, I haven’t found anything yet that suggests it does).

    Sorry to hear about your other issues, I’ve found that following the SDK docs to the nose will normally get things up and running.

    #3905

    Profile photo of Cal Loo
    Cal Loo

    Moderator

    John, Shamus, and IJ,

    We’ve been aware of the Open CV issue for quite some time and we do have plans to fix it in a future release of the SDK. Fixing it is more complex than it would seem but we’ll get there. We’ve been helping developers work around it for the past year at our hackathons and I’m glad you’ve been able to figure out workarounds of your own. Apologies, the fix is coming.

    Cal

    #4943

    Profile photo of Thomas
    Thomas

    Participant

    after some terrible tests:

    If I compile myself the opencv2.framework (version 2.4.13) with this instruction
    http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html
    and link it in the SDK sample,
    then Xcode can compile the SDK sample and the app runs fine.

    But if I take an image the app chrashes with:
    FLIROneSDKExamplejpeg_suppress_tables:
    EXC_BAD_ACCESS

    ———–
    You can avoid this crash (while taking an image) with the runtime version of opencv2.framework:

    DOWNLOADS


    https://github.com/opencv/opencv/releases
    OpenCV 2.4.13 opencv2.framework.zip

    • This reply was modified 3 years ago by Profile photo of Thomas Thomas.

    #10025

    Profile photo of Tim
    Tim

    Participant

    Hi – I downloaded the developer SDK and tried to compile the xcode project FLIROneSDKExampleApp. I just opened the xcode project that was in the downloaded folder and tried to compile it. I get over 100 errors, all relating to something called atlas. Does anyone know what this is? I would have thought an example code would compile without issues.

    #10026

    Profile photo of Gavin
    Gavin

    Keymaster

    Hey Tim,

    Check if the framework is linked properly, as the file names will be different. If this isn’t the problem, let me know and I’ll take a look at the errors.

    Thanks,
    Gavin
    FLIR One Community Support

    #10027

    Profile photo of Tim
    Tim

    Participant

    Hi Gavin

    Thanks for your reply. I found out the problem on another post. Xcode was compiling for the default simulator. When I connect an iPhone and compile to that, it all works fine and I am now able to control the FLIR (the radiometer function is really very good – an impressive little unit!)

    I guess Xcode uses different libraries when it compiles for the simulator – a trap for beginners!

    Best

    Tim

    #10057

    Profile photo of tayadil
    tayadil

    Participant

    I just opened the xcode project that was in the downloaded folder and tried to compile it. I get over 100 errors, all relating to something called atlas. Does anyone know what this is?

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.