Skip to content

Commit

Permalink
GroundSdk release 7.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins.onyxia committed Jan 13, 2023
1 parent b48f994 commit a4dadd9
Show file tree
Hide file tree
Showing 10 changed files with 752 additions and 2 deletions.
7 changes: 7 additions & 0 deletions SdkCore.framework/Headers/Arsdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@
#import "SdkCoreLic.h"

#import "GLError.h"

#import "ThermalProc.h"
#import "ThermalProcVideo.h"
#import "ThermalProcPicture.h"
#import "ThermalProcPictureData.h"
#import "ThermalProcPaletteFactory.h"

#endif /* Arsdk_h */
157 changes: 157 additions & 0 deletions SdkCore.framework/Headers/ThermalProc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
// Copyright (C) 2018 Parrot Drones SAS
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
// * Neither the name of the Parrot Company nor the names
// of its contributors may be used to endorse or promote products
// derived from this software without specific prior written
// permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// PARROT COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.

#import "ThermalProcPaletteFactory.h"

/** Thermal camera model. */
typedef NS_ENUM(NSInteger, ThermalProcThermalCamera) {
// Numerical values must be kept in sync with C code (tproc_thermal_camera)

/** Lepton thermal camera. */
ThermalProcThermalCameraLepton = 0,

/** Boson thermal camera. */
ThermalProcThermalCameraBoson = 1,
};

/** Thermal calibration State. */
typedef NS_ENUM(NSInteger, ThermalProcCalibrationState) {
// Numerical values must be kept in sync with C code (tproc_calibration_state)

/** Thermal calibration done. */
ThermalProcCalibrationStateDone = 0,

/** Thermal calibration requested. */
ThermalProcCalibrationStateRequested = 1,

/** Thermal calibration in progress. */
ThermalProcCalibrationStateInProgress = 2,
};

/** Thermal Spot.*/
@interface ThermalProcSpot : NSObject
/** Spot position. */
@property (nonatomic, readonly) CGPoint position;
/** Temperature at the spot */
@property (nonatomic, readonly) float temperature;
@end

/** Thermal process tatus */
@interface ThermalProcStatus : NSObject

/** 'YES' if thermal data are available. */
@property (nonatomic, readonly) bool hasThermalData;

/**
Thermal sensor calibration state.
Not available if 'hasThermalData' equals 'NO'.
*/
@property (nonatomic, readonly) ThermalProcCalibrationState calibrationState;

/**
Spot of the minimum temperature of the scene.
Not available if 'hasThermalData' equals 'NO' or
if 'calibrationState' equals 'ThermalCalibrationStateInProgress'.
*/
@property (nonatomic, readonly) ThermalProcSpot * _Nullable min;

/**
Spot of the maximum temperature of the scene.
Not available if 'hasThermalData' equals 'NO' or
if 'calibrationState' equals 'ThermalCalibrationStateInProgress'.
*/
@property (nonatomic, readonly) ThermalProcSpot * _Nullable max;

/**
Spot of the probe.
Not available if 'hasThermalData' equals 'NO' or
if 'calibrationState' equals 'ThermalCalibrationStateInProgress'.
*/
@property (nonatomic, readonly) ThermalProcSpot * _Nullable probe;
@end

/** Status callback */
typedef void(^ThermalProcStatusUpdate)(ThermalProcStatus * _Nonnull status);

/** Rendering Mode. */
typedef NS_ENUM(NSInteger, ThermalProcRenderingMode) {
// Numerical values must be kept in sync with C code (tproc_rendering_mode)

/** Visible image only. */
ThermalProcRenderingModeVisible = 0,

/** Thermal image only. */
ThermalProcRenderingModeThermal = 1,

/** Blending between visible and thermal images. */
ThermalProcRenderingModeBlended = 2,

/** Visible monochrome image only. */
ThermalProcRenderingModeMonochrome = 3,
};

/** define a thermal processor */
@protocol ThermalProc
@required

/**
Thermal probe position.
Origin point [0;0] is at the render top left and the point [1;1] is at the at render bottom right.
*/
@property (atomic) CGPoint probePosition;

/** Thermal palette. */
@property (nonatomic, assign) id<ThermalProcPalette> _Nonnull palette;

/**
The materials emissivity to use in percent from '0.0' to '1.0'.
default value is '0.95' emissivity of matte materials.
*/
@property (atomic) double emissivity;

/**
The background temperature to use to calculate temperatures, in kelvin.
Must be greater than '0'; default value is '295.15'.
*/
@property (atomic) double backgroundTemp;

/** Rendering mode. */
@property (atomic) ThermalProcRenderingMode renderingMode;

/**
Blending rate between visible and thermal images, from '0.0' to '1.0'.
Only used if rendering mode equals TPROC_RENDERING_MODE_BLENDED.
*/
@property (atomic) double blendingRate;

@end
225 changes: 225 additions & 0 deletions SdkCore.framework/Headers/ThermalProcPaletteFactory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
// Copyright (C) 2018 Parrot Drones SAS
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
// * Neither the name of the Parrot Company nor the names
// of its contributors may be used to endorse or promote products
// derived from this software without specific prior written
// permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// PARROT COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.


/**
Define a Thermal Color.
Color composing a thermal palette.
*/
@interface ThermalProcColor : NSObject
/** Rate of red of the color. */
@property (nonatomic, readonly) float red;
/** Rate of green of the color. */
@property (nonatomic, readonly) float green;
/** Rate of blue of the color. */
@property (nonatomic, readonly) float blue;
/** Position of the color in the palette. */
@property (nonatomic, readonly) float position;

/**
Create a thermal color.
@param red: the rate of red of the color.
@param green: the rate of green of the color.
@param blue: the rate of blue of the color.
@param position: the position of the color in the palette.
*/
- (instancetype _Nonnull)initWithRed:(float)red green:(float)green blue:(float)blue position:(float)position;
@end

/**
Define a Thermal Palette.
List of colors with their position associated.
*/
@protocol ThermalProcPalette <NSObject>

/**
Palette Colors
Array of `ThermalProcColor`.
*/
@property (nonatomic, readonly) NSArray * _Nonnull colors;

@end

/**
Absolute Thermal Palette.
Palette used between temperature range set.
The palette can be limited or extended for out of range temperatures.
*/
@protocol ThermalProcAbsolutePalette <ThermalProcPalette>

/**
Temperature associated to the lower boundary of the palette, in kelvin.
*/
@property (nonatomic) double lowestTemperature;

/**
Temperature associated to the higher boundary of the palette, in kelvin.
*/
@property (nonatomic) double highestTemperature;

/**
Yes If the palette is limited, temperatures out of range will be shown in black.
No If the palette is no limited, it is extended with the colors of its boundaries.
*/
@property (nonatomic) BOOL isLimited;

@end


/** Called back each time palette boundaries are updated. */
typedef void(^ThermalProcPaletteBoundariesUpdate)(void);

/**
Relative Palette.
Palette fully used.
The lowest color is associated to the coldest temperature of the scene and
the highest color is associated to the hottest temperature of the scene.
The temperature association can be locked.
*/
@protocol ThermalProcRelativePalette <ThermalProcPalette>

/**
NO if the temperature association is unlock:
The lowest color is associated to the coldest temperature of the scene and
the highest color is associated to the hottest temperature of the scene.
YES, if the temperature association is lock:
The association between colors and temperatures is fixed and will not change according to the scene.
*/
@property (nonatomic) BOOL isLocked;

/**
Temperature associated to the lower boundary of the palette, in kelvin.
*/
@property (readonly, nonatomic) double lowestTemperature;

/**
Temperature associated to the higher boundary of the palette, in kelvin.
*/
@property (readonly, nonatomic) double highestTemperature;

@end


/**
Temperature types to highlight.
*/
typedef NS_ENUM(NSInteger, ThermalProcTemperatureType) {
// Numerical values must be kept in sync with C code (tproc_temperature_type)
/** Used to show only temperatures hotter than the threshold. */
ThermalProcTemperatureTypeHot = 0,
/** Used to show only temperatures colder than the threshold. */
ThermalProcTemperatureTypeCold = 1,
};

/**
Color application range.
*/
typedef NS_ENUM(NSInteger, ThermalProcColorRange) {
// Numerical values must be kept in sync with C code (tproc_color_range)
/** Palette colors is applied on the range of the temperatures of the scene. */
ThermalProcColorRangeScene = 0,
/** Palette colors is applied on the range of the displayed temperatures. */
ThermalProcColorRangeVisible = 1,
};

/**
Spot Palette.
Palette to highlight cold spots or hot spots.
The palette is fully used:
The lowest color is associated to the coldest temperature of the scene and
the highest color is associated to the hottest temperature of the scene.
Only temperature hotter or colder than the threshold are shown.
*/
@protocol ThermalProcSpotPalette <ThermalProcPalette>

/**
Temperature type to highlight.
*/
@property (nonatomic) ThermalProcTemperatureType temperatureType;

/**
Threshold of highlighting from the palette, from 0 to 1.
*/
@property (nonatomic) double threshold;

/**
Temperature associated to the lower boundary of the palette, in kelvin.
*/
@property (readonly, nonatomic) double lowestTemperature;

/**
Temperature associated to the higher boundary of the palette, in kelvin.
*/
@property (readonly, nonatomic) double highestTemperature;

@end


/** Thermal Palette Factory. */
@interface ThermalProcPaletteFactory : NSObject

/**
Creates a new ThermalAbsolutePalette.
@param colors: colors of the palette; Array of `ThermalProcColor`.
@return: a new ThermalAbsolutePalette
*/
+(id<ThermalProcAbsolutePalette> _Nonnull)createAbsolutePalette:(NSArray * _Nonnull)colors;

/**
Creates a new ThermalRelativePalette.
@param colors: colors of the palette; Array of `ThermalProcColor`.
@param boundariesUpdateBlock: block called to notify the palette boundaries update.
@return: a new ThermalRelativePalette
*/
+(id<ThermalProcRelativePalette> _Nonnull)createRelativePalette:(NSArray * _Nonnull)colors
boundariesUpdateBlock:(ThermalProcPaletteBoundariesUpdate _Nullable)boundariesUpdateBlock;

/**
Creates a new ThermalSpotPalette.
@param colors: colors of the palette; Array of `ThermalProcColor`.
@param boundariesUpdateBlock: block called to notify the palette boundaries update.
@return: a new ThermalSpotPalette
*/
+(id<ThermalProcSpotPalette> _Nonnull)createSpotPalette:(NSArray * _Nonnull)colors
boundariesUpdateBlock:(ThermalProcPaletteBoundariesUpdate _Nullable)boundariesUpdateBlock;

@end
Loading

0 comments on commit a4dadd9

Please sign in to comment.