error inundefined function or method 'mtimes' for input arguments of type struct??
Mostra commenti meno recenti
gui code for browser button:-
[filename pathname]=uigetfile({'*.jpg';'*.bmp'},'File selector');
image=strcat(pathname, filename);
axes(handles.axes1)
imshow(image)
read_query(filename);% function call whose defination is given below
now code for read query:-
function img=read_query(filename)
I=imread(filename);
[c1,c2,e1,h,v,e2]=glcm_feature_extraction(I)
xlswrite('qfile.xlsx',[c1,c2,e1,h,v,e2]);%qfile is excel file for storing 6 glcm features like correaltion ,entropy etc etc.
function code for glcm feature extraction method :-
function [Contrast,cor,ener,homo,V,E]= glcm_feature_extraction(I1)
Contrast1 = graycoprops(graycomatrix(rgb2gray(I1)),'Contrast')
cor1= graycoprops(graycomatrix(rgb2gray(I1)), 'Correlation')
ener1 = graycoprops(graycomatrix(rgb2gray(I1)), 'Energy')
homo1 = graycoprops(graycomatrix(rgb2gray(I1)), 'Homogeneity')
img = double(I1);
V1 = var((img(:)))
E1=entropy(I1)
*contrast=round(Contrast1*1e1)/1e1*
cor= round(cor1* 1e1) / 1e1
ener=round(ener1* 1e1) / 1e1
homo=round(homo1* 1e1) / 1e1
V=round(V1* 1e1) / 1e1
E=round(E1* 1e1) / 1e1
-----------------------------------------------------------
while running code the bold characters"contrast=round(Contrast1*1e1)/1e1" is showing error undefined function or method 'mtimes' for input arguments of type struct?? .error in glcm_feature_extraction at contrast=round(Contrast1*1e1)/1e1.
i know question is bit longer but pls help me. thanks.
2 Commenti
Stephen23
il 19 Ago 2015
In future please format your code properly by selecting it and then clicking the {} Code button that you will find above the textbox. And please do not put an empty line between every line of your code, this actually makes it more difficult to read.
Guillaume
il 19 Ago 2015
The way to format code on this forum is not by putting a blank line between each line of code, but by putting two spaces in front of each line or even simpler, just using the {} Code button.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Whos in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!