Welcome, Guest.
Username: Password: Remember me

TOPIC: Colour remapper (Based on G'MIC's curves)

Colour remapper (Based on G'MIC's curves) 11 months 3 weeks ago #1

This is a port of the hlsl code I made which lets you map an input colour (HSV or RGB) to an output colour and interpolates linearly between them, in the same way that G'MIC's curves function does.

Warning: Spoiler! [ Click to expand ]


Goes in CustomFX's Custom.h:
Warning: Spoiler! [ Click to expand ]


hlsl video shader code:
Warning: Spoiler! [ Click to expand ]






http://www.framecompare.com/screenshotcomparison/01JJNNNU
Last Edit: 1 week 5 days ago by crabshank. Reason: Fixed OpenGL compatibility issue
The administrator has disabled public write access.
The following user(s) said Thank You: jas01, Deathmedic, WalterDasTrevas

Colour remapper (Based on G'MIC's curves) 2 months 4 days ago #2

I have added switches to all my shaders that lets you change which side of the split to apply the shader.

Re. this one, it comes with a webpage (here) that calculates points for you to match the cdfs of one image to another shown here:


Note that using this to white balance is now deprecated (replaced by using the white point shader).
Last Edit: 2 months 4 days ago by crabshank.
The administrator has disabled public write access.
The following user(s) said Thank You: jas01

Colour remapper (Based on G'MIC's curves) 2 months 4 days ago #3

This looks really good but as there isn't any ui based controls for the colour it's quite hard to figure out what to alter.
The administrator has disabled public write access.

Colour remapper (Based on G'MIC's curves) 2 months 3 days ago #4

Example:

Default:
	#define hueRotate 0
	float rotate_hues =0;  //-360 to 360


	#define hue 0
		#define hue_points 3
		float2 h[ hue_points] =
	{
		float2(0, 0),
		float2(180,180),
		float2(360, 360)
	};

Adjusted:
	#define hueRotate 1
	float rotate_hues =4; //Rotate hues by 4 degrees (clockwise) before rempping  //-360 to 360


	#define hue 1
		#define hue_points 4
		float2 h[ hue_points] =
	{
		float2(0, 0),
		float2(180,182),
		float2(212,200),
		float2(360, 360)
	};

This specfies (from, to): (0,0), (180,182), (212,200) and (360,360) as points and linearly interpolates between them, after rotating the hue by 4 degrees (useful for remapping red and pink hues that are on either side of 0/360deg).

EDIT: My webpage sometimes gives crappy results with hues because of the 0/360deg modulo issue. To combat this, rotate hues in the source image.

If there were a UI to allow you to add points I would use it.
Last Edit: 2 months 3 days ago by crabshank.
The administrator has disabled public write access.