This paper proposes a landscape function optimisation algorithm based on computer vision and AI modelling, which uses computer vision to process landscape images and extract visual features, and then optimises functions via AI. Based on analysis of landscape images and application of artificial intelligence techniques such as deep learning and reinforcement learning, improve the spatial organisation and resource allocation of the landscape. According to the results of the experiment on a dataset of 5000 landscape samples, the optimised model has achieved a functional utilisation rate of 85.2%, resource allocation efficiency of 79.4%, and spatial layout optimisation score of 91.1%, and has outperformed the traditional method. The study has provided a new technology for computer vision and artificial intelligence in environmental design that is highly optimised and has wide-ranging applications.