gpt4 book ai didi

image-processing - 棕褐色调是如何产生的?

转载 作者:行者123 更新时间:2023-12-04 02:41:35 25 4
gpt4 key购买 nike

创建棕褐色调所需的基本操作是什么?我的引用点是 perl imagemagick 库,因此我可以轻松使用任何基本操作。我试图量化(使其成为灰度)、着色,然后增强图像,但它仍然有点模糊。

最佳答案

我的回答中提供了 C# 中的棕褐色转换器的示例代码:What is wrong with this sepia tone conversion algorithm?

算法来自this page ,每个输入像素颜色按以下方式转换:

outputRed = (inputRed * .393) + (inputGreen *.769) + (inputBlue * .189)
outputGreen = (inputRed * .349) + (inputGreen *.686) + (inputBlue * .168)
outputBlue = (inputRed * .272) + (inputGreen *.534) + (inputBlue * .131)

If any of these output values is greater than 255, you simply set it to 255. These specific values are the values for sepia tone that are recommended by Microsoft.

关于image-processing - 棕褐色调是如何产生的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1061093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com