The invention relates to a device for monitoring foreign matters between a 
rail transit platform door and a 
train based on 
machine vision, wherein the device collects visible light images, 
infrared light images and depth images between the 
rail transit platform door and the 
train, integrates the visible light images, the 
infrared light images and the depth images to form three-dimensional space three-dimensional images, which can cover all targets in a shooting 
visual angle; events can be identified in the images by analyzing the data of the three-dimensional images, wherein the main events comprises: whether or not foreign objects exist in the track area, whether or not the 
train is at the 
station, the number of trains, the switch status of the platform door and the train door, the door seam of platform sliding door and train door, whether or not foreign objects inrude into the portion between the train and the platform door, the size and type of foreign objects, whether or not the foreign objects affects 
driving safety and the like; the device drives the 
foreign object alarm 
safety relay, and transmits the monitoring result and live real-time image in real time. The device can achieve no dead angle and full-area detection in an area, is not influenced by 
vehicle type, gap space size, vibration and environmental illumination, is suitable for underground, ground and ground platform environments, and is suitable for unmanned environments.