This research paper presents a novel approach for navigating a micro UAV (Unmanned Aerial Vehicle) through narrow passages using only its onboard camera feed and a PID control system. The proposed method uses edge detection and homography techniques to extract the key features of the passage from the camera feed and then employs a tuned PID controller to guide the UAV through and out of the passage while avoiding collisions with the walls. To evaluate the effectiveness of the proposed approach, a series of experiments were conducted using a micro-UAV navigating in and out of a custom-built test environment (constrained rectangular box). The results demonstrate that the system is able to successfully guide the UAV through the passages while avoiding collisions with the walls.