我需要写入count的值而不是字符串" count"在图像上 我该怎么办?
htxtins = vision.TextInserter('count');
htxtins.Color = [255, 255, 255];
htxtins.FontSize = 24;
htxtins.Location = [5 50];
J = step(htxtins,frame);
答案 0 :(得分:1)
假设count的值存储在名为count
的变量中,那么
vision.TextInserter(num2str(count));
会做的。
如果您想创建更复杂的字符串,可以使用strcat
,例如
strcat('Count =',num2str(count))