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 comentarios

Ahmet Gürbüz
Ahmet Gürbüz el 16 de Nov. de 2017
Editada: Walter Roberson el 17 de Nov. de 2017
.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 el 17 de Nov. de 2017
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?
It is recommended that you use fullfile() instead of those concatenations of strings.
Okey rcFiles a struct ı am solution the problem Thank you for your interest...... I solved the problem

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Nov. de 2017

Comentada:

el 17 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by