Skip to content

Commit d495d21

Browse files
authored
Merge pull request #854 from luxonis/alternate_ir
Alternate ir
2 parents 1853975 + 5a6ec6d commit d495d21

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Mono preview - Alternate between dot projector and illumination LED
2+
===================================================================
3+
4+
This example will alternate between the IR illumination LED and IR dot projector. By default, example script will run
5+
both left and right monochrome camera sensors at 30FPS, and it will switch between the IR LED and dot projector
6+
every frame - meaning you will get LED-illuminated frames at 15FPS, and dot projector-illuminated frames at 15FPS.
7+
8+
LED-illuminated frames can be used for your `AI vision tasks <https://docs.luxonis.com/en/latest/pages/ai_ml_nn/#ai-vision-tasks>`__
9+
and CV algorithms (eg. :ref:`Feature Tracker`) in low-light environments. Dot projector-illuminated frames are used for `active stereo depth <https://docs.luxonis.com/projects/hardware/en/latest/pages/articles/oak-s2/#pro-version>`__.
10+
11+
Demo
12+
####
13+
14+
.. raw:: html
15+
16+
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
17+
<iframe src="https://www.youtube.com/embed/LkW50C4N-R8" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
18+
</div>
19+
20+
On the video, we disabled both projector and LED for about a second, just to demonstrate how the scene looks
21+
in almost-complete darkness.
22+
23+
Setup
24+
#####
25+
26+
.. include:: /includes/install_from_pypi.rst
27+
28+
Source code
29+
###########
30+
31+
.. tabs::
32+
33+
.. tab:: Python
34+
35+
Also `available on GitHub <https://github.com/luxonis/depthai-python/blob/main/examples/MonoCamera/mono_preview_alternate_pro.py>`__
36+
37+
.. literalinclude:: ../../../../examples/MonoCamera/mono_preview_alternate_pro.py
38+
:language: python
39+
:linenos:
40+
41+
.. tab:: C++
42+
43+
Not yet implemented.
44+
45+
..
46+
Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/MonoCamera/mono_preview_alternate_pro.cpp>`__
47+
48+
.. literalinclude:: ../../../../depthai-core/examples/MonoCamera/mono_preview_alternate_pro.cpp
49+
:language: cpp
50+
:linenos:
51+
52+
.. include:: /includes/footer-short.rst

docs/source/tutorials/code_samples.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ are presented with code.
104104

105105
- :ref:`Mono Preview` - Displays right/left mono cameras
106106
- :ref:`Mono Camera Control` - Demonstrates how to control the mono camera (crop, exposure, sensitivity) from the host
107+
- :ref:`Mono preview - Alternate between dot projector and illumination LED` on OAK Pro devices
107108
- :ref:`Mono Full Resolution Saver` - Saves mono (720P) images to the host (:code:`.png`)
108109

109110
.. rubric:: NeuralNetwork

0 commit comments

Comments
 (0)