Compression of image or video now happens to be an essential feature to fit a large amount of binary data into an available narrow bandwidth digital communication channel. Inveterate compression algorithms formulated by means of Discrete Cosine Transform and Wavelet Transform suffers a lot with the presence of undesirable frequency components which in turn pull down the visual quality of the image or video. Those frequency components create prominent visible changes, identified as artifacts. The visual quality of such images needs improvement by the elimination of these artifacts  not only for consumer electronics but also for the analysis and decision making algorithms in real time systems. Artifacts can be modeled with the characteristics of neighboring pixels. The most noticeable are blocking, ringing and mosquito artifacts. The proposed adaptive filter applicable for JPEG compression algorithms detects the blocking artifacts with the new metric voted as Total Blocking Error. Subsequently the adaptive control superimposed for the corrective   parameter of the localized filter and for the correlation factor to create the new adaptive quantization matrix for correcting the rounded off Discrete Cosine Transform coefficients at the transmitter side reduces the blocking artifacts. The boundary pixels of each n*n block yields the measure of blocking annoyances with this new metric. Experimentation with SAR, Medical and Conventional images proved that the value of the metric gets increased with the increase in the compression ratio and gets reduces with the proposed adaptive algorithm.  Results bestow the assessment slot in for the adaptiveness suggested is strong worthy in improving the visual quality both quantitatively and qualititatively.