TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What is the concept underlying image processing?

22 pointsby m_classalmost 12 years ago

3 comments

GrantSalmost 12 years ago
It&#x27;s a strange post because nobody answers the question posed by the asker who is clearly a complete beginner, wondering how images get converted to grayscale and sepia -- I think it&#x27;s a much more basic question than the answers imply.<p>If you already know how to code, the math at the top of this article answers the question. <a href="http://www.techrepublic.com/blog/howdoi/how-do-i-convert-images-to-grayscale-and-sepia-tone-using-c/" rel="nofollow">http:&#x2F;&#x2F;www.techrepublic.com&#x2F;blog&#x2F;howdoi&#x2F;how-do-i-convert-ima...</a><p>If not: Digital images are a big grid of pixels. Each pixel has a red, green, and blue value, each of which is usually a number between 0 and 255 because 8 bits are used to represent each value.<p>A &quot;black and white&quot; image (really grayscale) is created by setting the red, green, and blue values at each pixel to be equal to the exact same value as each other, for example we could choose the average of the original red, green, and blue values at that pixel. This removes all &quot;color&quot;.<p>Sepia is similar but you take three differently weighted averages of the original red, green, and blue values to produce the sepia-red, sepia-blue, and sepia-green values in the result. See above link for the specific weights.<p>In both cases, each pixel location is computed independently, whereas other operations, like blurring, need to look at other nearby pixels as well.
评论 #6121907 未加载
评论 #6121906 未加载
snorkelalmost 12 years ago
Many image effects are based on shifting the color of each pixel based on the color of the 8 pixels surrounding it, for example blurring is essentially averaging the color value of the surrounding pixels. Experimenting with multiplying, dividing, combining, and inverting color values gives you effects such as emboss, drop shadow, glow, inverse, etc.
aaronsnoswellalmost 12 years ago
Why is this on Hacker News?
评论 #6120801 未加载