# End Face Attitude Detection of Special Steel Bars Based on Improved DBSCAN
## 1 Introduction  
Currently, the special steel bar production line has a relatively low level of intelligence and digitalization, especially in the grinding process for special steel bars. The grinding of special steel bars is separated from the instrument for detecting surface defects. However, the present defect detection instrument does not include traceable information about the circumferential position. As soon as the bar leaves the detection instrument, the surface defect position of the bar will no longer be able to be determined. Therefore, the current surface defect grinding process still relies on manual inspection of the defect position and grinding of the defect. This not only reduces production efficiency, but also worsens the working environment in the steel bar production workshop, and the debris generated by grinding may cause various degrees of harm to human health, which presents new challenges for scientists and technologists. Innovation in science and technology has enabled the digitization, networking, and intelligent construction of steel bar production lines to become a key development objective and primary direction in the steel industry. And the automatic grinding system for special steel bars is an essential component of the digitalization and intelligence of the production line for special steel bars. Providing automatic grinding for special steel bars can not only improve production efficiency and product quality, but also obtain consistent grinding results and reduce hidden risks. At present, steel bar surface defect detection methods include the eddy current detection method [1; 2; 3], the magnetic flux leakage detection method [4; 5; 6], the laser ultrasonicdetection method [7; 8; 9], the infrared imaging detection method [10; 11; 12], the machine vision detection method [13; 14; 15], and so on. These detection methods, however, focus only on the presence of defects on the surface of the steel bar. And they do not consider the problem that the defect needs to be repositioned after the bar leaves the detection instrument. But to accomplish automatic surface defect grinding, off-line traceable surface defect location information must be obtained. The existing steel bar surface defect detection instruments can obtain axial and circumferential position information of the surface defect when the bar is placed in the detection instrument. The axial position is represented by the length from the end of a steel bar, whereas a circumferential position is generally expressed by the counterclockwise expansion angle of the random reference zero position. Once the steel bar leaves the detection instrument, the circumferential position is impossible to locate again due to using a random reference zero position. Consequently, the special steel bar end face attitude detection system 1 was installed in the flaw detection workshop as shown in Figure 1. The rotation attitude of the end face during defect detection is calculated based on the characteristics of the steel bars' end face. By recording the rotation attitude, the circumferential position of defect detection has an absolute reference zero position. At this moment, once the special steel bar end face attitude detection system 2 has also been installed at the position of the grinding platform, the surface defect location can be re-located for use in the steel bar automatic grinding system. In order to calculate the end face attitude of special steel bars, the characteristics of the steel bars' end faces must be determined first. As a first consideration, the end face's texture should be considered. The texture features can be used to extract defects [16] and perform identification [17]. However, the collection of texture features requires high-definition acquisition equipment, and the light requirements are high, which is difficult to implement on a steel bar production line. Therefore, it is pertinent to consider the features added by human factors based on the actual production site situation.