====== Intel Realsense======
**{{tagpage>skeleton camera3D|Les pages sur les caméras 3D et la détection de squelette}}** **[[http://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fressources.labomedia.org%2Fintel_realsense|English Version]]**
{{ :media_15:img_0005.jpg?600 |}}
===== Ressources =====
* **[[cameras_de_profondeur|Camera Realsense Installation]] Intel® RealSense™ Computer Vision - Depth and Tracking cameras**
* [[https://intelrealsense.github.io/librealsense/python_docs/_generated/pyrealsense2.html|API python]]
* [[https://pyrealsense.readthedocs.io/en/master/pyrealsense.html|pyrealsense.readthedocs.io]]
* [[https://github.com/IntelRealSense/librealsense/tree/development/wrappers/python/examples| Exemples python sur GitHub]]
=====Installation du driver du Capteur D455=====
* **[[https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md|github.com librealsense doc linux]]**
Validé sur Debian 11 Bullseye
sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo apt install software-properties-common
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo focal main" -u
Puis\\
sudo apt update
sudo apt install -f librealsense2-dkms
Tester avec:
sudo apt install librealsense2-utils
realsense-viewer
Voir si le module est bien chargé
modinfo uvcvideo | grep "version:" devrait inclure realsense
{{ ::realsense_viewer.png?400 |}}
===== Récupération des images avec OpenCV en python =====
====Installation de pyrealsense2====
* https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#installation
python3 -m pip install pyrealsense2 --user
====L'exemple de la doc librealsense====
* [[https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/opencv_viewer_example.py|opencv_viewer_example.py]]
{{ :media_14:realsense_opencv.png?800 |}}
====Calibration de la caméra====
**Avec une calibration, la détction du squelette est beaucoup plus stable.**\\
Une copie du script de la doc se trouve dans le dossier rs-imu-calibration: [[https://github.com/sergeLabo/rs-opencv/blob/main/rs-imu-calibration/rs-imu-calibration.py|rs-imu-calibration.py]]\\
Suivre le script et le PDF [[https://github.com/sergeLabo/rs-opencv/blob/main/rs-imu-calibration/IMU_Calibration_Tool_for_Intel_RealSense-Depth_Cameras_Whitepaper.pdf|IMU_Calibration_Tool_for_Intel_RealSense-Depth_Cameras_Whitepaper.pdf]]
Exemple d'une calibration
python3 rs-imu-calibration.py
waiting for realsense device...
Device PID: 0B5C
Device name: Intel RealSense D455
Serial number: 053422251581
Product Line: D400
Firmware version: 05.12.11.00
Start interactive mode:
FOUND ACCEL with fps=63
FOUND GYRO with fps=200
-------------------------
*** Press ESC to Quit ***
-------------------------
Align to direction: [ 0. -1. 0.] Mounting screw pointing down, device facing out
Status.collect_data[...................]]
Direction data collected.
Align to direction: [1. 0. 0.] Mounting screw pointing left, device facing out
Status.collect_dataWARNING: MOVING ]]
Status.collect_data[...................]]
Direction data collected.
Align to direction: [0. 1. 0.] Mounting screw pointing up, device facing out
Status.collect_data[...................]]
Direction data collected.
Align to direction: [-1. 0. 0.] Mounting screw pointing right, device facing out
Status.collect_dataWARNING: MOVING ]]
Status.collect_data[...................]]
Direction data collected.
Align to direction: [ 0. 0. -1.] Viewing direction facing down
Status.collect_data[...................]]
Direction data collected.
Align to direction: [0. 0. 1.] Viewing direction facing up
Status.collect_dataWARNING: MOVING ]]
Status.collect_data[...................]]
Direction data collected.
Would you like to save the raw data? Enter footer for saving files (accel_
=====Les pages sur la détection de squelette=====
* [[skeleton_tracking_de_cubemos_logiciel_proprietaire|]]
* [[pose_estimation_avec_opencv]]
{{tag> capteurs opencv python realsense sb skeleton camera3D ia}}