This package shows an integration of opencv (cv_bridge) with ROS 2 ,also face-dectection using ROS 2.
This package helps you integrate Opencv with ROS 2 and also face-detection. Install all dependecies:
sudo apt install ros-<ros2-distro>-cv-bridge
using the pip command:
pip install opencv-python
NOTE: python3 has to be installed before this nodes can work.
To run this Node.
Create a workspace and clone the package into your src folder.
Then:
ros2 run ros2_cv face_detection
Open rviz and visualize the image from your webcam.
ros2 run rviz2 rviz2
set the image topic to "/webcam" You will see as Video displayed below:
Screencast.from.03-16-2023.12.54.55.AM.webm
You can integrate this package in simulation and also can be used in a pysical robot with Opencv.