|
 |
On Wed, 03 May 2000 06:06:05 -0400, Glen Berry wrote:
>>This is a matrix function, as long as you do it along one of the eight
>>multiples of 45 degrees. For the usual "light in the upper left corner"
>>effect, I believe the operation is
>>
>> -1 0 0
>> 0 1 0 * .5 + .5
>> 0 0 0
>
>The numbers in the matrix above are correct. I'm not sure about the
>multiplier and offset modifiers. For me, a vaue of one for the
>multiplier works, and the offset value should be set to one-half of
>the maximum possible value. I just tested these, and they work.
A multiplier of 1 can cause clipping at the ends of the range. The
two worst-case values of the matrix are -1 (when the upper-left pixel
is white and the center is black) and 1 (vice-versa.) To get this range
into the 0..1 range requires multiplying by .5 and adding .5, as I did.
If you neglect to multiply by .5, you increase the contrast of the
resulting image, but at the expense of "washing out" areas with high
gradients. A better way to increase contrast would be to apply the
filter as I've specified it, then apply an S-curve-shaped correction
to stretch the midrange.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
These are my opinions. I do NOT speak for the POV-Team.
Post a reply to this message
|
 |