Article View: sci.image.processing
Article #197Re: Filter Ranges for Enhancement, HELP!?!
From: Charles Brabec
Date: Mon, 27 Jul 1992 03:24
Date: Mon, 27 Jul 1992 03:24
46 lines
2000 bytes
2000 bytes
In article <1992Jul27.100116.9655@waikato.ac.nz> singlis@waikato.ac.nz writes:
>Greetings,
>
>when filtering with a standard Laplacian filter
> [ -1 -1 -1 ]
> [ -1 8 -1 ]
> [ -1 -1 -1 ]
>and assuming the pixel values from 0..1 in intensity, the result of the
>operation can range from -8.0 to 8.0. What is the standard way of
>mapping this result to a pixel range.
>
>I have tried just diving by 8.0, and if negative ignore but this just gives
>"black" images, I also tried /8.0 and the absolute, still it looks terrible.
>
>Could anyone give me some tips??
Scale the result of the filter as you like, then add to it the value of the
central pixel and clip the results to your pixel range.
So for example, using the 1/8th filter on the pixels (range = 0-256)
16 16 16
32 32 32
64 64 64
your filter value is: 32 - 2 - 2 - 2 - 4 - 4 - 8 - 8 - 8 = -6
Added to your original value: 32 + (-6) = 26
so 26 is your new value.
If your pixels were:
0 0 0
0 0 0
16 16 16
your filter value is: 0 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 = -6
Added to your original value: 0 + (-6) = -6
Clip to the range: = 0
so 0 is your new value.
Experiment with the scaling of the Filter to increase or decrease the amount
of edge enchancement. 1/8th and 1/16th are good to try, especially if you're
doing integer math.
Charles
--
--------------------------------------------------------------
Charles Brabec 304 Cox Hall
brabec@pysgjb.physics.ncsu.edu (919) 515-7228
Technical Details
Message-ID:
<1992Jul27.032404.7804@ncsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!taco!pysgjb.physics.ncsu.edu!brabecReferences:
<1992Jul27.100116.9655@waikato.ac.nz>Show Full Headers
Complete Article Headers
Newsgroups: sci.image.processing Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!taco!pysgjb.physics.ncsu.edu!brabec From: brabec@pysgjb.physics.ncsu.edu (Charles Brabec) Subject: Re: Filter Ranges for Enhancement, HELP!?! Message-ID: <1992Jul27.032404.7804@ncsu.edu> Sender: news@ncsu.edu (USENET News System) Organization: NCSU Physics, Condensed Matter Theory References: <1992Jul27.100116.9655@waikato.ac.nz> Date: Mon, 27 Jul 1992 03:24:04 GMT Lines: 46