Heat exchangers (HXs) play a critical role in maintaining human thermal comfort and ensuring product safety and quality in various industries. However, the formation of frost on HX surfaces during cooling operations can significantly impact their performance and energy efficiency. Traditional defrosting methods primarily rely on time-based control of heaters or HX operation, overlooking the actual frost formation pattern across the surface. This pattern is influenced by ambient air conditions (humidity and temperature) and surface temperature variations. To address this issue, frost formation sensors can be strategically placed within the HX. However, the non-uniform frost pattern poses challenges in sensor placement. This study proposes an optimized sensor placement approach using computer vision and image processing techniques to analyze the frost formation pattern. Through creating a frost formation map and evaluating various sensor locations, frost detection can be optimized to control defrosting operations with higher accuracy, thereby enhancing the thermal performance and energy efficiency of HXs. The results demonstrate the effectiveness of the proposed method in accurately detecting and monitoring frost formation, providing valuable insights for sensor placement optimization. This approach presents significant potential in enhancing the overall performance and sustainability of the operation of HXs.