1
$\begingroup$

I am tracking a $2D$ irregular shape that changes over time. image

I have the $(x,y)$ coordinates of the shape outline.

I am trying to quantify, with a single parameter, the degree to which the length of the shape changes along a specific angle. For example, on average, how much longer does the shape get along the axis 30 degrees counterclockwise of the x-axis.

Is there a standard way to do this? I was thinking to first just rotate the image negative of the desired angle (in this case -30 degrees). This way we can think in terms of measuring change in horizontal length. Then, for every point on one side of the shape, find a corresponding point on the other side by drawing a horizontal line, and and measure the distance between the two points. Averaging all the distances would give the average change in length along that specific dimension. However, I realize this is flawed because it's kind of arbitrary where the initial point is chosen.

Another way of looking at it is the following:

Any 2D shape can undergo an area change induced by elongation/shortening across one of two perpendicular axis. I want to know whether the increase/decrease in area is because of a uniform elongation/shortening across both axis, or, there is anisotropy and the shape is elongating/shortening to a greater extent along a specific axis. And I want to quantify the extent of that anisotropy. This is a little different than the description I have above, but either of these things would suffice.

Edit: the solution I used was the following. 1) Rotate polygon. 2) Fit polygon to a bounding rectangular box. 3) For a particular y-coordinate along the bounding box, determine the minimum and maximum x-coordinate on the polygon. Take the difference between the two x-coordinates. 4) Repeat (3) for every y-coordinate and average all those distances to get an average distance.

$\endgroup$

1 Answer 1

1
$\begingroup$

This approach might be suitable, depending on the nature of your irregular shapes:

Rotate the shapes so your selected axis points up, then fit axis-aligned bounding boxes around the shapes. Now take the quotient of the aspect ratios of these boxes.

Under the assumption that the new shape was obtained from the old shape using scalings parallel and perpendicular to the selected axis, this quotient will quantify the anisotropy of the total scaling (a quotient of 1 means the scaling was isotropic).

Note that this approach depends a lot on the aforementioned assumption. If you have more general maps (shearings, rotations, reflections or nonlinear maps) then your best approach to whatever you're trying to do would probably be to find an approximation of the map using a different method, then compute something from the parameters of that approximation.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .