New Method for Measuring Continuous Angle by Linear CCD

In this paper, a method for in-plane rotation angle measurement with high precision in machine vision is proposed. The presented set is composed by a calibrated line scan CMOS camera and an elaborately designed columnar pattern as rotating part under test. Computer simulation shows that tiny relative translation between the camera and columnar pattern can be ignored and thus, the experimental results demonstrate that this proposed method is reliable and robust. This approach can measure both micro and large angles. 1. Backgroud Many approaches, such as mechanical [1], electrom-agnetic [2], optical [3], polarimetric [4][5][6][7] ,etc., have been adopted for measuring rotation angle. Most of these preceding designs are not only complex and can work in very limited range, but are susceptible to temperature, pressure or humidity. For continuous in-plane rotation about stable axis, optoelectronic encoder has been involved comprehensively [8]. In recent years, rotation angle measurement in machine vision with area scan camera, whose refreshing frequency is very finite due to excessive quantity of data, has been employed and achieved approving results[9][10]. Line scan (LS) camera is utilized more and more since it can provide much higher frame rate and resolution. At the time of writing, existing line scan CMOS camera embed up to 8192×4 active pixels and deliver 1D images at a stunning frame-rate of 100 KHz [11]. In this letter, a novel method is put forward to measure continuous or discontinuous rotation angle, and our work is just to develop an apparatus to replace the photoelectric encoder used in airborne turret. 2. The feasible measuring program The measurement device is made up of a line scan camera and a specially designed columnar pattern with a single-lap character spiral curve(CSC), and the CSC can be divided into infinite character slice(CS). The measuring course is as follows: the camera focus on the columnar pattern and the image in the view plane is imaged. If the CSC can be distinguished from scene distinctly, then the rotation angle can be calculated by the image coordinate of CS participating in imaging, and the image coordinate of CS is corresponding with rotation angle uniquely. We established Cartesian coordinates as follows: image coordinate as OUV, camera coordinate as OcXcYcZc and columnar pattern coordinate as OoXoYoZo. When continuous rotation starts, the CS on different position will project onto the line scan CMOS camera with the rotation simultaneously, and theoretical precision δ of measurement satisfies δ = 648000 Kn (arc second) (1) In equation (1), K is the quantity of pixel participating in measurement and n stands for n-fold subdivision of pixel. 2020 4th International Conference on Computer Engineering, Information Science & Application Technology (ICCIA 2020) Published by CSP © 2020 the Authors 166 3. Error analyze 3.1 Angle measurement error analyze on image noise and data processing Generally, there are several lines of active cell in line scan CMOS camera and acquired image is blurred with Gaussian noise and equation (2) shown f(x) = Aexp �− (x−u) 2 2σ2 � + B (2) where A and B are the maximum image gray level of object and background respectively, u is the position of maximal gray level and σ is half width of object image. So, fitting the distribution of gray level with Gaussian function, we can acquire image coordinate of CS by solving all these parameters in equation (2). There are several lines of active cells in line scan camera and an intersecting angle existing between the CSC and view plane, systematic error of localization can be revised by interpolation considerably. The image coordinate of CS can be calculated by Gauss fitting, which can get the parameters such as image coordinate of CS and its width. The imprecision image width of CS and it is supposed by image preprocessing, such as image edge detection. The maximum of pixel gray level is considered as B, and the valid pixel gray level minus B is involved in fitting, and fitting function equation (2) can simply as g(x) = Aexp �− (x−u) 2 2σ2 � (3) The least square solutions of A can be solved by fitting. A and μ are the maximum of pixel gray level, center coordinate and width of CS respectively, and center coordinate of CS is the significant parameter for calculating rotation angle. The center coordinate of CS can be promoted precisely by reducing several disadvantageous effect, such as discrete sampling, quantization error and systemic noise. Actually, the precision of the CS’s center coordinate may be influenced by the width of CSC. With the width increase of CSC, the image gray level of CS will vary more smoothly when the image contrast is invariable, angle measurement error will be enlarged with the increase of image noise. So, the noise level is bad for computing the image coordinate of CS. On the other hand, if we decrease the width of CSC, the coordinate of image center will thus warp due to the interceptive error and reduced data. Sketch of pinhole camera model with line scan camera is shown as Fig.1(b), and angle measurement error is contingent upon the parallelism between camera and columnar pattern as Fig 1(b) . Considering both the processing costs and operation fusibility, it is fitted by setting the image width of CSC from 5 to 10 pixels.


Backgroud
Many approaches, such as mechanical [1], electrom-agnetic [2], optical [3], polarimetric [4][5] [6] [7] ,etc., have been adopted for measuring rotation angle. Most of these preceding designs are not only complex and can work in very limited range, but are susceptible to temperature, pressure or humidity. For continuous in-plane rotation about stable axis, optoelectronic encoder has been involved comprehensively [8]. In recent years, rotation angle measurement in machine vision with area scan camera, whose refreshing frequency is very finite due to excessive quantity of data, has been employed and achieved approving results [9] [10]. Line scan (LS) camera is utilized more and more since it can provide much higher frame rate and resolution. At the time of writing, existing line scan CMOS camera embed up to 8192×4 active pixels and deliver 1D images at a stunning frame-rate of 100 KHz [11]. In this letter, a novel method is put forward to measure continuous or discontinuous rotation angle, and our work is just to develop an apparatus to replace the photoelectric encoder used in airborne turret.

The feasible measuring program
The measurement device is made up of a line scan camera and a specially designed columnar pattern with a single-lap character spiral curve(CSC), and the CSC can be divided into infinite character slice(CS). The measuring course is as follows: the camera focus on the columnar pattern and the image in the view plane is imaged. If the CSC can be distinguished from scene distinctly, then the rotation angle can be calculated by the image coordinate of CS participating in imaging, and the image coordinate of CS is corresponding with rotation angle uniquely. We established Cartesian coordinates as follows: image coordinate as OUV, camera coordinate as OcXcYcZc and columnar pattern coordinate as OoXoYoZo. When continuous rotation starts, the CS on different position will project onto the line scan CMOS camera with the rotation simultaneously, and theoretical precision δ of measurement satisfies δ = 648000 Kn (arc second) (1) In equation (1), K is the quantity of pixel participating in measurement and n stands for n-fold subdivision of pixel.

Angle measurement error analyze on image noise and data processing
Generally, there are several lines of active cell in line scan CMOS camera and acquired image is blurred with Gaussian noise and equation (2) shown (2) where A and B are the maximum image gray level of object and background respectively, u is the position of maximal gray level and σ is half width of object image. So, fitting the distribution of gray level with Gaussian function, we can acquire image coordinate of CS by solving all these parameters in equation (2). There are several lines of active cells in line scan camera and an intersecting angle existing between the CSC and view plane, systematic error of localization can be revised by interpolation considerably.
The image coordinate of CS can be calculated by Gauss fitting, which can get the parameters such as image coordinate of CS and its width. The imprecision image width of CS and it is supposed by image preprocessing, such as image edge detection. The maximum of pixel gray level is considered as B, and the valid pixel gray level minus B is involved in fitting, and fitting function equation (2) can simply as The least square solutions of A can be solved by fitting. A and μ are the maximum of pixel gray level, center coordinate and width of CS respectively, and center coordinate of CS is the significant parameter for calculating rotation angle. The center coordinate of CS can be promoted precisely by reducing several disadvantageous effect, such as discrete sampling, quantization error and systemic noise.
Actually, the precision of the CS's center coordinate may be influenced by the width of CSC. With the width increase of CSC, the image gray level of CS will vary more smoothly when the image contrast is invariable, angle measurement error will be enlarged with the increase of image noise. So, the noise level is bad for computing the image coordinate of CS. On the other hand, if we decrease the width of CSC, the coordinate of image center will thus warp due to the interceptive error and reduced data.
Sketch of pinhole camera model with line scan camera is shown as Fig.1(b), and angle measurement error is contingent upon the parallelism between camera and columnar pattern as Fig  1(b) . Considering both the processing costs and operation fusibility, it is fitted by setting the image width of CSC from 5 to 10 pixels.

Error analyze on nonparallel between line scan camera and columnar pattern
Actually, it is best to keep the focal plane of line scan camera and the axis of columnar pattern parallel. This can be achieved by judging whether the distances between image coordinates of different CS are equal or not when rotating the columnar pattern. All the acquired image coordinates of CS satisfy equation (4) on perfect condition We should demonstrate the line scan COMS camera and columnar pattern are parallel until equation (4) is satisfied. Tiny translation between the focal plane of camera and the columnar pattern may influence experimental result, and we give the error analysis. We designate homogeneous coordinate transformation from columnar pattern coordinate to camera coordinate. The computed width of CS on the columnar pattern is [r 22 (z−t z )+r 32 t y ] 2 −(r 32 w) 2 (5) In equation (5), W0 are the actual width of the CS, z is the distance between projective center N and the CS on the columnar pattern and w is the image width of CS. Here, we suppose w′=w/z, ty′=ty/z and tz′=tz/z, the ratio of the computed width to actual width of CS is [r 22 �z−t z ′ �+r 32 t y ′ ] 2 −(r 32 w ′ ) 2

(6)
If we set w%=|μ-1|×100% as the percentage error, Fig.2(a) and (b) illustrate the relation between percentage error and relative translations. We can see that the relative translation has little effect on the measuring result within a deviation of 0.6%.

Experimental result
Our experimental setup is made up of a calibrated 2048×4 pixel line scan camera (pixel 5μm×5μm) with a 50mm lens. The columnar pattern is a aluminous column (radius 50mm and height 200mm) as rotating part under test. In addition, in order to get fair-sized image, the distance between the columnar pattern and camera should be adjustable. To detect the parallelism between the camera and columnar pattern beforehand and the precision of our proposed method, we employed a encoder as precise as 1 arc second and a PC that receives and processes data from both the camera and encoder.
The experimental results are shown as Table 1. The encoder output as actual positions, the average values of measurement by 10 times. The root mean square error (RMSE) of results within 0.0025° was calculated in the third column. In conclusion, a novel approach for noncontact rotation angle measurement in machine vision is proposed in this letter. Utilizing image coordinate of CS on the columnar pattern, we can realize the rotation angle uniquely. Not only does this technique overcomes the disadvantage of low frame rate of area scan camera with machine vision in prevailing studies, it is also unnecessary to manufacture laborious tray compared with traditional optoelectronic encoder. It is foreseeable that this approach will benefit many other correlative studies and can be applied in both military and industrial inspection, and will initiate a new era for measuring continuous in-plane rotation by line scan detector.