The mex files given are from a cpp code.
If you want to compile them with a c compiler, you need to correct some minor symtax differences.
The main one is that you need to declare the variables on the top of the function and not through the program, e.g. avoid for {int i = 0....
I use the new command ~ that ignores useless argouts. If your matlab does not recognize it, just replace all the ~ by trash ( send argouts to a trash variable )
well...this is good.
can i know how to apply measures like local consistency error,global consistency error,or rand index,variation of information....etc,...any of two i need....
Am currently working on flood detection where am supposed to segment the two images , classify them independently and then later obtain a change image.am woundering how i can use to this same method to segment my images and how i can calculate mean for each segment in the image
and also when i try to run this code on my landsat image,it gives this error
??? Index exceeds matrix dimensions.
Error in ==> srm at 66
dG=(image_seg(C1+n_pixels)-image_seg(C2+n_pixels))^2;
@all with compiler issues: rename *.c to *.cxx if you do not know how to change your compiler.
@Sylvain: Nice piece of work.
But what is the purpose of the last 8 lines of code in srm.m function? Their results are not returned. In fact srm_boundarygradient.c can be ignored.
well...this is good.
can i know how to apply measures like local consistency error,global consistency error,or rand index,variation of information....etc,...any of two i need....
Am currently working on flood detection where am supposed to segment the two images , classify them independently and then later obtain a change image.am woundering how i can use to this same method to segment my images and how i can calculate mean for each segment in the image
and also when i try to run this code on my landsat image,it gives this error
??? Index exceeds matrix dimensions.
Error in ==> srm at 66
dG=(image_seg(C1+n_pixels)-image_seg(C2+n_pixels))^2;
@all with compiler issues: rename *.c to *.cxx if you do not know how to change your compiler.
@Sylvain: Nice piece of work.
But what is the purpose of the last 8 lines of code in srm.m function? Their results are not returned. In fact srm_boundarygradient.c can be ignored.
bgradient = sparse(srm_boundarygradient(labels, nlabels, normgradient));
bgradient = bgradient - tril(bgradient);
idx=find(bgradient>0);
[~,index]=sort(bgradient(idx));
n_pairs=numel(idx);
[xlabels,ylabels]=ind2sub([nlabels,nlabels],idx);
pairs1=clusterlist(xlabels);
pairs2=clusterlist(ylabels);
Comment only