开发者

Algorithm to Calculate Symmetry of Points

Given a set of 2D points, I want to calculate a measure of how horizontally symmetrical and vertically symmetrical those points are.

Alternatively, for each set of points I will also have a rasterised image of the lines between those points, so is there any way to calculate a measure of symmetry for images?

BTW, this is for use in a feature vector that will be presented to a neural network.

Clarific开发者_开发百科ation

The image on the left is 'horizontally' symmetrical. If we imagine a vertical line running down the middle of it, the left and right parts are symmetrical. Likewise, the image on the right is 'vertically' symmetrical, if you imagine a horizontal line running across its center.

What I want is a measure of just how horizontally symmetrical they are, and another of just how vertically symmetrical they are.

Algorithm to Calculate Symmetry of Points

Algorithm to Calculate Symmetry of Points


This is just a guideline / idea, you'll need to work out the details:

To detect symmetry with respect to horizontal reflection:

  1. reflect the image horizontally
  2. pad the original (unreflected) image horizontally on both sides
  3. compute the correlation of the padded and the reflected images

The position of the maximum in the result of the correlation will give you the location of the axis of symmetry. The value of the maximum will give you a measure of the symmetry, provided you do a suitable normalization first.

This will only work if your images are "symmetric enough", and it works for images only, not sets of points. But you can create an image from a set of points too.


Leonidas J. Guibas from Stanford University talked about it in ETVC'08.

Detection of Symmetries and Repeated Patterns in 3D Point Cloud Data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜