Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: Creating a Sepia Tone Filter




> Simply put yes, but does anyone have an algorithm to actually do it?
Ah. OK.
I don't know how to make sepia, but you seem to know.
Assume sr,sg,sb = sepia rgb values
assume g = grayscale value

g = 0.3*R + 0.59*G + 0.11*B

Now, linear interpolation would go:
r = f*g + (1-f)*sr
g = f*g + (1-f)*sg
b = f*g + (1-f)*sb
where f is a linear interpolation factor ranging from 0 (pure sepia)
to 1 (pure gray).
You can set sr,sg,sb to a constant color (instead of per-pixel color)
to get "colored" grayscale images this way.

HTH,
-Gernot












Reply


View All Messages in comp.graphics.algorithms

path:
Creating a Sepia Tone Filter =>Re: Creating a Sepia Tone Filter =>Re: Creating a Sepia Tone Filter =>Re: Creating a Sepia Tone Filter =>Re: Creating a Sepia Tone Filter =>

Replies:

Copyright 2006 WatermarkFactory.com. All Rights Reserved.