A fast algorithm for evaluating an approximation to the information enclosed within coronas and their sectors in square matrices.
From numerical data distributed in an even square matrix A, we wish to determine the proportion of the data belonging to a selected area (S). We restrict the problem to any field of the initial data square enclosed within the part of a corona (characterized by the real values of its two limiting radii) limited by a circular sector (defined by its two limiting angles), both corona and sector being centred at the centre of the square. A fast and accurate approximation algorithm is presented, which collects the contribution of all the pixels of A by exploration of the first quadrant. For each pixel of it and, at the same time, for its three symmetrical ones in the other quadrants, the program evaluates the part belonging to (S), using radial and angular factors. Finally, the weighted contributions are summed up. Compared to the classical methods (exact determination, testing the position of the pixel centres or others), this algorithm offers a better time/accuracy ratio. Suitable accuracy at the border makes it possible to choose larger pixel size, hence to spend shorter CPU time (even and especially in the case of thin rings with large radii).
Gomel
J
J
UFR de Mathématiques, Université Paris 7, France.
D000465:Algorithms; D003461:Crystallography; D007091:Image Processing, Computer-Assisted / Q000379:methods*; D007257:Information Theory; D012985:Software Design