如何提高标记绘图的速度?

时间:2017-09-27 10:22:57

标签: matlab plot tracing imshow

我有一堆图像,我想绘制一个跟踪+一个2D位置的标记随着时间的推移(即300个图像的跟踪从位置(1,1)到(300,300) - >让我们假设一个为此目的的直线对角线。

使用绘图功能可以轻松地在图像上绘制此跟踪。绘制实际跟踪非常耗时。我能够做到的唯一方法是使用vision.MarkerInserter并在循环中使用step函数(for或while):

markerInserter = vision.MarkerInserter('Shape','Circle','BorderColor','Custom','CustomBorderColor','red', ...'Fill',1,'FillColor','Custom','CustomFillColor',[255],'Size',6,'Opacity',0.88);

frame = step(markerInserter, frame_copia,[int32(centroidsFiltered(i,2)) int32(centroidsFiltered(i,1))]);
imshow(frame,'Border', 'tight'); hold on

plot(centroidsFiltered(:,2),centroidsFiltered(:,1),colour,'LineWidth',0.5)

有没有更快的方法在不使用步骤或vision.markerinserter功能的情况下在图像中绘制此跟踪?

1 个答案:

答案 0 :(得分:1)

而不是使用MarkerInserter类,只需使用内置的respectful_tokenizer = YourCustomTokenizerRepectsPunctuation() blob = TextBlob('some text with %', tokenizer=repectful_tokenizer) 函数绘制标记

相关问题