[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: efficient kernel or masking algorithm ?*From*: "Richard Tyc" <richt(at)sbrc.umanitoba.ca>*Date*: Wed, 29 Nov 2000 16:37:21 -0600*Newsgroups*: comp.lang.idl-pvwave*Organization*: The University of Manitoba*References*: <903m3j$e20$1@canopus.cc.umanitoba.ca> <3A25758E.A83B10CA@astro.cornell.edu>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:22363

WOW, I need to look at these equations over about a dozen times to see what is going on ? I have been struggling with the variance of an nxn window of data, INCLUDING central pixel ;mean of the neighboring pixels (including central) mean=smooth(arr,n) ;square deviation from that mean sqdev=(arr-mean)^2 ;variance of an nxn window of data, INCLUDING central pixel var=(smooth(sqdev,n)*n^2-sqdev)/(n^2-1) This doesn't seem correct with test samples ? (Only difference is mean and division by n^2-1 ??) Thanks JD Rich J.D. Smith <jdsmith@astro.cornell.edu> wrote in message 3A25758E.A83B10CA@astro.cornell.edu">news:3A25758E.A83B10CA@astro.cornell.edu... > > Oh my this is a common topic lately. See my recent posts in a thread > with title "Array Manipulations". Here's the good stuff: > > ; the nxn window total > total=smooth(arr,n)*n^2 > ; the nxn window total not including central pixel > neighbors=smooth(arr,n)*n^2-arr > ; the mean of the neighboring pixels (excluding central) > neighmean=(smooth(arr,n)*n^2-arr)/(n^2-1) > ; the square deviation from that mean > sqdev=(arr-neighmean)^2 > ; the variance of an nxn window of data, excluding central pixel > imvar=(smooth(sqdev,n)*n^2-sqdev)/(n^2-2) > > Take a look at the "EDGE*" keywords too, if you care about what happens > near the borders. > > JD > > -- > J.D. Smith | WORK: (607) 255-6263 > Cornell Dept. of Astronomy | (607) 255-5842 > 304 Space Sciences Bldg. | FAX: (607) 255-5875 > Ithaca, NY 14853 |

**Follow-Ups**:**Re: efficient kernel or masking algorithm ?***From:*J.D. Smith

**References**:**efficient kernel or masking algorithm ?***From:*Richard Tyc

**Re: efficient kernel or masking algorithm ?***From:*J.D. Smith

- Prev by Date:
**Re: efficient kernel or masking algorithm ?** - Next by Date:
**Re: efficient kernel or masking algorithm ?** - Prev by thread:
**Re: efficient kernel or masking algorithm ?** - Next by thread:
**Re: efficient kernel or masking algorithm ?** - Index(es):