It is currently Tue Apr 23, 2024 10:01 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Does multi-threshold exists? (G'MIC help) SOLVED.
PostPosted: Mon Aug 22, 2016 9:24 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Is there away to do multi threshold at the same time?
While playing with Obama posterize script, I thought if there was a way to control not threshold but multiple thresholds at the same time it would be super advanced at producing Obama posters... or other uses as well.
Is it possible for GMIC because i don't think i could do it in script-fu to allow for an interface that allows for multiple threshold controls? for example add 5 thresholds and then as you move each threshold it changes the threshold image live preview. Similar to how threshold works but with multiple markers? and each lower threshold marker to the next threshold marker would show up as a different color of choice. I don't know if it's possible i am just imagining here.
Don't know if i am explaining it right.
Or is there something that currently exists that i don't know about?
This came to me when i am doing Obama Posterize and i notice the Original Obama poster has black(or dark blue) defining his facial features very clearly...and with single threshold i can probably do this manually but a multi threshold would be so useful to see.

Any thoughts or ideas? or a hopefully a GMIC filter with fancy controls?

_________________
TinT


Last edited by trandoductin on Wed Aug 24, 2016 6:26 pm, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Does multi-threshold exists?
PostPosted: Mon Aug 22, 2016 9:41 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
I was thinking about that when I was going through that posterize thread. If you could adjust the image to create different levels of posterize, or different effects on the outcome.

Perhaps if you could adjust the curves before threshold it might do what you want. Curves can make darks darker and lights lighter all at the same time. It can inverse too.


Top
 Post subject: Re: Does multi-threshold exists?
PostPosted: Mon Aug 22, 2016 9:47 pm  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I just up the contrast and try to guess what i want dark and what i want light..but i tend to stop recognizing any more than 2 groups.
there are 5 shades in the posterize process and a multi threshold live editing would be so kick-butt.

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists?
PostPosted: Tue Aug 23, 2016 11:06 am  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Any instructions on how i can accomplish this in G'MIC plugin?
I have never done anything in G'Mic before so instruct it like as if you're teaching a pure beginner..(examples would be great).

basically I want to have 4 sliders.
slider 1 controls the threshold of layer 1, after threshold it cuts away the white. the black would be filled in with darkest color
slider 2 controls the threshold of layer 2, after threshold it cuts away the white. the black would be filled in with 2nd darkest
slider 3 controls the threshold of layer 3, after threshold it cuts away the white. the black would be filled in with 3rd color
slider 4 controls the threshold of layer 4, after threshold it cuts away the white. the black would be filled in with 4th color
layer 5 just has color 5(brightest color) filled.
As the result, layer 4 would cover some of layer 5,
layer 3 would cover some of layer 4
layer 2 would cover some of layer 3
layer 1 would cover some of layer 2
so layer 5 is topmost and layer 1 is bottom most.

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists?
PostPosted: Tue Aug 23, 2016 11:47 am  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
so trying out to add G'Mic script.

tried adding this
#@gmic Tin effect : tin_effect, tin_effect
#@gimp : Sigma = float(2,0,10)
tin_effect :
     --blur $1 -n 0,255 -xor


in a file i tried
%AppData%/user.gmic
%AppData%/test.gmic
%AppData%/gmic/user.gmic
%AppData%/gmic/test.gmic
so far none have made my filter show up when i refreshed inside GIMP's G'MIC
any thoughts?

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 2:50 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Very cool script!

Try using %AppData%\Roaming\user.gmic

And I'm certain you can do what you're attempting with G'MIC, if I could spare more time I'd look into it myself!


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:00 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
tried that, didn't work
my %appdata% when i echo it on command prompt is: C:\Users\Tin Tran\AppData\Roaming
so i saved it in C:\Users\Tin Tran\AppData\Roaming\user.gmic
and that didn't work. :(

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:07 pm  (#8) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Edit: first line of gmic file should be
#@gmic


You may want to try a trick I use for tests, put this line at the start of your file:

#@gimp <b>.{development filters}</b>


Then this at the end:

#@gimp _


That way all your test filters should appear under a branch between Faves and About


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:14 pm  (#9) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
I just noticed you first line has a mistake too:

#@gmic Tin effect : tin_effect, tin_effect


The line should begin with #@gimp, like this:

#@gimp Tin effect : tin_effect, tin_effect


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:16 pm  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
nope that doesn't work for me

#@gimp
#@gimp <b>.{development filters}</b>
#@gimp Tin effect : tin_effect, tin_effect
#@gimp : Sigma = float(2,0,10)
tin_effect :
     --blur $1 -n 0,255 -xor
#@gimp _


and tried
#@gmic
#@gimp <b>.{development filters}</b>
#@gimp Tin effect : tin_effect, tin_effect
#@gimp : Sigma = float(2,0,10)
tin_effect :
     --blur $1 -n 0,255 -xor
#@gimp _

_________________
TinT


Last edited by trandoductin on Tue Aug 23, 2016 3:22 pm, edited 1 time in total.

Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:19 pm  (#11) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Very nearly! It should be:

#@gmic
#@gimp <b>.{development filters}</b>

#@gimp Tin effect : tin_effect, tin_effect
#@gimp : Sigma = float(2,0,10)
tin_effect :
     --blur $1 -n 0,255 -xor

#@gimp _


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:23 pm  (#12) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
nope cut and pasted that code and it didn't want to show up either. i am going crazy.

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:30 pm  (#13) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Hmmm OK, I just tested this exact file as a straight replacement of my own in "%appdata%\roaming\user.gmic" (obviously make sure it's not got a .txt extension!) and it worked. I'll test with up to date G'MIC since I haven't updated for a while. I'm too easily drawn into G'MIC stuff :hehe

Edit: using G'MIC 1.7.5 x64 it still works with the same file in the same place for me. This PC is win7, might test later on a win10 machine.


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:45 pm  (#14) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
it's not a .txt file i double checked that.
my G'Mic says it's 1.7.1 I wonder if i have to upgrade.
Where did you get 1.7.5?
Edit: found it I'll try 1.7.5 and see what happens.
Sucess.. it worked...
Now i gotta look into learning what commands to use . know a good place to look for these possible commands?

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:51 pm  (#15) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
From here: http://gmic.eu/files/windows/
File used: gmic_gimp_1.7.5_win64.zip

You might find the .exe better than .zip, I always manual install.

I'll be surprised if updating makes any difference to your problem though!

Edit: hahah OK I guess G'MIC wanted to prove me wrong ;)

Good luck with your filter :bigthup


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:55 pm  (#16) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Thanks for your help that was a big hurdle.

Where do you go to see references to what commands to use..
Like for script-fu it's procedure browser.
What about gmic?

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:56 pm  (#17) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
For more info try these:

G'MIC reference: http://gmic.eu/reference.shtml

G'MIC wiki: https://github.com/dtschump/gmic-community/wiki

Edit: I should warn you, depending on what you're attempting it can have a very steep learning curve but it's absolutely worth it!


Last edited by garagecoder on Tue Aug 23, 2016 3:57 pm, edited 1 time in total.

Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:56 pm  (#18) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Sweet.. Thanks a bunch.

_________________
TinT


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 3:58 pm  (#19) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Forgot to mention the fantastic tutorials!

http://gmic.eu/tutorial/basics.shtml


Top
 Post subject: Re: Does multi-threshold exists? (G'MIC help)
PostPosted: Tue Aug 23, 2016 5:45 pm  (#20) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
GMIC is tricky.

I got the threshold to work I think i had to normalize it took me a while to find that out...

now about cutting away whites? and replacing black with a specified color
and finally merging all the results so that the preview shows the combined result
What commands should i looking at? any hint?

_________________
TinT


Top
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Palette from multi image

2

No new posts Attachment(s) Seeking Help with First Multi-File Batch Script

9



* Login  



Powered by phpBB3 © phpBB Group