Since late 2019, Coronavirus Disease 2019 (COVID-19) has spread all over the world. The disease is highly contagious, and it may lead to acute respiratory distress (ARD). Medical imaging can play an important role in classifying, detecting, and measuring the severity of the virus. This study aims to provide a novel auto-detection tool that can detect abnormal changes in conventional X-ray images for confirmed COVID-19 cases. X-ray images from patients diagnosed with COVID-19 were converted into 19 different colored layers. Each layer represented objects with similar contrast that could be defined as a specific color. The objects with similar contrasts were formed in a single layer. All the objects from all the layers were extracted as a single-color image. Based on the differentiation of colors, the prototype model was able to recognize a wide spectrum of abnormal changes in the image texture. This was true even if there was minimal variation of the contrast values of the detected uncleared abnormalities. The results indicate that the proposed novel method can detect and determine the degree of lung infection from COVID-19 with an accuracy of 91%, compared to the opinions of three experienced radiologists. The method can also efficiently determine the sites of infection and the severity of the disease by classifying the X-rays into five levels of severity. Thus, the proposed COVID-19 autodetection method can identify locations and indicate the degree of severity of the disease by comparing affected tissue with healthy tissue, and it can predict where the disease may spread.