Reputation: 283
I wanna develop an application in matlab that can do tracking to the object in images. So i have sequence images and i wanna track the object by adding a bounding box around the object.
Ho i can do that??
Here is my code for Bounding box the object in sequence images..
L = bwlabel(Morp);
s = regionprops(L,'BoundingBox');
B = bwboundaries(Morp);
%imshow(a_bw)
hold on
%for k = 1:numel(s)
% c = s(k).Centroid;
% text(c(1), c(2), sprintf('%d', k), ...
% 'HorizontalAlignment', 'center', ...
% 'VerticalAlignment', 'middle');
%end
for k = 1:length(B)
boundary = B{k};
hold on
plot(boundary(:,1), boundary(:,2), 'g', 'LineWidth', 0.2)
end
hold off
drawnow;
Please Help me,,,,
Upvotes: 0
Views: 920
Reputation: 11941
As @Dima said, it depends on the specific problem.
Zhang et al.'s Real-time Compressive Tracking works well in some situations. Essentially, they acquire high dimensional sparse Haar-like features, compress them to make the problem tractable, and then do tracking with a simple Bayesian classifier. The matlab code is easy to try out to see if it suits you purposes. Some issues with it are that you have to provide an initial bounding box to track, and if movement between frames is too great (set by some parameter) tracking can be lost and doesn't recover.
Upvotes: 0
Reputation: 39389
If you have the Computer Vision System Toolbox, then please check out the following examples:
Generally, a lot depends on the specific problem you are trying to solve. Is the camera moving or stationary? Do you need to track a single object or multiple objects? Does your object have a distinctive color or texture? Does your object move in some predictable way?
Upvotes: 1