Struct contents reference from a non-struct array object.

for t=1:length(rcFiles)
filename=strcat('C:\MATLAB\R2017a\bin\dataset\',rcFiles(t).name);
b=gorsel(filename,t);
end
Struct contents reference from a non-struct array object.

4 件のコメント

Ahmet Gürbüz
Ahmet Gürbüz 2017 年 11 月 16 日
編集済み: Walter Roberson 2017 年 11 月 17 日
.m
function [output]=gorsel(i,artis)
input=imread(i);
% figure,imshow(input);
j=imnoise(input,'salt & pepper',0.02);
k=medfilt2(j);
filename = ['C:\MATLAB\R2017a\bin\Median' num2str(artis,'%d') '.jpg'];
imwrite(k,filename);
% do something with img
i=imread(filename);
level=graythresh(i);
bw=imbinarize(i,level);
filename2= ['C:\MATLAB\R2017a\bin\Otsu' num2str(artis,'%d') '.jpg'];
imwrite(bw,filename2);
output=bw;
end
Rik
Rik 2017 年 11 月 17 日
The only place I see a struct content reference is in the first line inside the loop. Are you sure rcFiles is indeed a struct?
Walter Roberson
Walter Roberson 2017 年 11 月 17 日
It is recommended that you use fullfile() instead of those concatenations of strings.
Ahmet Gürbüz
Ahmet Gürbüz 2017 年 11 月 17 日
Okey rcFiles a struct ı am solution the problem Thank you for your interest...... I solved the problem

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

回答 (0 件)

カテゴリ

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

タグ

質問済み:

2017 年 11 月 16 日

コメント済み:

2017 年 11 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by