FLIR One Developer / Blog / Topics / Flir One shows plain image after stopDiscovery

Flir One shows plain image after stopDiscovery

Home Forums Android development Flir One shows plain image after stopDiscovery

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of stinkymouse2 stinkymouse2 2 years, 4 months ago.

Viewing 1 post (of 1 total)

  • Author

    Posts

  • #5381

    Profile photo of stinkymouse2
    stinkymouse2

    Participant

    I have MainActivity that has a button and calls FlirOneActivity (which is the same as PreviewActivity in the example app).
    In MainActivity.onStart I do Device.startDiscovery to get notified when it’s connected. If the button is pressed before MainActivity.onDeviceConnected, then I show an error dialog. Otherwise, I first do Device.stopDiscovery, and then start FlirOneActivity.

    Now, if MainActivity calls Device.startDiscovery and then Device.stopDiscovery, before calling FlirOneActivity, there’s no way I can see a thermal preview. The camera just shows a normal image, with nothing applied.

    FlirOneActivity is the same as PreviewActivity in the example app, so onCreate I do:

    ` RenderedImage.ImageType defaultImageType = RenderedImage.ImageType.ThermalRGBA8888Image;
    EnumSet<RenderedImage.ImageType> defaultImageType1 = EnumSet.of(defaultImageType, RenderedImage.ImageType.ThermalRadiometricKelvinImage);
    frameProcessor = new FrameProcessor(getApplicationContext(), this, defaultImageType1);`

    Why could it possibly be, that even after setting the FrameProcessor to ThermalRGBA8888Image, I still see a normal image?
    It doesn’t happen if MainActivity doesn’t call Device.startDiscovery and then Device.stopDiscovery.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.