Post Reply 

Using Color/Levels causing phosterization photos

Sep 29, 2014, 12:30 (This post was last modified: Sep 29, 2014 12:34 by piotrkast.)
Post: #1
Using Color/Levels causing phosterization photos
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?
Find all posts by this user
Quote this message in a reply
Sep 29, 2014, 12:58 (This post was last modified: Oct 8, 2014 12:14 by ofnuts.)
Post: #2
RE: Using Color/Levels causing phosterization photos
This is a consequence of the 8-bit-per channel processing. All mappings fror 256 values to some other 256 values that preserve the order (in other words, x>=y => f(x)>=f(y) reduce the number of different values, so you end up with areas where all pixels have the same value, next to another area where all pixels have a same other value, and the frontier is visible.

You have the same problems with Brightness/Contrast, Levels, Curves... You can mitigate the problem by applying spread noise.

Furthermore, this color loss happens each time. So you cannot endlessly tweak your colors/levels, you must try to do everything in one pass (which usually means using the Curves tool).

Gimp isn't the only culprit, if you start with a JPEG you only have 256 values per channel to work with. This is why decent cameras can be asked to produce a "raw" file, which is 12-14 bit per pixel (4K-16K values) instead of 8. Then you do all the color/level processing in the raw processing utility using the full bit depth, before converting to JPG, and you use Gimp for local edits only.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 1, 2014, 17:23 (This post was last modified: Oct 1, 2014 19:24 by piotrkast.)
Post: #3
RE: Using Color/Levels causing phosterization photos
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 http://gimpforums.com/thread-removing-flash-glare (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 http://www.gimphelp.org/scripts/contrast...ast.shtml) 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).
Find all posts by this user
Quote this message in a reply
Oct 1, 2014, 21:11
Post: #4
RE: Using Color/Levels causing phosterization photos
Think what ever you want. I'm merely stating facts and explaining you why you get the results you have. While we are talking about facts, there is no Jpeg-16bits. Jpeg is an 8-bit-per-channel format.

When you look at the picture histogram it is obvious that the problem is that there are no highlights, which is why everything is dull and grey, including the skin of the ladies in the front. From this point of view the best picture is indeed the second one, because the white is white and the ladies no longer look like zombies. Of course the wall is posterized, but you have to choose your subject, and if I were one of the ladies I know which picture I would pick.

The gray wall in the back is an ideal posterization victim for all color processing. It is a rather uniform area and since it's 33% gray it is at the beginning of the center third of the values, where most color processing tools do their job. It is also possible that the denoising has been pushed too much and removed all the texture in the wall. Keeping a bit of texture would avoid the visible posterization.

Of course since you have a RAW processor so you should really be applying your color corrections with it, so you would not have to choose between posterization and zombies. Most such processors can save and re-use "recipes", so you can batch-convert your RAW files to JPeg using a common setting. You can also completely ignore my advice, after all that's your pictures.

Personally, I restrict RAW usage to difficult cases, and when I know I'll rework the image extensively. When I make hundred of photos in the same session, I use Jpeg and set my camera so that they are usable out of the box(*). I also check now and then that the camera settings are correct, by looking closely at a couple of pictures (and their histogram).

(*) My camera and its demosaicing program have a nice feature: it can convert the settings I used on a picture into camera user settings so that the camera produces JPegs that will have the same look as those I processed manually.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 2, 2014, 20:51
Post: #5
RE: Using Color/Levels causing phosterization photos
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.
Find all posts by this user
Quote this message in a reply
Oct 3, 2014, 00:36
Post: #6
RE: Using Color/Levels causing phosterization photos
(Oct 2, 2014 20:51)piotrkast Wrote:  And I didn't hide behind tabelas and charts, when I tried explain my theory.

Anyone hiding here? And what theory?

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 3, 2014, 06:20
Post: #7
RE: Using Color/Levels causing phosterization photos
@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.

"In order to succeed, your desire for success should be greater than fear of failure." BC
[Image: 29uocaf.png]
iFS007 tut vids on YT ~ auto color B&W landscape tut
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 8, 2014, 11:52
Post: #8
RE: Using Color/Levels causing phosterization photos
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.
Find all posts by this user
Quote this message in a reply
Oct 8, 2014, 12:06 (This post was last modified: Oct 8, 2014 12:11 by ofnuts.)
Post: #9
RE: Using Color/Levels causing phosterization photos
Please point me to one of my explanations where I use a chart...

Theory isn't meaningless... it"s a guide. It shows you want you can do and what you can't, and lets you invent new ways to do things... It also leads to reproducible results, which is fairly useful when you explain things to people. Otherwise it's just voodoo magic and you can just as well wave a dead chicken above your image...

If you want to see some of my photos, see there:

http://gimpforums.com/thread-gimping-a-beauty
http://gimpforums.com/thread-another-plane-pic
http://gimpforums.com/thread-yapp

But I start with pictures that are reasonably well exposed (these three pictures were JPEG only...).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  remove keystoning from painting photos broker12 1 89 Jul 11, 2017 05:29
Last Post: ythgilb
  Color alpha function and its current errors Fuse809 0 143 Oct 11, 2014 03:53
Last Post: Fuse809
  GIMP 2.8 Eyedropper Color Selection Tool Not Working? Upgraded App is Slow?? tootallll 14 8,921 Oct 9, 2014 18:39
Last Post: Graphicman2014
  New layer color... btraven 1 141 Oct 2, 2014 06:55
Last Post: ofnuts
  Getting more vibrant color - RED - Sublimation goad 2 237 Sep 14, 2014 05:44
Last Post: goad

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS