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

Is there any IO for nearest interpolation? #3

Closed
Barnonewdm opened this issue Dec 20, 2019 · 1 comment
Closed

Is there any IO for nearest interpolation? #3

Barnonewdm opened this issue Dec 20, 2019 · 1 comment

Comments

@Barnonewdm
Copy link

Barnonewdm commented Dec 20, 2019

We want to perform augmentation on the image label. Therefore, it requires the nearest interpolation. We wonder whether there is the IO for this operation.

@keppenhof
Copy link
Collaborator

Yes there is! You can assign an interpolation order to an Interpolator object, for example order=0 for nearest neighbor interpolation. For example, given image (some_image of type np.ndarray) and a Gryds transformation object some_transformation:

interpolator = gryds.Interpolator(some_image, order=0)
transformed_image = interpolator.transform(some_transformation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants