; written by hamid
; This IDL program computes;
; 1) normalize
; 2) kmeans --
; 3) Morphological extraction
; 4) Kohonen
; 5) the "thinned" edges of a Sobel filtered image:
pro kohen_algorithm
envi_select, title='Choose a Bio-Image-Cube',fid=fid,dims=dims,pos=pos
; Output directly path is currently at J:\..\..\cancer\
envi_file_query, fid, data_type=data_type, ns=ns, nb=nb, nl=nl,
fname=fname
nSamples = ns
nLines = nl
nBands = nb
;;;;envi_display_bands, [fid,fid,fid], [20,8,0], /new
;Set up the variables needed as input to the classification
envi_stats_doit, comp_flag=0, fid=fid, dims=dims, $
pos=pos, stdv=stdv, mean=mean
kmeans_out_name="j:\users\kohen\cancer\simulation\kmeans_out " + ".dat"
num_classes=5
class_names=strarr(num_classes+1)
for i=1,num_classes do class_names[i]="class"+strtrim(i,2)
class_names = ["Unclassified", "Glass", "Cell Walls", "Nuclei",
"Cytoplasm", "Stroma Blood Vessal"]
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.958
;;; this value should be set by u
;; ENVI_EXIT
print, " This is has completed is task "
end
"Kirk D. Knobelspiesse" wrote:
> Hello,
>
> Does anybody know of any unsupervised classification or clustering
> libraries available for IDL 5.2?
>
> Thanks in advance,
>
> Kirk D. Knobelspiesse
> Chester F. Carlson Center for Imaging Science
> Rochester Institute of Technology
> www.rit.edu/~kdk2963/research.html
|