High‐quality reversible data hiding scheme using sorting and enhanced pairwise PEE

IET Image ProcessingVolume 16, Issue 4 p. 1096-1110 ORIGINAL RESEARCH PAPEROpen Access High-quality reversible data hiding scheme using sorting and enhanced pairwise PEE Gurjinder Kaur, Gurjinder Kaur Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this authorSamayveer Singh, Corresponding Author Samayveer Singh samayveersingh@gmail.com Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, India Correspondence Samayveer Singh, Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, India. Email: samayveersingh@gmail.comSearch for more papers by this authorRajneesh Rani, Rajneesh Rani Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this authorRajeev Kumar, Rajeev Kumar Department of Computer Engineering, Delhi Technological University, Delhi, IndiaSearch for more papers by this authorAruna Malik, Aruna Malik Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this author Gurjinder Kaur, Gurjinder Kaur Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this authorSamayveer Singh, Corresponding Author Samayveer Singh samayveersingh@gmail.com Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, India Correspondence Samayveer Singh, Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, India. Email: samayveersingh@gmail.comSearch for more papers by this authorRajneesh Rani, Rajneesh Rani Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this authorRajeev Kumar, Rajeev Kumar Department of Computer Engineering, Delhi Technological University, Delhi, IndiaSearch for more papers by this authorAruna Malik, Aruna Malik Department of Computer Science & Engineering, Dr B R Ambedkar National Institute of Technology Jalandhar, Punjab, IndiaSearch for more papers by this author First published: 23 April 2021 https://doi.org/10.1049/ipr2.12212Citations: 2AboutSectionsPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Share a linkShare onFacebookTwitterLinked InRedditWechat Abstract This paper proposes a novel reversible data hiding (RDH) technique using sorting and pairwise prediction error expansion (PEE) to improve embedding capacity (EC) while retaining the quality of cover image. The proposed scheme traverses alternate pixels of the cover image in a zig-zag order to construct two independent sets for sequential embedding. The pixels of each set are sorted in an increasing order of their rhombus mean followed by a two-pass data embedding by dividing the sets into 1 × 3 size blocks based on some pre-defined criteria. In pass 1, two prediction errors are calculated for the first and the last pixels using their rhombus means; and pairwise mapping is modified and exploited to embed the secret data in such a way that the value of the first pixel is either increased or remains unchanged, and the value of the last pixel is either decreased or remains unchanged. In pass-2, the middle pixel is utilised to predict the first and last pixels and the values of the first pixel and the last pixel are either decreased or remains unchanged and either increased or remains unchanged, respectively. In contrast to some existing recovery-based methods, the proposed pass-2 guarantees to complement the changes made in pass-1, thereby boosting the quality along with increased EC. The experimental results show that the proposed method achieves better embedding performance than the state-of-the-art RDH techniques. More specifically, the proposed method gets an increment by an average of 0.46 dB and 1.01 dB for embedding 10,000 bits and 20,000 bits respectively over its closest prior art. 1 INTRODUCTION The rapid development in computers and network technology has made it possible to instantly transmit multimedia data over the internet. However, this facility of instant communication comes at a cost of compromising the security of transmitted data. So, to protect the multimedia data from being compromised, additional security mechanisms need to be incorporated into the existing data communication protocols. Information hiding (or data hiding) is one such security mechanism in which the secret data is embedded into a host medium so that the presence of hidden data is imperceptible to everyone. Despite having a strong security edge, the conventional data hiding methods cause permanent damages to the cover media. Due to this reason, these methods are not the best choices for some of the media-sensitive domains such as law enforcement, medical imagery, military, etc. Since these application domains deal with sensitive image operations, an alternative to the conventional data hiding approach is required. To address this concern, the use of reversible data hiding (RDH) seems to be an appropriate option. In RDH, lossless recovery of the cover image is ensured along with the complete extraction of the hidden data. It implies that RDH preserves the integrity of both the cover image and the embedded data. The idea of RDH was pioneered in a US patent [1]. Since then, the growth of research in the field of RDH is increasing monotonically and a broad spectrum of RDH techniques have been proposed in this domain. Various RDH schemes have been devised, paving way for well-known methods, including lossless compression [2, 3], difference expansion (DE) [4, 5], prediction error expansion (PEE) [6-9] and histogram shifting [10, 11]. Among these methods, PEE is one of the most effective methods due to its embedding performance. The method of PEE was first introduced by Thodi et al. [6] in which the three-pixel neighbourhood context of a pixel is used to compute its predicted value. The prediction error, calculated using the difference between the original pixel and its predicted value is then expanded to embed the secret data. The PEE method proves to be better than the earliest known variation of expansion-based embedding, that is, the DE method proposed by Tian [4]. The DE technique uses a pair of consecutive pixels and their corresponding difference is expanded to embed the data, which means a pixel pair is treated as a single embedding unit. On the contrary, PEE treats individual pixel as an embedding unit, hence providing scope of increased embedding capacity (EC). Moreover, a high number of small prediction errors are produced by PEE, that construct a sharp prediction error histogram, ultimately enhancing embedding performance. To further stimulate the capacity and quality of the traditional PEE-based RDH, Sachnev et al. [7] introduced a novel PEE scheme by incorporating the sorting of pixels according to their local complexities. They also proposed a new predictor, i.e. 'rhombus predictor' to predict the value of a pixel from its four-pixel neighbourhood that led to significantly increase the embeddable prediction errors. Ou et al. [8] introduced pairwise PEE in which a pair of prediction errors is modified simultaneously using 2D prediction error histogram modification strategy. The pairwise PEE exploits the inherent correlation between the pair of prediction errors for a pixel to improve the performance. In pairwise PEE, the expansion of prediction error pair (0,0) is done, such that it becomes (0,0), (0,1) and (1,0) to accommodate log23 data bits into a single pair. Moreover, pairwise PEE expands the error pair (1,1) to (2,2) and itself for additional one bit embedding, whereas this error pair is simply shifted to traditional PEE. Therefore, an increase in EC without disturbing the quality of image is achieved. To further improve the PEE schemes, various improvements have been proposed in [9, 12]. Li et al. [13] proposed pixel value ordering (PVO), one of the recent advancements of PEE, has gained much popularity and all credit goes to its impressive performance at low and moderate payload capacities. PVO computes the prediction errors using second-minimum and second-maximum pixels in a sorted block and embeds the data into the minimum-valued pixel if the minimum PE is '-1′, and maximum-valued pixel if the maximum PE is '1′ in a block-wise manner. All other PEs are shifted to guarantee reversibility at the receiver end. Moreover, PVO changes the pixel values only by one at the most, therefore it is able to generate high quality images even in worst case modifications. Peng et al. [14] proposed an extended version of PVO [13] called Improved PVO (I-PVO) and advocated the benefit of considering relative locations of pixels in the original block during error calculation. I-PVO utilises the prediction errors '0′ and '1′ instead of '-1′ or '1′as used in [13]. It resulted in increasing the number of embeddable prediction errors, ultimately leading to enhanced performance. Extending the work of [13, 14], a variety of other similar PVO-based methods [15-24] have come into the picture. The fact of capacity-dependence on the block size is recognised and it is observed that decreasing the block size would increase the capacity. As the PVO-based methods follow a block-wise data hiding approach, a block selection strategy is required to achieve better capacity-distortion ratio. In PVO embedding, the selection of a block is restricted by its complexity value (a measure of roughness/smoothness), where the complexity value is calculated as the difference of middle pixels. As the middle pixels remain unmodified, the receiver also calculates the same complexity during data retrieval. The comparison of complexity value is done with a user-defined threshold to categorise the blocks as embeddable or non-embeddable. Generally, the block is embeddable if its complexity is below a certain value of threshold. Otherwise, the block is named as non-embeddable and skipped. The categorisation of blocks in terms of their complexity is important because non-embeddable blocks could lead to more shifting, hence deteriorating image quality. Thus, block categorisation helps in preventing unnecessary shifting of pixels. However, these methods are more suitable for low to moderate EC as opposed to high capacity. Recently, Kumar et al. [25] proposed an enhanced pairwise IPVO scheme for attaining high capacity while maintaining a high quality of stego-images. They exploited every pixel of the cover image in a two-phase embedding using rhombus context and pairwise IPVO. They also used a block selection approach based on the rhombus context for three-pixel blocks. In the first pass, the pairwise IPVO for data embedding is used while in the second pass, a recovery-based pairwise embedding is implemented. Although the method achieved almost double the EC than the other PVO based methods, it posed low-quality concerns at smaller payloads. To address the concerns related to increasing the embedding while simultaneously maintaining the image quality, an RDH technique is proposed using the sorting of pixels based on their rhombus context. The proposed scheme utilises a local variance measure to construct blocks of size 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ . Also, a novel local complexity measure is used for block selection to prevent unnecessary distortion. The proposed scheme uses the pairwise embedding introduced by Kumar et al. [25] for first-pass embedding, followed by a PEE based embedding in the second pass. The following points highlight the major contributions of the proposed work: The proposed scheme uses a zig-zag order traversal of the cover image to construct two independent pixel sets – the plus set and the dot set. Afterwards, a two-pass data embedding is implemented for each of the sets, such that the plus set pixels act as rhombus context for the dot set pixels and vice versa. The sorting of pixels is performed in an increasing order of their rhombus means and then 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ size blocks are formed. Reordering of pixels by sorting plays a key role in increasing the EC and minimizing visual degradation as it helps in generating smaller prediction errors. The proposed method is proven to be an effective method for improving the embedding performance as compared to previous methods that do not incorporate sorting. Since the rhombus mean values of the pixels remain unchanged for each set, the same sorting order is generated at the receiver's side. The proposed scheme exploits the local complexity of individual pixels to determine their inclusion into the embedding block. This step ensures that the pixels belonging to a single block come from a common local complexity range that aids in preventing unwanted shifting. A two-pass embedding strategy is performed on three-pixel blocks. In pass 1, two prediction errors for the first pixel and the last pixel are computed using their rhombus means. Here, a pairwise embedding is used in which the first pixel is unmodified/increased by 1, and the last pixel is unmodified/decreased by 1. In pass 2, two prediction errors are computed for the first pixel and the last pixel using the middle pixel and PEH is modified for data embedding. Thus, the proposed method successfully overcomes the drawback of recovery-based method of Kumar et al. [25] and other PVO-based methods. In their work, pass-2 does not guarantee recovery of the pixel values modified during pass-1 as in the worst case, a pixel can be modified by ±2. So, the pass-2 in the proposed work is designed specifically to reverse the modifications done in pass-1, with worst case modification of just ±1, hence boosting image quality. The middle pixel is also predicted using its rhombus mean and is used for carrying data. Hence, our technique can embed high payloads while simultaneously retaining the image quality. The remaining paper is structured as follows. In Section 2, related works are discussed. The proposed scheme is explained in Section 3. For performance evaluation and analysis, results are discussed in Section 4. Finally, the concluding remarks are given in Section 5. 2 RELATED WORKS In this section, a comprehensive review of the existing RDH-based schemes are discussed. Sachnev et al. [7] proposed an RDH scheme in which the data embedding is performed in a pixel-by-pixel manner using prediction and sorting. They also introduced a 'rhombus predictor' such that a pixel is predicted using its rhombus context i.e. four neighbouring pixels. The pixels are divided into two independent sets such that one set is used for embedding while the other is used to calculate predictions. They noticed the performance improvement gain by sorting in Kamstra and Heijmans' [26] method. Taking inspiration from [26], Sachnev et al. realised that the ordering of pixels needs to be changed to hide more data with less distortion. So, they decided to re-arrange the pixels according to their correlation. Further, they utilised PEE in a pixel-wise manner and experienced much better capacity versus distortion trade-off than another sorting [26] and PEE [6] based techniques of that time. However, the visual quality offered by Sachnev et al. is not at par with today's well known high-fidelity methods. To overcome the quality-related issues as well as taking advantage of sorting and rhombus context, the proposed method sorts the pixels based on their rhombus means. Furthermore, rhombus prediction is utilised in pass-1 embedding, however, instead of conventional PEE, pairwise PEE has been used in the proposed method to enhance the image quality. The inspiration behind pairwise embedding is taken from the work of Ou et al. [8] in which PEE exploits the inherent correlation between the pair of prediction errors. The pairwise embedding exploits the correlation between the two prediction errors corresponding to maximum and minimum sides. According to a 2D histogram modification scheme used in this method, the error pair (0,0) can embed log23 data bits by expanding itself to (0,0), (0,1) and (1,0). However, the PE-pair (1,1) is exploited separately to accommodate 1-bit secret data by expanding itself and (2,2). The distortion level is brought down significantly, hence providing a high-quality way of data hiding. Xiao et al. [27] and He et al. [28] proposed content-dependent pairwise mappings to further stimulate the performance of pairwise PEE. They challenged the fixed 2D-PEH modification and presented the advantages of flexible histogram modifications. Ou et al. [29] proposed another 2D histogram generation method using geodesic path. In this method, the pixels are adaptively paired according to their local similarity in terms of intensity and spatial distance. It helps in generating prediction error pairs that are more correlated to each other, as opposed to fixed pairing mechanism. A further study of the idea of adaptive prediction error pairing has been conducted by Ou et al. [30] in which they proposed adaptive pixel pairing (APP) and adaptive mapping selection. Its objective is to include only smooth pixels in pairing, while the rough ones are ignored. This decision of adaptively selecting pixel pairs based on their local complexity creates sharper 2D prediction error histogram, hence leading to some performance gains over other pairwise embedding methods. Pairwise embedding has been further incorporated with PVO [13], that is itself a high-fidelity mechanism for data hiding. PVO- based methods are block-based RDH methods that modify the pixels by ±1 hence resulting in superior visual quality. The pixels in a block are sorted in increasing order of their intensity values. Then two prediction errors are obtained as the differences between smallest and second-smallest pixels, and the differences between the largest and second-largest pixels. Thus, the PEs in the range of 0 to 255 (for maximum valued pixel) and -255 to 0 (for minimum valued pixel) are obtained. In case of maximum prediction error, the peak bin '1′ is expanded for embedding and other bins > 1 are shifted to ensure reversibility. Similarly, for the smallest prediction error, the peak bin '-1′ is expanded to carry data and other bins < -1 are shifted. Peng et al. [14] proposed an I-PVO-based RDH scheme to consider the relative location of pixels in a block during the prediction error calculation. Li et al.'s PVO always generates non-negative differences for the largest pixel and non-positive differences for the smallest pixel. This is overcome by Peng et al. [14] by producing prediction errors in range of -255 to 255. This range enables the encoder to use both '0′ and '1′ for expansion both for minimum and maximum side predictions. Wang et al. [18] further extended the PVO scheme by experimenting with variable sized blocks. Instead of keeping the block size fixed, they exploited two block sizes i.e. 2 × 2 and 4 × 4 such that smaller blocks are created in smooth regions, and larger size blocks are created in rough regions. This allows an increase in embedding in highly correlated regions and prevents unnecessary shifting operations in textured areas. The idea of dynamic block partitioning has been studied and further extended in [20, 31, 32] to show improvement. Some of the PVO-based methods such as [33-35] performed partitioning into 1 × 3 blocks for capacity improvement. It is observed that small block size leads to improved EC but the quality of the stego image is compromised to some extent. Therefore, an efficient block partitioning is needed for an acceptable trade-off between capacity and distortion. Apart from PVO, Dragoi and Coltuc [36] further suggested prediction-error ordering-based RDH method for high-fidelity data embedding. They investigated the significance of prediction error ordering, replacing the conventional PVO by traversing the image into a chessboard pattern. The inclusion of pairwise embedding in PVO schemes is introduced in [12, 22, 37, 38] to improve performance. Dragoi et al. [39] also proposed an improved pairwise PVO-based method in which the blocks are classified on the basis of a local complexity measure, smooth blocks are processed using pairwise PVO, slightly noisy blocks using standard PVO while complex blocks are kept unchanged. Most of the above mentioned PVO methods have been surveyed in [40]. To increase the EC, Kumar et al. proposed two new reversible data hiding schemes using PVO based methods [41, 42]. In [41], Kumar et al. simply reserves a bin of prediction error histogram by initially shifting the pixels so that expansion and contraction can be done to embed additional amount of secret data. Thus, this scheme increases the EC but at the cost of stego-image quality. In [42], Kumar et al. generalised the work of Peng et al. [14] by extending the block size in case of extremely smooth blocks, so that unused pixels such as the middle pixels in [14] are reduced, which in turn increases the EC without much deterioration of the image quality. However, the scope to improve the EC is still there by adopting more efficient block categorization. Also, the regular raster-scan partitioning of the cover image does not promote any improvement. So, the proposed method uses a modified image traversal approach that would calculate the complexity of each pixel based on its neighbouring pixels. The proposed partitioning strategy allows a two-layer embedding in the cover image, ultimately producing improved results. Kumar et al. [25] recently proposed a high-capacity RDH-based method on enhanced pairwise IPVO using rhombus context. In this method, the cover image is divided into 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ blocks by traversing in a zig-zag order. In pass-1, IPVO is utilised for prediction and the PE pairs are modified using 2D-PEH shifting, such that the smallest pixel is decreased/unchanged and the largest pixel is increased/unchanged. In pass-2, the pixels in a block are sorted according to an increasing sequence of their rhombus means and the first and last pixel is used for data embedding using recovery based pairwise PEE. In pass-2, the first pixel is increased/unchanged and the last pixel is decreased/unchanged. Moreover, they also introduce an efficient block categorisation strategy based on the rhombus context and consider pixel-wise complexity in addition to block-level complexity. Although the payload capacity is significantly increased in comparison to existing PVO-based methods, the image quality is inferior at low ECs. The major drawback of Kumar et al.'s method is that they assume that pass-2 embedding would restore the modified pixel values during pass-1 as they assume that pixel with least/highest rhombus mean is most probably the minimum/maximum valued pixel in the block. However, this assumption that would force the worst-case pixel modification to be ±2 might not hold all the time. To overcome the issues pertaining to image quality in Kumar et al.'s method, it is to be ensured that the pass-2 embedding restores the modified pixels during pass-1, hence promoting better performance. Therefore, the two passes have been modified in the proposed method to achieve this objective. In pass-1 of the proposed method, the first pixel is increased/unchanged and the last pixel is decreased/unchanged, while in pass-2, the first pixel is decreased/unchanged and the last pixel is increased/unchanged. Hence, pass-2 is the complement of pass-1 with worst-case modification to be just ±1 thus mimicking the high-fidelity behaviour offered by PVO. 3 PROPOSED METHOD In this section, the working of the proposed method is explained. An abstract step-by-step demonstration of the proposed method is shown in Figure 1 in which the steps in shaded blocks correspond to the pre-processing stage, that are common for both data embedding and data extraction procedures. These pre-processing steps are required to prepare the image for data embedding/extraction. These steps, namely, image partitioning, zig-zag traversal of pixels, rhombus mean calculation, sorting of pixels, block partitioning and block selection are discussed in Section 3.1. The data embedding and data extraction processes are then explained in Sections 3.2 and 3.3, respectively. FIGURE 1Open in figure viewerPowerPoint An abstract flowchart of the proposed method (shaded blocks correspond to pre-processing stage) 3.1 Pre-processing Stage 3.1.1 Image partitioning The cover/stego image is partitioned to form a chessboard pattern to obtain two independent pixel sets namely, dot set and plus set, as shown in Figure 2. This alternate-pixel traversal scheme ensures that the changes made to one pixel-set do not affect the other pixel-set during embedding. The data embedding is independently performed in the dot-set pixels, followed by the plus-set pixels. The following procedure applies to dot set pixels and a similar set of steps is repeated for plus set pixels afterwards. FIGURE 2Open in figure viewerPowerPoint Chessboard partitioning of cover image and zig-zag traversal of dot pixels indicated by arrows 3.1.2 Zig-zag traversal of pixels and rhombus mean calculation The dot set pixels are collected in a sequence according to a zig-zag fashion as depicted by the arrows in Figure 2. For each pixel p i , j ${p_{i,j}}$ in the dot sequence, its rhombus context as shown in Figure 3, is used to calculate its rhombus mean μ i , j ${\mu _{i,j}}$ as in Equation (1): μ i , j = 1 4 p i , j − 1 + p i − 1 , j + p i , j + 1 + p i + 1 , j . \begin{equation}{{{\bm\mu }}_{{\bm{i}},{\bm{j}}}} = \left[ {\frac{1}{4}\left( {{{\bm{p}}_{{\bm{i}},{\bm{j}} - 1}} + {{\bm{p}}_{{\bm{i}} - 1,{\bm{j}}}} + {{\bm{p}}_{{\bm{i}},{\bm{j}} + 1}} + {{\bm{p}}_{{\bm{i}} + 1,{\bm{j}}}}} \right)} \right].\end{equation} (1) FIGURE 3Open in figure viewerPowerPoint Rhombus context of pixel pi,j Here μ i , j ${\mu _{i,j}}$ is the rhombus mean of the pixel p i , j ${p_{i,j}}$ and p i , j − 1 , p i − 1 , j , p i , j + 1 , p i + 1 , j ${p_{i,j - 1}},\ {p_{i - 1,j}},\ {p_{i,j + 1}},\ {p_{i + 1,j}}$ are its neighbours that belong to the plus set (while processing the plus set pixels, the dot pixels will act as their rhombus context). The value of rhombus mean is used for local complexity measurement of the pixels, as well as to rearrange the position of pixels using sorting, discussed in the next subsection. 3.1.3 Sorting of pixels according to rhombus mean The pixels are sorted in increasing sequence of their rhombus mean so that pixels in a single block are correlated and do not diverge as much to create non-embeddable prediction error scenarios. The rhombus means, μ i , j ${\mu _{i,j}}$ calculated using Equation (1) is supposed to achieve an appropriate sorting as the value of μ i , j ${\mu _{i,j}}$ remains unchanged after data hiding, that would not pose any difficulty at the decoder side. 3.1.4 Block partitioning scheme The sorted pixel sequence (according to rhombus mean) is segregated into blocks of size 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ . However, the decision to include a pixel into a 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ block is determined by its noise level. The pixels with smooth neighbourhood are basically chosen for block construction. A local variance measure employed in the Sachnev et al. [7] is used to quantify the noise level in the pixel neighbourhood of the proposed scheme to determine the inclusion of the pixel into an embedding block. According to this method, the noise level NL for pixel p i , j ${p_{i,j}}$ is computed as follows: NL p i , j = 1 4 ∑ k = 1 4 Δ d k − Δ d 2 , \begin{equation}{\rm{NL}}\ \left( {{p_{i,j}}} \right) = \frac{1}{4}\ \mathop \sum \limits_{k\ = \ 1}^4 {\left( {\Delta {d_k} - \Delta d} \right)^2},\end{equation} (2)Where, Δ d 1 = | p i , j − 1 − p i − 1 , j | $\Delta {\rm{\ }}{d_1} = | {{p_{i,j - 1}} - {p_{i - 1,j}}} |\ $ , Δ d 2 = | p i − 1 , j − p i , j + 1 | $\Delta {\rm{\ }}{d_2} = | {{p_{i - 1,j}} - {p_{i,j + 1}}} |\ $ , Δ d 3 = | p i , j + 1 − p i + 1 , j | $\Delta {\rm{\ }}{d_3} = | {{p_{i,j + 1}} - {p_{i + 1,j}}} |\ $ , Δ d 4 = | p i + 1 , j − p i , j − 1 | $\Delta {\rm{\ }}{d_4} = | {{p_{i + 1,j}} - {p_{i,j - 1}}} |\ $ and Δ d = ( Δ d 1 + Δ d 2 + Δ d 3 + Δ d 4 ) / 4 $\Delta d\ = ( {\Delta {d_1} + \Delta {d_2} + \Delta {d_3} + \Delta {d_4}} )/4\ $ . The pixels with NL less than a threshold value are chosen to be members of blocks, and others are skipped. If t1 is a user-defined threshold, then a 1 × 3 $1{\rm{\ }} \times {\rm{\ }}3$ block is formed as follows: B = { p 1 , p 2 , p 3 } such that NL ( p 1 ) , NL ( p 2 ) , NL ( p 3 ) < t 1 . \begin{equation*}B = \{ {{p_1},{p_2},{p_3}} \}\hbox{ such that }{\rm{NL}}( {{p_1}} ),{\rm{\ NL}}( {{p_2}} ),{\rm{NL}}( {{p_3}} ) < {t_1}.\end{equation*} The value of t1 is initially chosen as a small rando