selecting area on a image and Tracking the same area in the next subsequent images automatically

4 visualizaciones (últimos 30 días)
I have 12 images in the folder, i want to select area (Basically i want to mark a region and see where those pixels are going in the next subsequent images,We do call ROI) on the first image, this same area to be tracked in the nest subsquent images (These remaining images moves upwards as image number increases ).
How can i do it. Please any one guide me to do this task.
Below images are for your reference (how i wanted to).
As you can see in the image1 marked region, pixels in the image1. Now see the last image marked region is there itself (marked region fixed) but pixels in last image is moved upwards(color portion moved upwards (colour might be different )).
Any leads will be much appriciated.
Thanks in adavance

Respuesta aceptada

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 12 de En. de 2023
Ok, the first part of this problem is rather simple, if I understand correctly, you want to select a region of interest in one image and then have the same region in subsequent images. Say your image is
a = randn(200,60);
imagesc(a);
Then you can select a region, say that your area of interest is (20:90,20:30)
so define these as the rows and columns
rows=20:90; columns=20:30;
ROI = a(rows,columns);
imagesc (ROI)
now you only need to do the same to all your images.
Now the second part may not be so trivial depending on what you mean by "tracking". But hope this helps you get started.
  5 comentarios
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 13 de En. de 2023
OK, so select one ROI in the first frame with roipoly(), then run a cross correlation as suggested by Image Analyst, that will give you the movement of the ROI (assuming that the ROI is moving and not deforming or changing significantly) and then you can locate the new position of the ROI.

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 12 de En. de 2023
You might look into opticalFlow or normxcorr2 (demo attached).
  3 comentarios

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by