Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Bilinear or Tri-linear resampling for G2G #162

Open
songhan89 opened this issue Mar 9, 2019 · 5 comments
Open

Feature request: Bilinear or Tri-linear resampling for G2G #162

songhan89 opened this issue Mar 9, 2019 · 5 comments
Labels
component:remap Remapping or resampling enhancement
Milestone

Comments

@songhan89
Copy link

Hi,

Had a look at the true colour and thought the native/nearerest neighbour sampling makes the edges of features a little bit hard. I add a slight hint of blur to my image, perhaps closer to what a bilinear or a tri-linear sampling might look like.

Just a matter of preference.

Would be good this feature can be added next.

@djhoese
Copy link
Member

djhoese commented Mar 9, 2019

Thanks for the request. The bilinear interpolation is definitely possible and likely wouldn't be too hard to add. @pnuu with the pyresample project is currently optimizing the bilinear resampling. Once this is done there is no reason G2G couldn't use it in the future.

@djhoese djhoese added enhancement component:remap Remapping or resampling labels Mar 9, 2019
@djhoese djhoese added this to the Geo2Grid 1.1 milestone Mar 9, 2019
@graemely
Copy link

graemely commented Apr 9, 2020

Here is a reference bilinear interp implementation in Fortran90:
https://gitlab.ssec.wisc.edu/geocat/geocat/blob/master/src/interpolation.f90

@djhoese
Copy link
Member

djhoese commented Apr 9, 2020

We're currently discussing this in a meeting. Like I said Satpy currently has an implementation of bilinear resampling but if I remember correctly it is quite memory intensive. After talking with @graemely I think I'm going to find a case where bilinear resampling improves the resulting image, compare the execution time and memory usage with nearest neighbor resampling, and then add bilinear resampling as an option if it seems acceptable. Otherwise, we may wait for me to reimplement a different bilinear resampling algorithm that can perform better.

@pnuu
Copy link

pnuu commented Apr 15, 2020

We also have the experimental bilinear interpolation in Pyresample which uses gradient search. It is faster than the "normal" nearest neighbour resampling with cached LUTs. But as said, it is still experimental.

@djhoese djhoese modified the milestones: Geo2Grid 1.1, Geo2Grid 1.2 Nov 30, 2022
@kathys
Copy link
Collaborator

kathys commented Jan 10, 2024

Not something that needs to be supported in Version 1.2. Push to 1.3.

@djhoese djhoese modified the milestones: Geo2Grid 1.2, Geo2Grid 1.3 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:remap Remapping or resampling enhancement
Projects
None yet
Development

No branches or pull requests

5 participants