Re: Q: uniq value in an image? [message #11834] |
Fri, 29 May 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Herbert Tsang (htsang@mda.ca) writes:
> I am using this to find the unique values in an image:
>
> uniqPixelValue = data(uniq(data, sort(data)))
>
> and the sorting part is taking a long time when the image is big.
>
> Just wonder, if anyone out there has any bright idea to do this?
I'm too tired tonight to test this, but how about something
like this:
unique_values = Where(Histogram(image) EQ 1)
Print, (Histogram(image))[unique_values]
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|