Block Chain Based Robust Image Watermarking Using Edge Detection And Wavelet Transform

Image protection is essential part of the scientific community today. The invisible watermark is widely being used in past to secure the medical imaging data from copyright protection. In this paper novel hybrid combination of the invisible image watermarking and the Blockchain based encryption is proposed to design. The watermarking is implemented using edge detection (ED) of discrete wavelet transform (DWT) coefficient. The medical image is decomposed using L level DWT transform to generate multi-resolution coefficients. The edge detection is applied to HH wavelet band to generate the edge coefficients. To improve robustness difference of dilation and edge coefficient are used for watermark embedding. The watermark image is encrypted using Blockchain based hash algorithm for medical images. Then at the decoding end first decryption is achieved and then image is reconstructed. The results are sequentially presented for both stages. The PSNR performance is compared with additional level of security.

The watermarking algorithms designed specific for medical images are using Blockchain based data security. Proposed method is used for improving the medical image authentication and security. There are various applications [4, 5. and 6] of the watermarking as shown in the Figure 1.  In this paper a novel robust and secure watermarking method is proposed. Basic block diagram and process of the edge detection and Blockchain based watermarking methodology is presented in the Figure 2. Proposed watermarking method is processed in three stages. Initially edge detection (ED) based watermark e8mbedding is implemented. The watermark is embedded in the discrete wavelet transform (DWT) domain. The difference of edge component of LL wavelet coefficient and dilation component is used as the watermark. In the second phase the block chain based security method is implemented on the watermarked image. Then shuffled image is transmitted as block chain. In 3 rd stage Blockchain decryption is implemented to reconstruct the image. Sue to combination of Blockchain the embedded images are protected against the data tempering. The edge detection is implemented in transform domain to improve the robustness of watermark embedding.
This process will improve invisibility of watermark. To enhance robustness the morphological dilation is used with edge detection. Gaussian noise template is added with the embedded watermark. The edge detection (ED) is implemented using the Sobel edge detector mask. The ED is implemented using the following X and Y gradients masks. The suitable example of the discrete wavelet transform (DWT) decomposition of brain tamer image is shown in the Figure 4 for 2 level decompositions. .It can be clearly unsaved that the visibility may be invisible as the DWT offers multi resolution featured..

. Medical Image Watermarking
Due to high imaging density it is essential to design the watermarking method for medical images. The goal of watermarking is to embed watermark data in the medical images without disturbing visual quality. The essential requirements [2] of the medical image watermarking methods are as follows.
1. The watermark must be invisible and must not affect images visual quality. 2. Watermark must be robust ageist attacks. 3. Easily reconstructed and reliable. 4. Must be statistically irremovable once embedded 5. Must provide highest level of image security. 6. The hiding capacity of watermarking must be higher. Thus robust it is still tough task of designing the secure and watermarking method for medical imaging applications. .

PREVIOUS RELATED WORKS
Many researchers have designed different types of watermarking methods in the past. Our major concern of this paper is on the transform domain based methodologies and on the methods of using edge detection and block chain. Commonly an invisible watermarking is implemented using the transform domain based methodologies. Various transformations are used for improving the performance of watermarking as discrete cosine transforms (DCT), DWT, and combinations of both DT-DCT. Edge detection based methods are widely used in combination to these transform domain methods to improve invisibility.
Mr.Sachin eta al [1] have used the DWT transform and Texture analysis along with the Edge detection for improving the robustness of the image watermarking. The texture baloc extraction is followed by the canny edge detection in there method. Ellinas et al. [2] proposed an edge detection based algorithm for embedding watermark in the LL DWT coefficients. They have used contrast sensitivity based function CSF for in watermarking algorithms to provide robustness.
John N. Ellinas [3] has improved the performance over [2] by relacing the CSF with image dilation coefficient. They have opted Soble edge detector for determining edge in the two levels DWT coefficients. The 3x3 image dilation is calculated over edge image and then watermark is inserted using these coefficients. Ramanand singh and P Rawat et al [4] have improved the performance of the invisible watermarking in edge detection domain using the 2x2 dilation mask. They have used HH coefficient for watermark embedding. Shaozhang Xiao et al have designed an robust multipurpose watermarking algorithm using the watermark embedding in Region of interest (ROI) blocks of medical images.
Saeed et al. [7] have embedded the watermark using combination of DWT-DCT transformations. Arnold cat map is used for scrambling the binary watermarked logo and is embedded in c 3-level DWT coefficient of cover image. Then, PN-sequences are added to DCT coefficients of DWT sub-bands in the middle frequencies.
But this approach was computationally complex. Ramanand singh et al [8] has presented the ED based watermarking using the double density DWT transform domain. Method was novel and robust and also entropy efficient too. They also evaluate performance under attacks. Salima Lalan et al 12 [10] has proposed a new hybrid DWT-SVD based Canny edged detection based image watermarking.

B. Block Chain Based Methods:
Oleg Evsutin et al [12], have analyzed an problem of security at data flow level of the mining production process. They offer the solution of data security using the Blockchain and the image watermarking approach. They states that Blockchain has main advantage of conforming the any transaction during the data flow process. Konstantinos et al [13] have presented the survey of using Blockchain in the agricultural supply chains. There prime concern was to trace the location of goods in supply chain. Sheping et al [14] presented the various implementations of the Blockchain applications using the standard SHA-256 crypto algorithm. Lavanya B.M et al [15] presented a good survey of research trends in Blockchain and have addressed various challenges too. Nilesh Rathi et al [16] have used the triple level secure watermarking using the DWT-DCT and SVD domains. Narong et al [17] has used DWT based robust watermarking for identification of the patients. J. Jeyabharathi et al [18] have used the Blockchain based heuristic method for the applications in managing the supply chains.

DWT-ED BASED WATERMARKING
In the proposed method the basic DWT based edge detection (ED) is calculated and then dilated version of edge coefficient and Gaussian random noise is used along with scaling parameter for watermarking to improve invisibility.

Watermark Embedding
The watermark embedding using DWT-ED approach is sequentially presented in this section. The cover or host medical image is read and then converted to 256x256 image size for embedding. There is no external watermark logo is required. Since proposed method uses the edge detection (ED) coefficients of host image as the watermark. Paper proposed to take the 2 nd level DWT decompositions of host image then extracts the low and high pass DWT coefficients. The edge coefficient is computed over LL components using Sobel edge operator. The watermark insertion rule is used to produce the watermark using the edge coefficients. Sequential watermarking procedure to embed the watermark is presented as follows; 1. Read host color image convert to RGB2GRAY and resize the image to 256x 256 2. Define the edge detection masks for Sobel operator 3. Initialize the variables and size for wavelet transformations. 4. Applying the 2 nd level DWT decomposition using the dB1 wavelet and the LL decompositions is separated. 5. Implement edge coefficients of LL component. 6. Generate the Gaussian noise template. 7. Use morphological dilation over edge coefficient then the difference of both to minimize visibility concerns of watermark. 8. Apply scaling law for embedding the watermark to LL component. Take the inverse DWT for reproducing the watermark image.

Watermark Insertion Rule
It is proposed to insert the watermark in the LL sub-bands, let ( , ) is edge coefficient of LL component. The ( , ) is defined as dilated component of ( , ) . Then take the difference of dilated and edge component to produce the minimized features as.
Use the scaling factor for implementing the watermark features for improving the invisibility. In order to improve the invisibility changing the scaling factor is efficient one. The watermark is; W(x, y) = (1 − α) * ( ( , )) + α , Finally, the watermarked image is attained by an inverse transform. Flow chart is shown in Figure 5.  Where, compression function of the SHA256 is , and ( ) is the k th Block of message with = 1,2 ⋯ ⋯ ⋯ , , Here vector the hash of the k th message. The sequential process of Blockchain encryption os as follows; 1. In this paper the ED based watermarked image as produced by the previous section is used as input to Blockchain process. 2. Shuffled image is produced on the resized image of multiples of 512. Using the reshaping ℎ = ∈ ℎ (7) 3. The crypto hash SHA256 algorithm is implemented using 32 bit blocks for generating the Blockchain encrypted secure medical image watermarking. 4. Encrypted image is transmitted and evaluated by adding noisy attacks ( , ) during transmissions. 5. The received image with or without attacked is decrypted at the receiving end. Again resized to the 256x256 size.

= + ∈ (7)
The process of watermark extraction is just the reverse of the extraction process.

Results and Discussion
The results of proposed watermarking approach are presented sequentially in this section. The four distinct medical images are considered for results evaluation. These images are CT scan image, Chest X ray image, Brain Tumour image, and the MRI image as shown in the Figure 7. These all images are widely used for results validations. It is clearly observed that medical images have relatively less color brightness values. The proposed method is robust and expected to improve the efficiency of watermarking technique.  ( Wateermarked image512, b) shuflled image c)Encrypted imaged) decrypted, e) recovered image Figure 9 Sequential results of Blockchan based encryption-decryption for 512x512 medical image. It can be observed from the Figure 8 that the taking the scaled difference of the dilated and ED coefficients minimized the features in watermark. The best performance is observed for CT-scan image and for chest X-ray image.
After the watermarking the Blockchain is used to implement the security of images. The Sequential result of BC based security is presented for the encryption-decryption for 512x512 medical images in Figure 9.
The performance of the method for entropy analysis is compared in the sequential stage In Table 1. The entropy of the original host image, watermarked image, BC encrypted Decrypted and recovered images are compared in the Table 1. It can be observed that the BC based methods may better preserve the content in the recovered images. The complete sequential stage wise results of the proposed DWT-ED-BC algorithm are shown in for the CT scan image in the Figure 9.
The comparison of the crypto weights in terms of histograms are presented in the Figure 10    The mean square errors (MSE) and Signal to Noise Ration (SNR), is valuated for original and watermarked image and for recovered images also. The comparative is presented in Table 2 and Table 3 respectively. Mathematically MSE is defined as  From the comparison of the Table 2 and 3 it can be concluded that the proposed method performs good recovery of the BC based images and the best results of watermarking is for the Chest X-ray image and CT scan image with relatively poor contrast. The error for chest X-ray image is nearly 0.062378 for BC recovered image.
To evaluate the performance under attacks, impact of various noisy attacks added on the BC based security. The results for the different medical images for the bc based reconstruction are presented for the Gaussian and salt and pepper noise in the Figure 11.and Figure 12.

Conclusions
This paper proposed to designed hybrid combination of ED based watermarking and the BC based security. The watermarking is designed to be invisible. In the proposed method BC based encryption/decryption is used for securing the watermarked image. Method use the SHA 256 encryption and genesis block for BC. The ED of the LL coefficient of DWT is used for embedding the watermark. Image dilation based differential scaled watermark is used for embedding. It is concluded that invisibility is to be improved further. The results are sequentially presented for the ED based watermarking. In the first part paper presets the architecture of the robust ED based watermarking. Finally the BC based image encryption and its results are presented for security.
The performance of the watermarking is evaluated under the various highly noisy attacks with variance of 0.5. It is to observe that most of medical images are recovered efficiently even under highly noise. But as the noise variance increases the performance of recovery method for BC reduces further. It is further concluded that best results of watermarking is for the Chest X-ray image and CT scan image with relatively poor contrast The invisibility can be improved in future with proper scaling parameters selection.

DECLARATION
*Funding (information that explains whether and by whom the research was supported)-No funding provided for research *Conflicts of interest/Competing interests (include appropriate disclosures): Conflict of interest does not exist *Availability of data and material (data transparency): Images from Open access SPIE Digital Library *Code availability (software application or custom code): Code is a custom code using image processing toolbox of MATLAB