Tracking binary images and get x and y data from it (return their location)

Hello,
I have a video, that I split and I make a cycle, where on every single frame in that video I applyed segmentation. So now, every single frame is in binary.
In video, this object is rotating, and I would like to get a data from it, so x and y values from every frames, return their location.
Is in Matlab any function that I get detect the line and also the circle? I would like to mark the exact pixel I want and than get a data from it.
Or is there any other idea?
Thank you so much for your answers

 Respuesta aceptada

Image Analyst
Image Analyst el 29 de Oct. de 2022
Editada: Image Analyst el 30 de Oct. de 2022
What exactly does "get a data from it" mean? You can get all the x,y data from a binary image like this
[y, x] = find(binaryImage);
You can find the angle of the line by asking @doc:regionprops for 'Orientation'. Make sure you have only one blob in there. Use bwconvhull if you need to.

6 comentarios

Eliska Paulikova
Eliska Paulikova el 29 de Oct. de 2022
Movida: DGM el 29 de Oct. de 2022

But I would like to get concrete pixel.

This one.. I have already know the middle of the circle and radius of circle.. But I would like also get the y and x values of that line
Make a mask of the circle then use it to erase the original mask. Then use find to find the coordinates of the remaining pixels representing the concrete.
concreteMask = originalMask; % Initialize
concreteMask(circleMask) = false;
[rows, columns] = find(concreteMask);
Thank you so much
I appreciate it.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2022b

Preguntada:

el 28 de Oct. de 2022

Comentada:

el 30 de Oct. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by