MATLAB Answers

Tracking object in video and plot path of object

13 ビュー (過去 30 日間)
MA khan
MA khan 2019 年 12 月 6 日
Commented: Image Analyst 2019 年 12 月 7 日
I have one video and in that video i am tracking a car's particular one point through the video and i got success in that one
but i want to plot that (point on a car) point's path at a same on video. How can i do that??
Please help me
thank you in adavance

  0 件のコメント

サインイン to comment.


Image Analyst
Image Analyst 2019 年 12 月 7 日
Extract a frame, find the car and add it's (x,y) coordinate to a growing list of them, then call "hold on" and plot the entire list of (x,y) coordinates on the frame. Here's a start
% Open up the VideoReader for reading an input video file.
inputVideoReaderObject = VideoReader(inputFullFileName)
% Determine how many frames there are.
numberOfFrames = inputVideoReaderObject.NumberOfFrames;
% Prepare a figure to show the images.
% screenSize = get(0, 'ScreenSize');
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
% Loop through the movie, writing all frames out.
allX = zeros(1, numberOfFrames);
allY = zeros(1, numberOfFrames);
for frame = 1 : numberOfFrames
% Extract the frame from the movie structure.
thisFrame = read(inputVideoReaderObject, frame); % Get the next frame in the video.
[x,y] = FindCar(thisFrame); % however you do it...
allX(frameIndex) = x;
allY(frameIndex) = y;
plot(allX, allY, 'r.-', 'LineWidth', 2, 'MarkerSize', 25);
See several assorted, attached movie demos.

  2 件のコメント

MA khan
MA khan 2019 年 12 月 7 日
Can You help me in one more thing...
I want to locate car wheels through hough circle in video.
For that i convert video into edge only video but it's not working.
can you help me in that case, moreover i want to locate only one car wheels. in video 2 more car passing through it.
so i want to ignor those car wheel and just track one car wheel.
Thnak YOu...
Image Analyst
Image Analyst 2019 年 12 月 7 日
I can't help that much (would take too much of my time). But I can just say to try imfindcircles() which uses hough.

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

Translated by