With the acceleration of urbanization, the optimization of thermal environment of buildings has become an important topic to improve energy efficiency and environmental sustainability. This paper aims to enhance the optimization of building thermal environment through computer vision algorithm, and explore its application in VR industrial heritage landscape design, so as to achieve the dual goals of building energy conservation and cultural inheritance. In this study, advanced computer vision technology is used to monitor and analyze the thermal performance of buildings in real time. Through the construction of thermal environment model, combined with deep learning algorithm to extract building thermal energy data, and use VR technology for visual display, so as to provide scientific basis for design decisions. The research objects include several representative industrial heritage buildings, and analyze their thermal energy consumption characteristics and optimization potential. The results show that the application of the computer vision algorithm reduces the heat loss of the building and significantly improves the energy efficiency. At the same time, the VR visual model intuitively shows the design effect after thermal optimization, enhancing the communication and understanding between designers and stakeholders. Therefore, the combination of computer vision and VR technology can effectively improve the optimization ability of building thermal environment and promote the sustainable design and operation of traditional industrial heritage.