How to generate QR code of image in MATLAB R2019b.

46 ビュー (過去 30 日間)
Balkar Singh
Balkar Singh 2021 年 3 月 16 日
コメント済み: Balkar Singh 2022 年 12 月 8 日
I want to generate QR code of document image in MATLAB.
Please help
Thanks in advance
  4 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 17 日
The largest QR code is too small to hold that image. However it might be the case that it could fit a compressed version of the image.
Balkar Singh
Balkar Singh 2021 年 3 月 17 日
Ok Sir, but how to generate it. Please help

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

採用された回答

Walter Roberson
Walter Roberson 2021 年 3 月 17 日
filename = 'Tu_logo.png';
[fid, msg] = fopen(filename, 'r');
if fid < 0
error('could not open file "%s" because "%s"', msg)
end
bytes = fread(fid, 'uint8=>char', [1 inf]);
fclose(fid);
qr_array = encode_qr(bytes, [160 160]);
  12 件のコメント
ejs
ejs 2022 年 12 月 7 日
編集済み: Walter Roberson 2022 年 12 月 7 日
Hi folks, the Guilty is here,
The updated code, https://se.mathworks.com/matlabcentral/fileexchange/41437-qr-code-encoder is based on the https://se.mathworks.com/matlabcentral/fileexchange/29239-qr-code-encode-and-decode with these differencies (if I recall correctly): UTF-8 as default character set; possibility to specify size of the message, as we needed the fixed dimensions of the QR code; possibility to alter error correction. It's all in the header.
An no, to my understanting it does not use neither Image Processing toolbox, nor has somenting in common with 3D scene control. Not sure how the categories are assigned in the Fileexchange.
I can't recall the exact procedure of specifyining the ZXing libraries. As ZXing written Java, the same as Matlab, there was some simple procedure to add then to the path. If anyone is still interested in it, I can try to restore the procedure.
Again, it was 12 years ago, there was no online QR services at that time.
Balkar Singh
Balkar Singh 2022 年 12 月 8 日
Thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by