read Barcode is showing error- Undefined function or variable 'readBarcode'.

clc;
clear;
obj=webcam;
img=snapshot(obj);
msg=readBarcode(img);
disp("message="+msg);
After I tried to run this basic program of barcode reading, I found this error message of [Undefined function or variable 'readBarcode'.]
Now, I want to know, why this error happened and what can be done?

回答 (2 件)

Star Strider
Star Strider 2021 年 5 月 26 日

2 投票

According to the documentation, the readBarcode function was introduced in R2020a.
The version posted is R2019a, so to use it, it will be necessary to upgrade to R2020a.

2 件のコメント

Jan
Jan 2021 年 5 月 26 日
Perfect. I've overseen this detail.
Star Strider
Star Strider 2021 年 5 月 26 日
Thank you!

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

Jan
Jan 2021 年 5 月 25 日

0 投票

Do you have a license for the Computer Vision Toolbox?

4 件のコメント

SANDEEP KUMAR SINGH
SANDEEP KUMAR SINGH 2021 年 5 月 25 日
how to check that?
I have this Computer Vision Toolbox installed in the matlab.
In 'manage add ons' it is showing that, the computer vision toolbox is installed.
Jan
Jan 2021 年 5 月 25 日
Check this by:
ver
Actually the function should be found, if the toolbox is installed. What does this reply:
which('readBarcode')
SANDEEP KUMAR SINGH
SANDEEP KUMAR SINGH 2021 年 5 月 26 日
Ok, I will try and will get back to you, if the same problem still exists.
Jan
Jan 2021 年 5 月 26 日
Maybe you need to rehash the toolbox cache:
rehash toolboxcache

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

カテゴリ

ヘルプ センター および File ExchangeComputer Vision Toolbox についてさらに検索

製品

リリース

R2019a

タグ

質問済み:

2021 年 5 月 25 日

コメント済み:

2021 年 6 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by