Quoting Andrea Aime <[email protected]>: > On Wed, Feb 2, 2011 at 3:16 PM, <[email protected]> wrote: >> and look at the pictures explaining bicubic and bilinear >> interpolation. You cannot interpolate correctly pixels at your tile >> borders (expect the tile border is also the border of the big image). >> >> Nearest neighbor interpolation uses the closet pixel, no calculations. >> I assume your images are interpolated with this algorithm and that is >> the reason why you are lucky. >> >> If a user runs in this problem with your architecture, we will have NO >> solution. Personally I would add a big warning in the documentation. > > Normally in JAI chains that is solved by using a border extender of type > "copy". Can't this be applied here too? > > Cheers > Andrea
I think not because the border is filled with the pixels from the tile, but we need the pixels from the neighbor tiles here. Example. Given a tile 10x10 and bicubic interpolation. This means 16 pixels are the input for the calculation of one result pixel. Building a pyramid means reduction of the tile to 5x5 which implies reducing 4 pixels to one. Lets start in the ULC. Pixels (0,0), (1,0), (1,0) and (1,1) will be replaced by a new pixel. The bicubic interpolation needs all pixels in the range x = -1..2, y = -1..2, giving a total of 16 pixels. The -1 coordinates are the problem, so you have to load 3 neighbor tiles, the upper one, the left one and a third one for (-1,-1), the tile touching at the ULC. Doing a bilinear interpolation calculating one pixel from 4 pixels should be now problem as long as your width and height are even. I think most pyramids are nearest neighbor or bilinar, working without problems. Bicubic or even Spline interpolation may cause headache. Christian > > > -- > Ing. Andrea Aime > Technical Lead > > GeoSolutions S.A.S. > Via Poggio alle Viti 1187 > 55054 Massarosa (LU) > Italy > > phone: +39 0584962313 > fax: +39 0584962313 > > http://www.geo-solutions.it > http://geo-solutions.blogspot.com/ > http://www.linkedin.com/in/andreaaime > http://twitter.com/geowolf > > ----------------------------------------------------- > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
