[OSGeo-Discuss] OSGeo ISODATA implementation?

Nikos Alexandris nik at nikosalexandris.net
Mon Feb 25 09:09:40 PST 2013


Himanshu Singh wrote:
> Hi Nikos,

Hi :-)
 
Nikos:
>> "Only Windows support for this extension (right?)."

> The extension will compile and work in Linux 64-bit too. I can send you the
> build instructions if you have a 64-bit Linux machine.

I hesitated to try since I have limited time ahead (deadlines pushing).  I 
will try and let you know.

 
>> "Does anyone has any examples (from the past)?"

> A sample input file used to run the program:
> http://www.cs.umd.edu/~mount/Projects/ISODATA/input.txt.

Yes, I got it.  I use the following for my quick-test on an PCIDSK image 
(gdal_translate was handy here) -- not clear to me, however, whether other 
formats are supported (Byte only).

[ Note:  a test on a large image froze linux -- I don't remember when I saw a 
linuxbox frozen, well,  almost... I managed to get out with Ctrl + Shift + Alt 
+ PrntScrn + R - E - I - S - U - B ]

--%<---
NUMCLUS 10                      # initial number of clusters

NUMBANDS 1                      # number of bands, note that it is
                                # necessary to have this appear before
                                # 'input_images' directive

SAMPRM 200                      # minimum number of samples in a cluster 

LUMP 0.001                      # lumping parameter
                                # (clusters which are closer than this
                                # distance to each other are merged)

MAXPAIR 5                       # maximum number of pairs to lump

MAXITER 20                      # maximum number of iterations


rows 495                      # number of image rows
cols 743                      # number of image columns
                                # (size of image should be (rows x cols)
                                # and the image is expected to be in
                                # byte format (1 char per pixel))

input_images ndvi_difference_utm_z34_smallarea.pci              # name of the 
files each containing
                                # one band/channel of the image.  There
                                # should be NUMBANDS filenames after
                                # `input_images' directive. Specified
                                # files need to be resided in the same
                                # directory as the executable being run.

output  ndvi_difference_utm_z34_smallarea_clustered        # name of the output 
file to write the
                                # clustered image to. Pixels are assigned
                                # values 1, 2, ..., (no. of clusters),
                                # where points having the same number
                                # are in the same cluster

seed 10                         # seed for the `rand' function for 
                                # selecting initial centers randomly

#gen_data_pts                    # if this directive is given it means
                                # that the user is asking for
                                # synthetically generated data, and thus
                                # there won't be any need to specify
                                # `input_images' and `output' directives.

sample_seed 51                  # seed used for `rand' function to sample
                                # subset of data to work with

SQUARED 1                       # This is specified if/when you want to
                                # run the Hyb version of the algorithm.
                                # This metric is built in for Filtering
                                # and Approximate Filtering version and
                                # is used to Distinguish between Standard
                                # and Hybrid version since they share the
                                # same executable. 

#epsilon 0.5                     # This directive is defined for approximate
                                # filtering version only and specifies the
                                # epsilon value to be used.
--->%--

 
> Thanks,
> Himanshu

Thank you for your time.
Nikos
--

> PS: I just noticed that I misspelled your name in the last email. Sorry
> about that. :-)

It was very close actually -- Nikolaos, it is formally in Greek :-)



More information about the Discuss mailing list