开发者

tracking an image in matlab

How do you for example put a b开发者_开发知识库lue circle centered over an image you are tracking? Not a filled in circle, but more like a donut.


Here's an example based on Jonas' answer in your other question:

%# sample image
I = imread('autumn.tif');
figure, imshow(I)

%# location of random feature points
featLoc = randi([1 200], [10 2]);

%# draw first 5 points as one set, the rest as another with a different color
lineProps = {'LineStyle','none', 'LineWidth',2, 'Marker','o', 'MarkerSize',10};
line(featLoc(1:5,1), featLoc(1:5,2), 'Color','r', lineProps{:})
line(featLoc(6:end,1), featLoc(6:end,2), 'Color','b', lineProps{:})

tracking an image in matlab


For example like this:

%# load image and display it
img = imread('autumn.tif');
figure,imshow(img);

%# make it such that plotting something doesn't erase 
%# the previous plot (i.e. the image)
hold on

%# plot a circle. MarkerSize controls the size of the circle
plot(200,100,'ob','MarkerSize',14)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜