Skip to Main Content
In this paper we propose an effective, low computational cost technique to find the orientation of shapes that have several non-equally separated axes of symmetry. In our technique we define a simple method to calculate the average angle of the shape's axes of symmetry. The axes of symmetry of the shape could be detected using any of the well known techniques reported in the literature. In the proposed technique we use the edge points of the shape to have the ability to deal with natural pictures like coins. The internal edges are used in addition to the external boundary edges to increase the orientation detection capabilities of the algorithm. First, the edge map of the image is extracted by applying Canny edge detector. Second, the center of the object is detected by calculating the average of the vertical and horizontal coordinates of the points of the edge map. Third, the total perpendicular absolute distances from the edge map points to the line that passes through the center point with specified angle are calculated. These calculations are repeated with different angles to find the angles of the minimum peaks of the calculated distances. Finally, if the shape has more than one minimum peak we use our averaging method to get the dominant direction angle of the shape or the shape orientation. By using this technique we only use the first moment of inertia and do not have to use any higher orders to reduce the computational cost.