本研究使用單晶片電腦RaspberryPi 搭載單目鏡頭作為機器視覺系 統,經由UART 將控制所需之回授訊號傳輸至車體控制系統之微處理器 Arduino 控制自走車。機器視覺系統方面利用二值化、Canny 邊緣檢測、 閉運算、輪廓檢測等影像處理技術判斷鏡頭是否捕捉到停車格影像,並 利用相機校正取得單目相機之內參及外參,從而建立三維世界座標與二 維像素座標之間的對應關係,解算後取得相機與停車格之距離與偏航角 作為車體控制所需之參數。車體控制系統方面利用Arduino 接收之訊號 控制鏡頭轉動,並使用PID、PI 控制法輸出PWM 訊號控制馬達實現自 走車倒車入庫。;This research uses a singlechip microcomputer RaspberryPi equipped with a monocular len as a machine vision system, and transmits the values required for control via UART to the microprocessor Arduino, serving as a vehicle body control system, to control the selfguiding vehicle. The machine vision system uses image processing techniques such as binarization, Canny edge detection, closed operation, and contour detection to determine whether the camera captures a parking grid image, and uses camera calibration to obtain the internal and external parameters of the monocular camera, thereby establish the correspondence between the threedimensional world coordinates and the twodimensional pixel coordinates, After calculation, the distance between the camera, the parking space and the yaw angle are obtained as parameters required for vehicle body control. In the body control system, the signal received by the Arduino is used to control the lens rotation, and the PID and PI control methods are used to output PWM signals to control the motor to realize selfguiding vehicle backward parking.