Undefined variable "vision" or class "vision.TextInserter".

Undefined variable "vision" or class "vision.TextInserter".
What should I do to fix this problem? Need help.
Thank you!

回答 (1 件)

Guillaume
Guillaume 2018 年 11 月 30 日

0 投票

Install the computer vision toolbox. If you don't have a license for it, then you cannot use the code you're trying to use.

3 件のコメント

Xuan Zhao
Xuan Zhao 2018 年 11 月 30 日
Yes, I installed this toolbox and this function is still undefined. But when I change vision to insertText function , it works successfully.
Anyway, thank you for advice.
ethan jacobs
ethan jacobs 2019 年 4 月 18 日
I saw on mathworks that instead of using htextinsRED = vision.TextInserter('Text', 'Red : %2d', ... % Set text for number of blobs
'Location', [5 2], ...
'Color', [1 0 0], ... // red color
'Font', 'Courier New', ...
'FontSize', 14);
matlab now uses RGB = insertText(I,position,text)
the "I" is the image (grabbed one by one from the streaming webcam). how do I get the image if it is grabbed in the while loop below ?
Guillaume
Guillaume 2019 年 4 月 18 日
It does not matter where your image comes from. As long as I is an image (i.e. a 2D matrix for greyscale images, a 3D matrix for colour images), insertText will work. As long as you have the computer vision toolbox installed and licensed of course.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Image Processing and Computer Vision についてさらに検索

質問済み:

2018 年 11 月 30 日

コメント済み:

2019 年 4 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by