魔法等效的gimp hue-chroma变换

发布于 2025-01-24 07:27:36 字数 301 浏览 2 评论 0原文

使用gimp,给定输入图像,我可以使用颜色&gt来改善其对比度;色相化学... 通过设置 Chroma = 50 (以-100和100之间的比例),然后离开 hue = 0 Lightness = 0 。因此,看来我正在进行HCL转换。

魔术师有同等命令吗?

下图显示了gimp效应: image

Using Gimp, given an input image, I can improve its contrast using Colors > Hue Chroma... by setting Chroma=50 (in a scale between -100 and 100) and leaving Hue=0 and Lightness=0. So it appears I'm doing an HCL transformation.

Is there an equivalent command for Magick?

The following image shows the GIMP effect:
Image

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

惟欲睡 2025-01-31 07:27:36

更新的答案

根本不确定这一点。我认为,如果您进入lch colourspace,您可以通过模型非常接近,但是我不知道它是否会持续工作。我得到了:

magick cXDv3.jpg -define modulate:colorspace=LCH -modulate 100,150 result.jpg

如果那不起作用,或者不喜欢您,请继续阅读...


任何GIMP或Photoshop过滤器的通用方法

,下面的方法应允许您使用 ImageMagick - 只要它是纯“点过程” ,我的意思是,每个像素的输出值纯粹是从其输入值得出的,而不是“区域过程” 周围像素有贡献的地方 - 例如,模糊或中位过滤。

这被称为刺痛。您将创建一个hald-clut类似的东西:

magick hald:16 clut.png

然后将该文件(clut.png)将> gimp-h0-c50-l0.png ,因此我们知道 gimp 如何影响每种颜色。你只做一次。

然后,您回到 ImageMagick 并将该剪辑应用于您的图像:

magick input.png GIMP-H0-C50-L0.png -hald-clut result.png

这给了我这一点:

“在此处输入图像说明”

,我想您会同意左侧看起来与右侧相似输入图像的侧面。

原始答案

我不知道该命令在 gimp 中做什么,但是您可以在 Imagemagick 中转换为HCl colourspace,然后选择Chroma频道这样的修改:

magick INPUT.PNG -colorspace HCL -channel G ...

然后您想做什么?要影响Chroma频道,请尝试-Auto-level,然后返回到SRGB Colourspace并保存:

magick INPUT.PNG -colorspace HCL -channel G -auto-level +channel -colorspace sRGB RESULT.PNG

然后您需要提供更多的线索或更多的线索或在GIMP中使用该命令的功能 - 或提供例子。

Updated Answer

Not sure about this at all. I think you can get pretty close with -modulate if you go into an LCH colourspace, but I have no idea if it will work consistently. I got:

magick cXDv3.jpg -define modulate:colorspace=LCH -modulate 100,150 result.jpg

If that doesn't work, or is not to your liking, read on...


Generic Method for any GIMP or Photoshop filters

The method below should allow you to replicate any GIMP or Photoshop filter with ImageMagick - as long as it is a pure "point process", I mean one where each pixel's output value is purely derived from its input value and not an "area process" where surrounding pixels contribute - such as blurring or median filtering, for example.

It's called a HALD-CLUT. You would create a HALD-CLUT something like this:

magick hald:16 clut.png

Then take that file (clut.png) into GIMP and apply your GIMP processing on it and save the result as GIMP-H0-C50-L0.png so we know how GIMP affects each colour. You do that just once.

Then you go back to ImageMagick and apply that CLUT to your image:

magick input.png GIMP-H0-C50-L0.png -hald-clut result.png

That gives me this:

enter image description here

and I think you'll agree the left side looks pretty similar to the right side of your input image.

Original Answer

I don't know what that command does in GIMP, but you can convert to HCL colourspace in ImageMagick and select the Chroma channel for modification like this:

magick INPUT.PNG -colorspace HCL -channel G ...

You then want to do something ? to affect the Chroma channel, so try -auto-level for now, and then return to sRGB colourspace and save:

magick INPUT.PNG -colorspace HCL -channel G -auto-level +channel -colorspace sRGB RESULT.PNG

Then you need to provide more clues or experiment more with what that command does in GIMP - or provide examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文