ilabs-flir 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/Flir.podspec +31 -0
  2. package/README.md +1271 -0
  3. package/android/Flir/build.gradle.kts +80 -0
  4. package/android/Flir/libs/flir-stubs.jar +0 -0
  5. package/android/Flir/src/main/AndroidManifest.xml +31 -0
  6. package/android/Flir/src/main/java/flir/android/CameraHandler.java +194 -0
  7. package/android/Flir/src/main/java/flir/android/FlirController.kt +11 -0
  8. package/android/Flir/src/main/java/flir/android/FlirDownloadManager.kt +75 -0
  9. package/android/Flir/src/main/java/flir/android/FlirDownloadPackage.kt +16 -0
  10. package/android/Flir/src/main/java/flir/android/FlirFrameCache.kt +6 -0
  11. package/android/Flir/src/main/java/flir/android/FlirManager.kt +248 -0
  12. package/android/Flir/src/main/java/flir/android/FlirModule.kt +74 -0
  13. package/android/Flir/src/main/java/flir/android/FlirPackage.kt +16 -0
  14. package/android/Flir/src/main/java/flir/android/FlirSDKLoader.kt +191 -0
  15. package/android/Flir/src/main/java/flir/android/FlirStatus.kt +12 -0
  16. package/android/Flir/src/main/java/flir/android/FlirView.kt +48 -0
  17. package/android/Flir/src/main/java/flir/android/FlirViewManager.kt +13 -0
  18. package/android/Flir/src/main/java/flir/android/FrameDataHolder.java +14 -0
  19. package/app.plugin.js +264 -0
  20. package/expo-module.config.json +6 -0
  21. package/ios/Flir/Framework/ThermalSDK/FLIRBattery.h +76 -0
  22. package/ios/Flir/Framework/ThermalSDK/FLIRCalibration.h +108 -0
  23. package/ios/Flir/Framework/ThermalSDK/FLIRCamera.h +156 -0
  24. package/ios/Flir/Framework/ThermalSDK/FLIRCameraDeviceInfo.h +53 -0
  25. package/ios/Flir/Framework/ThermalSDK/FLIRCameraEvent.h +132 -0
  26. package/ios/Flir/Framework/ThermalSDK/FLIRCameraImport.h +204 -0
  27. package/ios/Flir/Framework/ThermalSDK/FLIRColorDistributionSettings.h +204 -0
  28. package/ios/Flir/Framework/ThermalSDK/FLIRColorizer.h +82 -0
  29. package/ios/Flir/Framework/ThermalSDK/FLIRDiscoveredCamera.h +44 -0
  30. package/ios/Flir/Framework/ThermalSDK/FLIRDiscovery.h +132 -0
  31. package/ios/Flir/Framework/ThermalSDK/FLIRDisplaySettings.h +29 -0
  32. package/ios/Flir/Framework/ThermalSDK/FLIRFocus.h +70 -0
  33. package/ios/Flir/Framework/ThermalSDK/FLIRFusion.h +192 -0
  34. package/ios/Flir/Framework/ThermalSDK/FLIRFusionController.h +136 -0
  35. package/ios/Flir/Framework/ThermalSDK/FLIRFusionTransformation.h +35 -0
  36. package/ios/Flir/Framework/ThermalSDK/FLIRIdentity.h +264 -0
  37. package/ios/Flir/Framework/ThermalSDK/FLIRImageBase.h +196 -0
  38. package/ios/Flir/Framework/ThermalSDK/FLIRImageColorizer.h +26 -0
  39. package/ios/Flir/Framework/ThermalSDK/FLIRImageStatistics.h +61 -0
  40. package/ios/Flir/Framework/ThermalSDK/FLIRIsotherms.h +208 -0
  41. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementArea.h +38 -0
  42. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementCollection.h +147 -0
  43. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDelta.h +62 -0
  44. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDimensions.h +33 -0
  45. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementEllipse.h +49 -0
  46. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementLine.h +66 -0
  47. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementMarker.h +69 -0
  48. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementParameters.h +41 -0
  49. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementRectangle.h +36 -0
  50. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementReference.h +27 -0
  51. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementShape.h +46 -0
  52. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementSpot.h +33 -0
  53. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementsController.h +160 -0
  54. package/ios/Flir/Framework/ThermalSDK/FLIRMeterLinkSensorPoll.h +247 -0
  55. package/ios/Flir/Framework/ThermalSDK/FLIROverlayController.h +27 -0
  56. package/ios/Flir/Framework/ThermalSDK/FLIRPalette.h +60 -0
  57. package/ios/Flir/Framework/ThermalSDK/FLIRPaletteController.h +36 -0
  58. package/ios/Flir/Framework/ThermalSDK/FLIRPaletteManager.h +97 -0
  59. package/ios/Flir/Framework/ThermalSDK/FLIRQuantification.h +55 -0
  60. package/ios/Flir/Framework/ThermalSDK/FLIRRemoteControl.h +393 -0
  61. package/ios/Flir/Framework/ThermalSDK/FLIRRenderer.h +35 -0
  62. package/ios/Flir/Framework/ThermalSDK/FLIRRendererImpl.h +17 -0
  63. package/ios/Flir/Framework/ThermalSDK/FLIRScale.h +99 -0
  64. package/ios/Flir/Framework/ThermalSDK/FLIRScaleController.h +44 -0
  65. package/ios/Flir/Framework/ThermalSDK/FLIRStream.h +109 -0
  66. package/ios/Flir/Framework/ThermalSDK/FLIRStreamer.h +124 -0
  67. package/ios/Flir/Framework/ThermalSDK/FLIRSystem.h +40 -0
  68. package/ios/Flir/Framework/ThermalSDK/FLIRTemperatureRange.h +43 -0
  69. package/ios/Flir/Framework/ThermalSDK/FLIRThermalDelta.h +77 -0
  70. package/ios/Flir/Framework/ThermalSDK/FLIRThermalImage.h +331 -0
  71. package/ios/Flir/Framework/ThermalSDK/FLIRThermalImageFile.h +56 -0
  72. package/ios/Flir/Framework/ThermalSDK/FLIRThermalParameters.h +31 -0
  73. package/ios/Flir/Framework/ThermalSDK/FLIRThermalValue.h +92 -0
  74. package/ios/Flir/Framework/ThermalSDK/FLIRWirelessCameraDetails.h +88 -0
  75. package/ios/Flir/Framework/ThermalSDK/ThermalSDK.h +73 -0
  76. package/ios/Flir/SDKLoader/FlirSDKLoader.m +13 -0
  77. package/ios/Flir/SDKLoader/FlirSDKLoader.swift +175 -0
  78. package/ios/Flir/src/FlirEventEmitter.h +12 -0
  79. package/ios/Flir/src/FlirEventEmitter.m +33 -0
  80. package/ios/Flir/src/FlirModule.h +10 -0
  81. package/ios/Flir/src/FlirModule.m +381 -0
  82. package/ios/Flir/src/FlirPreviewView.h +13 -0
  83. package/ios/Flir/src/FlirPreviewView.m +24 -0
  84. package/ios/Flir/src/FlirState.h +20 -0
  85. package/ios/Flir/src/FlirState.m +79 -0
  86. package/ios/Flir/src/FlirViewManager.h +9 -0
  87. package/ios/Flir/src/FlirViewManager.m +16 -0
  88. package/package.json +61 -0
  89. package/react-native.config.js +14 -0
  90. package/scripts/copy_ios_libs.sh +32 -0
  91. package/scripts/download-sdk.js +62 -0
  92. package/scripts/prepare-binaries.sh +171 -0
  93. package/sdk-manifest.json +30 -0
  94. package/src/FlirDownload.ts +78 -0
  95. package/src/index.d.ts +17 -0
  96. package/src/index.js +7 -0
  97. package/src/index.ts +7 -0
@@ -0,0 +1,204 @@
1
+ //
2
+ // FLIRCameraImport.h
3
+ //
4
+ // Copyright © 2019 Teledyne FLIR. All rights reserved.
5
+ //
6
+ // Initialize and perform import (list and import images).
7
+
8
+ #import <UIKit/UIKit.h>
9
+
10
+ #import "FLIRIdentity.h"
11
+
12
+ /** Describes different possible file locations in the cameras filesystem. */
13
+ typedef NS_ENUM(NSInteger, FLIRLocation)
14
+ {
15
+ /** Unknown root. */
16
+ FLIRLocationUnknown,
17
+ /** The active camera folder used for storing images. */
18
+ FLIRLocationActive,
19
+ /** Base folder for images (e.g. "DCIM" on the SD card). */
20
+ FLIRLocationImageBase
21
+ };
22
+
23
+ /// Options for listing images
24
+ typedef NS_OPTIONS(NSInteger, FLIRListImagesFlags) {
25
+ /// recurse all found folders
26
+ FLIRListImagesRecursive = 1 << 0,
27
+ /// include hidden files
28
+ FLIRListImagesShowHidden = 1 << 1
29
+ };
30
+
31
+ /**
32
+ * Abstract file path on camera's filesystem.
33
+ */
34
+ @interface FLIRFileReference : NSObject
35
+ /** Defines base part of the file path. */
36
+ @property (nonatomic, readwrite) FLIRLocation location;
37
+ /** Relative path to location.
38
+ *
39
+ * Example: Both "image.jpg" and "/image.jpg" would refer to an image file in the folder of `location`, and both "" and "/" would refer to the folder of `location`.
40
+ * @note The path is expressed in a camera-compatible format using forward slashes (/) as the separator.
41
+ */
42
+ @property (nonatomic, nonnull, readwrite) NSString *path;
43
+ @end
44
+
45
+ /**
46
+ * Abstract directory path on camera's filesystem.
47
+ */
48
+ @interface FLIRFolderReference : NSObject
49
+ /** Defines base part of the file path. */
50
+ @property (nonatomic, readwrite) FLIRLocation location;
51
+ /** Relative path to location.
52
+ *
53
+ * @note The path is expressed in a camera-compatible format using forward slashes (/) as the separator.
54
+ */
55
+ @property (nonatomic, nonnull, readwrite) NSString *path;
56
+
57
+ @end
58
+
59
+ @class FLIRThumbnail;
60
+
61
+ /**
62
+ * Delegate to return events when files are found on a camera.
63
+ */
64
+ @protocol FLIRCameraImportEventDelegate <NSObject>
65
+
66
+ /**
67
+ * This is called when a file is imported from the camera to the device.
68
+ * Note: you should NOT try to call `FLIRCamera.disconnect()` directly from this callback. Instead i.e. spawn a new thread.
69
+ *
70
+ * @param filename The path to a new file.
71
+ */
72
+ - (void)fileAdded:(NSString * _Nonnull)filename;
73
+
74
+ /**
75
+ * This is called when error occurs when downloading a file.
76
+ * Note: you should NOT try to call `FLIRCamera.disconnect()` directly from this callback. Instead i.e. spawn a new thread.
77
+ *
78
+ * @param e Dictionary with error information (error message and filename)
79
+ */
80
+ - (void)importError:(NSDictionary<NSString *, NSString *> * _Nonnull)e;
81
+
82
+
83
+ /**
84
+ * This is called to show the progress of downloading image files from the device.
85
+ * Note: you should NOT try to call `FLIRCamera.disconnect()` directly from this callback. Instead i.e. spawn a new thread.
86
+ *
87
+ * @param progress The number of bytes downloaded so far.
88
+ * @param total The total number of bytes of the file downloading.
89
+ * @param file The reference of the file currently being downloaded. Remember to compare files using `isEqual`.
90
+ */
91
+ - (void)fileProgress:(NSInteger)progress total:(NSInteger)total file:(FLIRFileReference * _Nonnull)file;
92
+
93
+ @optional
94
+
95
+ /**
96
+ * This is called when a thumbnail is downloaded
97
+ *
98
+ * @param thumbnail A thumbnail with a reference to the original image and a thumbnail as a UIImage
99
+ */
100
+ - (void)gotThumbnail:(FLIRThumbnail * _Nonnull)thumbnail;
101
+
102
+ /**
103
+ * This is called when a file is deleted
104
+ * @param file The reference of the file that was deleted
105
+ */
106
+ - (void)fileDeleted:(FLIRFileReference * _Nonnull)file;
107
+
108
+ @end
109
+
110
+ /**
111
+ * Objects returned by listImages
112
+ */
113
+
114
+ @interface FLIRFileInfo : NSObject
115
+ /** The name of the file, without the path (like Unix's basename) */
116
+ @property (nonatomic, nonnull) NSString *name;
117
+ /** Abstract path to the file. */
118
+ @property (nonatomic, nonnull) FLIRFileReference *reference;
119
+ /** The time this file was last changed */
120
+ @property (nonatomic, nonnull) NSDateComponents *time;
121
+ /** The file size in bytes */
122
+ @property (nonatomic) long long size;
123
+ /** True if this file object represents a directory, false otherwise */
124
+ @property (nonatomic) bool isDirectory;
125
+ @end
126
+
127
+ @interface FLIRThumbnail : NSObject
128
+ /** File reference */
129
+ @property (nonatomic, nonnull) FLIRFileReference *reference;
130
+ /** Thumbnail */
131
+ @property (nonatomic, nonnull) UIImage* thumbnail;
132
+ @end
133
+
134
+ /**
135
+ * This class facilitates importing images from Camera.
136
+ */
137
+ @interface FLIRCameraImport : NSObject
138
+
139
+ /**
140
+ * Import files from camera.
141
+ *
142
+ * @param imageList List of files to import. Use `listImages` or `listImagesInWorkFolder` to obtain an image list.
143
+ * @param destPath Destination path.
144
+ *
145
+ * @return TRUE if all is OK.
146
+ */
147
+ - (BOOL)startImport:(NSArray<FLIRFileReference *> * _Nonnull)imageList withDestPath:(NSString * _Nonnull)destPath;
148
+
149
+ /**
150
+ * Import thumbnails for files.
151
+ *
152
+ * @param imageList List of images. If a thumbnail is available, it will be imported, and the delegate will be called.
153
+ */
154
+ - (void)startImportThumbnails:(NSArray<FLIRFileReference *> * _Nonnull)imageList;
155
+
156
+ /**
157
+ * Cancels the import session
158
+ */
159
+ - (void)cancelImport;
160
+
161
+ /**
162
+ * A delegate to handle the events in FLIRCameraImportEventDelegate.
163
+ */
164
+ @property (nonatomic, weak, nullable) id<FLIRCameraImportEventDelegate> delegate;
165
+
166
+ /**
167
+ * List all Flir files from default active folder in camera.
168
+ *
169
+ * @return Array with FLIRFileInfos.
170
+ */
171
+ -(NSArray<FLIRFileInfo *> * _Nullable)listImages:(out NSError *_Nullable *_Nullable)error;
172
+
173
+ /**
174
+ * List all Flir files in camera.
175
+ *
176
+ * @param folder the folder to list, nil will use the active default folder
177
+ * @param flags flags for recursive listing and including hidden folder
178
+ *
179
+ * @return Array with FLIRFileInfos.
180
+ */
181
+ - (NSArray<FLIRFileInfo *> * _Nullable)listImages:(FLIRFileReference * _Nullable)folder
182
+ flags:(FLIRListImagesFlags)flags
183
+ error: (out NSError *_Nullable *_Nullable)error;
184
+
185
+ /**
186
+ * List all Flir files from folder in camera.
187
+ *
188
+ * @param folder workfolder with files.
189
+ *
190
+ * @return Array with FLIRFileInfos.
191
+ */
192
+
193
+ - (NSArray<FLIRFileInfo *> * _Nullable)listImagesInWorkFolder:(FLIRFileReference * _Nonnull)folder error:(out NSError *_Nullable *_Nullable)error;
194
+
195
+ /**
196
+ * Gets workfolders as a list of folders from the specified camera.
197
+ *
198
+ * @return Returns workfolders as a list of folders from the camera. List may be empty.
199
+ */
200
+ - (NSArray<FLIRFileInfo *> * _Nullable)listWorkfolders:(out NSError *_Nullable *_Nullable)error;
201
+
202
+ - (void)startDeleteFiles:(NSArray<FLIRFileReference *> * _Nonnull)fileList;
203
+
204
+ @end
@@ -0,0 +1,204 @@
1
+ //
2
+ // FLIRColorDistributionSettings.h
3
+ // ThermalSDK
4
+ //
5
+ // Created by FLIR on 2021-09-03.
6
+ // Copyright © 2022 Teledyne FLIR. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ /**
14
+ * These methods transform each slot histogram bin x into the weight y.
15
+ */
16
+ typedef NS_ENUM(NSUInteger, FLIRHistogramModifier) {
17
+ /** y = x^(1/2).
18
+ * If all pixels in a slot were collected within a circle,
19
+ * the radius of this circle is proportional to the slot weight.
20
+ */
21
+ FLIRSquareRoot,
22
+
23
+ /** y = x^(1/3) */
24
+ FLIRCubicRoot,
25
+
26
+ /** ln(x) if x >= 2 else 0. Every doubling of a slot's pixel count
27
+ * will increase the slot weight by a fixed amount.
28
+ */
29
+ FLIRLn,
30
+
31
+ /** Scaled LN (y = y_LN / 2.3), which has no effect on the normalized weights. */
32
+ FLIRLog10,
33
+
34
+ /** y = min(x, plateauCount)
35
+ * Put the cap @p ulPlateauCount on each of this histogram's bins.
36
+ */
37
+ FLIRPlateau,
38
+
39
+ /** y = x */
40
+ FLIRNone
41
+ };
42
+
43
+ /**
44
+ * Specifies the color distributions used when running the colorizer on an image.
45
+ */
46
+ @interface FLIRColorDistributionSettings : NSObject
47
+
48
+ @end
49
+
50
+ /**
51
+ * The color information in the image is distributed linear to the temperature values of the image.
52
+ *
53
+ * @note The palette colors used for each pixel is mapped in a linear fashion between the min and max temperatures of the image.
54
+ * Pixels above and below min and max will contain a color defined in the @ref atlas::image::Palette.
55
+ */
56
+ @interface FLIRTemperatureLinearSettings : FLIRColorDistributionSettings
57
+
58
+ @end
59
+
60
+ /**
61
+ * The colors are evenly distributed over the existing temperatures of the image and enhance the contrast.
62
+ *
63
+ * This color distribution can be particularly successful when the image contains few peaks of very low or
64
+ * high temperature's values.
65
+ */
66
+ @interface FLIRHistogramEqualizationSettings : FLIRColorDistributionSettings
67
+
68
+ /** Minimum heq slope limit. */
69
+ @property (nonatomic, assign) float linearPercent;
70
+ /** Maximum heq slope limit. */
71
+ @property (nonatomic, assign) int plateauTruncation;
72
+ /** How many pixels to ignore. */
73
+ @property (nonatomic, assign) float tailPercent;
74
+ /** Decrease to make the histogram more responsive to new scene content. */
75
+ @property (nonatomic, assign) float histogramDf;
76
+ /** Temporal filtering of span limits. */
77
+ @property (nonatomic, assign) float scaleDf;
78
+ /** Mode to transform each slot histogram bin x into the weight y. */
79
+ @property (nonatomic, assign) FLIRHistogramModifier modifierMode;
80
+
81
+ @end
82
+
83
+ /**
84
+ * The color information in the image is distributed linear to the signal values of the image.
85
+ *
86
+ * @note The palette colors used for each pixel is mapped in a linear fashion between the min and max signal values of the image. Pixels above and below min and max will contain a color defined in the @ref atlas::image::Palette.
87
+ */
88
+ @interface FLIRSignalLinearSettings : FLIRColorDistributionSettings
89
+
90
+ @end
91
+
92
+ /**
93
+ * Specifies parameters for the plateau histogram equalization mode.
94
+ *
95
+ * The colors are evenly distributed over the existing temperatures of the image and enhance the contrast.
96
+ * @note This color distribution can be particularly successful when the image contains few peaks
97
+ * of very low or high temperature's values.
98
+ */
99
+ @interface FLIRPlateauHistogramEqSettings : FLIRColorDistributionSettings
100
+
101
+ /** Limits the maximum slope of the mapping function. */
102
+ @property (nonatomic, assign) float maxGain;
103
+ /** Limits the population of any single histogram bin. */
104
+ @property (nonatomic, assign) float percentPerBin;
105
+ /** Increasing values of Linear Percent more accurately preserves the visual representation of an object */
106
+ @property (nonatomic, assign) float linearPercent;
107
+ /** Determines the percentage of the histogram tails which are not ignored when generating the mapping function.*/
108
+ @property (nonatomic, assign) float outlierPercent;
109
+ /** Used to adjust the perceived brightness of the image. */
110
+ @property (nonatomic, assign) float gamma;
111
+
112
+ @end
113
+
114
+ /**
115
+ * Specifies parameters for the Digital Detail Enhancement (DDE) and Entropy modes.
116
+ * Entropy modes reserve more shades of gray/colors for areas with more entropy by assigning areas with lower entropy lesser gray shades.
117
+ *
118
+ * @note In this mode one color might not map to a specific temperature. Which means that the output
119
+ * scale is not radiometric accurate.
120
+ */
121
+ @interface FLIRDDESettings : FLIRPlateauHistogramEqSettings
122
+
123
+ /** Detail to background ratio. */
124
+ @property (nonatomic, assign) float detailToBackground;
125
+ /** DDE smoothing factor */
126
+ @property (nonatomic, assign) float smoothingFactor;
127
+ /** Headroom for detail at dynamic range extremes */
128
+ @property (nonatomic, assign) float detailHeadroom;
129
+
130
+ @end
131
+
132
+
133
+ /**
134
+ * Specifies parameters for Entropy modes.
135
+ * Entropy modes reserve more shades of gray/colors for areas with more entropy by assigning areas
136
+ * with lower entropy lesser gray shades.
137
+ *
138
+ * @note In this mode one color might not map to a specific temperature. Which means that the output
139
+ * scale is not radiometric accurate.
140
+ */
141
+ @interface FLIREntropySettings : FLIRDDESettings
142
+
143
+ @end
144
+
145
+ /**
146
+ * Specifies parameters for the Adaptive Detail Enhancement (ADE) mode.
147
+ * Adaptive detail enhancement which is using a edge-preserving and noise-reducing smoothing filter
148
+ * to enhance the contrast in the image.
149
+ *
150
+ * @note In this mode one color might not map to a specific temperature. Which means that the
151
+ * output scale is not radiometric accurate.
152
+ */
153
+ @interface FLIRADESettings : FLIRColorDistributionSettings
154
+
155
+ /** Noise amplification limit (LF) (Low value=Disable this feature) */
156
+ @property (nonatomic, assign) float alphaNoise;
157
+ /** Edge preserving limit (LF); Too avoid halos around sharp edges (High value=Disable this feature). */
158
+ @property (nonatomic, assign) float betaLf;
159
+ /** Edge preserving limit (HF); Too avoid halos around sharp edges (High value=Disable this feature). */
160
+ @property (nonatomic, assign) float betaHf;
161
+ /** LF/HF crossover level; Low value=Only HF enhancement;High value=Only LF enhancement. */
162
+ @property (nonatomic, assign) float betaMix;
163
+ /** Amount of the high pass filter that should be used. */
164
+ @property (nonatomic, assign) float hpBlendingAmount;
165
+ /** Low part of the histogram that is discarded. */
166
+ @property (nonatomic, assign) float lowLimit;
167
+ /** High part of the histogram that is discarded. */
168
+ @property (nonatomic, assign) float highLimit;
169
+ /** Headroom for details at dynamic range extremes. */
170
+ @property (nonatomic, assign) float headRoom;
171
+ /** Footroom for details at dynamic range extremes. */
172
+ @property (nonatomic, assign) float footRoom;
173
+ /** Limits the maximum slope of the mapping function. */
174
+ @property (nonatomic, assign) float gain;
175
+ /** Linear portion used for mapping the colors. */
176
+ @property (nonatomic, assign) float linearMix;
177
+
178
+ @end
179
+
180
+ /**
181
+ * Specifies parameters for the FSX mode.
182
+ * FSX is using a edge-preserving and noise-reducing smoothing filter
183
+ * to enhance the contrast in the image.
184
+ */
185
+ @interface FLIRFSXSettings : FLIRColorDistributionSettings
186
+
187
+ /** Maximum allowed difference in the bilateral filtering. */
188
+ @property (nonatomic, assign) float sigmaR;
189
+ /** The weight factor applied to image details. */
190
+ @property (nonatomic, assign) unsigned short alpha;
191
+
192
+ @end
193
+
194
+ /**
195
+ * Specifies parameters for the local contrast enhancement (LCE) mode.
196
+ */
197
+ @interface FLIRLCESettings : FLIRDDESettings
198
+
199
+ /** Can be used to enhance the contrast. */
200
+ @property (nonatomic, assign) int contrast;
201
+
202
+ @end
203
+
204
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,82 @@
1
+ //
2
+ // FLIRColorizer.h
3
+ // ThermalSDK
4
+ //
5
+ // Created by FLIR on 2021-10-27.
6
+ // Copyright © 2021 Teledyne FLIR. All rights reserved.
7
+ //
8
+
9
+
10
+ #pragma once
11
+
12
+ #import <UIKit/UIKit.h>
13
+
14
+ #import "FLIRRenderer.h"
15
+
16
+ @class FLIRRange;
17
+
18
+ /**
19
+ * Protocol for classes colorizing thermal images or streams
20
+ */
21
+ @protocol FLIRColorizer<FLIRRenderer>
22
+
23
+ /**
24
+ * Automatic scale
25
+ *
26
+ * If true rendered images will have scale automatically set based on the min and max values in the image.
27
+ * @note auto-adjusted scale is disabled by default
28
+ *
29
+ * @note Calling this function does not trigger any render. Use `getImage()` if necessary to "re-render".
30
+ * @note it is recommended to keep the rendering setting consistent with the FLIRThermalImage information within FLIRScale.
31
+ * For this purpose code similar to the following could be used:
32
+ * // auto scale enabled
33
+ * let colorizer = ... // FLIRColorizer
34
+ * colorizer.autoScale = true
35
+ * // calling getImage(), among other internal work, will re-calculate scale range that we can then apply to Scale object
36
+ * colorizer.getImage()
37
+ * let scale = ... // obtain FLIRScale instance from FLIRThermalImage or in live stream from FLIRThermalStreamer.withThermalImage()
38
+ * // set the range calculated by the colorizer
39
+ * auto tempRange = colorizer.getScaleRange();
40
+ * scale.setRangeMin(tempRange.min);
41
+ * scale.setRangeMax(tempRange.max);
42
+ * //
43
+ * // auto scale disabled
44
+ * let colorizer = ... // FLIRColorizer
45
+ * colorizer.autoScale = false
46
+ * // first get scale
47
+ * let scale = ... // obtain FLIRScale instance from FLIRThermalImage or in live stream from FLIRThermalStreamer.withThermalImage()
48
+ * // then set manual range provided from the user
49
+ * scale.setRangeMin(userMinScaleValue);
50
+ * scale.setRangeMax(userMaxScaleValue);
51
+ * // finally update the colorizer so the rendered image is colorized using user-defined scale range
52
+ * colorizer.getImage()
53
+ */
54
+ @property (nonatomic, assign) BOOL autoScale;
55
+
56
+ /**
57
+ * Render scale
58
+ *
59
+ * If true the scale will be rendered when the image is rendered
60
+ * @note scale rendering is disabled by default
61
+ */
62
+ @property (nonatomic, assign) BOOL renderScale;
63
+
64
+ /**
65
+ * Get an image with the scale
66
+ *
67
+ * @note if scale rendering was disabled during last call to @ref update, the result from this function may be out of sync .
68
+ * @note For getting rendered image without scale, see @ref getImage
69
+ * @return Returns an UIImage, or nil if update hasn't been called with scale rendering enabled
70
+ */
71
+ - (UIImage * _Nullable)getScaleImage;
72
+
73
+ /**
74
+ * Get the range of the scale
75
+ *
76
+ * If auto scale is on, get the min and max temperature
77
+ * @return FLIRRange with min and max
78
+ */
79
+
80
+ - (FLIRRange * _Nullable)getScaleRange;
81
+
82
+ @end
@@ -0,0 +1,44 @@
1
+ //
2
+ // FLIRDiscoveredCamera.h
3
+ // ThermalSDK
4
+ //
5
+ // Created by FLIR on 2022-02-03.
6
+ // Copyright © 2022 Teledyne FLIR. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ @class FLIRIdentity;
12
+ @class FLIRWirelessCameraDetails;
13
+
14
+ NS_ASSUME_NONNULL_BEGIN
15
+
16
+ /// Describes how connect may be called
17
+ typedef NS_OPTIONS(NSUInteger, FLIRConnectMethod) {
18
+ /// Allows normal usage of connect
19
+ CM_normal = 0x1,
20
+ /// Allows connect "connecting" over SSL
21
+ CM_secure = 0x2,
22
+ };
23
+
24
+ /// Plain information of discovered camera, including connection settings.
25
+ @interface FLIRDiscoveredCamera : NSObject
26
+
27
+ /// The Identity to use when connecting to a camera
28
+ @property (nonatomic, nonnull, readonly, strong) FLIRIdentity *identity;
29
+
30
+ /// Human readable name of the camera
31
+ @property (nonatomic, nonnull, readonly) NSString *displayName;
32
+
33
+ /// Describes how connect may be called
34
+ @property (nonatomic, readonly) FLIRConnectMethod supportedConnectMethods;
35
+
36
+ /// Additional custom data received during discovery
37
+ @property (nonatomic, nonnull, readonly) NSDictionary<NSString *, NSString *> *records;
38
+
39
+ /// Optional wireless details for F1 wireless
40
+ @property (nonatomic, nullable, readonly, strong) FLIRWirelessCameraDetails* wirelessCameraDetails;
41
+
42
+ @end
43
+
44
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,132 @@
1
+ //
2
+ // FLIRDiscovery.h
3
+ //
4
+ // Copyright © 2019 Teledyne FLIR. All rights reserved.
5
+ //
6
+ // An interface for discovering cameras in vicinity.
7
+ //
8
+
9
+ #ifndef FLIRDiscovery_h
10
+ #define FLIRDiscovery_h
11
+
12
+ #import "FLIRIdentity.h"
13
+ #import "FLIRDiscoveredCamera.h"
14
+
15
+ /**
16
+ * Delegate to return events detected in the camera scanner
17
+ */
18
+ @protocol FLIRDiscoveryEventDelegate <NSObject>
19
+
20
+ /**
21
+ * This event is raised when a camera device is returning an error.
22
+ *
23
+ * @param error The error.
24
+ *
25
+ * @param nsnetserviceserror The NSNetServicesError code
26
+ *
27
+ * @param iface The interface where the discovery error was encountered.
28
+ */
29
+ -(void)discoveryError:(nonnull NSString *)error netServiceError:(int)nsnetserviceserror on:(FLIRCommunicationInterface)iface;
30
+
31
+ @optional
32
+
33
+ /**
34
+ * This event is raised when new camera device is found.
35
+ * @Deprecated Implement `cameraDiscovered:` instead
36
+ */
37
+ -(void)cameraFound:(nonnull FLIRIdentity *)cameraIdentity __attribute((deprecated("Implement cameraDiscovered: instead.")));;
38
+
39
+ /**
40
+ * This event is raised when a camera device is removed from the collection.
41
+ */
42
+ -(void)cameraLost:(nonnull FLIRIdentity *)cameraIdentity;
43
+
44
+ /**
45
+ * This event is called when discovery is finished (i.e. OS limitation).
46
+ * this event it NOT called after "FLIRDiscovery#stop()" is called
47
+ *
48
+ * @param iface The interface where the discovery was finished .
49
+ */
50
+ -(void) discoveryFinished:(FLIRCommunicationInterface)iface;
51
+
52
+ /**
53
+ * This event is called when a camera is discovered, it provides more information than `cameraFound:`
54
+ */
55
+ - (void)cameraDiscovered:(nonnull FLIRDiscoveredCamera *)discoveredCamera;
56
+
57
+ @end
58
+
59
+
60
+ /**
61
+ Discover cameras on your connected network. Finds a FLIR ONE if connected to your device.
62
+
63
+ @note Cameras can be reported as found even if they aren't connectable, depending on the implementation (entries could be cached in system services).
64
+ Similarly camera lost events might be delayed, depending on the implementation (some implementations are only refreshed once per 5 minutes).
65
+ One should use `FLIRCamera.connect(...)` if faster feedback is required.
66
+
67
+ ### Example Usage
68
+ ```swift
69
+ import UIKit
70
+ import ThermalSDK
71
+
72
+ class ViewController: UIViewController, FLIRDiscoveryEventDelegate {
73
+
74
+ // Create a discovery object.
75
+ let discoverer = FLIRDiscovery()
76
+
77
+ override func viewDidLoad() {
78
+ super.viewDidLoad()
79
+ // Set the discovere delegate to self.
80
+ discoverer.delegate = self
81
+ // Start discovery on all supported interfaces.
82
+ discoverer.start(FLIRCommunicationInterface.FLIRCommunicationInterfaceLightning)
83
+ }
84
+
85
+ func cameraFound(_ cameraIdentity: FLIRIdentity) {
86
+ // Handle discovered camera identity object...
87
+ }
88
+
89
+ // Etc ...
90
+ }
91
+ ```
92
+ */
93
+ @interface FLIRDiscovery : NSObject
94
+
95
+ /**
96
+ * Start searching for devices on specified interfaces.
97
+ * The operation is asynchronous, scanning will continue in the background until FLIRDiscovery#stop() is called or OS cancels the operation
98
+ * @param iface specifying the interfaces to use eg "FLIRCommunicationInterface#FLIRCommunicationInterfaceLightning".
99
+ */
100
+ -(void) start: (FLIRCommunicationInterface)iface;
101
+
102
+ /**
103
+ * Start searching for devices on specified interfaces.
104
+ * The operation is asynchronous, scanning will continue in the background until FLIRDiscovery#stop() is called or OS cancels the operation
105
+ * @param iface specifying the interfaces to use eg "FLIRCommunicationInterface#FLIRCommunicationInterfaceLightning".
106
+ * @param type specify a specific type to scan for (currently only supported for the emulator)
107
+ */
108
+ - (void)start:(FLIRCommunicationInterface)iface cameraType:(FLIRCameraType)type;
109
+
110
+
111
+ /**
112
+ * Stop scanning for devices.
113
+ * Does nothing if no scan is active.
114
+ * The operation is asynchronous
115
+ */
116
+ -(void) stop;
117
+
118
+ /**
119
+ * Checks if the scanner is active.
120
+ *
121
+ * @return YES if still scanning for cameras, otherwise NO.
122
+ */
123
+ -(BOOL) isDiscovering;
124
+
125
+ /**
126
+ * A delegate to handle the events in FLIRDiscoveryEventDelegate.
127
+ */
128
+ @property (nonatomic, assign, nullable) id<FLIRDiscoveryEventDelegate> delegate;
129
+
130
+ @end
131
+
132
+ #endif
@@ -0,0 +1,29 @@
1
+ //
2
+ // FLIRDisplaySettings.h
3
+ //
4
+ // Copyright © 2020 Teledyne FLIR. All rights reserved.
5
+ //
6
+
7
+ #import <Foundation/Foundation.h>
8
+
9
+ /**
10
+ * The FLIRDisplaySettings exposes a range of visual attributes which specify how the image is
11
+ * displayed. They also specify how image was displayed when it was initially taken by a camera.
12
+ * FLIRDisplaySettings allows user to specify a "subsection" of interest, while still keeping the
13
+ * entire image available for context.
14
+ * For example: taking an image of a car engine, but "zoom-in" to a faulty spark-plug, while keeping
15
+ * the entire image of the photographed engine for a context.
16
+ * The FLIRDisplaySettings effects both the IR and visual image.
17
+ */
18
+ @interface FLIRDisplaySettings : NSObject
19
+
20
+ - (instancetype)initWithZoomFactor:(float)zoomFactor zoomPanX:(int)zoomPanX zoomPanY:(int)zoomPanY;
21
+
22
+ /** Defines the image zoom factor, where value 1.0 means no zoom. */
23
+ @property (nonatomic, readonly) float zoomFactor;
24
+ /** Defines the image zoom pan/offset in X axis, where value 0 means centered. */
25
+ @property (nonatomic, readonly) int zoomPanX;
26
+ /** Defines the image zoom pan/offset in Y axis, where value 0 means centered. */
27
+ @property (nonatomic, readonly) int zoomPanY;
28
+
29
+ @end