Coronavirus is normally transmitted from animal to person, but nowadays it is transmitted from person to person by changing its form. Covid-19 appeared as a very dangerous virus and unfortunately caused a worldwide pandemic disease. Radiology doctors use X-ray or CT images for the diagnosis of Covid-19. It has become crucial to help diagnose such images using image processing methods. Therefore, a novel intelligent computer vision method to automatically detect the Covid-19 virus was proposed. The proposed automatic Covid-19 detection method consists of preprocessing, feature extraction, and feature selection stages. Image resizing and grayscale conversion are used in the preprocessing phase. The proposed feature generation method is called Residual Exemplar Local Binary Pattern (ResExLBP). In the feature selection phase, a novel iterative ReliefF (IRF) based feature selection is used. Decision tree (DT), linear discriminant (LD), support vector machine (SVM), k nearest neighborhood (kNN), and subspace discriminant (SD) methods are chosen as classifiers in the classification phase. Leave one out cross-validation (LOOCV), 10-fold cross-validation, and holdout validation are used for training and testing. In this work, SVM classifier achieved 100.0% classification accuracy by using 10-fold cross-validation. This result clearly has shown that the perfect classification rate by using X-ray image for Covid-19 detection. The proposed ResExLBP and IRF based method is also cognitive, lightweight, and highly accurate.