FLIR One Developer / Blog / Topics / temperature range / Trouble when setting temperature range "O to 400 Celcius"

Trouble when setting temperature range "O to 400 Celcius"

Home Forums FLIR Mobile SDK Development Android Development Trouble when setting temperature range "O to 400 Celcius"

This topic contains 5 replies, has 3 voices, and was last updated by Profile photo of Masashi Masashi 4 months, 4 weeks ago.

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

  • Author

    Posts

  • #11947

    Profile photo of Hung
    Hung

    Participant

    I bought an Android Flir One Pro last week and developing an Android app.

    I’m trying to set Temperature range from “O to 400 Celcius” scene like official “Flir One” app is doing.

    I have tried different methods such as “setThermalFusionAbove(0, TemperatureUnit.CELSIUS)”, “setThermalFusionBelow(400, TemperatureUnit.CELSIUS)” or “getScale().setRange(0, 400)” for “ThermalImage” object but it didn’t give out temperature value like “Flir One” app does.

    Is it SDK bug or am I using wrong methods? Please help! Many thanks!

    • This topic was modified 6 months, 4 weeks ago by Profile photo of Hung Hung.
    • This topic was modified 6 months, 4 weeks ago by Profile photo of Hung Hung.

    #11988

    Profile photo of Gavin
    Gavin

    Keymaster

    Hi Hung,

    What specifically do you mean by “didn’t give out temperature value like FLIR One App does”. Is it not giving values at all?

    Gavin
    FLIR Community Support

    #11992

    Profile photo of Hung
    Hung

    Participant

    Hi Gavin,

    so, in “Flir One” app, I added a Spot in the center. Then, I set temperature range 0 ~ 400 Celcius. Then, it reads my face temperature around 38, 39 Celcius at the spot.

    But in my own app it reads my face temperature around 33 Celcius which is very low.
    Here is what I coded which is almost copied from SDK sample code except Fusion, Palette settings

    
        private final Camera.Consumer<ThermalImage> handleIncomingImage = new Camera.Consumer<ThermalImage>() {
            @Override
            public void accept(ThermalImage thermalImage) {
                Bitmap msxBitmap;
                {
                    thermalImage.getFusion().setFusionMode(FusionMode.THERMAL_ONLY);
                    thermalImage.getFusion().setThermalFusionAbove(new ThermalValue(0, TemperatureUnit.CELSIUS));
                    thermalImage.getFusion().setThermalFusionBelow(new ThermalValue(400, TemperatureUnit.CELSIUS));
    
                    Palette palette = PaletteManager.getDefaultPalettes().get(0);
                    thermalImage.setPalette(palette);
                    thermalImage.setTemperatureUnit(TemperatureUnit.CELSIUS);
    
                    ////////////////////////////
                    // HERE!!!!!!  Get temperature at the center of thermal image
                    Double dblSpotTemperature = thermalImage.getValueAt(new Point(thermalImage.getWidth() / 2, thermalImage.getHeight() / 2));
                    Log.d("+++++++", String.valueOf(dblSpotTemperature));
    
                    msxBitmap = BitmapAndroid.createBitmap(thermalImage.getImage()).getBitMap();
                }
    
                Bitmap dcBitmap = BitmapAndroid.createBitmap(thermalImage.getFusion().getPhoto()).getBitMap();
                streamDataListener.images(msxBitmap,dcBitmap);
            }
        };

    Is there anything I missed?

    Many thanks!

    P.S. I couldn’t add spot like this into the codes above too. My app crashed which I don’t know why.

    
    thermalImage.getMeasurements().addSpot(new Point(thermalImage.getWidth() / 2, thermalImage.getHeight() / 2));
    • This reply was modified 6 months, 3 weeks ago by Profile photo of Hung Hung.
    • This reply was modified 6 months, 3 weeks ago by Profile photo of Hung Hung.
    • This reply was modified 6 months, 3 weeks ago by Profile photo of Hung Hung.

    #12000

    Profile photo of Hung
    Hung

    Participant

    Hi Gavin,

    I have read this topic
    Get wrong temperature from FLIRThermalImage:getValue

    I think this is SDK issue here in Android too.

    One Flir app

    My own app

    #12010

    Profile photo of Gavin
    Gavin

    Keymaster

    I have escalated this to our technical support team and I will expect a follow up in 2-3 days. Thank you for your patience.

    Gavin
    FLIR Community Support

    #12269

    Profile photo of Masashi
    Masashi

    Participant

    I am stumbling in the same place.
    Crash when doing “addSpot()” or “addRectangle()”.
    I got the error message, it is “Spot limit 8 exeeded” or “Rectangle limit 8 exeeded”.
    Please tell me the cause and the solution.

    #15236

    Profile photo of SAMBO
    SAMBO

    Participant

    I am trying to add a rectangle overlay image with a temperature number. And I am not able to do it.

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

You must be logged in to reply to this topic.