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

3 次查看(过去 30 天)
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

采纳的回答

Constantino Carlos Reyes-Aldasoro
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 个评论
Constantino Carlos Reyes-Aldasoro
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.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2023-1-12
You might look into opticalFlow or normxcorr2 (demo attached).
  3 个评论

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by