In this article, we propose a bilevel segmentation framework with metacognitive learning (BS-McL) to detect power lines with an RGB camera mounted on an unmanned aerial vehicle (UAV) platform. The proposed framework consists of two levels based on spectral and spatial techniques. In the first level, spectral classification is carried out using the McL method, which is an evolving online learning neural network architecture. Due to similarities in spectral intensities, few nonpower line pixels are grouped along with power line pixels. The nonpower line pixels are removed by spatial segmentation in the second level. The second level includes morphological operations such as geometric features (shape and density indices), which are applied to detect the power lines. The processing steps of BS-McL are illustrated using a synthetic image of size $9 \times 6$ pixels. Also, two datasets consisting of 64 images with varying backgrounds, different locations, and dimensions of power lines are used to demonstrate the performance of the proposed BS-McL. The obtained results for BS-McL are compared with five commonly used methods. For both datasets, the efficiency of the BS-McL for power line extraction is better than for the methods used for comparison. Furthermore, the trained knowledge from our experimental set-up (Dataset 1: suburban scene) can be transferred to another dataset that is available publicly (Dataset 2: urban and mountain scenes) if the power line spectral values are in relevance with the distribution in the training dataset. The proposed approach BS-McL is based on online learning with a self-adaptive architecture, which provides improved generalization ability.