Opened 9 years ago

Closed 9 years ago

#5765 closed defect (invalid)

gdaladdo: cubic resampling produces bad mask

Reported by: cdestigter Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc: antonio

Description

Given an RGB+mask image, running gdaladdo with cubic resampling computes masks in a way that some originally masked pixels aren't masked in overviews. This results in random black pixels around the edges of data areas.

The output from average and nearest seems correct, so it seems cubic is doing something strange here.

Steps to reproduce:

for r in cubic nearest average
do
    echo $r 
    cp masked.tif $r.tif
    gdaladdo --config INTERLEAVE_OVERVIEW PIXEL --config GDAL_TIFF_INTERNAL_MASK YES --config GDAL_CACHEMAX 128 -r $r $r.tif 2 
    tiffsplit $r.tif $r-
done

The attached zip includes a qgis project which highlights the differences between the algorithms.

Attachments (1)

mask-cubic-test.zip (948.0 KB ) - added by cdestigter 9 years ago.

Download all attachments as: .zip

Change History (4)

by cdestigter, 9 years ago

Attachment: mask-cubic-test.zip added

comment:1 by antonio, 9 years ago

Cc: antonio added

comment:2 by Even Rouault, 9 years ago

Grrr, my comment got lost.

Craig, I can see the issue in cubic-aac.tif, but when I try to reproduce, the result I get looks fine. Are you using latest GDAL trunk ? Which compiler, environment, compilation flags are you using ?

comment:3 by cdestigter, 9 years ago

Resolution: invalid
Status: newclosed

You're right, I'm not seeing the bug now either. I think I was running this on the wrong machine and it had an older GDAL than I thought it did. Sorry for the noise.

Note: See TracTickets for help on using tickets.