Provides support for infrared cameras that are not directly enabled out-of-the box (at the very least, the kernel must recognize your infrared camera). The purpose of this repository is to enable the emitter when the infrared camera is invoked.
linux-enable-ir-emitter
can automatically configure almost any (UVC) infrared emitter.
Download the latest linux-enable-ir-emitter-x.x.x.systemd.x86-64.tar.gz. Then execute:
sudo tar -C / --no-same-owner -m -h -vxzf linux-enable-ir-emitter*.tar.gz
sudo systemctl enable --now linux-enable-ir-emitter
We also support the OpenRC service manager. See docs/manual-build.md for information on how to build the project.
To uninstall the tool, see docs/uninstallation.md for the instructions.
- Stand in front of and close to the camera and make sure the room is well lit.
- Make sure you are not using the camera during the execution.
- Be patient, do not kill the process (you could break the camera); it is not stuck if you see the
Searching...
output blinking. If you really have to, pressCTRL+C
, the tool will stop safely as soon as possible (you may have to answer a last question see 5.). - Run
sudo linux-enable-ir-emitter configure
.- If you have many emitters on the camera, specify it with the option
--emitters
. E.g.--emitters 2
. - If your ir camera requires a specific resolution, specify it with the option
--width
and--height
. E.g.--width 640 --height 360
. - The tool should automatically detect your ir camera, but you can specify it with the option
--device
. E.g.--device /dev/video2
; useful if you have multiple ir camera.
- If you have many emitters on the camera, specify it with the option
- You will see a video feedback, answer to the asked questions by pressing Y or N inside the window (click on it to give the focus if it is not the case).
- Sometimes, it can request you to shut down, then boot and retry (
$\neq$ reboot)
If you like the project, do not hesitate to star the repository to support me, thank you!
If the configuration failed:
- But you saw the ir emitter flashing, reboot and switch to manual mode by with the
--manual
option. - Also, try the exhaustive search by using the
--limit -1
option. Caution: this may take several hours; do not combine it--manual
. Put something that reflects IR in front of the computer so you can leave. - Otherwise, feel free to open a new issue, but please consult the docs first.
All criticism, ideas and contributions are welcome!
Some cameras provide instructions for changing the brightness of the ir emitter. You will need to find the corresponding instructions and set the correct value manually. An instruction consists of X values between 0-255.
- Run
sudo linux-enable-ir-emitter tweak
- If you ir camera requires a specific resolution, specify it with the option
--width
and--height
. E.g.--width 640 --height 360
. - The tool should detect automatically your ir camera, but you can specify it with the option
--device
. E.g.--device /dev/video2
; useful if you have multiple ir camera.
- If you ir camera requires a specific resolution, specify it with the option
- You will see a video feedback and a menu of the available instructions.
- Beside of each instruction, you will see the status of the instruction:
- If marked
[DISABLE]
, the instruction may make your camera unusable, so the tool will not use them automatically, we advise you do not touch it. - If marked
[START]
, the instruction will be executed on thelinux-enable-ir-emitter run
command; and by extension when the systemd service is started (at boot). - If marked
[IDLE]
, the instruction will not be executed on thelinux-enable-ir-emitter run
command.
- If marked
- Select one, then the status (start/idle/disable), the initial and current value for the instructions, as well as the minimum and maximum values (if exists) will be displayed.
- Input a new value and watch the video feedback to see the difference. You can also input a different status.
- You may also want to reset everything to default, for that see docs/configurations.