2424'0' - Select control: sharpness
2525'[' - Select control: luma denoise
2626']' - Select control: chroma denoise
27+ 'a' 'd' - Increase/decrease dot projector intensity
28+ 'w' 's' - Increase/decrease flood LED intensity
2729
2830For the 'Select control: ...' options, use these keys to modify the value:
2931 '-' or '_' to decrease
@@ -191,6 +193,8 @@ def get(self):
191193
192194 print ('USB speed:' , device .getUsbSpeed ().name )
193195
196+ print ('IR drivers:' , device .getIrDrivers ())
197+
194198 q = {}
195199 fps_host = {} # FPS computed based on the time we receive frames in app
196200 fps_capt = {} # FPS computed based on capture timestamps from device
@@ -209,6 +213,10 @@ def get(self):
209213 EXP_STEP = 500 # us
210214 ISO_STEP = 50
211215 LENS_STEP = 3
216+ DOT_STEP = 100
217+ FLOOD_STEP = 100
218+ DOT_MAX = 1200
219+ FLOOD_MAX = 1500
212220
213221 # Defaults and limits for manual focus/exposure controls
214222 lensPos = 150
@@ -223,6 +231,9 @@ def get(self):
223231 sensMin = 100
224232 sensMax = 1600
225233
234+ dotIntensity = 0
235+ floodIntensity = 0
236+
226237 awb_mode = cycle ([item for name , item in vars (dai .CameraControl .AutoWhiteBalanceMode ).items () if name .isupper ()])
227238 anti_banding_mode = cycle ([item for name , item in vars (dai .CameraControl .AntiBandingMode ).items () if name .isupper ()])
228239 effect_mode = cycle ([item for name , item in vars (dai .CameraControl .EffectMode ).items () if name .isupper ()])
@@ -321,6 +332,26 @@ def get(self):
321332 ctrl = dai .CameraControl ()
322333 ctrl .setAutoExposureLock (ae_lock )
323334 controlQueue .send (ctrl )
335+ elif key == ord ('a' ):
336+ dotIntensity = dotIntensity - DOT_STEP
337+ if dotIntensity < 0 :
338+ dotIntensity = 0
339+ device .setIrLaserDotProjectorBrightness (dotIntensity )
340+ elif key == ord ('d' ):
341+ dotIntensity = dotIntensity + DOT_STEP
342+ if dotIntensity > DOT_MAX :
343+ dotIntensity = DOT_MAX
344+ device .setIrLaserDotProjectorBrightness (dotIntensity )
345+ elif key == ord ('w' ):
346+ floodIntensity = floodIntensity + FLOOD_STEP
347+ if floodIntensity > FLOOD_MAX :
348+ floodIntensity = FLOOD_MAX
349+ device .setIrFloodLightBrightness (floodIntensity )
350+ elif key == ord ('s' ):
351+ floodIntensity = floodIntensity - FLOOD_STEP
352+ if floodIntensity < 0 :
353+ floodIntensity = 0
354+ device .setIrFloodLightBrightness (floodIntensity )
324355 elif key >= 0 and chr (key ) in '34567890[]' :
325356 if key == ord ('3' ): control = 'awb_mode'
326357 elif key == ord ('4' ): control = 'ae_comp'
0 commit comments