FLIR One Developer / Blog / Topics / swift ios FLIRScale / FLIRScale.disableAutoAdjust?

FLIRScale.disableAutoAdjust?

Home Forums FLIR Mobile SDK Development iOS Development FLIRScale.disableAutoAdjust?

This topic contains 5 replies, has 2 voices, and was last updated by Profile photo of Justin Tjoa Justin Tjoa 1 month, 1 week ago.

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

  • Author

    Posts

  • #10805

    Profile photo of Ove
    Ove

    Participant

    I’m trying to change the FLIRScale of an image by using func setRangeWithMin(_ min: Double, andMax max: Double)

    It doesn’t work correctly because the value FLIRScale.isAutoAdjustEnabled() returns true

    There is a function enableAutoAdjust in the SDK, but I can’t find a disableAutoAdjust().
    Anyone found a solution for this?

    To FLIR-staff: Will FLIRScale.disableAutoAdjust() be included in future updates of the SDK, or will the function FLIRScale.isAutoAdjustEnabled() is changed to read/write property?

    #10850

    Profile photo of Justin Tjoa
    Justin Tjoa

    Participant

    Hello Ove! I will look into this now and if I need to I will escalate the question.I will respond ASAP.

    • This reply was modified 1 month, 2 weeks ago by Profile photo of Justin Tjoa Justin Tjoa.
    • This reply was modified 1 month, 2 weeks ago by Profile photo of Justin Tjoa Justin Tjoa.

    #10851

    Profile photo of Justin Tjoa
    Justin Tjoa

    Participant

    Hi Ove! I will escalate this matter. Thank you!

    • This reply was modified 1 month, 2 weeks ago by Profile photo of Justin Tjoa Justin Tjoa.
    • This reply was modified 1 month, 2 weeks ago by Profile photo of Justin Tjoa Justin Tjoa.

    #10903

    Profile photo of Ove
    Ove

    Participant

    Thank you, Justin

    #10904

    Profile photo of Ove
    Ove

    Participant

    It looks like the SDK is ignoring your customized FLIRScale and uses the auto scale instead.
    I have found a sort of workaround for this problem, which works for me:

    1. You set your wanted range by func setRangeWithMin(_ min: Double, andMax max: Double) immediately before you save the FLIRThermalImage.
    2. When you reopen your thermal image again with FLIRThermalImageFile.open(_ path: String!), store the range somewhere in a temporary variable, by using FLIRThermalImage.getScale()
    3. Then, when show your image in a UIImageView with uiImageView.image = flirThermalImage.getImage(), you should “reset” the thermal images FLIRScale.setRange(...) with your temporary scale variable.

    #10963

    Profile photo of Justin Tjoa
    Justin Tjoa

    Participant

    Hello Ove, sorry for the late reply. I am glad you came with a solution. Please let us know if there are any more issues.

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

You must be logged in to reply to this topic.