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

use of wavelet in spatial matching #52

Open
cristianlussana opened this issue Nov 10, 2017 · 0 comments
Open

use of wavelet in spatial matching #52

cristianlussana opened this issue Nov 10, 2017 · 0 comments

Comments

@cristianlussana
Copy link

The spatial matching could probably be done by exploiting a bit more of the wavelet properties. In particular, instead of finding the match by comparing the de-composed coarse fields (i.e. averages over large boxes) -as I firstly suggested, not the smartest thing to do but the easiest- it might be better to compare the wavelet coefficients of the coarser scales.
What we gain is a match that takes into account much more spatial details than before and this might help in the matching of two "rare" situations.

In practice, the command we are using now is (file database.py):
dec = pywt.wavedec2(data, 'haar', level=self.wavelet_levels, axes=(1, 2))[0]
man page is:
http://pywavelets.readthedocs.io/en/latest/ref/2d-dwt-and-idwt.html
search for"pywt.wavedec2":
the function returns a list:
[cAn, (cHn, cVn, cDn), ... (cH1, cV1, cD1)]
and now we are using cAn, instead I'm suggesting to use all the other elements. The quality of the match between two fields is the (scalar) value given by the summation of all the squared differences:
[cHn(field1)-cHn(field2)]^2 + [cVn(field1)-cVn(field2)]^2+[cDn(field1)-cDn(field2)]^2 + ... + [cH1(field1)-cH1(field2)]^2 + [cV1(field1)-cV1(field2)]^2+[cD1(field1)-cD1(field2)]^2
Note that: the dimension of the vectors cHn, cVn, cDn is different from the one of the vectors cH(n-1),cV(n-1),cD(n-1) because they refers to different grids; and cH1, cV1, cD1 should be just 3 scalar values.

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

1 participant