The invention relates to a weldment contour detection method. The weldment contour detection method comprises the following steps: 1, image enhancement preprocessing, 2, image histogram equalization processing, 3, image denoising, 4, image background interference removal and 5, image edge improvement. According to the invention, the weldment image is preprocessed in an image enhancement mode, so that the edge detection precision of the weldment image is improved; According to the invention, histogram equalization is introduced to improve the gray level dynamic range of the image, the image contrast is improved, and the image is clearer; According to the invention, the median filtering technology is adopted to carry out denoising processing on the image, operation is simple, implementation is convenient, and edge information of the image is protected while isolated noise points are filtered out; The invention adopts the probabilistic Hough transform method to judge and connect the pixel points disconnected from the edge of the image, and is small in calculation amount, high in practicability and high in efficiency.