Voids in solder balls can cause board failures. The detection and assessment of voids in solder balls can help in reducing board yield issues caused by incorrect scrapping and rework. X-ray imaging machines make voids visible to the operator for manual inspection. Some existing x-ray inspection systems have void detection algorithms that require the use of intensive manual tuning operations that are time consuming, and inaccurate due to the inability to examine balls overshadowed with other components. In this paper, a robust automatic void detection algorithm is proposed. The proposed method is able to detect voids with different sizes inside the solder balls, including the ones that are overshadowed by board components and under different brightness conditions. Results show that the proposed method achieves a correlation squared in the range of 91% to 97 % with ground truth data from a 3D x-ray scan. The proposed algorithm is fully automated and benefits the manufacturing process by reducing operator effort and by providing a cost effective solution to improve output quality.