| X-ray nondestructive testing technology is widely used in industrial casting defect detection,but at present,the defect recognition of the casting image formed by X-ray testing still depends on manual work,resulting in low detection efficiency and poor accuracy.With the rapid development of image registration technology,it provides a new research direction for automatic defect detection of industrial castings.In the actual process of obtaining the casting image,due to the deviation of casting positioning,the obtained casting image to be tested has rigid and elastic deformation compared with the template image,so it is impossible to directly use the digital subtraction technology to process the defect information of the image to be tested and the template casting image.Through image registration between the image of the casting to be tested and the image of the template casting,the two images can be aligned in space,and then the digital subtraction technology can be used to obtain accurate casting defects.Therefore,image registration technology is an indispensable step to detect casting defects.In this paper,the internal defect detection of castings based on image registration is studied.The main research contents are as follows:(1)In view of the existing casting detection methods based on image registration only consider the phenomenon of rigid deformation in the detection image,but not the problem of elastic deformation,this paper studies the casting internal defect detection method based on rigid-elastic image registration.The algorithm can be divided into four stages.Firstly,the rigid registration of the casting image to be tested is realized by using the rigid registration compared with the template image;Then,on the basis of rigid registration,the active demons elastic registration method is used to realize the elastic registration of the casting image to be tested compared with the template casting image;Then,the subtracted images of the casting image to be tested and the template casting image are obtained by digital subtraction technology;Finally,threshold segmentation is used to remove the false defects caused by registration errors in the subtracted image,determine the position of the defects in the image of the casting to be tested and label them.Through the comparison of simulation experiments,the defect detection results obtained by using different image registration methods are compared.The experiments show that the proposed method can detect the defects of casting images more accurately.(2)Aiming at the problem that the Active Demons elastic image registration algorithm only uses gradient field as a single Demons force,on the basis of rigid registration combined with the Active Demons elastic registration method,the Active Demons elastic registration method is replaced by the Demons elastic image registration method that introduces the direction field.This method introduces the direction field into the traditional Demons elastic registration method that uses gradient field as the Demons force,which can make better use of the direction information of the image,Make image registration more accurate.In view of the problem that the normalization factor α needs to be adjusted manually in this method,the Demons elastic image registration method with direction field is further improved,and the deformation of the image registration process is adjusted by using mutual information adaptive,without the need to manually adjust the normalization factor α.Finally,the defect detection results using different registration methods are compared.Through the comparison of simulation experiments,the results of different image registration methods are compared.The experiment shows that the proposed method can detect the defect location of casting image more accurately. |