Info

此问题已关闭。 请重新打开它进行编辑或回答。

Make two pictures have the centroid in the same spot

1 次查看(过去 30 天)
Hi, I want to use the function imabsdiff so I can obtain the absolute difference between two pictures. The problem is that i get a size error because the centroids of the two pictures are in different positions. How can I make them both coincide, regarding the fact that the object is the same in both pictures. Thank you!

回答(1 个)

Walter Roberson
Walter Roberson 2017-9-20
Consider imregister()
  2 个评论
Angela Muñoz
Angela Muñoz 2017-9-27
It doesn't work. When I use regionprops I get that the centroids and the axis of each picture are different but I don't know how to change them.
Walter Roberson
Walter Roberson 2017-9-27
You can calculate the minimum distance between centroid and each side over the two pictures, and then crop out the extra from each image. The result should have the centroids in the same relative position.

此问题已关闭。

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by