GIMP Forums

Full Version: Using Color/Levels causing phosterization photos
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't know if this is right place for this.

When I hit Auto button in this plugin and apply later another filters I see that my photo had posterization effect. I search extensively what causes this problem and found out that poblem is in this plugin.

Whats going on? Show on example. After hitting auto button I get this value right below histogram (in line parameters: chanel; low; gamma; high):
Red; 28; 1.00; 224

Values in (colors channel) low other than 0, and high other than 255 causes posterization. This effect grows if sliders are far from their max position (for low - 0 and high - 255).

I think, that may be the solution for this problem:
1. Read min slider value and calculate differential betwen 0 and min slider value. Write down this value
2. Read slider max value and calculate differential betwen 255 and max slider value. Write down this value
3. Sum this both value and divide sum by 2. This is new gamma vaue for this channel.

Red value sample:
1. 28 - 0 = 28
2. 255 - 224 = 31
3. (28 + 31) / 2 = 59 / 2 = 29.5

Because you may enter only integers, your new value is 30. So you must enter in this channels values (in line parameters: chanel; low; gamma; high):
Red; 0; 1.30; 255

Do it in the same way in the Green and Blue channel.

Maybe you fix Levels plugin or do it in semiplugin mode? What do you think about this?
I think that Ofnuts & Co. are not interested in giving people new functionality in script and plugins, but in the enfine of the program,. And each new idea is to explain in this way that doing this is almost impossible (restriction in format, bits per channel, "you don't do it raw format").

Below is original image (I shhoting this in RAW, etract it and Denoise in Camera RAW):
This image was in JPEG 16bit photo.

Later I do procedure whiich i described in (points 1 to 8 from the 1st part my post).
When I use Color/Levels and hit auto I get this photo (see how much posterisation is on the wall in this photo):
So Ofnuts and Co. in last part of the his post in this thread seems to be sounds that they don't know what really going on in processing photography (when they must prcessing photography on the advanced levels).

Next. I use procedure Color/Level from this post (on the value layer) and I get this:
When you processing houndreds of photographs and doing your jour job when you have limited time for this is suicide to select locally areas how Ofnuts want.

Finally I use (still on value layer) Hue/Saturation - decrease value to remove amount of the flash from the photo and use script FU-auto-contrast from <Image>/Script-Fu/Contrast/Auto Contrast (you can find it in and I get this:

So now everyone who read this post decide for yourself which procedure produce better result (even if input image is shotting as RAW).
I used RAW in this photos becase the room when I shoot photos was very dark and I noticed that my camera Canon Powershot SX50HS (this is not DSRL camera, it's compact camera) had introduced much stronger noise in JPEGs than in RAW mode. That session of photographs was done when I hardly know my camera (I buy it two or three months before this session).
Of course I later notice that the best shots I received when I shoot phptos in AUTO mode (but I did't liked this modes because my previous cameras ALWAYS shoots better pictures in manual modes). It tooks time to learn all possibilities of your new camera. Now I shoot in Auto mode which produced JPEGs and ralely use RAW.
By the way: the last picture is not the final picture. Here I show only method how I repaired photos. Actually I used combination GIMP and PS6 (on Windows) to repaired this photos. And final photo offen look after this procedures how you see this scene in reality when you shoot the photo.
I always hated see the flash effect in this photos. This procedure also removes this effect, so photograps looks like was shooting without flash (in natural light environment).
So yuor comments are interesting, but I spend houndred hours in past time trying repaired photos which was shooting by previous camera, used a lot of programs, so I have some experience in repairing photography (I didn't said that I know all off photography). And I didn't hide behind tabelas and charts, when I tried explain my theory.
@piokrast: I see posterization in your original image in the wall, its just less obvious. So you were doomed from the start xD

Quote:Ofnuts & Co.
Hm, sounds official LOL

But if you are to address the rest of us helpers/Gimp enthusiasts (co.) please refrain from subtle sarcasm & remember we volunteer our free-time to help & inspire the use of this free awesome program. So you patience & respect is much appreciated piokrast, especially if you want quality help, thankyou Smile

Whenever your editing colors or lighting in a photo, save the original or work on a temporary duplicate layer as these adjustments are destructive to the original bits.
What theory? When I tried read another posts from this forum I noticed that If it not the problem how use function in program, I saw many charts instead explain how do this difficult task in gimp. For me charts are only theory. Scientist also presents a lot of theory, but useful of this theories are often miningless. I assumed that was for people who wrote plugins, but why you answer in this way in all topics on the forum? This is kind of annoying for novice users this forum.

Besides of anything, I want to see any your photographs (can you show at least one - source and final) who is based of any your charts - and possibly explanation with middle samples - how you dealing with this kind of situation.
Reference URL's