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

Home » Public Forums » archive » coherence test implementation
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: coherence test implementation [message #15424 is a reply to message #15336] Thu, 13 May 1999 00:00 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Mark,

Mark Rehbein wrote:
>
> Hi,
>
> I'm doing some cloud detection on some rather large images using what
> some people call a coherence test. To do a coherence test on a pixel
> you take a 3x3 matrix around that pixel and assign that pixel the
> standard deviation of the 3x3 matrix.

You piqued my curiosity, since you're right, there had to be a more
efficient way! My attached coherence.pro should do the trick, and I
clock it at about 60 times faster with a 300x300 test.

From your code, just call:

sddevimage = Coherence(ch4)

I return an image of the same size and leave the outer ring of pixels as
0.0, is that reasonable?

I used the formula for the SD of a set of 9 values:

SD = Sqrt((Sum(X^2) - (Sum(X)^2 / 9)) / 8)

Generalizing coherence.pro to allow variable 'width' (not fixed at 3) is
left as an exercise to the reader. :-) I guess it wouldn't be hard,
changing all 'magic numbers' (3, 2, 9 and 8) to width, width-1, width^2
and width^2-1.

Cheers,
--
-Dick

Dick Jackson Fanning Software Consulting, Canadian Office
djackson@dfanning.com Calgary, Alberta Voice/Fax: (403) 242-7398
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: divide by zero problems
Next Topic: little and big endian -- once more

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

Current Time: Fri Oct 10 23:02:39 PDT 2025

Total time taken to generate the page: 0.64024 seconds