how to assign manual control points and track it in a video?

4 ビュー (過去 30 日間)
RAJKUMAR Palaniappan
RAJKUMAR Palaniappan 2013 年 6 月 20 日
編集済み: Livnat Landau 2017 年 3 月 23 日
I would like to know if there exist any function in matlab to select one or more feature points manually in the first frame and track the points in the consecutive frames and processes it to acquire information regarding the changes.
  1 件のコメント
RAJKUMAR Palaniappan
RAJKUMAR Palaniappan 2013 年 6 月 26 日
I already found a positive and working solution on my own, i used ginput, an inbuilt function to point any number of feature points manually and then i used KLT algorithm for the purpose of tracking

サインインしてコメントする。

採用された回答

RAJKUMAR Palaniappan
RAJKUMAR Palaniappan 2013 年 6 月 26 日
I already found a positive and working solution on my own, i used ginput, an inbuilt function to point any number of feature points manually and then i used KLT algorithm for the purpose of tracking

その他の回答 (1 件)

Livnat Landau
Livnat Landau 2017 年 3 月 23 日
編集済み: Livnat Landau 2017 年 3 月 23 日
Thanks for your Ginput idea. Here is a code to manually track points in video based on it --
%
%read & display multiple images from a folder
srcFiles = dir('*.tif'); % the folder in which our images exist
dist=[];
TF=0;
x_v=[];
y_v=[];
%display file order
for i = 1 : length(srcFiles)
strcat('\',srcFiles(i).name)
end
%manually track points
for i = 1 : length(srcFiles)
filename = strcat('\',srcFiles(i).name);
I = imread(filename);
imshow(I)
for j=1:size(x_v,2)
hold on;
plot(x_v(:,j),y_v(:,j),'+-', 'MarkerSize', 10);
end
hold on
[x,y]=ginput
x_v(i,:)=x;
y_v(i,:)=y;
close all
end

Community Treasure Hunt

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

Start Hunting!

Translated by