Imaging based disorder classification remains one of the most difficult challenges in the world today. Due to the ever-increasing population growth, the doctors must overwork for meeting the needs of the patients. Hence an early diagnostic system which can detect the disease in the early stages is helpful for doctors. Such a condition is pneumonia that is a bacterial infection grows inside lungs. The early detection and subsequent treatment can help in certainly reducing the deaths caused due to this disease. The indications of this disease are usually captured with Chest X-Ray. However, the diagnosis made out of simple examination of x-rays is occasionally indistinct and results into predicament. Therefore as indicated by this study, we have proposed a CNN-based model for the detection of pneumonia so that it may assist the doctors in early diagnosis. The CNN based model is helpful for detection of essential features by itself as compared to the hand-engineered feature selection techniques. In addition, we have proposed a novel image enhancement algorithm where the clip limit of CLAHE algorithm is yielded by adaptive DWT based computations. © 2020 IEEE.