This is a G'MIC plugin script.
In Linux, look for a file called .gmic in your $HOME/ folder
On Windows, it's a filed called user.gmic in your %APPDATA%/ (on mine it's C:\Users\Tin Tran\AppData\Roaming\user.gmic
If it's not there create it.
If it's there paste this code in there at the appropriate place, i hope you're able to tell where the appropriate place is (I am guessing just end of file) I don't know because I previously don't have that file.
#@gmic
#@gimp <b>.{development filters}</b>
#@gimp Multi Thresholds : multi_threshold, multi_threshold
#@gimp : Threshold_1 = int(50,1,256)
#@gimp : Threshold_2 = int(100,1,256)
#@gimp : Threshold_3 = int(150,1,256)
#@gimp : Threshold_4 = int(200,1,256)
multi_threshold :
--luminance[0] -threshold[-1] 1 -normalize[-1] 0,255 -to_colormode[-1] 4
--luminance[0] -threshold[-1] $1 -normalize[-1] 0,255 -to_colormode[-1] 4
--blend[-1,-2] difference -replace_color[-1] 0,0,255,255,255,255,9,0,1,255
--luminance[0] -threshold[-1] {$1} -normalize[-1] 0,255 -to_colormode[-1] 4
--luminance[0] -threshold[-1] {$2} -normalize[-1] 0,255 -to_colormode[-1] 4
--blend[-1,-2] difference -replace_color[-1] 0,0,255,255,255,255,175,42,27,255
--luminance[0] -threshold[-1] {$2} -normalize[-1] 0,255 -to_colormode[-1] 4
--luminance[0] -threshold[-1] {$3} -normalize[-1] 0,255 -to_colormode[-1] 4
--blend[-1,-2] difference -replace_color[-1] 0,0,255,255,255,255,101,101,101,255
--luminance[0] -threshold[-1] {$3} -normalize[-1] 0,255 -to_colormode[-1] 4
--luminance[0] -threshold[-1] {$4} -normalize[-1] 0,255 -to_colormode[-1] 4
--blend[-1,-2] difference -replace_color[-1] 0,0,255,255,255,255,174,165,131,255
--luminance[0] -threshold[-1] {$4} -normalize[-1] 0,255 -to_colormode[-1] 4
--luminance[0] -threshold[-1] 256 -normalize[-1] 0,255 -to_colormode[-1] 4
--blend[-1,-2] difference -replace_color[-1] 0,0,255,255,255,255,247,228,160,255
-remove[-2,-3,-5,-6,-8,-9,-11,-12,-14,-15]
--blend[-1,-2,-3,-4,-5] add
-remove[-2,-3,-4,-5,-6]
-move[-1] 0
-remove[1]
#@gimp _
Alternately if you do not yet have the .gmic file or user.gmic file already just use this file.
Attachment:
user.gmic.zip [479 Bytes]
Downloaded 230 times
And then you'll have an available filter in G'MIC that looks like this.
You can control these 4 thresholds on the fly and preview the result (a little slow but i am just happy it works).
Then after applying, you can run the
Obama Posterize scheme scriptAnd the result will reflect the manual multi thresholds that you used.
As an example here this result i have it reflects the thresholds that I used above.
Warning: Threshold1 < Threshold2 < Threshold3 < Threshold4. Thresholds must be incrementally different. If a lower numbered threshold is higher than a higher numbered threshold, it'll poop out and give white areas. You've been warned.