error inundefined function or method 'mtimes' for input arguments of type struct??
이전 댓글 표시
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
Stephen23
2015년 8월 19일
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
2015년 8월 19일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!