From: donna@peabody.eece.unm.edu (Donna Koechner)
Newsgroups: comp.soft-sys.khoros
Subject: Re: khoros questions
Date: 11 Dec 92 22:56:12 GMT

On Dec 10,  7:39pm, Leslie Gail Adiska wrote:
} Subject: khoros questions
} 
}  I am currently working with Khoros 1.0 Patch Level 4 and would find it most
} helpful if you could answer a few questions for me.
} 
} 1) When I use the warp image program the zoom window is garbled, is this a
} bug in the program or is there something I may be doing wrong?

You will see this behavior if you are running warpimage on a 24-bit display.

} 
} 2) I would like to do unsupervised classification or clustering. I think the
} program I need to use is vkmeans or viso2. vkmeans did not give me an image
} I could display: is there another routine that works with vkmeans to display
} an image file result? I know viso2 creates an image file result but I think
} it does more processing than necessary.

vkmeans can produce 3 output images.  The cluster number image will
be an image with the same number of rows and columns as your input 
image, and the value of each pixel corresponds to its cluster number.
To better visualize the image, use the pseudo coloring option in
editimage to color clusters.

At the end of this message, I am also including some previous mail 
which explains how the clustering algorithms operate on the data.

} 
} 3) I would also like to do supervised classification or clustering based
} upon the image cluster centers I choose. I set up a file with 3 cluster
} centers to use as the -f1 parameter to viso2. These lines were in the file
} pisa.center:
}                   229       1509
}                   571       949
}                   172       452
} I entered the command:
}  viso2 -i1 pisa.ing  -01 pisa.01  -02 pisa.02  -03 pisa.03  -f1 pisa.center
}  
}  The output used 5 clusters instead of my three and looked similar to the
} unsupervised classification output (without -f1 pisa.center). Did I leave
} off a parameter? 

No.  viso2 may change the final number of clusters you get based on the
splitting and merging rules.

} 
} 4) Is there a routine to combine 2 side-by-side images or overlapping images
} into one big image for display? I would prefer an xvroutine if possible.

vinsert (non xvroutine) can do this automatically for you.  Specify
the image 2 to be inserted on the right of the image 1.  If image 2
is smaller than image 1, the necessary padding will automatically occur.
Example: vconvert -i :head -o - -n 255| vinsert -i1 :ball -i2 - -x 500 -y 40 -o - | putimage -i -

} 
} 5) I would like to analyze N spectral bands/images into N principal
} components. The first being brightness. I am not sure that there is a
} routine to do this although I know that it has something to do with
} eigenvectors. What is the routine I need? Is it meigen and if so what
} routines work with meigen to create an output display image analysis?

Not sure about this one.

} 
} 6) The edit image program has the capability of displaying pixel values.
} When I use this capability with a three band image file it only gives me the
} values of the first band and not the values of the other two bands. Is this
} a bug or how do I do this (is it possible)?

(From the FAQ)
   Q27. Does Khoros work with 24-bit displays?  Can I expect any particular
        problems when I run Khoros applications on my 24-bit display?

   A27. Yes, Khoros works with 24-bit displays.  As of patch 2, increased
        support was added for 24-bit displays - most xvroutines should display
        graphics and images on 24 bit displays without problem.   One drawback
        of editimage is that the position widget (displayed under the image,
        in [X x Y = Z] format) should display 3 components when used with a 
        24 bit image;  we did not have time to update this as of yet.
        Similarly, the Pixel Print capability should also treat the lookup
        as 3 decomposed RGB values. 

} 
} 7) Is it possible to do a streach based upona small portion of the image
} (local streach).

venhpatch, venhance and vhxray -- the last 3 routines under Image Processing/
Histograms in cantata do regional histogram operations.

} 
} 8) How do I export a small portion of the image using the edit image
} function - region of interest?
} 

Write it to a file using the "Extract Region of interest output file" option.

} 
}   I am a programmer, working with a PhD. in remote sensing, and am currently
} overseas. I am sending this e-mail via my husband, who is in the USA. Is it
} possible that I could call or FAX you directly? Or have my PhD call you to
} explain things better?

Sorry, we can only provide email support.

Hope this helps

Donna


} 
}                                         Thank-You Sincerely,
}                                         Leslie Adiska
}                                        
}                                         Phone: 011-39-55-277-5258
}  From Florence, Italy                   FAX  : 011-39-55-294-461
}  Note: The FAX # has one less digit that the phone #. 
}-- End of excerpt from Leslie Gail Adiska



--- Forwarded mail from Tom Sauer <sauer@sherman.eece.unm.edu>

Hi,

On Feb 20, 13:27, barrett@bunsen.eece.unm.edu. wrote:
} Subject: using vkmeans
>> We would like to use the K-means algorithm (vkmeans) in Khoros, but are not
>> sure
>> about some of the conventions/formats (e.g. expected input format, columns,
>> rows, "bands, input format for ascii to viff, etc.)
>> 
>> As a specific (simple) example, suppose we were to input a sequence of
>> (x,y)
>> coordinate pairs for K-means clustering, and that the sequence of (x,y)
>> pairs
>> is as follows:
>> 
>> (0,0), (1,0), (1,1), (6,6), (7,6), (7,7) with K=2 clusters and initial
>> cluster
>> centers: (0, .5) and (5,5).

The way our classification routines work can be some what of a mystery. We
are working on compiling technical documents for the future, but that
doesn't help you now. So, i will try to explain what is going on.

Vkmeans expects as input data a multiband float viff image. This image will be
or some width * height = number of vectors in the data set. The
number of bands in the image = the dimension of each vector. So, now we
consider the data as a set of vectors or some dimension (in your case,
2-dimensional vectors). 

The starting cluster centers for vkmeans will use one of three methods:
1) use the first K data points as the initial cluster centers
2) specify the x,y position in a sperate file. These x-y positions
   correspond to actual vectors in the input data.
3) specify actual cluster center values.

use "vman vkmeans" to determine the how to use each of these three
options.

Hopefully you now have an understanding of the input data, so I will
try to answer your specific questions.

>> 
>> Question 1:
>>         What should the input ascii file look like? Should the data be
>> arranged
>>         in row major order:     0 0
>>                                 1 0
>>                                 1 1
>>                                 6 6
>>                                 7 6
>>                                 7 7
>> 
>>         or as a sequence: 0 0 1 0 1 1 6 6 7 6 7 7, in which case the
>> "columns"                          
>>         parameter would parse the coordinates 2 at a time?

It really does not matter. In either case you have 6 2-dimensional
vectors.


>> 
>> Question 2:
>>         How do we set the parameters for the function "asc2viff" so that 
>>         vkmeans receives the data in the correct order/format?

you would use "asc2viff -i infile -o outfile -r 1 -c 6 -fi 1 -b 2"
which says your viff file will contain 1 row by 6 columns and 2 data
bands. The input data is interleaved (xyxyxyxyxyxy) as compared to
(xxxxxyyyyyy).


>> 
>> Question 3:
>>         What does "bands" specify? How is it used (in this example) for
>>         for instance?

I think I explained it above.

>> 
>> Question 4:
>>         Does vkmeans do any vector normalization (if for example the input
>>         vectors are of varying dimension? Is the "bands" parameter used to
>>         specify (variable) dimensionality of the input vectors?

No, but I like the idea! The best way to do you normalization is
to use cantata and use "vbandspt1" to extract out the data band(s) that
you want to normalize. Then Normalize, scale, etc and use "vbandcomb"
to combine the data back into a multiband image. Then send that on
to vkmeans.

>> 
}-- End of excerpt from barrett@bunsen.eece.unm.edu.

I hope that this quick explaination helps you out. If you run into
any trouble, let me know.

Good luck,

Tom
--- End of forwarded message from Tom Sauer <sauer@sherman.eece.unm.edu>

From: kk@hpl-opus.hpl.hp.com (Konstantinos Konstantinides)
Date: Sun, 13 Dec 1992 04:33:10 GMT
Subject: Re: starting up with khoros
Organization: HP Labs, High Speed Electronics Dept., Palo Alto, CA