Which matlab function can be used to compare spatial distribution grids?

3 次查看(过去 30 天)
Hi,
I have two spatial distributions in a grid, so lets say a 40 x 70 matrix: each grid has the same dimensions e.g. 0.250 m on 0.5 m. I want to compare the grids and find the best overlay, one grid is a result of simulation, the other one is the real measurement.For eavluating the match I can use the mean squared difference or the mean relative difference, this is not the main issue.
One slow way to do this could be to perform all possible translation and rotations of one grid and compare it each time to the other grid. This probably could work but does not seems efficient
One function of matlab that seems interesting is cp2tform but I see that it is only applied to images, is this function suited or are there function that are more suited for this purpose, thanks for any suggestion,
regards,J

回答(1 个)

Image Analyst
Image Analyst 2012-12-18
I'm not sure why you're translating and rotating. Are the two images not registered (aligned)? If not, try imregister() in the Image Processing Toolbox. That's probably what I'd try first. It's more automatic than cd2tform. Alternatively you can try normxcorr2() to do normalized cross correlation but that works only for translation. I have a demo of normxcorr2 that I posted in Answers if you're interested. There are other methods if those don't work. For example, see how they find the jet in the image at the bottom of this page using the Hausdorff distance.
  1 个评论
Jürgen
Jürgen 2012-12-19
编辑:Jürgen 2012-12-19
Thanks for the answer, I look into the proposed solutions, a a remark: it are not really images but of course the grid data could be treated as an image, I would lose some precision when transforming my "analog" measurements. I uploaded the contourplots: http://imageshack.us/photo/my-images/16/tempdwy.jpg/

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by