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

조회 수: 2 (최근 30일)
Jürgen
Jürgen 2012년 12월 18일
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에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by