Gimp-Forum.net
Posterize or make contour lines by defined colours - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Posterize or make contour lines by defined colours (/Thread-Posterize-or-make-contour-lines-by-defined-colours)



Posterize or make contour lines by defined colours - pygmalion - 06-19-2020

I have a picture as a result of a calculation program:

[Image: IOjSA6I.png]

There is also a legend for values:

[Image: Xtqyo2l.png]

Now, I would like to make a picture with seven colours (posterize) OR find six isocolor lines.  The six threshold colours can be extracted from the legend with equidistance.

Is something like that even possible in GIMP?  When I make posterize in GIMP it does the job but I don't like the colours that were automatically selected as threshold colours


RE: Posterize or make contour lines by defined colours - denzjos - 06-19-2020

Maybe this is a solution :
GMicQt / Artistic / Cutout 
Number of levels 7
Edge Simplicity 3
Edge Fidelity 2

[attachment=4558]


RE: Posterize or make contour lines by defined colours - pygmalion - 06-19-2020

(06-19-2020, 11:56 AM)denzjos Wrote: Maybe this is a solution :
GMicQt / Artistic / Cutout 
Number of levels 7
Edge Simplicity 3
Edge Fidelity 2

Unfortunately, this tool takes wrong threshold colors.  I think that threshold colors must be picked manually.  But how?


RE: Posterize or make contour lines by defined colours - Ofnuts - 06-19-2020

(06-19-2020, 03:44 PM)pygmalion Wrote:
(06-19-2020, 11:56 AM)denzjos Wrote: Maybe this is a solution :
GMicQt / Artistic / Cutout 
Number of levels 7
Edge Simplicity 3
Edge Fidelity 2

Unfortunately, this tool takes wrong threshold colors.  I think that threshold colors must be picked manually.  But how?

Create a palette with the color you want, and use Image>Mode>Indexed and specify your palette as a custom palette. If necessary, copy the graphic to its own image and color-index it, and copy-paste the result in the initial image.


RE: Posterize or make contour lines by defined colours - rich2005 - 06-19-2020

Again using indexed mode, slightly different to above:
------------------
Not much you can do with that image. First lose the border, It does not help. You can put it back later.

Screenshots for reference - all in Gimp 2.8 https://i.imgur.com/yGbbi5O.jpg

1. Convert to indexed mode with 6 colours. Image -> Mode -> Indexed

that gets just 6 colours but the border are a bit 'jagged'

2. Back to RBG mode Image -> Mode RGB the apply a Gauusian blur - quite strong about 20

3. Repeat stage 1 Image -> Mode -> Indexed with 6 colours. That smooths the borders a bit. If you want to change any of the colours, edit the colormap

Then if you need to back to RGB mode, you will still have just 6 colours.

I did look around for suitable scripts or plugins but nothing much different to changing the colour mode