Error with imwrite which appears to be toolbox code issue

1 回表示 (過去 30 日間)
Scott
Scott 2019 年 8 月 26 日
コメント済み: Walter Roberson 2019 年 10 月 10 日
I am getting an intermittent error on code within imwrite:
Error: File: C:\Program Files\MATLAB\R2019a\toolbox\matlab\imagesci\imwrite.m Line: 479 Column: 16
Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name: "matlab.virtualfileio.internal.validators.validateCloudEnvVariables" fails this test.
The imwrite is being called within a loop and isn't failing every time. I can't detect a pattern. Here's the call:
imwrite(parameterarea, fullfile('\\R5011655', 'Problems', ['LOWCONFIDENCE_' strip(basename) strip(ext) '_' char(string(i)) '.png']));
I'm not familiar with what the error message is talking about, so I don't really know the first step to fixing this, or if it is even something I can address from my end.
I'm running MATLAB R2019a Update 4 (9.6.0.1150989), 64-bit(win64).
Thanks for any ideas.

回答 (1 件)

Prabhan Purwar
Prabhan Purwar 2019 年 8 月 29 日
Hey,
The error you are facing is due to some fault while configuring the path or compatibility issue among output file format and supported data bit.
You can go through following code that might help you
clc
close all
clear all
load clown.mat;
parameterarea= uint8(X);
basename='hello';
ext='one';
i=1;
imwrite(parameterarea, fullfile(['LOWCONFIDENCE_' strip(basename) strip(ext) '_' char(string(i)) '.png']));
Output
LOWCONFIDENCE_helloone_1.png
Links:
  1 件のコメント
Scott
Scott 2019 年 10 月 10 日
Thank you for the response, but I am struggling to get value from it.
I tried the code you included and it ran without issue, creating the image file in a grayscale format.
I just ran into the IMPORT error again, hence came looking for any further guidance. Is there anything more you can suggest to check? It sure looks like a MATLAB-internal error to me....

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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by