This repository contains a ROS2 package which many features for showing and monitoring face emotions and apply filters in a real time video.
In order to use this package, follow this steps in terminal.
cd ros2_ws/src
- Clone this repository.
- Colcon your ros2_ws.
colcon build
- Source your workspace
source install/setup.bash
3 filters are implemented for image management. To use them, it is essential to run the publishing node of the frames captured by the video camera.
ros2 run opencv_tools img_publisher
- Frames publisher.
This filter has the effect of softening the image and removing fine details or rapid changes in pixel intensity. For this, the OpenCv (Cv2) library and the cv2.filter2D() method are used. The low pass filter is useful in various applications, such as noise reduction, smoothing images to improve visual appearance, or preparing images for certain processing algorithms that work better with softer data.
ros2 run opencv_tools lowpass
- lowpass filter.
This filter has the effect of representing rapid changes in pixel intensity, such as edges and fine details. For this, the OpenCv (Cv2) library and the cv2.filter2D() method are used. The main function of a high-pass filter in an image is to enhance details and highlight edges. By applying a high-pass filter, you can attenuate parts of the image that contain low-pass variations. frequency, such as uniform areas or smooth intensity transitions, and highlight parts that have abrupt changes.
ros2 run opencv_tools highpass
- highpass filter.
This filter chooses to detect the horizontal lines present in each frame of the image
ros2 run opencv_tools custom_filter
- custom filter.
A launch type file was created to launch the nodes of each filter and the image publisher to display each filter simultaneously.
ros2 launch opencv_tools filtros.launch.py
- Launch file.
In order to visualize face emotions in real time and their analytics for each face.
ros2 launch opencv_tools detector_emociones.launch.py
- Launch file.