comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Getting ROI data from an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Getting ROI data from an image [message #77865 is a reply to message #77861] Fri, 30 September 2011 11:42 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Sep 30, 1:50 pm, Rebecca Brown <rab4...@gmail.com> wrote:
> I need to extract hyperspectral data from an image ROI :
>
> The project I'm working on requires me to code strictly with IDL, so I
> cannot use ENVI calls in the final product. I am running unsupervised
> classification (K-Means), which returns a classification image with
> each pixel assigned a number from [0,..nClasses]. I want to use the
> classification image to subset the image based on ROI and get the mean
> spectra from each class. The functionality I need is probably the same
> as  ENVI_GET_ROI_DATA(). My exact question is, how can I use the one-
> dimensional calls to capture ROI data from the hypersepctral data?
>
> samples = 320
> lines = 1000
> bands = 300
> classes = 15
>
> result = KMEANS(img, ITERATIONS = 4, NCLASSES = classes)
>
> FOR i = 0, nClasses-1 DO BEGIN
>     loc = WHERE(result EQ i, count)
>     IF count EQ 0 THEN CONTINUE
>
>     ; ?
>
>     ; ?
>
>  ENDFOR

Look at using the HISTOGRAM function on the result variable with
REVERSE_INDICES keyword.

http://www.idlcoyote.com/tips/histogram_tutorial.html

-Brian
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multi-Threading in ENVI
Next Topic: finding confidence interval in spectral analysis ( something similar to chi2conf.m in matlab)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:15:52 PDT 2025

Total time taken to generate the page: 1.67686 seconds