Detección y seguimiento de objetos en secuencia de imágenes por medio de procesamiento de imágenes y filtro de kalman
Date
2021xmlui.dri2xhtml.METS-1.0.item-advisor
Silva, Luis Ángel
xmlui.dri2xhtml.METS-1.0.item-type
Proyecto de grado
Citación
Metadata
Show full item recordDocuments PDF
Abstract
En este proyecto se desarrolló una aplicación de escritorio usando el IDE Python 3.9 enlazado a la librería OpenCV,
implementando el algoritmo del filtro de Kalman, logrando la detección, el seguimiento y la predicción de la
posición del objeto dada por el centroide de este. Inicialmente, se realizó una breve revisión bibliográfica del
algoritmo del filtro de Kalman y su uso en la visión artificial y el procesamiento de imágenes. La aplicación de
escritorio resultante contiene cuatro opciones en el menú principal, donde la primera fue llamada
“UMBRALIZACIÓN”, en la cual por medio de la captura de imágenes en tiempo real se convierte estas imágenes
del espacio de color RGB al espacio de color HSV y por medio de deslizadores se encuentran los umbrales que
contienen el objeto y esos datos de los umbrales son guardados para las pruebas futuras. La segunda opción del menú
principal fue llamada “PREDICCIÓN / SEGUIMIENTO”, donde se seleccionan los datos de los objetos que se
desean detectar tomando los valores de los umbrales anteriormente encontrados. Con estos datos se realiza el
procesamiento de imagen, inicialmente aplicando transformaciones morfológicas y luego extrayendo características
como los contornos y centroides de los objetos, tomando los centroides como la posición del objeto en el plano
coordenado (x, y). Por medio de ecuaciones lineales relacionando el diámetro en pixeles del objeto con distancias
medidas manualmente, se halla un aproximado de la posición en el eje z. Posteriormente con los datos de las
posiciones de los objetos, el filtro de Kalman el cual se encarga de predecir la posición futura en los tres ejes
manejando así tres dimensiones. Los datos tomados son guardados en un documento plano para luego ser graficados
y analizados. La tercera opción del menú principal fue llamada “GRAFICAS RESULTADO”, donde por medio de la
librería Matplotlib se realizaron las gráficas de comparación de trayectorias en cada uno de los ejes, la gráfica de
movimiento en el plano coordenado (x, y) y la gráfica en el espacio (x,y,z). La cuarta y última opción del menú
principal fue llamado “SALIR” encargada de terminar el proceso y cerrar la aplicación. Finalmente se realizaron
pruebas en tiempo real capturando las imágenes mediante la cámara web del computador portátil y con un ambiente
no controlado entregando resultados de detección, seguimiento y predicción de la posición con resultados
considerablemente aproximados, con una detección eficiente de acuerdo al color de cada objeto y valores muy
similares entre la posición del objeto y la posición predicha por el filtro de Kalman como también en las trayectorias
entregando mayor suavidad en los cambios de dirección en la posición predicha en comparación con la posición
medida. In this project, a desktop application was developed using the Python 3.9 IDE linked to the OpenCV library,
implementing the Kalman filter algorithm, achieving the detection, monitoring and prediction of the object's position
given by its centroid. Initially, a brief literature review of the Kalman filter algorithm and its use in computer vision
and image processing was conducted. The resulting desktop application contains four options in the main menu,
where the first one was called "UMBRALIZACIÓN”, in which by means of the capture of images in real time these
images are converted from the RGB color space to the HSV color space and by Middle of sliders are the thresholds
that contain the object and that threshold data is saved for future testing. The second option on the main menu was
called “PREDICCIÓN / SEGUIMIENTO”, where the data of the objects to be detected are selected taking the values
of the previously found thresholds. Image processing is carried out with these data, initially applying morphological
transformations and then extracting characteristics such as the contours and centroids of the objects, taking the
centroids as the position of the object in the coordinate plane (x, y). By means of linear equations relating the
diameter in pixels of the object with manually measured distances, an approximation of the position on the z axis is
found. Subsequently with the data of the positions of the objects, the Kalman filter which is in charge of predicting
the future position in the three axes, thus managing three dimensions. The data collected is saved in a flat document
to later be plotted and analyzed. The third option of the main menu was called “GRAFICAS RESULTADO”, where
by means of the Matplotlib library the graphs of comparison of trajectories in each of the axes, the graph of
movement in the coordinate plane (x, y) and the graph in space (x, y, z). The fourth and last option of the main menu
was called "SALIR" in charge of ending the process and closing the application. Finally, tests were carried out in real
time, capturing the images through the webcam of the laptop and with a non-controlling environment, delivering
results of detection, monitoring and prediction of the position with considerably approximate results, with efficient
detection according to the color of each object. and very similar values between the position of the object and the
position predicted by the Kalman filter as well as in the trajectories giving greater smoothness in the changes of
direction in the predicted position compared to the measured position
Keyword/s
Ingeniería Electrónica
Detección
seguimiento
procesamiento de imágenes
filtro Kalman
Collections
- Trabajos de grado [6733]
The following license files are associated with this item: