[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: filtering problem
"Dave Brennan" <firstname.lastname@example.org> wrote in message
> Although any value below the thershold should not be included in the
> statistics, pixels below the threshold should be corrected by the
> Therefore is it possible to change the code:
> pro thresh, a, n, t
> m = a ge t
> wh = where(m,cnt)
> if cnt eq 0 then return
> a[wh] = a[wh] * mean(a[wh]) * (smooth(float(m),n,/EDGE) / $
> to allow this.
If I understand you correctly, you want to correct the below-threshold
pixels by the factor calculated from the valid pixels surrounding it.
Couln't you just leave out some of the specific subscripting [wh] in the
a = a * mean(a[wh]) * (smooth(float(m),n,/EDGE) / $
Correct me if I'm wrong here...
Jaco van Gorkom e-mail: email@example.com
FOM-Instituut voor Plasmafysica "Rijnhuizen", The Netherlands