I want a one matlabe function that can compare between two images by shape please help

1 view (last 30 days)
i dont have
  8 Comments
Walter Roberson
Walter Roberson on 19 May 2015
What is a similarity teax ?
How do you measure the similarity of two shapes? Their area? Their color? Their eccentricity? Their Euler Number?
Consider
The kite shown can be divided into two triangles, horizontally, with the upper triangle being much smaller than the lower triangle. If I reduce the height of the upper triangle further, I could get something that looks similar to a triangle but which does have four distinct sides. Would that be considered more similar to a triangle because it "looks" almost like one, or would it be considered more similar to a rectangle because it would have four sides? Are the "features" (such as "four sides") the important part, or is the "mass distribution" the important part? Is a long ellipse more similar to a circle or to a line?

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 18 May 2015
isequal(size(FirstImage), size(SecondImage))
In MATLAB, all images are rectangular or cuboid.

Image Analyst
Image Analyst on 20 May 2015
Perhaps you mean morphometrics: http://en.wikipedia.org/wiki/Morphometrics but I really have almost no idea what you might want. Do you want the shape of the image itself (like aspect ratio of the rectangle, and number of rows and columns), or the shape of things shown in the image?

Community Treasure Hunt

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

Start Hunting!