FLIR One Developer / Blog / Topics / android, image, ONE / Color only (or thermal only) library problem

Color only (or thermal only) library problem

Home Forums Android development Installation and getting started Color only (or thermal only) library problem

Tagged: , ,

This topic contains 6 replies, has 4 voices, and was last updated by Profile photo of Mike Daoust Mike Daoust 2 years, 6 months ago.

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

  • Author

    Posts

  • #4985

    Profile photo of Roger
    Roger

    Participant

    Hi
    I am trying to use the .aar in an exising Android Studio Project
    (I also tried it with Eclipse extracting .aar components by hand but for now I’ll stick with Studio)

    When I build an existing application that I include the .aar file in I get strange results.
    On a Galaxy S5 the only image I get back from the FLIR One is the Colour overview camera (I cannot get a MSX image). On an older Galaxy S3 all I get back is a greyscale Thermal, never a colour thermal or edge detection overlay.

    If I build the sample on Android Studio it works, but when I copy the Preview Activity over to my own application (along with the xml resources) and call that Activity I get just the colour overview camera on the S5.

    I wonder if there is suble dependency on a gradle scrip or a particular Andrroid Build Tools version that is needed.

    #5024

    Profile photo of Chris
    Chris

    Participant

    I would like to say I see this extremely strange problem too. I have an Galaxy S3, and the FLIRONEExampleApplication build and works fine with MSX (though it definitely crash after suspending).
    I can observe that MSX processing is resulting in the log: Rendered image dimensions: 340x454, size=617440
    but in another app I build it is always Rendered image dimensions: 240x320, size=307200 which is indicating it is not really doing MSX anyway. But it does say

    
    D/JNI: typesBitMask=36
    01-06 02:39:38.616 24371-25019/com.epc.thermon V/JNI: Doing MSX...
    01-06 02:39:38.631 24371-24963/com.epc.thermon W/RDW: (52afe930)[    NativeThermalImage.cpp: 228        setTelemetryFromRawData]: No telemetry data received!
    

    note that this problem also exist when using the simulator.
    I am using SDK version SDK 1.2.8

    #5025

    Profile photo of Roger
    Roger

    Participant

    I eventually tracked down the cause of the issue.
    Elsewhere in the logcat I noticed it was complaining about Palette Files not being loaded.

    In the end I think I had two problems that seemed to cause me problems.
    One was a bad conversion of my base project from Eclipse to Android Studio. Android Studio merges all the manifest files whereas Eclipse did not. This meant that I ended up with an APK where the FLIR libs were not in the correct folder.
    The other was that my app had existing native code (NDK). In the end I make a build that did not have any native code in (swapping some C functions for much slower Java functions).

    Either way I did get it working and now have thermal MSX images on the S3 and S5.

    #5027

    Profile photo of Chris
    Chris

    Participant

    Thank you for your quick reply Roger. Your information indeed helped me for fixing my issue. But I have a different situation. I did not see “Palette Files not being loaded”. My project has no native code too. I ended up with two Android Studio projects, with identical code, gradle scripts, project settings (toolchain ver., target API etc). But then the one derived from the SDK works, but the other I built following the tutorial (e.g. https://developer.flir.com/training-videos/) does not. This is really getting subtle that puzzles me deeply. I know I must be missing some piece of knowledge here. I did not bother to find out the exact difference eventually… as long as my project works. I am writing here to share my experience, and the fact that it is not as simple as “just including the .aar”.

    #5243

    Profile photo of Sinan
    Sinan

    Participant

    I am having the same problem as Chris. I did not see “Palette Files not being loaded” no native code as well. I ended up copying my own code to sample app and it works. However we have bigger project and copying might not be the answer.

    Radiometric image works same in two cases.
    Rendered image dimensions: 480×640, size=1228800 in both
    only reasonable error in logcat: dlopen failed: could not load library “libthermalcamera_client.so” needed by “libmbwrapper.so” caused by library “libthermalcamera_client.so” not found. Also this error exists in both.

    I have checked exploded-aar folder and libthermalcamera_client.so is missing there as well. Nay help is appreciated this problem puzzles me a lot.

    #5267

    Profile photo of Sinan
    Sinan

    Participant

    My problem is solved. For a reason I had to move my project from my PC to a Laptop, and thermal image started to show. There is no code difference only android tools differ.
    PC
    Gradle: 2.14.1
    BuildTools: 25.0.2
    Studio: 2.2.3
    Laptop
    Gradle: 3.3
    BuildTools: 25.0.3
    Studio: 2.3.1
    I will update my PC soon (don’t know when), I will try to update the topic if updating fixes.

    • This reply was modified 2 years, 6 months ago by Profile photo of Sinan Sinan.
    • This reply was modified 2 years, 6 months ago by Profile photo of Sinan Sinan.

    #5306

    Profile photo of Mike Daoust
    Mike Daoust

    Participant

    I am also having an identical problem, wherein only the color image will appear while specifically requesting the BlendedMSXRGBA8888Image. The returned RenderedImage indeed has the imageType of BlendedMSXRGBA8888Image, but the displayed result is clearly a color image.

    I have tried with the following phones:
    Galaxy S6
    Galaxy S5
    Cat S60
    Nexus 6

    And the following configurations in every permutation:
    Android Studio 2.3.1, Android Studio 2.3.2
    Build Tools 25.0.0, 25.0.3
    Gradle 3.3, 3.5 and 2.14.1

    I have tried building the project from both of our work desktops as well as my laptop.

    Previous applications we have developed are all working correctly, even when freshly built in Android Studio. The Example Application also works, which led me to believe that the issue must be a software side issue.

    However, after copying and pasting the Example Application code in its entirety, I have found that the issue persists.

    I’ve about run out of ideas at this point. So if anybody has any more clues here, please do let me know.

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

You must be logged in to reply to this topic.