2
$\begingroup$

Context: I have two 3D non-random matrices that have the same dimensions. These matrices represent satellite images with 1 band, so their values are strictly positive. They both present areas that have similar values, while areas without a "pattern" would have more varied values.

Problem: Even though they might have similar patters, these matrices have values that can be several orders of magnitude different. Their patterns might also sometimes differ a lot, but be nonetheless present.

Question: How could I compare such matrices ? I would like to express how "far" from each other they are, and use statistical tools to try and measure that.

Tools I use:

  1. Calculate the Rotated Empirical Orthogonal Functions (REOF) of both matrices (I keep the first 4 modes only), which gives me 4 spatial modes and 4 temporal modes for each.
  2. Normalize the spatial modes with (mean-min)/(max-min).
  3. Calculate the Frobenius norm of the difference of the normalized spatial modes: Frobenius(spatial_modes_matrix_1 - spatial_modes_matrix_2)
  4. Plot the differences between each spatial mode (low difference means similarity)
  5. Plot a histogram of values of the Frobenius norm for each mode.
$\endgroup$
4
  • $\begingroup$ How well does your approach work? Why do you want to replace it? $\endgroup$ Commented Jul 10, 2023 at 6:46
  • $\begingroup$ It works fairly well (especially step 4), but I would like to learn more about this topic and see if there are other techniques for doing that. I also want to test how robust my approach is compared to other approaches. I know the Frobenius norm has limitations and I want to be sure I understand 100% what I'm doing ! $\endgroup$
    – Nihilum
    Commented Jul 10, 2023 at 6:58
  • 1
    $\begingroup$ Good approaches on comparing two matrices will vary depending on the intended application. Here you've hinted that images represent areas with or without a "pattern". I'm guessing that various effects (scale, rotation, granularity, noise) might contribute to different images of the same area. Indeed you should probably describe your goal as to consequences of "failing" either in deciding two images are similar when they depict different areas or in reporting two images are not similar when they depict the same area. $\endgroup$
    – hardmath
    Commented Jul 10, 2023 at 12:04
  • $\begingroup$ I see, thank you for your comment ! I will think of other ways to express the dissimilarities. I haven't worked with gradients yet, maybe from there I will find useful features to allow me to measure how dissimilar the matrices are. $\endgroup$
    – Nihilum
    Commented Jul 10, 2023 at 16:15

1 Answer 1

2
$\begingroup$

Welcome to Scicomp! You might be interested in the field of (multimodal) medical image registration. In medical contexts one often wants to register a CT image with an MR or PET-Scan. The amplitudes of these modalities may vary considerably and differ in their physical meaning. Nonetheless they show the same spatial features.

In order to register these images one needs to calculate a similarity between them to iterate the optimizer. One approach that worked well for me was using local gradient information instead of amplitudes ("mutual information").

A good starting point may be the list of available similarity metrics implemented in the (wonderful) itk library:

https://itk.org/Doxygen/html/group__RegistrationMetrics.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.