I have used the cmd line tool to apply hald clut, but would like to derive a new hald clut from an image.
I am new to the process and could use some direction.
Create new hald clut from image?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Create new hald clut from image?
The question is vague.
What version of IM do you use?
What do you mean by "derive a new hald clut from an image"? I don't know how just one image might be used to make a hald clut.
What version of IM do you use?
What do you mean by "derive a new hald clut from an image"? I don't know how just one image might be used to make a hald clut.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Create new hald clut from image?
The general technique is to create a base HALD image (all colors with no processing applied) using HALD:X. Save as PNG. Take the PNG image to some interactive tool like GIMP or Photoshop. Apply the same processing you want to do to an image to the HALD base image. Then save as a new PNG. Then bring back that new HALD image to Imagemagick and use -hald-clut to apply it to any image.
See https://imagemagick.org/Usage/color_mods/#hald-clut
See https://imagemagick.org/Usage/color_mods/#hald-clut
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Create new hald clut from image?
As Fred says, a known process can be used to make a hald clut. Alternatively, if we have two images where one was made from the other by some unknown process, it may be possible make a hald clut that does the same thing.
But if all we have is a single image, I don't know how we could make a hald clut from that.
But if all we have is a single image, I don't know how we could make a hald clut from that.
snibgo's IM pages: im.snibgo.com
Re: Create new hald clut from image?
Probably vague, because of lack of understanding.
I downloaded ImageMagick 7.0.8 Q8 (64-bit).
I meant how to create a hald clut for reuse based off a modified image. I thought the tool could generate one this way. Now I understand an base identity hald clut must be modified in the same manner as the image using an editing tool
Re: Create new hald clut from image?
This filled in the gaps for me. Thank you.fmw42 wrote: ↑2019-02-02T11:38:13-07:00 The general technique is to create a base HALD image (all colors with no processing applied) using HALD:X. Save as PNG. Take the PNG image to some interactive tool like GIMP or Photoshop. Apply the same processing you want to do to an image to the HALD base image. Then save as a new PNG. Then bring back that new HALD image to Imagemagick and use -hald-clut to apply it to any image.
See https://imagemagick.org/Usage/color_mods/#hald-clut
If done programmatically, I would just take the same code to modify the image and apply it to the base hald clut.
Re: Create new hald clut from image?
I see. So would I be able to use image magick with two images (original and modified by unknown process) and create a hald clut?snibgo wrote: ↑2019-02-02T11:54:36-07:00 As Fred says, a known process can be used to make a hald clut. Alternatively, if we have two images where one was made from the other by some unknown process, it may be possible make a hald clut that does the same thing.
But if all we have is a single image, I don't know how we could make a hald clut from that.
Or maybe a better question is, how would I do this?
Last edited by angsunrey on 2019-02-02T12:13:45-07:00, edited 2 times in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Create new hald clut from image?
As I say, it may be possible. But only if every input colour has only one output colour. And if the input image doesn't contain every possible colour, then the hald clut will include guesswork.
snibgo's IM pages: im.snibgo.com
Re: Create new hald clut from image?
If you know of any learning materials, I am completely ignorant with no available resources. I have definitely come across your site more than once the past few days.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Create new hald clut from image?
See my pages "Editing with hald cluts" and "Sparse hald cluts". To do what I suggest requires IM to be built with my process modules. This is a fairly advanced technique.
I suggest you start with simpler techniques, eg "gain and bias". The introduction to that page mentions alternatives, and gives links.
If you link to sample images, perhaps we can advise better.
I suggest you start with simpler techniques, eg "gain and bias". The introduction to that page mentions alternatives, and gives links.
If you link to sample images, perhaps we can advise better.
snibgo's IM pages: im.snibgo.com