I found this tutorial about spectral using python and I will test kmeans classification using Landsat image. I don't understand some things about this tutorial. First thing I can't understand is about pylab, how to import class names dynamic in plot like class 1, class 2, class 3,... for any class create the kmeans algorithm?

first time to use python spectral.

can help me somone ?

here the simple code of manual :

from spectral import *
from pylab import figure, axes, pie, title, show
img = open_image('LT.lan').load()
(m, c) = kmeans(img, 10, 80)
import pylab
for i in range(c.shape[0]):
  • @Luke, mgri, BERA, ahmadhanb, lynxlynxlynx I have update – Mar Oct 6 '17 at 13:42