**5. Analysis of Real-Life Three-Channel Image**

Our experiments with real-life images have been done using a three-channel Landsat TM image earlier used in our studies [38,39]. This test image (shown in pseudo-color representation in Figure 7a) contains three component images acquired in optical bands with central wavelengths equal to 0.66 μm, 0.56 μm, and 0.49 μm, respectively. They have been associated with R, G, and B components of the color image that has a size of 512 × 512 pixels. The image has five recognizable classes, namely, "Soil" (Class 1), "Grass" (Class 2), "Water" (Class 3), "Urban (Roads and Buildings)" (Class 4), and "Bushes" (Class 5). The image fragments used in classifier training are shown in Figure 7b whilst the pixel used for verification of classifiers are marked by the same colors in Figure 7c. Details concerning the numbers of pixels are given in [39]. Class 1 is marked by red color, Class 2—by green, Class 3—by dark blue; Class 4—by yellow, Class 5—by azure.

**Figure 7.** The three-channel image in pseudo-color representation (**a**); pixel groups used for training (**b**), pixel groups used for verification (**c**).

As one can see, the total number of classes is less than for the test image in the previous section, but some classes are the same or similar. Class 1 is similar to Field-R, Class 5—to Class "Texture". As in test RS data, color features for many classes intersect (consider Classes "Grass" and "Soil", Classes "Soil" and Bushes"). This means that classification is not a simple task.

A part of data concerning lossy compression of this image component-wise are presented in Table 13 (more details can be found in [39]). As one can see, to provide PSNR-HVS-Mdes = 42 dB, one has to use QS ≈ 17.3. To provide PSNR-HVS-Mdes = 42 dB, QS ≈ 29.3. This is in good agreement with the data in Figure 1 for other test images. Thus, it is possible to give recommendations on what QS to use for providing PSNR-HVS-Mdes (see details in [23]).


**Table 13.** Compression parameters.

Note that the provided CR can be quite large. It is about 6 for PSNR-HVS-Mdes = 42 dB and reaches 16.5 for PSNR-HVS-Mdes = 30 dB.

We have carried out the analysis for six values of PSNR-HVS-M (45, 42, 39, 36, 33, and 30 dB). Figure 8 presents the considered three-channel image (in pseudo-color representation) compressed providing PSNR-HVS-M equal to 42 dB, 36 dB, and 30 dB. They are all very similar between each other and similar to the original image. A more attentive analysis allows finding differences for images in Figure 8b,c that mainly appear themselves in the neighborhoods of small-sized objects and high contrast edges.

**Figure 8.** Three-channel image in pseudo-color representation: compressed with providing PSNR-HVS-M = 42 dB (**a**), compressed with providing PSNR-HVS-M = 36 dB (**b**); compressed with providing PSNR-HVS-M = 30 dB (**c**).

#### *5.1. MLM Classifier Results*

Let us start by considering the results of applying the MLM classifier trained for the original image. Tables 14–17 present the obtained data in the form of confusion matrices. As it is seen, probabilities of correct classification for particular classes vary from 0.75 to 0.99 and the smallest probabilities take place for rather heterogeneous classes "Soil" and "Bushes".

**Table 14.** Classification probabilities for the MLM method trained for the original image and applied to it.


**Table 15.** Classification probabilities (confusion matrix) for the MLM method trained for the original image and applied to the compressed image (PSNR-HVS-M = 42 dB).


**If the same classifier is applied to a compressed image (PSNR-HVS-M**=**42 dB), the results are slightly worse (see data in Table 15).** Reduction of probabilities of correct classification by 0.002 ... 0.033 takes place. The largest reduction is observed for the most heterogeneous class "Bushes".


**Table 16.** Classification probabilities (confusion matrix) for the MLM trained for the original image and applied to the compressed image (PSNR-HVS-M = 36 dB).

**Table 17.** Classification probabilities (confusion matrix) for the MLM trained for the original image and applied to the compressed image (PSNR-HVS-M = 30 dB).


Consider now the data obtained if the MLM classifier is applied to the image compressed with visible distortions (PSNR-HVS-M = 36 dB). The confusion matrix is given in Table 16. Most probabilities of correct classification for particular classes continue to decrease although this reduction is not essential—up to 0.021 compared to the previous case (Table 15).

Finally, let us analyze data for a compressed image (PSNR-HVS-M = 30 dB) to which the MLM classifier has been applied. The data are presented in Table 17. The tendency is the same—most probabilities of correct classification for particular classes continue to decrease but, again, the reduction is not large.

Classification maps for three images are presented in Figure 9. They are quite similar although some differences can be found. Compression does not lead to radical degradation of classification accuracy.

**Figure 9.** Classification results: for original image (**a**), for compressed image (PSNR-HVS-M = 36 dB) (**b**), for compressed (PSNR-HVS-M = 30 dB) (**c**).

One can be interested in the behavior of Pcc depending on compression. For original image Pcc = 0.865; for compressed images it equals to 0.853, 0.854, 0.853, 0.849, 0.842, and 0.839 for PSNR-HVS-M equal to 45, 42, 39, 36, 33, and 30 dB, respectively. So, it is possible to state that lossy compression providing PSNR-HVS-M about 40 dB does not lead to sufficient reduction of Pcc for the considered case. Moreover, if training is done for the image compressed with the same conditions as

an image subject to classification, classification results can improve. For example, if training has been done for the compressed image (PSNR-HVS-M = 36 dB) and then applied to this image (to verification set of pixels), Pcc increases to 0.855.

We have analyzed distributions of features before and after compression. One reason why Pcc does not radically reduce with CR increase is that the corresponding distributions do not differ a lot. The largest differences are observed for the classes "Soil" and "Bushes". It might be slightly surprising that the class "Urban" is recognized so well. The reason is that, for the considered image, features for this class do not sufficiently overlap with features for other classes.

#### *5.2. NN Classifier Results*

Consider now the results of the NN-based classification of the real-life image. The ideal case data (NN trained for original image is applied to the original image) are given in Table 18. The results can be compared to the data in Table 14. The NN classifier better recognizes the classes "Soil" and "Grass", the results for the class "Water" are approximately the same.

**Table 18.** Classification probabilities for the NN-based method trained for the original image and applied to it.


Suppose now that this classifier (NN trained for the original image) is applied to compressed images. The results for different qualities of compressed data are presented in Tables 19–21. If PSNR-HVS-M is equal to 42 dB or 36 dB, the results keep practically the same. Only the probability of correct classification for "Bushes" steadily decreases. Reduction of classification accuracy occurs to be larger for the image compressed with PSNR-HVS-M equal to 30 dB. Mainly, reduction takes place for the classes "Water" and "Urban".

**Table 19.** Classification probabilities (confusion matrix) for the NN-based method trained for the original image and applied to the compressed image (PSNR-HVS-M = 42 dB).



**Table 20.** Classification probabilities (confusion matrix) for the NN-based method trained for original image and applied to the compressed image (PSNR-HVS-M = 36 dB).

**Table 21.** Classification probabilities (confusion matrix) for the NN-based method trained for the original image and applied to the compressed image (PSNR-HVS-M = 30 dB).


Some classification maps are presented in Figure 10. They do not differ a lot from each other. Some pixels that belong to the class "Water" for the narrow river (see the left low corner in Figure 10c) "disappear" (become misclassified). This is because of the effects of smearing prolonged objects due to lossy compression. The MLM classifier training for compressed images was performed using training samples for fragments shown in Figure 7b. Due to the usage of the same data for both training and validation, noticeable classification improvement can be observed (at least, for several classes).

**Figure 10.** Classification results provided by NN-based method: for original image (**a**), for compressed image (PSNR-HVS-M = 36 dB) (**b**); for compressed (PSNR-HVS-M = 30 dB) (**c**).

#### *5.3. Brief Analysis for Sentinel-2 Three-Channel Images*

One can be interested whether the observed dependences hold for other images or their fragments, other imagers, and other compression techniques. Sentinel-2 offers wide possibilities to check this since it provides a huge amount of data that can be exploited for different purposes. For our study, we have taken three-channel images of the Kharkiv region (Ukraine) in visible range acquired on 30 August 2019 when there were practically no clouds (images are available at [56]). The analyzed 512 × 512 pixel fragments are for the neighborhood of Staryi Saltiv (45 km north-east from Kharkiv, Ukraine, set 1) and north part of Kharkiv (set 2)—see Figure 11. The main reason for choosing these fragments is the availability of ground truth data that allow easy marking of four typical classes: Urban, Water, Vegetation, and Bare Soil. One more reason is that the image in Figure 11a is considerably less complex (textural) than the image in Figure 11b.

**Figure 11.** Fragments of Sentinel-2 images of Staryi Saltiv (**a**) and north part of Kharkiv (**b**).

First, these fragments have been compressed component-wise with providing a set of PSNR-HVS-M values using three coders: AGU used in the previous part of this paper, SPIHT [57] which can be considered as an analog of JPEG2000 standard, and Advanced DCT coder (ADCTC) [58] that uses partition scheme optimization for better adaptation to image content. Basic data on compression performance are given in Table 22. The observed dependences are predictable. CR for all coders increases if desired PSNR-HVS-M reduces. CR values for different components for the same desired PSNR-HVS-M and set differ but not considerably. CR for AGU is usually slightly larger than for SPIHT (for the same conditions), ADCTC outperforms both coders. CR values for set 2 images are several times smaller than for the corresponding set 1 images due to the higher complexity of set 2 RS data.


**Table 22.** CR comparison for real-life data for three coders, both sets.

Second, classifier training has been performed and probabilities of correct classification for all four classes as well as the total probability of correct classification have been obtained. For the NN classifier and AGU coder, the data are presented in Tables 23 and 24. Here and below abbreviation SS1 means that classification has been done for an original (uncompressed) image 1 whilst, e.g., SS1\_45 means that classification has been done for the image compressed with providing PSNR-HVS-M = 45 dB. Training has been done for the original image. As one can see, compression results for the Set 1 image practically do not depend on compressed image quality. Even for PSNR-HVS-M = 30 dB probabilities of correct classification are practically the same as for original data. Meanwhile, for the Set 2 image, the situation is another. There is a tendency for classification accuracy degradation if compressed image quality becomes worse. This is mainly due to the reduction of correct classification probabilities for more heterogeneous classes, e.g., vegetation. For this image, it is possible to recommend compression with providing PSNR-HVS-M about 42 dB to avoid considerable reduction of classification accuracy.

**Table 23.** Probabilities of correct classification depending on compressed image quality for Set 1, AGU coder, NN classifier.


**Table 24.** Probabilities of correct classification depending on compressed image quality for Set 2, AGU coder, NN classifier.


We have also analyzed the possibility of using compressed images for training. The probability of correct classification has improved by about 0.01 for Set 1 image and remained practically the same for Set 2 image.

Another part of our study relates to classification by MLM (the same maps have been used for training the NN and MLM). MLM has been applied to data compressed by three aforementioned coders. For the AGU coder, the obtained data are presented in Tables 25 and 26.

**Table 25.** Probabilities of correct classification depending on compressed image quality for Set 1, AGU coder, ML classifier.



**Table 26.** Probabilities of correct classification depending on compressed image quality for Set 2, AGU coder, ML classifier.

It is seen that lossy compression leads to a positive effect for the Set 1 image. For all classes except Bare Soil, the probabilities of correct classification improve or remain the same. Total probability also improves and remains at approximately the same level for all considered qualities of the compressed image (Table 25). Meanwhile, for the Set 2 image, larger CR leads to a steady reduction of total probability and decreasing of probabilities for most classes Table 26).

We have also checked whether or not it is worth carrying out training for compressed images instead of uncompressed ones. The answer, as earlier, is yes. In particular, for images compressed with providing PSNR-HVS-M = 42 dB. The total probabilities equal to 0.893 for the Set 1 data and 0.858 for the Set 2 image. Thus, it is worth using those data in training that have been obtained with the same compression conditions as images subject to classification.

Data obtained for the SPIHT coder are presented in Tables 27 and 28. Their analysis shows the following. Again, lossy compression has a small impact on the classification of the Set 1 data. An optimum is observed for PSBR-HVS-M about 40 dB. The impact of compression for the Set 2 data is also small. For some classes, probabilities of correct classification improve, for others become slightly worse. In aggregate, the total probability remains almost the same.


**Table 27.** Probabilities of correct classification depending on compressed image quality for Set 1, SPIHT coder, ML classifier.

**Table 28.** Probabilities of correct classification depending on compressed image quality for Set 2, SPIHT coder, ML classifier.


Consider now the data obtained for ADCTC. They are presented in Tables 29 and 30. Their analysis shows the same tendencies as those observed for the SPIHT coder.


**Table 29.** Probabilities of correct classification depending on compressed image quality for Set 1, ADCTC, ML classifier.

**Table 30.** Probabilities of correct classification depending on compressed image quality for Set 2, ADCTC coder, ML classifier.


#### **6. Discussion**

Above, we have considered tendencies for one test and three real-life three-channel images presented as 8-bit 2D data for each component. In practice, images can be presented differently, for example, by 16-bit data [13] or by 10-bit data after certain normalization [59]. Then, a question arises how to provide the desired PSNR-HVS-M (e.g., 40 dB) for a given multichannel image to be compressed. To answer this question, let us consider some data. First, Figure 11 taken from [60] presents the dependences of PSNR-HVS-M on QS for nine 8-bit grayscale test images of different complexity for AGU. The average curve obtained for these nine test images is also given. It is seen that this average curve allows the approximate setting of QS to provide the desired PSNR-HVS-M. For example, to provide PSNR-HVS-M ≈ 43 dB, one has to set QSrec ≈ 15. To provide PSNR-HVS-M ≈ 40 dB, it is possible to set QSrec ≈ 20. If D is not equal to 255, then the recommended QS is

$$\text{QS}\_{\text{recD}} = \text{QS}\_{\text{rec}} \text{D} / 255,\tag{9}$$

where QSrec is determined from the average curve in Figure 11. As it follows from the analysis of data in Figure 11, the use of QSrec or QSrecD provides PSNR-HVS-M approximately, errors can be up to 1 ... 2 dB depending upon the complexity of an image to be compressed. Such accuracy can be treated as acceptable, since, as it is shown in the previous Section, change of PSNR-HVS-M by even 2 dB does not lead to radical changes of Pcc and probabilities of correct classification for particular classes. Second, if errors in providing the desired PSNR-HVS-M are inappropriate, accuracy can be improved by applying a two-step procedure proposed in [60]. As it has been shown in Table 13, QS that should be used in component-wise compression is practically the same for all components. This means that it is enough to determine QSrec or QSrecD for one component image and then apply it for compressing other components (this can save time and resources at the data compression stage). Moreover, QSrec or QSrecD determined according to recommendations given above can be used in joint compression of all components of multichannel images or groups of components [59] by the 3D version of AGU. In this case, the positive effect is twofold. First, a larger CR is provided compared to the component-wise compression. Second, a slightly larger quality of the compressed image can be ensured.

Figure 12 demonstrates the dependences PSNR-HVS-M on QS for different test images. Figure 13 shows the RS data processing flowchart. Acquired images (e.g., on-board) are subject to "careful" lossy compression in Quality Control Compression Unit where PCC (e.g., QS) is determined using

the desired threshold for a chosen quality metric (e.g., 40 dB for PSNR-HVS-M) and rate/distortion curves obtained in advance (like those in Figure 12). PCC corrections can be done if, e.g., images are normalized before compression. In the Image Classification Unit, RS data are subject to classification where the classifier can be trained using either earlier processed images or data that have been just received. If time limitations are not strict, the second option seems preferable (according to results obtained in our analysis).

**Figure 12.** Dependences PSNR-HVS-M on QS for nine test images (see the list in the upper part of the plot) and the average curve for AGU.

**Figure 13.** Flowchart of the proposed processing approach.

Another question that has arisen several times is the following—is it possible to improve classification accuracy? One answer that easily follows from our analysis is that the pixel-wise classification (at least, its simple version used by us) does not allow exploiting information from neighboring pixels. Such information can be of different types and it can be used differently. For example, a pixel can be preliminarily classified as belonging to a homogeneous, textural, or locally active area (by locally active, we mean pixel belonging to a small-sized object or edge or their neighborhood). Then, different features can be determined and used for such pre-classified pixels. However, this approach is out of the scope of this paper.

There are also two other approaches possible. They have been proposed in [39]. First, several elementary classifiers (for example, MLM, NN, and SVM ones) can be applied in parallel, and then their outputs can be combined. Second, post-processing of classification results with preliminary detection of edges can be performed. Note that these approaches can lead to a sufficient (up to 0.1 ... 0.2) increase of Pcc, especially if it is low for originally classified data. Meanwhile, more experiments for verifying the methods developed in [39] are needed.

Finally, the last question is how to improve CR without losing classification performance for multichannel RS data? In our opinion, 3D compression should be applied. However, in this case, additional studies are also desired.

#### **7. Conclusions**

We have considered the task of lossy compression of multichannel images by introducing different levels of distortions to analyze their influence on classification accuracy. Two classifiers, namely MLM and NN, have been studied. The DCT-based coder AGU has been used. In addition, two other transform-based coders have been employed with a brief analysis of their performance. One artificial and three real-life three-channel images have been thoroughly analyzed. Component-wise compression has been addressed with quality controlled (characterized) by visual quality metric PSNR-HVS-M.

The following has been shown for the case of classifier training for original (uncompressed) data;


The situation is slightly different if the training is done for compressed data. Then, it is worth using for training such compressed data that are characterized by the same quality (for example, approximately the same PSNR-HVS-M value) as data to which classification will be applied. Then, even for PSNR-HVS-M about 36 dB, the classification can be almost as good enough as for the original image classified by the classifier trained for original data.

It has been also shown that the main dependencies are observed for different coders (in particular, compression techniques based on DCT and wavelets) and for data provided by different multispectral

systems. We also believe that other than PSNR-HVS-M visual quality metrics can be applied within the proposed approach to lossy compression. Thus, the approach is quite general.

Finally, practical recommendations on how to set coder parameters to avoid sufficient reduction of classification accuracy are given. Possibilities of classification improvement are briefly mentioned and directions of future research are described.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/2072-4292/12/22/3840/s1, The Spearman Rank-Order Correlations Coefficient (SROCC) values for 49 quality metrics for TID 2013 database.

**Author Contributions:** I.V. created and tested MLM classifier, O.R. created and tested NN-based classifier, F.L. performed compression with desired characteristics; S.K. participated in model data design, S.A. was responsible for simulation results analysis, V.L. put forward the idea of coder parameter selection and prepared the paper draft, B.V. was responsible for real-life image result analysis, K.C. proposed methodology of investigation, K.E. carried out editing and supervision. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.
