Skip to content

How to implement Sepia filter? #27

Answered by Tushar7-coder
H1manshu21 asked this question in Q&A
Discussion options

You must be logged in to vote

sepia filter gives images an old-timey feel by making the whole image look a bit reddish-brown.

An image can be converted to sepia by taking each pixel, and computing new red, green, and blue values based on the original values of the three.

There are a number of algorithms for converting an image to sepia.
For each pixel, the sepia color values should be calculated based on the original color values per the below.

sepiaRed = .393 * originalRed + .769 * originalGreen + .189 * originalBlue
sepiaGreen = .349 * originalRed + .686 * originalGreen + .168 * originalBlue
sepiaBlue = .272 * originalRed + .534 * originalGreen + .131 * originalBlue

(Given by researchers)
The result of each of thes…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@H1manshu21
Comment options

H1manshu21 May 19, 2022
Maintainer Author

@SHembram18
Comment options

@Ank1taS
Comment options

@chandrakant100
Comment options

@H1manshu21
Comment options

H1manshu21 May 29, 2022
Maintainer Author

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by chandrakant100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed question Further information is requested Important
5 participants