# Re-Ordering of Hadamard Matrix Using Fourier Transform and Gray-Level Co-Occurrence Matrix for Compressive Single-Pixel Imaging in Low Resolution Images

Pedro Vaz, Andreia Gaudencio, L. Ferreira, Anne Humeau-Heurtier, Miguel Morgado, Joao Cardoso

► To cite this version:

Pedro Vaz, Andreia Gaudencio, L. Ferreira, Anne Humeau-Heurtier, Miguel Morgado, et al. Re-Ordering of Hadamard Matrix Using Fourier Transform and Gray-Level Co-Occurrence Matrix for Compressive Single-Pixel Imaging in Low Resolution Images. IEEE Access, 2022, 10, pp.46975-46985. 10.1109/ACCESS.2022.3171334. hal-03660534

HAL Id: hal-03660534

https://univ-angers.hal.science/hal-03660534

Submitted on 12 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Received March 21, 2022, accepted April 26, 2022, date of publication April 29, 2022, date of current version May 5, 2022.

Digital Object Identifier 10.1109/ACCESS.2022.3171334

# Re-Ordering of Hadamard Matrix Using Fourier Transform and Gray-Level Co-Occurrence Matrix for Compressive Single-Pixel Imaging in Low Resolution Images

PEDRO G. VAZ<sup>1</sup>, ANDREIA S. GAUDÊNCIO<sup>1</sup>, L. F. REQUICHA FERREIRA<sup>1</sup>, ANNE HUMEAU-HEURTIER<sup>2</sup>, MIGUEL MORGADO<sup>3,4</sup>, (Member, IEEE), AND JOÃO CARDOSO<sup>1</sup>

Corresponding author: Pedro G. Vaz (pvaz@uc.pt)

This work was supported in part by the Fundação para a Ciência e a Tecnologia under Grant PTDC/EMD-TLM/30295/2017, and in part by the European Regional Development Fund and Competitiveness and Internationalization Operational Programme (PTCOMPETE 2020).

**ABSTRACT** One of the most active research fields in single-pixel imaging is the influence of the sampling basis and its order in the quality of the reconstructed images. This paper presents two new orders, ascending scale (AS) and ascending inertia (AI), of the Hadamard basis and test their performance, using simulation and experimental methods, for low sampling ratios (0.5 to 0.01) in low resolution images (up to 128 × 128). These orders were compared with two state-of-the-art orders, cake-cutting (CC) and total gradient (TG), using TVAL3 as the reconstruction algorithm and three noise levels. These newly proposed orders have better reconstructed image quality on the simulation data set (110 images) and achieved structure similarity index values higher than CC order. The experimental data set (2 images) showed that the AS and AI orders performed better with a sampling ratio of 0.5, while for lower sampling ratio the performance of AS, AI and CC was similar. The TG order performed worst in the majority of the cases. Finally, the simulation results present clear evidence that peak signal-to-noise ratio (PSNR) is not a reliable image quality assessment (IQA) metric to assess image reconstruction quality in the context of single pixel imaging.

**INDEX TERMS** Compressive sensing, Fourier transform, Hadamard ordering, single pixel imaging.

## I. INTRODUCTION

It is acknowledged that the first attempt to use a single-pixel imaging (SPI) technique may date back to the invention of the flying-spot camera during the decade of the 1920s [1]. That device consisted of a mechanical scanning imaging system aimed to transduce visual images into electrical signals, using a patterned disc with equally distanced and sized holes - the Nipkow disc. This system could be used to convert images to electrical signals in a time where two-dimensional imaging sensors were not available.

The associate editor coordinating the review of this manuscript and approving it for publication was Mohamad Forouzanfar.

Since then, the scientific and technical improvements of this technique have transformed it into a cutting-edge technology with advantages over traditional imaging techniques. Because SPI does not require a two-dimensional sensor to produce images, it takes advantage of faster, simpler and more sensitive light detectors to produce images in low light conditions, with faster equivalent acquisition frequencies and at wavelengths outside the range of operation of two-dimensional sensors.

A single-pixel camera (SPC) can be constructed in two distinct configurations: selective light detection or structured illumination. In both configurations, the SPC is mainly composed of three principal components, a light source, a spatial light modulator and a photodetector. The spatial light

<footnote n="1">¹LIBPhys-UC, Department of Physics, Rua Larga, University of Coimbra, 3004-516 Coimbra, Portugal</footnote>

<footnote n="2">²LARIS, SFR MATHSTIC, Université d'Angers, 49000 Angers, France</footnote>

<footnote n="3">³Department of Physics, Rua Larga, University of Coimbra, 3004-516 Coimbra, Portugal</footnote>

<footnote n="4">⁴Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), Health Sciences Campus, Azinhaga de Santa Comba, 3000-548 Coimbra, Portugal</footnote>
modulator is used to selectively collect light in accordance with a set of defined patterns. The electrical signal recorded by the photodetector is then correlated with the projection/detection pattern to retrieve a reconstructed two-dimensional image.

The reconstruction process can be combined with compressive sensing (CS), a mathematical concept that allows for signal reconstruction with a sampling frequency below the Nyquist limit. Compressive sensing in the context of SPI reduces the number of patterns needed for sampling the scene which mitigates one of its biggest disadvantages, the acquisition time. Moreover, higher compression ratios are difficult to achieve in low resolution applications since coefficients tend to be less sparse when compared with high resolution applications [2], [3].

Recently, due to the development of fast and advanced light modulators based on digital micro-mirror devices (DMD) the SPI showed advances in theoretical CS principles, like the use of new projection bases, new projection orderings, and new reconstruction algorithms, and in practical applications. Among other applications, SPI can be used for the development of light detection and ranging (LiDAR) systems in conjunctions with deep learning optimization [4], to develop optical machine learning systems that can perform fully-optically pattern recognition [5], to perform optical color image encryption [6], and as an optical authentication method [7]. Moreover, SPI is also currently used in the biomedical field for fluorescence lifetime imaging [8], phosphorescence lifetime imaging [9], 3D imaging [10] and turbid imaging [11]. All of these applications are in their early days of development and there is still room for improvements and studies to determine the best settings and image reconstruction algorithms.

This paper presents a study on the effect of the projection pattern ordering, using the Hadamard basis, in the quality of reconstructed low resolution images. Here, we present a simulation work in a large dataset (110 images), as well as an experimental work in two images, using state-of-the-art orderings, namely, the cake-cutting (CC) [3] and total gradient (TG) [12] methods, and two novel orders: the first, denominated as ascending scale (AS), is based on the increasing of the predominant 2D spatial frequency of the projected pattern, and the second one, designated as ascending inertia (AI), is based on the increasing of inertia property of the gray-level co-occurrence matrix (GLCM) also obtained from each projected pattern. From the knowledge of the authors, both of these orders were not yet described in previous works.

## II. THEORETICAL OVERVIEW

### A. SINGLE-PIXEL IMAGING

As stated in the introduction, the SPI technique is able to reconstruct two-dimensional images using only a single-pixel detector. The target is illuminated with structured light produced by a DMD. The micro-mirrors are programmed to tilt in one of two directions, resulting in light projected onto the

target or loss to the environment. Then, the light reflected by the target is collected by a set of optics and focused on the photodetector.

In addition, the DMD is programmed using a sequential set of orthogonal patterns, denominated sensing basis, while the intensity detected by the photodetector is recorded using a digital acquisition system. In order to produce a complete acquisition, a number of patterns equal to the number of image pixels (N) should be acquired. Mathematically, this process can be translated by:

$$y = \Phi x, \qquad (1)$$

where $y \in \mathbb{R}^{N \times 1}$ is the acquired set of coefficients and $\Phi$ the sensing basis.

### B. COMPRESSIVE SENSING

Compressive sensing allows the reconstruction of a target with a resolution of N pixels by taking only M measurements, being $M < N$, if two conditions are satisfied – sparsity and incoherence [13], [14]. The sparsity is fulfilled when a signal can be represented by high valued coefficients, in a particular orthonormal basis ($\Psi$), while the low valued coefficients are removed without significant losses. The incoherence condition implies that the mutual coherence between the sensing basis ($\Phi$) and the sparsity basis ($\Psi$) must be low to ensure a good image reconstruction. The complete mathematical description of this process can be formulated as:

$$y = \Phi x = \Phi \Psi \theta = A \theta, \qquad (2)$$

where $\theta \in \mathbb{R}^{M \times 1}$ is the set of coefficients that contains the majority of spatial information. The sampling ratio (SR) is defined as the ratio between the set of target measurements and the resolution of the recovered image $SR = M/N$. Some papers also denominate this quantity as compression ratio [15] but this nomenclature is counter-intuitive, and should be abandoned, because in that term “higher compression ratios” means the use of more sampling patterns.

### C. SENSING MATRIX AND ORDERINGS

One of the most used sensing basis is the Hadamard transform which can be represented in the form of a matrix:

$$H_{2k} = \begin{bmatrix} H_{2k-1} & H_{2k-1} \\ H_{2k-1} & -H_{2k-1} \end{bmatrix} = H_2 \otimes H_{2k-1}, \qquad (3)$$

where $\otimes$ is the Kronecker product, $H_1 = 1$ and $2^k$ the number of lines of the Hadamard matrix (order). Each line of this matrix, denominated as Walsh function, is reshaped, column by column, into a 2D array when applied in SPI. One of the main characteristics of the Walsh functions is that they are only composed of two values, +1 and -1, making them appropriate to use with DMD.

The equation 3 produces a Hadamard matrix in the natural order. Nevertheless, the order of the Walsh functions can be rearranged to allow the acquisition of higher coefficients ($\theta$) first. Many different orders have been proposed for the
Hadamard matrix because the order in which the patterns are displayed has a great impact on the minimum sampling ratio that can be achieved without losing too much image quality. Here we propose two novel orders (AS and AI) and compare it with the high performing orders used in past works (CC [2] and TG [16]).

## D. ORDERINGS

### 1) STATE OF THE ART

Regarding CC, the rows of the Hadamard matrix are rearranged to increase the groups of pixels with the same value (blocks). Since this is a straightforward approach, the process will not be detailed here but it can be found in [2], [3].

Concerning the TG order, it was first introduced in [12] along with another order denominated as total variance ascending order. The process of determining the TG order starts by reshaping each row of the Hadamard matrix into its corresponding 2D pattern. Then, the gradient of this matrix is determined in both x and y direction ($G^x$ and $G^y$). Both in the original paper [12] and in our work, the Matlab function gradient was used to determine the mask's gradient. This function implements the central difference for the interior data and the single-sided differences along the matrix borders.

In order to archive the same order as the one presented in fig. 2 of paper [12], the equation originally presented (Eq. 5 of [12]) must be modified to:

$$TG_i = \sum_{j=1}^{N} |G_j^x| + |G_j^y| \quad (4)$$

where $TG_i$ is the total gradient of the pattern derived from Hadamard matrix line $i$, $G_j$ is the gradient value in pixel $j$ in that pattern and $N$ the number of pixels of the pattern.<fnref n="1" />

### 2) NEWLY PROPOSED

The newly proposed AS order is based on the identification of the predominant frequency of each reshaped Walsh function. The predominant frequency of each pattern is determined by computing the 2D Fourier transform and calculating the euclidean distance from the peak to the transform origin (0, 0). Then, the Walsh functions are ordered by increasing frequency to produce the AS ordered Hadamard matrix. This process is exemplified in fig. 1. Each line of the original Hadamard matrix is reshaped, column by column, into a 2D square pattern. From left to right and top to bottom, we can see all the 16 patterns derived from the original matrix. The magnitude of the Fourier transform first quadrant, using zero padding to 256 × 256 to increase the transform resolution, for each pattern is presented below the respective pattern, where lighter colors mean higher intensity. Finally, the patterns are ordered by ascending distance.

The proposed AI order technique is based on the inertia, also denominated contrast, property of the GLCM obtained from the reshaped Walsh function [17]. First, the pattern values -1 are replaced by zeros in order to obtain a GLCM of the same size of the mask. Then, for each pattern we obtain the corresponding GLCMs, using 4 different directions ($\theta$ equals to 0, 45, 90, and 135 degrees) and an offset equal to one.

Each GLCM, $g_{\theta}(j, k)$, will be composed of the number of times the pair of pixels $(j, k)$ occurring within the pattern. Finally, the inertia final value, for each pattern, is determined as the mean value of the 4 inertia values:

$$AI_i = \frac{1}{4} \sum_{\theta=1}^{4} \sum_{j=1}^{\sqrt{N}} \sum_{k=1}^{\sqrt{N}} |j-k|^2 \frac{g_{\theta}(j, k)}{N_{\theta}} \quad (5)$$

where $N_{\theta}$ is the sum of all the values of $g_{\theta}$.

Figure 2 presents the Hadamard matrices reordered for the cake-cutting (a), ascending scale (b), total gradient (c), and ascending inertia (d) orders. Most Walsh functions retain the same position. However, there are specific functions (e.g. #16) that are substantially moved up in the AS order due to the reasons detailed above.

Although several authors agree that the most significant information in natural images is presented in the low frequency region [12], both CC and TG orders penalize the 2D patterns that present diagonal lines, causing these patterns to be acquired last. For an illustrative example of this phenomenon, consider the Hadamard pattern #11 (fig. 1), which corresponds to a diagonal low frequency stripe. Both in CC and TV orders, this pattern is selected only after patterns #2 and #5 which show a higher spatial frequency but in a single direction. The proposed ascending scale order aims to correct this issue, by selecting the low frequency patterns first, regardless of the stripes' direction.

For AI order, the pattern #11 is also selected before the patterns #2 and #5. The GLCMs provide the joint probability distributions of two pixel pairs, and the inertia will reflect the local variations within the matrix. Basically, the AI order allows to quantify the intensity contrast between a pixel and its neighbor along 4 directions for a given pattern. For example, both AI and AS novel orders privilege the patterns #1, #3, #9, #11, and #4 first. However, given the higher local variations of the pattern #6, the AI order considers it more important compared to the AS order that places it last.

## E. RECONSTRUCTION ALGORITHMS

The reconstruction algorithm used during this experiment was the total variation minimization by augmented Lagrangian and alternating direction algorithm (TVAL3) [18]. This algorithm is fast when compared to others iterative algorithms [19], and finds the optimal solution by considering a sparsifying basis ($\Phi$) as the gradient of the signal by solving the equation:

$$\min_{w_i, x} \sum_i \|w_i\|_2, \quad \text{subject to } \Phi x = y \quad \text{and} \quad D_i = w_i \quad \forall i \quad (6)$$

<footnote n="1">¹During this work we also tried to implement the total variation order but we were unable to reproduce the order of fig. 2 of the paper [12] using the given definition (equation 3 of paper [12]).</footnote>
<figure><img src="image_2.png" /><figcaption>FIGURE 1. Hadamard matrix of order 16 in natural with the corresponding reshape patterns and respective Fourier transform first quadrant magnitude. In the 2D spectrum the DC value corresponds to the bottom left corner. Lighter color represent higher intensity.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>FIGURE 2. Re-ordered Hadamard matrix (16 × 16) for different orders. The lateral numbers indicate the original position on the natural order Hadamard matrix.</figcaption></figure>

where $||...||_2$ is the l2 norm, $w_i = D_i x \in \mathbb{R}^{2 \times 1}$ is the discrete gradient of $x$ at position $i$, horizontally and vertically.

## F. ACQUISITION PROCEDURES

In this work, a dataset composed of 110 images (simulation) and two images (experimental) were used to test the reconstruction algorithm using different sampling ratios, different orderings and different noise levels for the simulation case and a data set composed of two images. The simulation dataset was composed by the MATLAB image processing toolbox built-in images. This dataset comprise a miscellaneous of natural images, including cars, microscopy images, aerial views, electronic circuits, black and white images, and images with different conditions of luminosity. Since the images present variations in terms of resolution and color space, all the data set was resized to a resolution of 128 × 128 pixels and converted to gray scale. Fig. 3 presents the two images used in both the simulation and experimental datasets, represented in gray scale levels with a resolution of 128 × 128 pixels (simulation) and a size of 5 cm × 5 cm (physical paper target).

The simulated image sampling procedure was performed according to equation (3) where $x$ is a vectorized version of the image and $\Phi$ is the desired sensing matrix. Furthermore, normally distributed noise was added to the acquisition according to the following equation:

$$y_s = y + c \times |\bar{y}| \times \sigma \quad (7)$$

where $y$ represents the simulated signal projections, $c$ is a constant with values of 0 (no noise), 0.1 and 0.5, $|\bar{y}|$ is the

mean of the absolute value of all projections, and $\sigma$ is an independent and normally distributed random variable with zero mean and unit standard deviation. Since this noise has a random component, five runs for each case were simulated to improve the significance of the results.

The experimental set-up was based on a previously described single-pixel camera [2], which uses a DMD to project the Hadamard masks into a static target. The resolution of the reconstructed images in the experimental case was 64 × 64 pixels.

## G. EVALUATION METRICS

Two distinct metrics were used to assess the simulation results: the structural similarity index (SSIM) [20] and the peak-signal-to-noise ratio (PSNR) [21].

The SSIM metric is focused on three image parameters: luminance ($l$), contrast ($c$) and structure ($s$). Each of these parameters is evaluated using the following Eqs.:

$$l(\hat{I}, I) = \frac{2\mu_j\mu_I + C_1}{\mu_I^2 + \mu_I^2 + C_1},$$

$$c(\hat{I}, I) = \frac{2\sigma_j\sigma_I + C_2}{\sigma_I^2 + \sigma_I^2 + C_2},$$

$$s(\hat{I}, I) = \frac{\sigma_{\hat{I},I} + C_3}{\sigma_{\hat{I}}\sigma_I + C_3},$$

$$SSIM(\hat{I}, I) = l(\hat{I}, I)^\alpha \times c(\hat{I}, I)^\beta \times s(\hat{I}, I)^\gamma, \quad (8)$$

where $\mu$ stands for the image mean value, $\sigma$ is the image standard deviation, $\sigma_{\hat{I},I}$ represents the co-variance between
<figure><img src="image_4.png" /><figcaption>FIGURE 3. Images used in the simulation and bench experiment.</figcaption></figure>

$\hat{I}$ and $I$ and $C_1$, $C_2$ and $C_3$ are constants used to prevent indeterminate expressions. This metric was determined using $C_1 = 2.55^2$, $C_2 = 7.65^2$, $C_3 = C_2/2$ and $\alpha = \beta = \gamma = 1$.

Finally the PSNR was determined using the equation:

$$PSNR = 10 \times \log_{10} \frac{255^2}{MSE} \qquad (9)$$

where MSE corresponds to the mean square error, and 255 corresponds to the maximum intensity of a gray scale image (8 bits image).

### III. RESULTS

#### A. SIMULATION

The simulation results are summarized in fig. 4 and 5. Each fig. shows the reconstructed images, of two of the used images, for the four orders, using sampling ratios of 10%, 5% and 1%, and a noise level of $c = 0.1$. For all the cases, the reconstructed image quality is reduced when the sampling ratio decreases. The complete data, including the original images and their reconstructed versions, is available at [22].

Looking at the boat image, when the SR is equal to 10%, significant differences between the CC and AS orders are visible (fig. 4-(a) and (b)). For example, the outriggers (long diagonal poles) can still be identified in the AS and AI orders while they blend in the background of the image reconstructed with CC order. The visual analysis of the images reconstructed with AS and AI shows a good image reconstruction where the shape of the boat is highly visible and the outriggers can be clearly identified. In contrast, the image reconstructed with the TG order for this SR is already blurred with less quality.

For the cases of SR = 5% and SR = 1%, image degradation is evident in all cases. Nevertheless, the AS and AI orders are the only one able can recover the structural features with sharper edges and less blur with a SR = 5%. Since were are dealing with low resolution images (128 × 128), none of the orders is able to recover the image structure for SR = 1%.

The Cameraman case for SR = 10% (fig. 5-(a), (d), (g) and (j)) presents a similar situation where AS and AI orders show similar visual quality while the CC order already presents difficulties in the identification of the background, tripod, and camera. Nevertheless, the only order who stands out from a negative perspective is the TG order which failed to retrieve the image details. The same conclusion, with a stronger evidence, can be drawn from the Cameraman case (fig. 5-(b), (e), (h) and (k)) when the SR reaches 5%. The global image quality, specifically the background, the subject silhouette and the face details are much clearer in the AS and AI orders than in the others. Again, for the lowest SR all the orders did not perform satisfactory.

The visual conclusions are also supported by the evaluation metrics (fig. 6-(a) and(b)). The points in the graphics correspond to the mean ± standard deviation obtained for all the dataset (110 images and 5 runs for each image). The newly proposed orders, AS and AI, achieve better SSIM and PSNR than the state of the art TG and CC orders. An interesting phenomenon occurs when directly comparing the SSIM of AS and AI orders with CC order in the case of $c = 0.1$. For sampling ratios between 0.04 and 0.1 the AS and AI orders consistently show higher SSIM when compared with the CC order. This fact is clearly reflected by the visual analysis of figures 4 and 5. For lower SR (0.01 to 0.03), the SSIM of CC order is similar to the one of AS and AI. Nevertheless, as can be seen by the reconstructed images, with these SRs most of the image structure is already lost and the SSIM could be ineffective in determining the image global quality. The influence of the noise level is also evident in the SSIM and PSNR values, causing their value to lower when the noise increases from $c = 0.1$ to $c = 0.5$. For the SSIM, the orders remain in the same position in terms of performance regardless of the noise level. Nevertheless, the PSNR presents a different situation, where the CC ordering is surpassed by the TG ordering for SR > 0.7 in the noisy situation, in opposition with the less noisy situation where CC ordering is always better than TG.

If we look at the specific example of the Cameraman image (fig. 6-(c) and (d)), the results of PSNR show a large variation, with a non-monotonic trend, along the SR. The AS and AI orders still present higher PSNR, when compared with TG and CC, for most of the SRs. Moreover, the influence of the added noise on PSNR is much larger than in the SSIM as can be seen by the size of the error bars in fig. when comparing fig. 6-(c) and fig. 6-(d) graphics.

#### B. EXPERIMENTAL BENCH

A global decrease in the quality of the reconstructed images can be observed when comparing these images with the simulated ones. The signal-to-noise ratio in a real environment
<figure><img src="image_5.png" /><figcaption>FIGURE 4. Image reconstruction of boat using TVAL3 algorithm for the simulation with a noise level of c = 0.1.</figcaption></figure>

is affected by many different noise sources that degrade the signal quality. Among those noise sources, the large noise equivalent power of the photodiode [2] and the projection system focus that slightly blurs the pattern on the test image must be highlighted.

Due to the lower image reconstruction quality of the experimental bench data, the presented sampling ratio is higher than the one used for the simulation case. When looking at the results of boat image reconstruction (fig. 7) for SR = 0.5, the differences between the four orders are not as evident as the differences presented in the simulation results. For lower sampling ratios (SR ≤ 0.2), CC, AS and AI have a better

reconstruction image quality than TG. This is in accordance with the simulation results where AS and AI presented very similar performances, followed by CC, while TG was by far the ordering with the worst reconstruction performance (considering SSIM and PSNR).

In the case of the cameraman image (fig. 8), the AS and AI orders show a better definition for the case when SR = 0.5. As an example, the subjects facial definition in the AS and AI orders is enough for its eye to be visible while it is not visible in both CC and TG order. Moreover, the tripod right leg bracing is more defined in the AS and AI orders. Nevertheless, the performance of AS, AI and CC is
<figure><img src="image_6.png" /><figcaption>**FIGURE 5.** Image reconstruction of Cameraman using TVAL3 algorithm for the simulation with a noise level of c = 0.1.</figcaption></figure>

similar, when analyzing the images for SR = 0.2, while TG shows a reconstruction with lower quality. For the case when SR = 0.05 all the orders present lower reconstruction quality but differences can still be highlighted. TG reconstruction is more blurred when comparing with the others. When analyzing the shoulder of the cameraman, AS order provides a better reconstruction, with less aliasing. Both CC and AI reconstruct this area as a stair while the AS order provides a more reliable reconstruction with a diagonal line. This is in line with the theoretical considerations where patterns with diagonal lines are flavored in the AS order which results in a better reconstruction of these features when low SR are used.

Regarding the numerical results, the absence of an aligned ground truth image invalidate the use of SSIM and PSNR as a robust measurement metric. The PSNR method is based on pixel by pixel comparison which is extremely dependent on the correct alignment between the reconstructed image and the ground truth. On the other hand, SSIM depends on the co-variance between both images which should be determined using the exactly same field for view. When performing an experimental acquisition, it is difficult to ensure that the projected pattern illuminates the same field of view as the original target image. For example, in the presented case, the reconstructed experimental image is a cropped ver-
<figure><img src="image_7.png" /><figcaption>FIGURE 6. Numerical results of image reconstruction with noise levels of c = 0.1 and c = 0.5.</figcaption></figure>

sion of the original target. Alternative no-reference image quality assessment (NR-IQA) metrics can be used to overcome these issues. Several methods based on traditional and machine learning methods have been developed in recent years [23], [24].

Since comparison of NR-IQA algorithms is out of the scope, we have applied three of the most used state of the art methods, namely: the blind/referenceless image spatial quality evaluator (BRISQUE) [25], the natural image quality evaluator (NIQE) [26] and the perception based image quality evaluator (PIQE) to our reconstructed images [27]. Nevertheless, none of the NR-IQA metrics prove to be conclusive in the evaluation of these images. The low resolution of the images and the fact that they all show artifacts from the compressive sampling reconstruction could be a possible

explanation for this occurrence. Moreover this type of IQA was designed to assess images with higher resolutions and is only sensitive to minimal level of noise.

## IV. DISCUSSION

The simulation experiment indicates that the newly proposed ascending scale and ascending inertia orders achieve better image quality in the reconstruction of a diverse dataset. This conclusion is backed by the visual inspection of the images and by the SSIM and PSNR values achieved by these orders in most of the tested SR range. The cake-cutting order obtains the best SSIM but only for low sampling ratios, where the image quality is already poor. In our experimental conditions, the total gradient order showed lower image reconstruction
<figure><img src="image_8.png" /><figcaption>FIGURE 7. Experimental image reconstruction of boat.</figcaption></figure>

quality for all the SRs. Both visual inspection and numerical values strongly back this conclusion.

In contrast, the experimental bench results do not fully confirm this conclusion. While the ascending order and ascending inertia achieve better image quality for SR = 0.5, for lower sampling ratios, the difference in image reconstruction quality between cake-cutting and the remaining orders is small. In addition, it was expected for the experimental sampling ratio to be higher since low resolution SPI coefficients tend to be less sparse [2], [3] leading to problems in the reconstruction process [10]. In addition, as can be seen in fig. 6(d),

PSNR is an evaluation metric very sensitive to the image noise component. The large error bars presented for the same conditions show that very different PSNR values are obtained for images with similar visual quality. The PSNR should be used very carefully when in presence of noise sources or even small spatial displacements of the target because it is computed using point-wise computations.

As our results demonstrate, PSNR can be misleading even in low noise conditions. For the boat image case (Fig. 6(b)-c = 0.1), CC order achieved a PSNR = 21 dB while AS achieved a PSNR = 19 dB for a sampling ratio of 0.05.
<figure><img src="image_9.png" /><figcaption>FIGURE 8. Experimental image reconstruction of cameraman.</figcaption></figure>

A visual analysis of these images shows that the image reconstructed with AS order has better quality than the image reconstructed with CC order.

The discussion about which Hadamard ordering allows for the lower sampling ratio gave rise to many different orderings [2], [3], [12], [28] in recent works. Although we can conclude that some are better than others (for example natural order vs Walsh order [2] or CC vs Paley [12]), the best order will depend on the structure of the image and on the noise conditions. Other works [16] have also showed that the best order can change depending on the analyzed image.

For example, in [16], for the reconstruction of an image of a man, the best order was the total variation while the power order achieved better results when reconstructing a wheel image. In the conditions previously documented, ascending scale and ascending inertia surpassed the cake-cutting and, by a large margin, the total gradient order.

Single-pixel imaging range of applications has been extending in recent years including microscopy [29], phophorescence [9] and fluorescence imaging, microtomography [30], retinal imaging [31] and in telescopic systems [32]. Each one of these applications has its own
requirements and produces different images. Researchers doing single-pixel imaging should not exclude, a priori, one or other order. Instead, simulation works should be performed using typical images with similar structure to the real ones to determine the order/orders which allow for the lowest sampling ratio. This is indeed the major disadvantage of this simulation/experimental work because it can only be significant for the Hadamard basis and the application in question (natural imaging). The use of other sampling basis will require similar studies. Another approach is to use an adaptive strategy as the one developed for Fourier sampling basis [33].

## V. CONCLUSION

The presented paper proposes two novel Hadamard ordering techniques for SPI applications based on Fourier analysis and on the inertia property of GLCM, and are denominated as ascending scale and ascending inertia, respectively. The simulation results, using a dataset of 110 images, show that these orders produce better image quality when compared with state-of-the-art methods. The experimental results indicate that the ascending scale and ascending inertia orders have the potential to be good candidates to achieve lower sampling ratios.

## REFERENCES

[1] F. Gray, "The use of a moving beam of light to scan a scene for television," *J. Opt. Soc. Amer.*, vol. 16, no. 3, pp. 177-190, Mar. 1928.

[2] P. G. Vaz, D. Amaral, L. R. Ferreira, M. Morgado, and J. Cardoso, "Image quality of compressive single-pixel imaging using different Hadamard orderings," *Opt. Exp.*, vol. 28, no. 8, pp. 11666-11681, 2020.

[3] W.-K. Yu, "Super sub-nyquist single-pixel imaging by means of cake-cutting Hadamard basis sort," *Sensors*, vol. 19, no. 19, p. 4122, Sep. 2019. [Online]. Available: https://www.mdpi.com/1424-8220/19/19/4122

[4] N. Radwell, S. D. Johnson, M. P. Edgar, C. F. Higham, R. Murray-Smith, and M. J. Padgett, "Deep learning optimized single-pixel LiDAR," *Appl. Phys. Lett.*, vol. 115, no. 23, Dec. 2019, Art. no. 231101, doi: 10.1063/1.5128621

[5] S. Jiao, J. Feng, Y. Gao, T. Lei, Z. Xie, and X. Yuan, "Optical machine learning with incoherent light and a single-pixel detector," *Opt. Lett.*, vol. 44, no. 21, pp. 5186-5189, Nov. 2019. [Online]. Available: http://opg.optica.org/ol/abstract.cfm?URI=ol-44-21-5186

[6] G. Qu, X. Meng, Y. Yin, H. Wu, X. Yang, X. Peng, and W. He, "Optical color image encryption based on Hadamard single-pixel imaging and Arnold transformation," *Opt. Lasers Eng.*, vol. 137, Feb. 2021, Art. no. 106392. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0143816620308150

[7] Y. Xiao, L. Zhou, and W. Chen, "Single-pixel imaging authentication using sparse Hadamard spectrum coefficients," *IEEE Photon. Technol. Lett.*, vol. 31, no. 24, pp. 1975-1978, Dec. 15, 2019.

[8] M. Ochoa, A. Rudkouskaya, R. Yao, P. Yan, M. Barroso, and X. Intes, "High compression deep learning based single-pixel hyperspectral macroscopic fluorescence lifetime imaging in vivo," *Biomed. Opt. Exp.*, vol. 11, no. 10, pp. 5401-5424, Oct. 2020.

[9] P. P. Santos, P. G. Vaz, A. S. F. Gaudêncio, M. Morgado, N. A. Pereira, M. Pineiro, T. P. E. Melo, and J. Cardoso, "Compressive single pixel fluorescence lifetime and intensity simultaneous imaging: A pilot study using oxygen sensitive biomarkers," *Proc. SPIE*, vol. 11775, Apr. 2021, Art. no. 1177511.

[10] M.-J. Sun, M. P. Edgar, G. M. Gibson, B. Sun, N. Radwell, R. Lamb, and M. J. Padgett, "Single-pixel three-dimensional imaging with time-based depth resolution," *Nature Commun.*, vol. 7, no. 1, p. 12010, Jul. 2016.

[11] A. J. M. Lenz, P. C. Pesudo, V. Climent, J. Lancis, and E. Tajahuerce, "Imaging the optical properties of turbid media with single-pixel detection," in *Unconventional Optical Imaging II*, vol. 11351, C. Fournier, M. P. Georges, and G. Popescu, Eds. Bellingham, WA, USA: SPIE, 2020, pp. 35-40.

[12] X. Yu, R. I. Stantchev, F. Yang, and E. Pickwell-MacPherson, "Super sub-nyquist single-pixel imaging by total variation ascending ordering of the Hadamard basis," *Sci. Rep.*, vol. 10, no. 1, pp. 1-11, Dec. 2020.

[13] M. F. Duarte, M. A. Davenport, D. Takhar, J. N. Laska, T. Sun, K. F. Kelly, and R. G. Baraniuk, "Single-pixel imaging via compressive sampling," *IEEE Signal Process. Mag.*, vol. 25, no. 2, pp. 83-91, Mar. 2008.

[14] J. Romberg, "Imaging via compressive sampling," *IEEE Signal Process. Mag.*, vol. 25, no. 2, pp. 14-20, Mar. 2008.

[15] K. M. Czajkowski, A. Pastuszczak, and R. Kotyński, "Real-time single-pixel video imaging with Fourier domain regularization," *Opt. Exp.*, vol. 26, no. 16, pp. 20009-20022, Apr. 2018.

[16] X. Yu, F. Yang, B. Gao, J. Ran, and X. Huang, "Deep compressive single pixel imaging by reordering Hadamard basis: A comparative study," *IEEE Access*, vol. 8, pp. 55773-55784, 2020.

[17] R. M. Haralick, K. Shanmugam, and I. H. Dinstein, "Textural features for image classification," *IEEE Trans. Syst., Man, Cybern.*, vol. SMC-3, no. 6, pp. 610-621, Nov. 1973.

[18] C. Li, W. Win, H. Jing, and Y. Zhang, "An efficient augmented Lagrangian method with applications to total variation minimization," *Comput. Optim. Appl.*, vol. 56, no. 3, pp. 507-530, Dec. 2013.

[19] L. H. Bian, J. L. Suo, Q. H. Dai, and F. Chen, "Experimental comparison of single-pixel imaging algorithms," *J. Opt. Soc. Amer. A, Opt. Image Sci.*, vol. 35, no. 1, pp. 78-87, Jan. 2018. [Online]. Available: http://opg.optica.org/josaa/abstract.cfm?URI=josaa-35-1-78

[20] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," *IEEE Trans. Image Process.*, vol. 13, no. 4, pp. 600-612, Apr. 2004.

[21] G. M. Gibson, S. D. Johnson, and M. J. Padgett, "Single-pixel imaging 12 years on: A review," *Opt. Exp.*, vol. 28, no. 19, pp. 28190-28208, Sep. 2020.

[22] P. Vaz, A. Gaudêncio, M. Morgado, and J. Cardoso. (2022). *Compresive Single Pixel Imaging Simulation and Experimental Results*. Gitlab. [Online]. Available: https://gitlab.com/l3151/spi

[23] H. Zhu, L. Li, J. Wu, W. Dong, and G. Shi, "MetaIQA: Deep meta-learning for no-reference image quality assessment," in *Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR)*, Jun. 2020, pp. 14143-14152.

[24] D. Varga, "No-reference image quality assessment with multi-scale order-less pooling of deep features," *J. Imag.*, vol. 7, no. 7, p. 112, Jul. 2021.

[25] A. Mittal, A. K. Moorthy, and A. C. Bovik, "No-reference image quality assessment in the spatial domain," *IEEE Trans. Image Process.*, vol. 21, no. 12, pp. 4695-4708, Dec. 2012.

[26] A. Mittal, R. Soundararajan, and A. C. Bovik, "Making a 'completely blind' image quality analyzer," *IEEE Signal Process. Lett.*, vol. 20, no. 3, pp. 209-212, Mar. 2012.

[27] Venkatanath, D. Praneeth, M. Chandrasekhar, S. S. Channappayya, and S. S. Medasani, "Blind image quality evaluation using perception based features," in *Proc. Twenty 1st Nat. Conf. Commun. (NCC)*, Feb. 2015, pp. 1-6.

[28] M.-J. Sun, L.-T. Meng, M. P. Edgar, M. J. Padgett, and N. Radwell, "A Russian dolls ordering of the Hadamard basis for compressive single-pixel imaging," *Sci. Rep.*, vol. 7, no. 1, p. 3464, Dec. 2017.

[29] J. Peng, M. Yao, Z. Huang, and J. Zhong, "Fourier microscopy based on single-pixel imaging for multi-mode dynamic observations of samples," *APL Photon.*, vol. 6, no. 4, Apr. 2021, Art. no. 046102.

[30] J. Peng, M. Yao, J. Cheng, Z. Zhang, S. Li, G. Zheng, and J. Zhong, "Micro-tomography via single-pixel imaging," *Opt. Exp.*, vol. 26, no. 24, pp. 31094-31105, 2018.

[31] R. Dutta, S. Manzanera, A. Gambín-Regadera, E. Irles, E. Tajahuerce, J. Lancis, and P. Artal, "Single-pixel imaging of the retina through scattering media," *Biomed. Opt. Exp.*, vol. 10, no. 8, pp. 4159-4167, 2019.

[32] Y. Zhang, G. M. Gibson, M. P. Edgar, G. Hammond, and M. J. Padgett, "Dual-band single-pixel telescope," *Opt. Exp.*, vol. 28, no. 12, pp. 18180-18188, 2020.

[33] A. Y. Yuan, J. Feng, S. Jiao, Y. Gao, Z. Zhang, Z. Xie, L. Du, and T. Lei, "Adaptive and dynamic ordering of illumination patterns with an image dictionary in single-pixel imaging," *Opt. Commun.*, vol. 481, Feb. 2021, Art. no. 126527.

...