Introducci贸n y Visi贸n General de SecureVision AI
Introducci贸n a SecureVision AI y CCTV
Fundamentos de Visi贸n Computarizada en CCTV
Procesamiento de Im谩genes y Fundamentos de OpenCV
Introducci贸n a OpenCV para An谩lisis de CCTV
Creaci贸n y An谩lisis de Heatmaps con OpenCV
Quiz: Procesamiento de Im谩genes y Fundamentos de OpenCV
Segmentaci贸n de Im谩genes con YOLO
Configuraci贸n de Modelos Preentrenados para Segmentaci贸n con YOLO
Integraci贸n de Segmentaci贸n en Tiempo Real y Generaci贸n de Heatmaps
Quiz: Segmentaci贸n de Im谩genes con YOLO
Detecci贸n de Objetos con YOLO
Introducci贸n a la Detecci贸n de Objetos con YOLO
Configuraci贸n y Uso de Modelos YOLO Preentrenados
Implementaci贸n de un Sistema de Conteo de Personas con YOLO
Quiz: Detecci贸n de Objetos con YOLO
Pose Estimation con Mediapipe
Fundamentos de Pose Estimation con Mediapipe
Seguimiento y An谩lisis de Miradas con Mediapipe
Generaci贸n de Heatmap de Miradas con Mediapipe y OpenCV
Quiz: Pose Estimation con Mediapipe
Entrenamiento y Creaci贸n de Modelos Personalizados con YOLO
Entrenamiento de un Modelo YOLO para Detectar Defectos en Soldaduras Industriales - Parte 1
Entrenamiento de un Modelo YOLO para Detectar Defectos en Soldaduras Industriales - Parte 2
Etiquetado de Im谩genes con Label Studio
Reflexi贸n y Cierre del Curso
You don't have access to this class
Keep learning! Join and start boosting your career
Eye-tracking technology has revolutionized the way we understand human interaction with digital products and content. Through heat maps generated using Gaussian algorithms, we can visualize exactly where users' visual attention is focused, providing invaluable data to improve designs, interfaces and user experiences. This detailed analysis allows us to understand not only what our customers see, but how they interact visually with what they see.
The foundation of an eye-tracking heat map is based on a Gaussian distribution in a three-dimensional space. This mathematical function allows us to create a visual representation where the central point corresponds to the area where the user is focusing their gaze. Although we work in a three-dimensional space, the result is displayed in a flat two-dimensional image.
The Gaussian distribution formula includes several configurable parameters:
These parameters allow us to adjust the display to accurately represent how the user's visual attention is distributed on the screen.
To implement this solution, we continue to work with MediaPipe for face detection, using a minimum confidence threshold of 0.5. The process includes several key steps:
# Get frame dimensionsheight, width = frame.shape[:2]# Initialize the heatmapheatmap = np.zeros((height, width), dtype=np.float32)# Apply exponential decayheatmap *= decay_factor
Once the heatmap is generated, we perform a normalization to scale the values between 0 and 255, which allows us to apply a "jet" type color palette (ranging from deep red, through yellow, green and up to light blue). Finally, we superimpose this map on the original image with some transparency.
Although real-time eye tracking is useful, many professional studies prefer to record videos of users for later analysis in greater detail. This methodology allows for more in-depth analysis without the time constraints of live processing.
To implement this solution with pre-recorded videos, we can use both CPU and GPU, the latter being significantly faster for processing. The basic procedure is:
# Define output pathoutput_path = 'eye_tracking_result.mp4'# Configure output formatfourcc = cv2.VideoWriter_fourcc(*'mp4v')fps = 30video_writer = cv2.VideoWriter(output_path, fourcc, fps, (width, height))# Write each processed framevideo_writer.write(processed_frame)
It is important to note that this technique has significant limitations, especially when it comes to head position relative to gaze direction. For example, if a person has his or her head tilted upward but is looking downward, the system could incorrectly interpret the direction of gaze.
This limitation is particularly relevant when the objects of interest are at different distances from the user. The system works best when the objects are relatively close and in the same plane, such as a computer screen.
Eye tracking using heat maps offers a powerful tool for understanding the visual behavior of users. Whether implemented in real time or applied to pre-recorded videos, this technology provides valuable insights into how people interact with digital interfaces and physical products. We invite you to experiment with your own videos using the techniques described and share your experiences in the comments.
Contributions 1
Questions 0
Want to see more contributions, questions and answers from the community?