I have been trying to write an image file to the colud.
Something of that sort:
A = rand(100,100);
filepath = 's3://mybucket/myimage.tif';
imwrite(A,filepath);
Unoftinetly, this code returns:
"Error using fopen The file name contains characters that are not contained in the filesystem encoding. Certain operations may not work as expected."
I did find an implementation using tall in this article under "Write Images with Custom Write Function" however that seems to be overkill as I'm trying to upload a single file, so building a tall might be too much.
In addition I could use AWS CLI to write a file locally than upload to the cloud, but that seems not the right way to work either.
Did anyone had an experience in doing so?

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 9 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 9 日

1 投票

A=rand(100,100);
filepath='C:\Research\Matlab Work\';
%........................folder path
imwrite(A,[filepath,'hello.tiff']);
%......................^file_name
Verified from folder:
po.png
or
A=rand(100,100);
filepath='C:\Research\Matlab Work\hello';
imwrite(A,[filepath,'.tiff']);

3 件のコメント

Adam de la Zerda
Adam de la Zerda 2019 年 8 月 9 日
Thank you, for your quick answer.
However I'm looking into saving my image to the cloud not locally.
NANDITA SHARMA
NANDITA SHARMA 2020 年 12 月 7 日
Thank you @KALYAN ACHARJYA sir for providing this code. It is really helpful to upload the image file in the AWS s3 cloud. Thanks a lot.
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 12 月 8 日
Nandita Sharma Ji,
Glad to know that he helped you. :)

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

カテゴリ

ヘルプ センター および File ExchangeCloud Integrations についてさらに検索

製品

リリース

R2019a

質問済み:

2019 年 8 月 9 日

コメント済み:

2020 年 12 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by