What causes pixelation?

J-see

Senior Member
I suspect it to be related to the JPEG format. I notice more artefacts:

Screen Shot 2016-02-28 at 08.33.25.png

Maybe you should upload the NEF and see if others have the same result when exporting as a JPEG. If not, it would allow you to exactly pinpoint the problem.

Btw, the pixelation in the sky is probably posterisation.

I exaggerated the shot in Affinity to check for tonal gaps and from what I see in the histogram and shot itself, I bet on posterisation.

Screen Shot 2016-02-28 at 09.10.53.png
Screen Shot 2016-02-28 at 09.10.47.png
 
Last edited:

J-see

Senior Member
I toyed with levels a bit to check what happens:

Screen Shot 2016-02-28 at 09.30.49.jpg

Screen Shot 2016-02-28 at 09.31.00.jpg

Screen Shot 2016-02-28 at 09.30.34.jpg

Assuming you shoot RAW, the posterisation occurs during processing and exporting as JPEG. There's too much information being compressed and this can result in gaps between tones. It usually shows in (gradient) skies. You should be able to fix it by adjusting curves or toying with the exposure. The RAW itself should be fine (when 14-bit).

You can also fix it afterwards by adding a little bit of noise to the affected areas and applying a Gaussian blur to that.

Screen Shot 2016-02-28 at 10.29.47.jpg

The artefacts around the edges of the bridge are JPEG artefacts likely caused by compression (or maybe multiple edits).
 
Last edited:

hark

Administrator
Staff member
Super Mod
Contributor
I'm telling you I think it has to do with not being able to get rid of all the noise. If anyone wants to give it a go, here is a link to the original NEF. I reset everything back to default. Heads up--the file is 28.75MB.

https://www.dropbox.com/s/jws2ab7b9ew14u7/028.NEF?dl=0

After resetting everything back to default, I opened the file in PCC and simply ran Nik Dfine. This is the result. I can still see noise in the file without any other post processing done. I converted the NEF to a DNG for the following image since it is what I normally use. Previewing the image as I'm writing this, I STILL see pixelation.

I've never had this issue with any other files regardless of forum sizing. I swear it has to do with not being able to get rid of all the noise. For those who are interested, please have a go at it, and post your results below.
[MENTION=31330]J-see[/MENTION] earlier in the thread, I uploaded the original RAW file which is in my quoted link.

And here is this latest RAW file. https://www.dropbox.com/s/5tlmedqj3n3eprd/006.NEF?dl=0

I always resize to the same dimensions and have never had a problem. Eariler in the thread, aroy mentioned it may be due to the dynamic range being too much for the camera to capture--and likely that's the problem. It's just that I've never had this issue with similar skies in the past although in the past I used my D610. One of these days I might try retaking the photo with the D610 and this lens....
 

J-see

Senior Member
I loaded the NEF in RT, applied the D750 cam (flat) + lens profile, increased exposure slightly (using the full range) and exported it as JPEG max quality (1024 long side, about 1MB file size).

006.jpg

I do not see any posterisation in the full shot. I did however see some in the preview JPEG that was embedded in the NEF which makes me wonder if it isn't caused by a profile.

I reprocessed it adding some more contrast and color to see if that had any effect but the sky remains correct.

006-1.jpg

Whatever causes it, it occurs during processing.
 
Last edited:

WayneF

Senior Member
I suspect it to be related to the JPEG format. I notice more artefacts:

View attachment 200595

Yes absolutely, these fuzzy artifacts around sharp edges are unequivocally caused by excessive JPG compression, caused by using a JPG Quality factor too low. Choose a high JPG Quality factor to eliminate them (starting from a new original, these cannot be removed once present).

That is one type of JPG artifacts. Another type of JPG artifact is 8x8 pixel "blocks" shown in plain areas, like sky or walls. I don't see those here, but neither of those artifact effects are pixelization, they are instead JPG artifacts caused by excessive JPG compression, caused by using a JPG Quality factor too low.

Start over from the original, and choose a decently high JPG Quality factor when Saving, and all of this will disappear. Quality is a good thing, don't be stingy with JPG Quality. :)
 

J-see

Senior Member
Here's about the same magnification using the shot I processed and exported at max JPEG quality. Upping the quality fixes those artefacts.

Screen Shot 2016-02-28 at 16.28.56.png
 
Last edited:

J-see

Senior Member
Right, the "arifacts" remaining are not JPG, but are normal aliasing (jagged lines at edges) and over sharpening (light and dark rim along the upper left edge).

Yep.

If I have to guess I'd say the JPEG quality during export is around 70% which doesn't trigger any visible issues in most of the shot but causes posterisation in the sky. It's only when there's this transition in the sky the quality issue surfaces.

Here's a zoomed portion at quality 60% showing those artefacts again.

Screen Shot 2016-02-28 at 16.54.30.png
 
Last edited:

J-see

Senior Member
Here's the shot at 75% quality.

006.jpg

Zoomed:

Screen Shot 2016-02-28 at 17.00.20.png

Pretty similar to the original shot. Artefact-wise. The posterisation in the sky still occurs at this quality while everything else looks normal in the full shot.

If the quality is increased, the issue should disappear.
 
Last edited:

hark

Administrator
Staff member
Super Mod
Contributor
I'm trying to wrap my head around what [MENTION=31330]J-see[/MENTION] and @WayneF are saying--thank you for your input. When I save jpegs to upload here, I save them at 240 resolution and 1600 pixels on the long side. Then the forum still sizes them down during the upload.

J-see, my jpeg settings in camera are standard, sharpening is either 6 or 7, and I'm not sure whether contrast is off or set to low.

If this is caused by jpeg compression, what would either of you suggest for jpeg sizing when saving?
 

Horoscope Fish

Senior Member
I'm trying to wrap my head around what [MENTION=31330]J-see[/MENTION] and @WayneF are saying--thank you for your input. When I save jpegs to upload here, I save them at 240 resolution and 1600 pixels on the long side. Then the forum still sizes them down during the upload.

J-see, my jpeg settings in camera are standard, sharpening is either 6 or 7, and I'm not sure whether contrast is off or set to low.

If this is caused by jpeg compression, what would either of you suggest for jpeg sizing when saving?
I'd suggest you resize the images for Nikonites to 1,000 pixels on the long edge. It's been discussed around here before and if I recall correctly that's the magic number: anything larger gets compressed by the forum software.
 

hark

Administrator
Staff member
Super Mod
Contributor
I loaded the NEF in RT, applied the D750 cam (flat) + lens profile, increased exposure slightly (using the full range) and exported it as JPEG max quality (1024 long side, about 1MB file size).

View attachment 200619

I do not see any posterisation in the full shot. I did however see some in the preview JPEG that was embedded in the NEF which makes me wonder if it isn't caused by a profile.

I reprocessed it adding some more contrast and color to see if that had any effect but the sky remains correct.

View attachment 200620

Whatever causes it, it occurs during processing.

These may not show any of the pixelation, but they lack depth because they should have a little more post processing. Any suggestions on how much post processing to do?
 

J-see

Senior Member
J-see, my jpeg settings in camera are standard, sharpening is either 6 or 7, and I'm not sure whether contrast is off or set to low.

If this is caused by jpeg compression, what would either of you suggest for jpeg sizing when saving?

I'm not sure what program you are using to export as a JPEG but it should have a quality setting.

I'm using Affinity where it looks like this:

Screen Shot 2016-02-29 at 14.24.32.png

As you see my quality is always 100%. The current quality you are using is good for most shots but occasionally it'll mess up a gradient like the sky in your shot. Increasing the quality you are now using will solve that issue for those shots. The lower the quality, the higher the compression, the more posterisation.

You should see your file size increase when increasing the quality. At 100% my shot was about 1MB while at 75% quality it was around 180KB.
 
Last edited:

J-see

Senior Member
If you use LR, it should look somewhat like this:

export_for_email.png

On top next to the image format is again a quality setting. If you use LR, or PS, max out that quality and export the shot again. If I'm correct, it should solve the problem.
 
Last edited:

aroy

Senior Member
I use NX-D for RAW processing and then exporting to 1000 pixels on the long side. Never faced this problem, even though I shoot in harsh tropical sun where the DR is quite high.

Posterization during jpeg conversion depends on the algorithm used. A good algorithm will rarely posterize. Even if it does, there is no point in compressing to below 80% quality for posting on the NET. I should know, as I have written a lot of software in C++ and had to find a good JPG library (you will be surprised to know how bad some of them are, and they are used by a lot of commercial people). Good algorithms will take cognizance of the DR (at least for 8 bits) and not posterize. It is only when the algorithm is trying to aggressively do a global compress that problems start.
 

J-see

Senior Member
I get the same posterisation in that specific shot when I export at 75% quality even when I used a totally different program to process and export.

I just checked it: https://en.wikipedia.org/wiki/Posterization

Additionally, compression in image formats such as JPEG can also result in posterization when a smooth gradient of colour or luminosity is compressed into discrete quantized blocks with stepped gradients.

When the conditions of the shot are right, every JPEG will show posterisation when the compression increases.

To show the result when lowering the quality.

I used a Mac background which is close to perfect in IQ. I exported 100%-90%-80%-70% and then zoomed in at a detail of the shot. You directly notice the artefacts even at 90%.

Order is 100-90-80-70:

100.png
90.png
80.png
70.png

Compression will always cause artefacts but the severity varies from shot to shot. Best is to always use 100% quality.
 
Last edited:

hark

Administrator
Staff member
Super Mod
Contributor
I use PCC to save files as jpegs. I'll look to see where I can access the quality setting. :)
 

hark

Administrator
Staff member
Super Mod
Contributor
This shows how I save all my images. Is there some other setting that needs to be changed?

saving jpeg.jpg
 
Top