Gimp-Forum.net
Colour Indexing issue - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Older Gimp versions (2.8, 2.6....) (https://www.gimp-forum.net/Forum-Older-Gimp-versions-2-8-2-6)
+--- Thread: Colour Indexing issue (/Thread-Colour-Indexing-issue)



Colour Indexing issue - gazza - 08-25-2021

Hi
I am trying to make a layer mask from an image with a busy background. I am using the method where I change the method from RGB to indexed. Everything seems to work fine, in removing the colours, but when I change the image back to RGB, it appears all pixelated, hence after I complete the process to the point where the final image appears on a transparent background, it is STILL pixelated. 

I tested this by changing the image from RGB to indexed on a setting of 16, and when I changed it back again, it never returned to the RGB mode>

Could you please tell me what I am doing wrong. 

The YouTube clip I used to refer to was one that I save a long time ago, and I think the author was "Rich", but I cannot find the tutorial any more.

Regards
GAZZA


RE: Colour Indexing issue - PixLab - 08-26-2021

I'm curious to know how this method is working, are you sure that you should do your RGB to Indexed in the same image?
I would do the conversion in a new/other image (in a different GIMP tab), then once it's clean, convert back to RGB and only then drag n' drop to the normal other image and use it as a mask for example.

Because in the same image and if I understood your workflow (it would be nice if you post 2 images before and after for me to get an idea):
Indexed use 256 colors,
RGB ~16.7million
You are transforming an image with 16.7 million colors to an image with 256 colors (16 colors setting is even worse), then try to get back the original quality by re-transposing your image in 16.7 million colors, but you've lost 16.5 million colors while in indexed colors...
So yes you went back to RGB, but with only 256 colors spreaded thru the 16.7 million colors

Having said that, and if it's about pixels at the edge of your subject, click on the mask then Filters > Blur > Median blur (median blur is very good at that)


RE: Colour Indexing issue - rich2005 - 08-26-2021

This is the video - Gimp 2.8 from 2012 https://www.youtube.com/watch?v=N87VHCkbsts

If it is not working, then probably the foreground is too similar to the background. There are several ways to extract a foreground, now with Gimp 2.10 the improved foreground extract tool, while not wonderful will make a selection you can use with a layermask.

The main thing is getting that initial black / white layer mask that you can improve, do not be confused by PixLabs 256 / 16 million colours Wink

As an alternative, the gimp_gmic_qt plugin has an interactive foreground extract. Quite effective, I use it on occasion.


RE: Colour Indexing issue - PixLab - 08-26-2021

(08-26-2021, 07:49 AM)rich2005 Wrote: This is the video - Gimp 2.8 from 2012  https://www.youtube.com/watch?v=N87VHCkbsts
The main thing is getting that initial black / white layer mask that you can improve,

That's what I thought, you did it on 2 images 1 to make a mask then transpose to the original and use it as a mask Wink
BTW, Excellent tuto!

(08-26-2021, 07:49 AM)rich2005 Wrote: do not be confused by PixLabs 256 / 16 million colours Wink

Yeah.. sorry about that, I have tendency to speak too much, and then I lose the track Blush


RE: Colour Indexing issue - gazza - 08-26-2021

Hi Rich
Many thanks for the reply. I will try what you suggest. The link below shows what I am working on. The Pukeko image I am using is in the second row down second image from the left. NZ Pukeko (Titled 38 Pukeko Ideas) . (I am from NZ). You will notice that the background is entirely different to the image of the bird. 
Many thanks again really appreciate the help from all you folk.
Regards Gazza


https://www.google.com/search?q=pukeko&sxsrf=AOaemvKhJMcFGEfnFDIgFWPloWWYp8sxcA:1630015188931&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjq0sHi18_yAhUuwjgGHRbgBkkQ_AUoAX


RE: Colour Indexing issue - rich2005 - 08-27-2021

I could get a mask out of that using an indexing method. This part way reduced to 8 colours before threshold & touch-up. https://i.imgur.com/fBsese1.jpg

However time moves on, Gimp is now 2.10 and using the gimp_gmic_qt plugin. If you do not have it it is worth installing go to:  http://www.gmic.eu

This how I might proceed using the gmic interactive foreground extract: https://youtu.be/XsGALORZ4pg in horrible detail 7 minutes.






RE: Colour Indexing issue - gazza - 08-28-2021

Thanks Rich
I have got 2.10 installed as well so I will definitely give that a go.
Cheers
GAZZA