Due to their location, malignant brain tumors are one of humanity's greatest killers, among these tumors, gliomas are the most common. The early detection of gliomas can contribute to the design of proper treatment schemes and, thus, improve the survival rate of patients. However, it is a challenging task to detect the gliomas within the complex structure of the brain. The conventional artificial diagnosis is timeconsuming and relies on the clinical experience of radiologists. To detect gliomas more efficiently, this paper proposes a noninvasive automatic diagnosis system for gliomas based on the machine learning methods. First, image standardization, including size normalization and background removal, is applied to produce standard images; then, the modified dynamic histogram equalization is implemented to enhance the low-contrast standard brain images, and skull removal based on outlier detection is presented. Furthermore, hybrid features, including gray-level co-occurrence matrix, pyramid histogram of the oriented gradient, modified completed local binary pattern, and intensity-based features are extracted together from the enhanced images, and their dimensions are reduced by principal component analysis. Kernel support vector machine (KSVM) combined with the particle swarm optimization is eventually adopted to train classifiers; in this paper, brain magnetic resonance imaging images are labeled with normal, glioma, and other. The experimental results show that the accuracy, sensitivity, and specificity of the proposed method can reach 98.36%, 99.17%, and 97.83%, respectively, which indicates that the proposed method performs better than many current systems. INDEX TERMS Modified CLBP, PSO-KSVM, Glioma detection, hybrid features, skull removal. FIGURE 3. The process of background removal based on an adaptive threshold.