Understanding the vision.TextInserter ERROR

조회 수: 27 (최근 30일)
Matpar
Matpar 2020년 5월 16일
댓글: almog haviv 2022년 1월 13일
Hi all and thank you in advance for assisting me,
I am applying the vision.TextInserter function for my code simulation and I am continously receiving this error!
Can some one help to understand this error please? I am not sure what this is but I have been reading the documentation and still Its evading me!
Please help!
my code is;
ishape = insertShape(FirstBeatFrame, 'rectangle',bboxOut,'Linewidth',4);
figure
subplot(1,2,1);
imshow(ishape), title('ishape image');
numobj = numel(objArea);
%% This is Line 103 From My Error%%
hTextIns = vision.TextInserter('%d','Location',[20 20],...
'Color',[255 255 0],'FontSize',30);
itext = step(hTextIns,ishape,int32(numobj));
subplot(1,2,2);
imshow(itext), title('itext image');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
my error
Unable to resolve the name vision.TextInserter.
Error in blobAnalysis2 (line 103)
hTextIns = vision.TextInserter('%d','Location',[20 20],...
  댓글 수: 1
almog haviv
almog haviv 2022년 1월 13일
Hello
How can I run this code with a usb camera ??

댓글을 달려면 로그인하십시오.

채택된 답변

Sindhu Karri
Sindhu Karri 2020년 5월 19일
Hii,
vision.TextInserter is replaced with the function insertText .So replacing the existing code line with insertTextfunction will solve the issue
You can refer to the below documentation link on how to use insertText function
  댓글 수: 1
Matpar
Matpar 2020년 5월 20일
thank you so much for your answer!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by