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

Home » Public Forums » archive » Re: HELP: replace missing value with closest good pixel
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: HELP: replace missing value with closest good pixel [message #4513 is a reply to message #4508] Wed, 14 June 1995 00:00 Go to previous message
sterner is currently offline  sterner
Messages: 106
Registered: February 1991
Senior Member
knight@ll.mit.edu writes:

> I have 2-D images with flaws, i.e., missing pixels. I want to replace each
> missing pixel with the closest good pixel. Does anybody have a routine to do
> this? For example,

> new = replace(image,missing=99)

> where
> image = 2-D array
> missing = keyword to specify the value which is to be replaced
> new = image with each pixel having value 99 replaced by closest pixel
> with a value not equal to 99.


Here's a simple technique that seems to work well.

new = image
w = where(new eq missing)
m = median(new,3)
new(w) = m(w)

The median filter does a nice job filling in the missing pixels
(if the missing value is outside the range for good pixels).
The size of the filter can be adjusted for the severity of the
missing data. Only the missing pixels are modified, the rest of the
image is untouched.

Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: ftp://fermi.jhuapl.edu/www/s1r/people/res/res.html
[Message index]
 
Read Message
Read Message
Previous Topic: linking with call_external
Next Topic: PV-WAVE: wtworkproc

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

Current Time: Sat Oct 11 12:53:34 PDT 2025

Total time taken to generate the page: 1.67905 seconds