Weld defect inspection is an essential aspect of testing in industries field. From a human viewpoint, a manual inspection can make appropriate justification more difficult and lead to incorrect identification during weld defect detection. Weld defect inspection uses X-radiography testing, which is now mostly outdated. Recently, numerous researchers have utilized X-radiography digital images to inspect the defect. As a result, for error-free inspection, an autonomous weld detection and classification system are required. One of the most difficult issues in the field of image processing, particularly for enhancing image quality, is the issue of contrast variation and luminosity. Enhancement is carried out by adjusting the brightness of the dark or bright intensity to boost segmentation performance and image quality. To equalize contrast variation and luminosity, many different approaches have recently been put forth. In this research, a novel approach called Hybrid Statistical Enhancement (HSE), which is based on a direct strategy using statistical data, is proposed. The HSE method divided each pixel into three groups, the foreground, border, and problematic region, using the mean and standard deviation of a global and local neighborhood (luminosity and contrast). To illustrate the impact of the HSE method on the segmentation or detection stage, the datasets, specifically the weld defect image, were used. Bernsen and Otsu's methods are the two segmentation techniques utilized. The findings from the objective and visual elements demonstrated that the HSE approach might automatically improve segmentation output while effectively enhancing contrast variation and normalizing luminosity. In comparison to the Homomorphic Filter (HF) and Difference of Gaussian (DoG) approaches, the segmentation results for HSE images had the lowest result according to Misclassification Error (ME). After being applied to the HSE images during the segmentation stage, every quantitative result showed an increase. For example, accuracy increased from 64.171 to 84.964. In summary, the application of the HSE method has resulted in an effective and efficient outcome for background correction as well as improving the quality of images.