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

*Subject*: Re: Interpolation question*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 25 Jul 2001 14:27:16 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <9jn2hm$qj1$1@SonOfMaze.dpo.uab.edu>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:25825

rkj@dukebar.crml.uab.edu (R. Kyle Justice) writes: > I have an image containg some bad values. I would like > to replace these points with the average value of their > neighbors. Is there an easy way to do this without loops? > > For instance, a 3x3 array as follows: > > 1 1 1 > 1 0 1 > 1 1 1 > > would become > > 1 1 1 > 1 1 1 > 1 1 1. > > I can't get the boundary conditions to work correctly when > I use CONVOL. It either zeros the edges or does not process > them. How about a hybrid approach? Use CONVOL for the center of the image, and then special-case the stripes around the edges. Or, better yet, check out the MEDIAN function for sliding median smoothing. Good luck, Craig -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response --------------------------------------------------------------------------

**References**:**Interpolation question***From:*R. Kyle Justice

- Prev by Date:
**Interpolation question** - Next by Date:
**Re: base widgets growing uncontrollably.... ?** - Prev by thread:
**Interpolation question** - Next by thread:
**Re: Interpolation question** - Index(es):