[gdal-dev] Boundary Artifact with ChunkAndWarpImage
Michael Aschenbeck
m.g.aschenbeck at gmail.com
Thu Apr 16 10:42:47 PDT 2015
Thanks for your reply.
I'm using gdal 1.10.1. I'm using cubic resampling, but i have noticed the
dark line artifact with bilinear as well. I unfortunately do not reproduce
the problem with a basic gdalwarp with cubic resampling.
I have written this code to do some registration. It's hard to tell in the
example, but my transformation actually pushed pixels up a bit. The
transformation I use handles interior pixels nicely and extends beyond the
image, so there is nothing 'weird' going on with that near the boundary
that I can think of.
I was hoping there is a warp option i have not yet thought of.
Thanks again,
Mike
On Thu, Apr 16, 2015 at 11:10 AM, Even Rouault <even.rouault at spatialys.com>
wrote:
> Le jeudi 16 avril 2015 19:01:57, Michael Aschenbeck a écrit :
> > Hello,
> >
> > I'm using ChunkAndWarpMulti to warp an image. The warping is working
> > nicely, however, at the boundary I seem to be getting some artifacts.
> >
> > The first artifact i see is a DARK boundary of pixels in some location.
> My
> > guess is that the interpolator is interpolating with blackfill (intensity
> > zero pixels). Note that I am using the following setup:
> > psWarpOptions->padfSrcNoDataReal = (double *)
> > CPLMalloc(psWarpOptions->nBandCount*sizeof(double));
> > for (int ii = 0; ii < psWarpOptions->nBandCount; ii++)
> > {
> > psWarpOptions->padfSrcNoDataReal[ii] = 0;
> > }
> > which i thought was supposed to treat zeros as nodata. It doesn't seem
> to
> > be doing what I think it should.
> >
> > In some cases, I am also noticing a BRIGHT band strip of pixels adjacent
> to
> > the dark boundary pixels. I don't have any thoughts on where this
> artifact
> > is coming from.
> >
> > Below you can find links to an example. The orange you see is just the
> > background color of my viewer. Zero pixels are set to transparent so you
> > can see the dark boundary artifact. (Note that all of the orange region
> is
> > covered with zero-intensity pixels, so we haven't reached the boundary of
> > the file, just the boundary of the non-zero pixels.) Sorry if that's
> > confusing.
> > The before image:
> https://www.dropbox.com/s/3kmyi8wu0qybsq9/before.JPG?dl=0
> > The after image with the artifacts:
> > https://www.dropbox.com/s/fo0m8q95b26s61m/after.JPG?dl=0
> >
>
> Mike,
>
> Which gdal version ? Which resampling method ?
> Do you reproduce with gdalwarp ?
> If so, providing input file + full gdalwarp command line would help.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150416/96d7c3f2/attachment-0001.html>
More information about the gdal-dev
mailing list