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

Normalization of mapping tables #85

Open
TjarkMiener opened this issue Jan 21, 2019 · 3 comments
Open

Normalization of mapping tables #85

TjarkMiener opened this issue Jan 21, 2019 · 3 comments

Comments

@TjarkMiener
Copy link
Member

TjarkMiener commented Jan 21, 2019

The normalization in image mapper isn't working properly. The core problem is the following:

  1. Firstly each mapping table is normalized by normalization(self, mapping_matrix3d, num_pixels). For example for the mapping table of the one camera pixel in the figure, the weights of the output grid points (red and green and from more Delaunay triangulation around the pixel) are normalized.
  2. Then, the mask is applied by mask_interpolation(self, mapping_matrix3d, nn_index, num_pixels, pad). The mask will set the red grid points to zero and keep the green points. This will somehow destroy the normalization and we will end up having less intensity/energy in the transformed image.

Applying the mask before the normalization will result in the same problem.
normalization

@TjarkMiener
Copy link
Member Author

I added an optional argument in image_mapper for mask interpolation in commit e1639c1

@aribrill
Copy link
Collaborator

aribrill commented Feb 1, 2019

When the argument for mask interpolation is set to True, does this issue still persist? If so, I think this issue should be reopened. If I understand correctly, the point of mask interpolation is to prevent contamination from zero padding which causes a border artifact, so it should be set to True by default.

@TjarkMiener TjarkMiener reopened this Feb 1, 2019
@TjarkMiener
Copy link
Member Author

Yes! When mask interpolation is True it's still persist. However, I think this is an issue that occur by construction and can't be avoided.

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