Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

prxcode/skyscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SkyScan: Computer Vision Runway Feature Extraction

SkyScan is a Python-based computer vision pipeline designed to simulate the visual navigation requirements of autonomous landing systems. It processes aerial cockpit imagery to detect, isolate, and extract runway coordinates and orientation data in real-time.

By focusing strictly on algorithmic efficiency and spatial filtering, the pipeline is optimized for the low-latency constraints typical of embedded aerospace systems.


SkyScan

Key Features

  • Noise Reduction: Implements Gaussian Blurring to minimize atmospheric interference, sensor noise, and high-frequency visual artifacts.
  • Gradient-Based Edge Extraction: Utilizes the Canny algorithm to identify high-contrast boundaries between the landing strip and surrounding terrain.
  • Geometric Filtering: Employs Probabilistic Hough Line Transforms to extract structural runway markings and convert pixel clusters into mathematical line vectors.
  • ROI Optimization: Focuses processing power strictly on a targeted "Region of Interest" (ROI) trapezoid, drastically reducing computational overhead.

Tech Stack

  • Language: Python 3.x
  • Computer Vision: OpenCV (cv2)
  • Matrix Operations / Math: NumPy
  • Domain: Autonomous Navigation & Image Processing

Pipeline Methodology

To ensure maximum performance, the image data is passed through a strict sequential filter:

  1. Grayscale Conversion: Reduces the input tensor from 3 channels (RGB) to 1 channel, cutting the processing payload by 66% while preserving necessary intensity gradients.
  2. Gaussian Blur (Smoothing): A $5 \times 5$ convolution kernel is applied to prevent the edge detector from triggering on minor terrain details (like grass textures or tarmac cracks).
  3. Canny Edge Detection: Computes the gradient magnitude and direction to find strong edges based on defined hysteresis thresholds.
  4. Spatial Masking: A polygonal mask is applied to isolate the bottom-center of the frame, completely ignoring the sky, horizon, and peripheral terrain.
  5. Hough Transform: The isolated edge pixels are mapped into Hough Space (using polar coordinates $r$ and $\theta$) to find overlapping intersecting curves, which translate back to straight lines ($y = mx + b$) representing the runway borders.

Installation & Setup

Follow these steps to set up the pipeline locally:

  1. Clone the repository:

    git clone https://github.com/prxcode/skyscan.git
    cd skyscan
  2. Create a Virtual Environment:

    python -m venv venv
  3. Activate the Environment:

    • Windows: venv\Scripts\activate
    • macOS/Linux: source venv/bin/activate
  4. Install Dependencies:

    pip install opencv-python numpy

Usage

  1. Place a sample aerial image (e.g., test_runway.jpg) in the root directory.
  2. Run the processing script:
    python skyscan.py
  3. The script will output two windows:
    • Debug View: Showing the raw Canny edges isolated within the Region of Interest.
    • Final Output: The original image with the extracted runway features overlaid in high-contrast green.
  4. Press any key while the image window is active to close the program safely.

Future Improvements

  • Video Stream Processing: Adapting the static frame logic to process .mp4 flight recordings in real-time (aiming for 30+ FPS).
  • Kalman Filtering: Implementing a predictive tracker to smooth the line detection across consecutive video frames and handle momentary visual dropouts (e.g., passing through a cloud).
  • Deep Learning Validation: Integrating a lightweight object detection model (like YOLOv8) to verify airport infrastructure alongside the geometric extraction.

About

Computer Vision Runway Feature Extraction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages