Automatic recognition of weld defects in x-ray inspection