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

Home » Public Forums » archive » Q: uniq value in an image?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Q: uniq value in an image? [message #11835] Fri, 29 May 1998 00:00 Go to next message
htsang is currently offline  htsang
Messages: 14
Registered: September 1997
Junior Member
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?

-- Herbert (htsang@mda.ca)
Re: Q: uniq value in an image? [message #11926 is a reply to message #11835] Sun, 31 May 1998 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <MPG.fd92945577ce4819897bf@news.frii.com>
davidf@dfanning.com (David Fanning) writes:


David Fanning wrote:

> I 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]

I think (?) Herbert Tsang wants "all distinct values" present in
his image, in that case it would mean:

min = min(image)
hist = histogram(image,min=min)
values = min + where(hist)

But of course, this only works if his image consists of integers
only. Floating point valued images would be a real mess to do
properly! If it does make sense to speak of discrete values
from a floating point image, then do convert your image to an
integer image in the first place.

Regards,

Stein Vidar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ION Experiences?
Next Topic: ION Experiences?

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

Current Time: Wed Oct 08 15:22:37 PDT 2025

Total time taken to generate the page: 0.00432 seconds