The invention discloses a crane barrier monitoring and prewarning method and system based on binocular vision. The method includes the steps that a binocular vision model is established, and relevant parameters are initialized; images are acquired in real time and preprocessed; target edges are detected, and the characteristics of the images are extracted; the left images and the right images are registered, and a common area is segmented; iteration is repeatedly conducted, and foregrounds and backgrounds are distinguished; three-dimensional information is rebuilt, and the foregrounds and barriers are recognized; motion parameters are resolved, and prewarning information is analyzed and output. According to the crane barrier monitoring and prewarning method and system, a binocular vision system is adopted, the working environment of a crane is monitored in real time, the problem of preventing collision of the crane is effectively solved, and the system has the advantages of being high in efficiency, moderate in accuracy, simple in structure, low in cost, and very suitable for online, non-contact product detection and quality control on a manufacturing site.