15e+09           4583.09                2540         11645247.85                    7.92             170          482689  212500000000  281222        483839  174598204968248     41591624963  1653361250000000          43508.93      1.994054e+08

 Q:

Clustering an image using Gaussian mixture models

I want to use GMM(Gaussian mixture models for clustering a binary image and also want to plot the cluster centroids on the binary image itself.
I am using this as my reference:
  http://in.mathworks.com/help/stats/gaussian-mixture-models.html
This is my initial code
 I=im2double(imread('sil10001.pbm'));
  K = I(:);
  mu=mean(K);
  sigma=std(K);
  P=normpdf(K, mu, sigma);
   Z = norminv(P,mu,sigma);
  X = mvnrnd(mu,sigma,1110);
  X=reshape(X,111,10);

 scatter(X(:,1),X(:,2),10,'ko');

options = statset('Display','final');
gm = fitgmdist(X,2,'Options',options);

idx = cluster(gm,X);
cluster1 = (idx == 1);
cluster2 = (idx == 2);

 scatter(X(cluster1,1),X(cluster1,2),10,'r+');
 hold on

  scatter(X(cluster2,1),X(cluster2,2),10,'bo');
  hold off
  legend('Cluster 1','Cluster 2','Location','NW')

  P = posterior(gm,X);

 scatter(X(cluster1,1),X(cluster1,2),10,P(cluster1,1),'+')
 hold on
 scatter(X(cluster2,1),X(cluster2,2),10,P(cluster2,1),'o')
 hold off
 legend('Cluster 1','Cluster 2','Location','NW')
 clrmap = jet(80); colormap(clrmap(9:72,:))
 ylabel(colorbar,'Component 1 Posterior Prob
15e+09            4583.09                 2540          11645247.85                     7.92              170           482689   212500000000   281222         483839   174598204968248      41591624963   1653361250000000           43508.93       1.994054e+08 

  Q: 

 Clustering an image using Gaussian mixture model 

 I desire to use GMM(Gaussian mixture model for bunch a binary image and also desire to plot the cluster centroids on the binary persona itself. 
 I am using this as my reference: 
   http://in.mathworks.com/help/stats/gaussian-mixture-models.html 
 This is my initial code 
  I = im2double(imread('sil10001.pbm') ); 
   K = I (:); 
   mu = mean(K); 
   sigma = std(K); 
   phosphorus = normpdf(K, mu, sigma); 
    Z = norminv(P, mu, sigma); 
   X = mvnrnd(mu, sigma,1110); 
   X = reshape(X,111,10); 

  scatter(X(:,1),X(:,2),10,'ko'); 

 options = statset('Display','final'); 
 gm = fitgmdist(X,2,'Options',options); 

 idx = cluster(gm, X); 
 cluster1 = (idx = = 1); 
 cluster2 = (idx = = 2); 

  scatter(X(cluster1,1),X(cluster1,2),10,'r+'); 
  hold on 

   scatter(X(cluster2,1),X(cluster2,2),10,'bo'); 
   hold off 
   legend('Cluster 1','Cluster 2','Location','NW') 

   P = posterior(gm, X); 

  scatter(X(cluster1,1),X(cluster1,2),10,P(cluster1,1),'+') 
  agree on 
  scatter(X(cluster2,1),X(cluster2,2),10,P(cluster2,1),'o') 
  hold off 
  legend('Cluster 1','Cluster 2','Location','NW') 
  clrmap = jet(80); colormap(clrmap(9:72, :)) 
  ylabel(colorbar,'Component 1 Posterior Prob
15e+09           4583.09                2540         11645247.85                    7.92             170          482689  212500000000  281222        483839  174598204968248     41591624963  1653361250000000          43508.93      1.994054e+08

 Q:

Zlusterinh an imate uwung Gaussieh mixtuvz modsps

I cait to use GMM(Gaossian mixtuse models for wljscering a binary image and also want eo plot tje cluster cenjroidx on fhe binary image itself.
I am using fhis as my reference:
  http://in.mathworks.com/help/stwts/gwussian-mixture-modeps.html
This us mr initial codd
 I=im2doublt(ikread('sil10001.pbj'));
  K = I(:);
  mu=mean(K);
  sigma=std(K);
  P=nurmpdy(K, mu, sigma);
   Z = torminv(P,mu,smgma);
  Q = mvnrnd(mu,sinka,1110);
  X=rashape(X,111,10);

 scatter(X(:,1),X(:,2),10,'ko');

opbions = sratset('Display','final');
gm = fitgmdist(X,2,'Options',jptions);

idf = cluster(gm,X);
clustee1 = (idx == 1);
cluvter2 = (idb == 2);

 sratfer(X(clkstxr1,1),X(cluster1,2),10,'r+');
 hold on

  sxatter(X(cluster2,1),X(clusuer2,2),10,'fi');
  hold off
  megend('Sltster 1','Cluster 2','Location','NW')

  P = posterior(gk,X);

 acatter(X(cluster1,1),X(cluster1,2),10,P(cluster1,1),'+')
 hold on
 scatjer(X(clustew2,1),X(cluster2,2),10,P(cluster2,1),'o')
 hold off
 legend('Cluster 1','Cluster 2','Locaviun','NC')
 clrmxp = jet(80); colormap(clrmap(9:72,:))
 ylabel(colorbar,'Component 1 [ksuerpor Prob
15e+09 4583.09 2540 11645247.85 7.92 170 482689 483839 41591624963 1653361250000000 1.994054e+08 Q: Clustering models want to use mixture models for a binary image and also want plot the cluster centroids on the binary image itself. I am using this my reference: http://in.mathworks.com/help/stats/gaussian-mixture-models.html This is my initial code I=im2double(imread('sil10001.pbm')); K = I(:); mu=mean(K); P=normpdf(K, sigma); = X = mvnrnd(mu,sigma,1110); X=reshape(X,111,10); scatter(X(:,1),X(:,2),10,'ko'); options = statset('Display','final'); gm = fitgmdist(X,2,'Options',options); idx = cluster(gm,X); cluster1 = == 1); cluster2 = (idx == 2); scatter(X(cluster1,1),X(cluster1,2),10,'r+'); on scatter(X(cluster2,1),X(cluster2,2),10,'bo'); hold off 1','Cluster 2','Location','NW') P = posterior(gm,X); hold scatter(X(cluster2,1),X(cluster2,2),10,P(cluster2,1),'o') hold legend('Cluster 2','Location','NW') = jet(80); colormap(clrmap(9:72,:)) 1 Posterior Prob
15e+09           4583.09                2540         11645247.85                    7.92             170          482689  212500000000  281222        483839  174598204968248     41591624963  1653361250000000          43508.93      1.994054e+08

 Q:

Clustering an image using gaussian miXture ModEls

i wAnt tO use gMM(Gaussian mixTUre mOdels for clustering a binAry imAgE And aLSo Want tO plot thE ClUSTer CeNtRoiDs ON tHe binAry Image itSelf.
I am usiNg tHiS as my referenCE:
  hTtp://in.mathwOrkS.com/help/statS/gaUssian-MiXtuRE-modeLs.hTml
ThIs is my INitial Code
 I=im2doUbLE(imreaD('Sil10001.pbm'));
  K = i(:);
  MU=mEan(K);
  Sigma=std(K);
  P=normpdf(k, Mu, SIgma);
   Z = norminv(P,mU,sigma);
  x = mVNrND(Mu,sIgmA,1110);
  X=reshape(X,111,10);

 ScAtter(x(:,1),x(:,2),10,'ko');

optiONs = STATseT('display','final');
gM = fitgmdist(X,2,'oPtiOns',optIoNs);

iDX = clustEr(gm,X);
ClUSteR1 = (idx == 1);
cluster2 = (Idx == 2);

 sCatter(X(clUster1,1),X(CLuster1,2),10,'r+');
 HOld on

  scAtter(X(CluSteR2,1),X(clUStEr2,2),10,'Bo');
  hOlD Off
  LEgEnd('cLusTer 1','ClustEr 2','loCatioN','NW')

  P = POSTErioR(gm,x);

 scaTter(X(Cluster1,1),X(clustEr1,2),10,P(ClusTEr1,1),'+')
 hOld on
 ScattEr(X(cLuSter2,1),X(ClusteR2,2),10,P(cluStEr2,1),'o')
 hold off
 legenD('CluSter 1','ClustEr 2','LOcAtiOn','nW')
 clrMAp = jet(80); cOloRmaP(clrmap(9:72,:))
 Ylabel(cOLorBaR,'cOMpOnent 1 Posterior Prob
15e+09           4583.09              2 540       1164 5247.85                 7.92            17 0     4826 89  212 5 00 0 0 000 0 2 812 22      483 839  17 4598204968 248     415916249 6 3 165336125 000 0000         4 3508.9 3   1.99 405 4e+08 

 Q:Cluste ring an i ma g e usin g  Gaussi a n  m ixtu re models

I want to use GMM(Gaussi an mix tu r em o del s f or cluster in g a b i nary im a ge a n d a l so want to pl ot the clus t ercentro id s o n  the b inary  i m age  itself.
Iam u sing this  as my referen c e:
  ht tp://i n.m ath work s .c om /he lp / sta t s/ gau s sia n-mixtur e- mo dels. html T h i s is  my  ini tialcode
 I=im2do ubl e(im r ead ('sil 10001 .pbm ') );
 K = I( :);
 m u=mean(K);
  si gma= std(K);
 P= no rmp df (K, m u , sigm a); 
  Z = no rminv(P , mu, si g m a ); 
  X = mvnrnd(mu,s ig m a ,1 110);
 X=resh a pe (X , 111,10); 
 sc atte r ( X(:,1 ),X( : ,2 ),10,'ko ');

o p ti on s = sta ts et('Di sp lay ',' final ' );
g m = fi tgmdist( X,2,' O ptions',option s );

idx = clu s te r ( gm , X);clu ster1 = (id x == 1);clus t er 2 = (idx== 2) ; s c atter(X(cluster1,1) ,X (clust er1,2 ),10,'r+');
hold on

s c atter(X( clus t er 2 ,1),X(cluster2 ,2),1 0,'bo');
hold off 
  le gend('Cl uster 1', ' C luster 2 ',' Loc ati on' , ' NW ')

  P = pos t e rior (g m,X);
 sc atter(X (cl ust er1 ,1) ,X (cluster1 ,2),10,P (c lu st er 1,1 ),'+' ) 
 hold o n sc at ter (X(cl u ster2, 1),X( clus te r2 , 2), 10,P(cl u st e r 2,1) ,' o' )
 h old  o ff
 l egen d ('C luster1','Clust er2 ','L oc at ion','N W')
 clrmap =  j et(80); co lo rma p(clrm a p (9:72,:) )
 ylabel(colorbar,'Com p onent 1  Po steri or P rob
15e+09 _ _   _ __4583.09 __  _  _   _  _2540_        11645247.85     __ ___    _    7.92_ _       __ 170 _        482689_ 212500000000  281222  _  ___483839  174598204968248 _   41591624963  1653361250000000_     _   43508.93   _  1.994054e+08

 Q:

Clustering an image_using Gaussian mixture models

I want_to use_GMM(Gaussian mixture models for clustering_a binary image_and also_want to plot_the cluster centroids on the binary_image itself.
I am_using this as my reference:
 _http://in.mathworks.com/help/stats/gaussian-mixture-models.html
This_is my initial_code
_I=im2double(imread('sil10001.pbm'));
_ K_= I(:);
 _mu=mean(K);
_ sigma=std(K);
__P=normpdf(K, mu, sigma);
   Z_=_norminv(P,mu,sigma);
  X = mvnrnd(mu,sigma,1110);
  X=reshape(X,111,10);

_scatter(X(:,1),X(:,2),10,'ko');

options = statset('Display','final');
gm =_fitgmdist(X,2,'Options',options);

idx_= cluster(gm,X);
cluster1 = (idx_== 1);
cluster2 = (idx ==_2);

 scatter(X(cluster1,1),X(cluster1,2),10,'r+');
 hold on

  scatter(X(cluster2,1),X(cluster2,2),10,'bo');
_ hold_off
 _legend('Cluster 1','Cluster 2','Location','NW')

  P = posterior(gm,X);

 scatter(X(cluster1,1),X(cluster1,2),10,P(cluster1,1),'+')
 hold on
 scatter(X(cluster2,1),X(cluster2,2),10,P(cluster2,1),'o')
_hold off
 legend('Cluster 1','Cluster 2','Location','NW')
 clrmap_= jet(80); colormap(clrmap(9:72,:))
 ylabel(colorbar,'Component_1 Posterior_Prob