Bug report #6561
'cubic' resambling for "zoomed in" (scale > 100%) rasters creates undesired visual glitches with contrast set to stretch to min max
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Marco Hugentobler | ||
Category: | Rasters | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | all | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | end of life |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 15761 |
Description
Steps to reproduce visual glitches:
1. Load a raster; for the sake of this example, please use 1:10m ocean bottom available @ http://www.naturalearthdata.com/downloads/10m-raster-data/10m-ocean-bottom/ as it shows this issue quite well
2. In the layer property window, retrieve the min/max values of RGB bands with these settings:
() cumulative count cut 2 - 98%
() Full (extend)
(*) Estimate (faster) (accurary)
3. Set contrast enhancement to "Stretch to MinMax"
4. Set zoomed in resampling to "Cubic"
5. Apply the change, then zoom in (raster zoom scale must be > 100% to activate cubic resampling) a region of the raster (if using the above ocean bottom raster, glitches easily to spot in southern china sea, among other places)
You'll notice weird visual glitches which are not there if using the two other types of resambling. I'm attaching a screenshot of the problem.
Associated revisions
[raster] Fix cubic resampler visual glitches (refs #6561)
Resampler was not correctly bounding color components for premultiplied
image format. There's still errors in the resampled raster at the
source image edges and glitches with transparency channels, though.
Also fix a bunch of inefficiencies in the code.
History
#1 Updated by Marco Hugentobler about 12 years ago
If the image has sharp changes, it is in the nature of cubic functions to overshoot. I think this is what you perceive as visual glitches. In that cases, using cubic interpolation is just not suitable.
#2 Updated by Mathieu Pellerin - nIRV about 12 years ago
- File resampling-comparison.jpg added
Marco, I understand the characteristic cubic interpolation, and I believe what is being raised here doesn't fall within expected results of a cubic resampling :)
I'm attaching a new screenshot that compares the three available resampling methods for raster >100%, including the problematic cubic one. It'll hopefully help better demonstrate the issue.
#3 Updated by Radim Blazek over 11 years ago
- Assignee changed from Radim Blazek to Marco Hugentobler
#4 Updated by Jürgen Fischer over 10 years ago
- Target version changed from Version 2.0.0 to Future Release - Lower Priority
#5 Updated by Médéric RIBREUX almost 9 years ago
- Status changed from Open to Feedback
Hello, bug triage...
I can't reproduce it on QGIS 2.13 master . Can you confirm ?
#6 Updated by Nyall Dawson almost 9 years ago
It's still an issue - as per the commit note above, it's now only visible on image edges.
#7 Updated by Nyall Dawson almost 9 years ago
- Status changed from Feedback to Open
#8 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#9 Updated by Giovanni Manghi over 5 years ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR
Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/