An adaptive shadow detection algorithm is proposed to eliminate interference on object detection from the shadow. The algorithm uses three components in YUV colour space to identify shadow pixels from the candidate foreground. An adaptive threshold estimator is designed to improve shadow detection accuracy and adaptive capacity in various lighting conditions. This estimator uses edge detection method to obtain global texture, as well statistical calculations to obtain the thresholds. Algorithm has the characteristic of low complexity and little restraint; hence it is suitable for real time‐moving shadow detection in various lighting conditions. Experiment results show that this algorithm can obtain a high detection accuracy and the time‐assume is greatly shortened compared with other algorithms with similar accuracy.
Background: The single-channel sleep EEG has the advantages of convenient collection, high-cost performance, and easy daily use, and it has been widely used in the classification of sleep stages. Methods: This paper proposes a single-channel sleep EEG classification method based on long short-term memory and a hidden Markov model (LSTM-HMM). First, the single-channel EEG is decomposed using wavelet transform (WT), and multi-domain features are extracted from the component signals to characterize the EEG characteristics fully. Considering the temporal nature of sleep stage changes, this paper uses a multi-step time series as the input for the model. After that, the multi-step time series features are input into the LSTM. Finally, the HMM improves the classification results, and the final prediction results are obtained. Results: A complete experiment was conducted on the Sleep-EDFx dataset. The results show that the proposed method can extract deep information from EEG and make full use of the sleep stage transition rule. The proposed method shows the best performance in single-channel sleep EEG classification; the accuracy, macro average F1 score, and kappa are 82.71%, 0.75, and 0.76, respectively. Conclusions: The proposed method can realize single-channel sleep EEG classification and provide a reference for other EEG classifications.