ADM-201 dump PMP dumps pdf SSCP exam materials CBAP exam sample questions

计算机的颜色不是连续的 – 译学馆
未登录,请登录后再发表信息
最新评论 (0)
播放视频

计算机的颜色不是连续的

Computer Color is Broken

如果你将一张彩色图片放入Photoshop或者Instagram中进行模糊操作 你会看到
If you put a colorful image into Photoshop or Instagram and blur it, you’ll see a weird,
在邻近的两个的亮色间有条奇怪的黑色边界 呵!在真实的世界中 未聚焦的色彩
dark boundary between adjacent bright colors. Yuk! In the real world, out of focus colors
会柔和的混合在一起 从红过渡到黄再到绿 而不是红到棕再到绿
blend smoothly, going from red to yellow to green – not red to brown to green!
这个色彩混合问题并非只在数字图像模糊时才出现
This color blending problem isn’t limited to digital photo blurring, either – pretty
只要你用电脑模糊图像或使用透明边界时就会看到
much any time a computer blurs an image or tries to use transparent edges, you’ll see
同样难看的边线
the same hideous sludge.
对产生这一丑陋边线的原因有个简单的解释 并且有个简单的方法修复它
There’s a very simple explanation for this ugliness – and a simple way to fix it.
这得从我们对亮度的感知开始说起
It all starts with how we perceive brightness.
人的视觉像我们的听觉一样以相关的 粗糙的对数比方式进行处理
Human vision, like our hearing, works on a relative, roughly logarithmic scale: this
这意味着我们对亮度的感知从一个光源跳至两个光源时
means that flipping from one light to two changes the percieved brightness a TON more
比从101个跳至102个时要强的多 尽管它们所增加的光源数
than going from a hundred and one to a hundred and two, despite adding the same physical
其实是一样的 我们的眼睛和大脑在暗场景下对亮度小小的变化非常明锐
amount of light. Our eyes and brains are simply better at detecting small differences in the
而在亮场景下对相同的变化感知却差得多
absolute brightness of dark scenes, and bad at detecting the same differences in bright scenes.
电脑和数字图像感测器则完全不同 它们对亮度的判断完全基于
Computers and digital image sensors, on the other hand, detect brightness purely based
光电探测器接收到的光子数量 因此对不同亮度只会增加
on the number of photons hitting a photodetector – so additional photons register the same
相同量的额外光子 而忽略掉场景的亮度
increase in brightness regardless of the surrounding scene.
当数字图像存储时 电脑会记录下所有色彩——
When a digital image is stored, the computer records a brightness value for each colors
红、绿、蓝——的亮度值 对图像上的每个点做记录 比方说 0代表亮度为0
– red, green and blue – at each point of the image. Typically, zero represents zero
1代表亮度为100% 那么0.5就代表100%的一半了
brightness and one represents 100 percent brightness. So 0.5 is half as bright as 1,
对不对?完全不是 它只是看起来像在黑白一半间的灰 可那是
right? NOPE. This color might LOOK like it’s halfway between black and white, but that’s
基于我们的对数视觉所判断的 依据绝对物理上的亮度来说
because of our logarithmic vision – in terms of absolute physical brightness, it’s only
它只有白色1/5的光子数 更夸张的是 0.25的亮度值
one fifth as many photons as white. Even more crazy, an image value of 0.25 has just one
只有白色1/12的光子数
twentieth the photons of white!
数字图像选择比严格物理意义上更深的亮度是有好处的
Digital imaging has a good reason for being designed in this darker-than-the-numbers-suggest
要记得 人的视觉在黑暗场景下很容易感知微小的亮度变化
way: remember, human vision is better at detecting small differences in the brightness of dark
而软件则着重于节省内存空间
scenes, which software engineers took advantage of as a way of saving disk space in the early
这在早期的图像存储中很重要
days of digital imaging.
方法很简单 当数码相机捕捉图像时 不选择存储
The trick is simple: when a digital camera captures an image, instead of storing the
原本的亮度值 而是存储其平方根值——这样的采样方法
brightness values it gives, store their square roots – this samples the gradations of dark
使暗色的渐变比亮色存储的数据点多 粗糙的模仿了
colors with more data points and bright colors with fewer data points, roughly imitating
人的视觉特性 当你需要在显示屏上查看像片时
the characteristics of human vision. When you need to display the image on a monitor,
只要将亮度值的平方算回去就行了
just square the brightness back to present the colors properly.
这好像没什么问题——直到你修改图像文件的时候 以模糊操作为例
This is all well and good – until you decide to modify the image file. Blurring, for example,
它是通过将两个相邻像素点的色彩取平均值来实现的 听起来
is achieved by replacing each pixel with an average of the colors of nearby pixels. Simple
很简单 但你是用取了平方根前的值还是其后的值来计算
enough. But depending on whether you take the average before or after the square-rooting
所得结果就不一样了! 而且不幸的是,大多数电脑软件
gives different results!! And unfortunately, the vast majority of computer software does
都用了不正确的数值
this incorrectly.
像是 如果你想模糊红和绿的边界 你期望它是
Like, if you want to blur a red and green boundary, you’d expect the middle to be
一半红一半绿 可大多数计算机都偷懒使用了
half red and half green. And most computers attempt that by lazily averaging the brightness
文件所存储的亮度值 而无视这个值是取了平方根后的值
values of the image FILE, forgetting that the actual brightness values were square-rooted
是相机为了节省空间而处理过的! 结果是所得效果变得很暗 这恰恰
by the camera for better data storage! So the average ends up being too dark, precisely
是因为两个数开平方后的平均值总是比两数平均值的平方根要小
because an average of two square roots is always less than the square root of an average.
为了避免出现难看的边界线正确的混合红色和绿色 电脑应该
To correctly blend the red and green and avoid the ugly dark sludge, the computer SHOULD
先将被开根式的值计算平方数还原回来
have first squared each of the brightnesses to undo the camera’s square rooting, then
再计算其平均值 最后开平方 看这样就好看多了! 黄色出现了
averaged them, and then squared-rooted it back – look how much nicer it is!! It’s actually yellow there.
不幸的是 大多数软件 从IOS系统到Instagram甚至是
Unfortunately, the vast majority of software, ranging from iOS to instagram to the standard
Adobe Photoshop的标准设置 都使用了偷懒 难看又错误的图像处理方式
settings in Adobe Photoshop, takes the lazy, ugly, and wrong approach to image brightness.
不过在Photoshop的高级设置以及其他专业制图软件中
And while there are advanced settings in Photoshop and other professional graphics software that
你还是可以使用数学及物理意义上正确的混合机制 是不是比默认状态下好看多了?
let you use the mathematically and physically correct blending, shouldn’t beauty just be the default?
这就是通过正确的数学计算实现的

发表评论

译制信息
视频概述
听录译者

收集自网络

翻译译者

Nullyl

审核员

自动通过审核

视频来源

https://www.youtube.com/watch?v=LKnqECcg6Gw

相关推荐