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
0 个评论
回答(1 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!