Opened 6 years ago

Closed 4 years ago

#6817 closed defect (wontfix)

gdaladdo produces artefacts in TIFF internal masks for certain resampling schemes e.g. lanczos

Reported by: nowakr Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: 2.1.3
Severity: normal Keywords: overview, resampling, gdaladdo
Cc: mojodna

Description

When adding overviews to TIFFs that have internal masks using a resampling scheme such as lanczos the internal masks on the overviews (not the image itself) sometimes have significant artefacts well within the nodata area. These artefacts are not created when using average or nearest resampling.

Is it possible that the overview algorithm uses the same resampling scheme on the mask as for the image, thereby leading to ringing on the sharp edge of the mask? (and making non-zero values where there should be zeros)

If this is the case, it makes no sense to always apply the same resampling algorithm to the mask as to the image. The mask should probably be resampled using average regardless of the user choice of image resampling. (Or let the user decide which mask resampling is used by a new command line switch.)

The attached TIFFs have overviews added with lanczos and average schemes, and screenshots of both when zoomed out (to show the overview rather than the primary image).

Attachments (4)

test_lanczos.tif (264.4 KB ) - added by nowakr 6 years ago.
with lanczos overviews
test_lanczos - screenshot.png (852 bytes ) - added by nowakr 6 years ago.
screenshot of artefacts in internal mask of overview after lanczos resampling
test_average.tif (264.4 KB ) - added by nowakr 6 years ago.
overviews with average resampling
test_average - screenshot.png (526 bytes ) - added by nowakr 6 years ago.
screenshot of overviews after average resampling - there are no artefacts in the nodata area

Download all attachments as: .zip

Change History (6)

by nowakr, 6 years ago

Attachment: test_lanczos.tif added

with lanczos overviews

by nowakr, 6 years ago

screenshot of artefacts in internal mask of overview after lanczos resampling

by nowakr, 6 years ago

Attachment: test_average.tif added

overviews with average resampling

by nowakr, 6 years ago

screenshot of overviews after average resampling - there are no artefacts in the nodata area

comment:1 by mojodna, 5 years ago

Cc: mojodna added

comment:2 by Even Rouault, 4 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.