Re: need help [message #19289 is a reply to message #18507] |
Sun, 12 March 2000 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
Hi Hamid,
I've used class "lookup" etc in a different context (sticking
classification info on a byte image I created myself) -I haven't
actually used "class_doit". But from what I know your code looks
okay. One thing you didn't show though - "num_classes". In your
case this should be 6. (Might seem obvious, but you have to include
the "unclassified" class here.)
I also used it on a 24-bit-colour machine, although I can't see that
making any difference considering the colours you're specifying.
Perhaps try changing the result image to straight byte and checking
that its values are 0..5?
I hope this is of some help,
Cheers
Peter Mason
Hamid Kohen <kohen@jpl.nasa.gov> wrote:
> Does any one know how to use lookup command under envi programming?
>
> for an example I have used it like this ...
>
> class_names = ['Unclassified', 'Glass', 'Cell Walls', 'Nuclei',
> 'Cytoplasm', 'Stroma Blood Vessel']
> lookup = [[0,0,0], [255,255,255],
> [0,0,255],[255,0,0],[0,255,0],[0,125,125]]
>
> ;run the classification
> envi_check_save, /classification
> class_doit, fid=fid, pos=pos, dims=dims, out_name=kmeans_out_name, $
> method=7, r_fid=c_fid, mean=mean, $
> out_bname="Kohonen Classifier", iterations=1, change_thresh=0.1, $
> num_classes=num_classes, lookup=lookup,stdv=stdv, in_memory=0, $
> class_names=class_names, Thresh = ((total(mean)) / nbands) * 1.968
>
> however when I run the program ... classes are colored differently..
> Does anyone know how to use lookup properly ..
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|