Separate Image Into Color Layers Online

By | 28/08/2022

How to separate an image into multiple layers based on colour




Hi Anybody,

Offset post.

I would like to know if in that location is a way to split an image into multiple layers based on color (or pallet)?

I accept created an image with Filter -> Render -> Clouds -> Difference Clouds

Then I utilize the Color -> Posterize upshot to make the epitome await like a terrain map

Now I would like to automatically split up each color into its own layer (so this image should be well-nigh viii or 9 layers).

Any suggestions would be most appreciated!!!

Thank you,
jpummill


There will exist a few ways I am certain. My first thoughts.

(i) Posterizing all the same leaves a bit of a messy image. Using
Colors -> Info -> Colorcube Analysis
shows 146 shades.
(ii) A better way might be
Colors -> Map -> Palette Map  using a suitable palette. I will adhere the one I used, might be useful (or not)

(3) I used gimp_gmic_qt see: http://www.gmic.european union to separate those.
(4) The layers with a couple of them visible.


If the colors tin be separated by their luminosities (or this is a grayscale image) and then:

* Add a layer mask to the epitome, and initialize to
Grayscale copy of layer

* Make as many copies of this every bit you desire images
* Utilize the threshold tool on the mask to keep opaque simply the range of values for the image (the threshold tool has ii handles and defines a range).

In the case below, since the spectrum of the solid dissonance is a bit restricted, I used wider ranges at both ends


Merely a simple comment on Rich’s post about “Posterize” in Gimp.
I estimate that contempo releases of Gimp accept a proper handling of Posterizing effect.
After having run Gimp Posterize on an image I institute (thru Histogram) that the values are really only n, without messy values around the peaks.
I’m referring to Gimp 2.10.nineteen Samj’southward.







(04-27-2020, 05:47 AM)
dinasset Wrote:
Only a simple annotate on Rich’southward post nearly “Posterize” in Gimp.
I estimate that recent releases of Gimp have a proper handling of Posterizing effect.
After having run Gimp Posterize on an image I found (thru Histogram) that the values are really only northward, without messy values effectually the peaks.
I’yard referring to Gimp two.ten.nineteen Samj’south.

SamJ’s somehow versioning is independent of Gimp”s versioning.

However, using my 2.ten.14, if I use Posterize to a I-8 and FP-32 versions of the same grayscale image I get the same histogram with sharp values, Nonetheless, when I ask for 8 colors I simply get half dozen spikes…

OTOH the colorcube assay however reports 199 (FP-32) or 198 (I-eight) colors, and if I color-index the I-viii paradigm, I become a colormap with 198 entries…


Used OP’due south posterized prototype. Must have been scrambled on download.




(04-27-2020, 06:42 AM)
rich2005 Wrote:
Used OP’due south posterized epitome. Must have been scrambled on download.

The OP’s posterized prototype is a JPEG. JPEG pinch volition create new colors.




(04-27-2020, 06:44 AM)
Ofnuts Wrote:



(04-27-2020, 06:42 AM)
rich2005 Wrote:
Used OP’southward posterized image. Must accept been scrambled on download.

The OP’southward posterized prototype is a JPEG. JPEG pinch will create new colors.

Lets hope that OP is not using that i then.
Wink




(04-27-2020, 06:46 AM)
rich2005 Wrote:



(04-27-2020, 06:44 AM)
Ofnuts Wrote:



(04-27-2020, 06:42 AM)
rich2005 Wrote:
Used OP’s posterized image. Must have been scrambled on download.

The OP’s posterized epitome is a JPEG. JPEG compression will create new colors.

Lets hope that OP is not using that one and so.
Wink

Hey Everyone, I wanted to thank all of you lot for taking the time to provide input on my question.

Sorry most the image provided existence a JPEG.  I didn’t call back about the ramifications regarding color.  I am withal using Gimp ii.8 and my posterize seemed to exist working correctly.

I’m looking for a way to automate the procedure.  I would similar to create a python-fu script to create the original image, posterize information technology, so split information technology into separate layers.  I would then like to bump map each layer and create a drib shadow for each layer.

Ultimately, I am trying to create the following type image (and then automate the process).

Cheers once more for your useful comments!!!







(04-27-2020, 03:30 PM)
jpummill Wrote:



(04-27-2020, 06:46 AM)
rich2005 Wrote:



(04-27-2020, 06:44 AM)
Ofnuts Wrote:
The OP’due south posterized prototype is a JPEG. JPEG pinch will create new colors.

Lets promise that OP is not using that i so.
Wink

Hey Everyone, I wanted to give thanks all of yous for taking the time to provide input on my question.

Lamentable about the image provided existence a JPEG.  I didn’t think almost the ramifications regarding colour.  I am still using Gimp 2.8 and my posterize seemed to be working correctly.

I’m looking for a manner to automate the process.  I would similar to create a python-fu script to create the original image, posterize it, then dissever it into split layers.  I would and then like to bump map each layer and create a drop shadow for each layer.

Ultimately, I am trying to create the following blazon paradigm (then automate the process).

Thanks once again for your useful comments!!!

The technique I explained with thresholded layer masks is inspired past one of my scripts, which is demonstrated here:

http://gimpchat.com/viewtopic.php?f=9&t=9311

The script is hither: https://sourceforge.internet/projects/gimp-to…y/download

Some doc at the bottom of this page: http://gimp-tools.sourceforge.net/tools.shtml

80% of the script can be reused. In fact yous only have to remove the pixellation step and the tiles images and use hard-wired values for the thresholds (or your own algorithm/heuristic).  You have to add together the drop-shadow (easy to script) and perhaps the smoothing of the curve (but then upscaling noise should do it).

Source: https://www.gimp-forum.net/Thread-How-to-separate-an-image-into-multiple-layers-based-on-color