With the development of petroleum industry, the need of oil pipe becomes larger and larger. Nevertheless, the failure of oil pipe also appeared. Because failure of oil pipe always happened on the connection thread of oil pipe, the importance of detection and renovation of thread is very obvious.In this article, a method of detection and renovation of thread piece on CNC is presented. The renovation of the damaged workpiece according to its original thread helical line can reduce the production costs, waste of material and finally enhance economic efficiency. The non-contact measurement way, which using CCD camera fixed on baffle to obtain thread picture and analyze picture with computer(machine vision), has the characteristic of compact structure, high precision and speed. A program is developed to process the thread picture, which including image collection module, image process module and thread parameter solution module, and finally achieve thread pitch and the emendation of rotating angle. In the end, the renovation machining start according to these data.This paper presents a method of picture analysis, instead of using electro-optic encoder to control system, to solute the emendation of rotating angle. Another graphics algorithm of threshold segmentation is introduced for thread picture process especially to provide a new clues in future picture process. |