1
你如何在你正在跟蹤的圖像上放置一個藍色圓圈?不是一個圈子,但更像一個甜甜圈。在matlab中跟蹤圖像
你如何在你正在跟蹤的圖像上放置一個藍色圓圈?不是一個圈子,但更像一個甜甜圈。在matlab中跟蹤圖像
例如像這樣:
%# 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)
下面是你的另一個問題基於Jonas' answer一個例子:
%# 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{:})