Photoshop如何计算“平均模糊” (平均颜色) [英] How does photoshop calculate the "average blur" (average color) of an image?
本文介绍了Photoshop如何计算“平均模糊” (平均颜色)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是photoshop为每个季度的Mona Lisa图像的平均模糊生成的。这样做的算法是什么?我正在寻找以一种简单的方式复制它:
感谢。
解决方案
没有办法确定除非你能得到Photoshop的源代码,但通常的方法是:
- 添加所有的r,g,b值;
- 将这些值的总和除以季度中的像素数量;
- 创建一个新颜色
- add all the r, g, b values of every pixel in the quarter;
- divide the sum of those values by the number of pixel in the quarter;
- create a new color with the resulting r, g, b values.
这个新颜色是季度的平均颜色。
有关详细信息和完整代码,请查看此处。
This is what photoshop produces for the "average blur" of the Mona Lisa image for each respective quarter. What is the algorithm for doing so? I am looking to replicate it in a simple manner.:
Thanks.
解决方案
There is no way to be sure of that unless you can get the source code of Photoshop but the usual way to do this is to :
This new color is the average color of the quarter.
For more information and complete code look here.
这篇关于Photoshop如何计算“平均模糊” (平均颜色)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文