## 4 Proposed Scheme
### Illustrative Example  
For a better understanding of the proposed scheme, an illustrative example is discussed in this section. As per the proposed RDH scheme, a medical image \(I\) of size \(R\times C\) and a clinical report of \(T\) are considered as the input. The medical images may use 8-bit, 12-bit, or 16-bit grayscale representation for capturing more gray levels, which may help the doctors to make better diagnoses. Our experimental study considered 8-bit medical images, and we assume that the clinical report is a text file. The clinical report content should be converted to the corresponding bit representation \(T^{B}\) to perform RDH. In the second step, the given medical image \(I\) is divided into 8 different bit planes. If we analyze the bit planes, it can be observed that the bits in the most significant bit planes will be highly correlated. Since the few most significant planes are highly correlated, those planes can be compressed with a high compression ratio. We have considered the \(Q\) number of most significant bit planes for compression using RLE. To encode RLE, we have introduced a modified version of the Elias gamma encoding technique with an RDH capability. RDH we will achieve in two ways: the RDH during the modified Elias gamma encoding procedure and the other through the embedding of data in the space created through lossless compression. An illustrative example to demonstrate the modified Elias gamma encoding approach is given in Figure 5.  
Figure 5 shows one bit plane for demonstration purposes. Firstly, the RLE sequence is identified from the bit plane. Then, we used the modified Elias gamma encoding method to convert the run-length sequence to a sequence of bits. For this, the RLE sequence that we computed was incremented by one. Note that this increment process may lead to an increase in the number of bits in the corresponding binary representation if the integer value is \(2^{I}-1\), where \(J\) is a positive integer. Let us denote the RLE sequence obtained after incrementing by one with \(\hat{U}\) (except the first value, which is the starting bit). Each of the run-length values will be considered from \(\hat{U}\), and the number of bits that we can embed through the modified Elias gamma encoding process will be dependent on the number of integers in the run-length sequence. In the illustrative example, there are five run-length sequences, so we shall embed 5 bits during the modified Elias gamma encoding process. Let us assume the sequence of bits that we need to embed is \((10110)\). Now, let us consider the first sequence in the run-length sequence, which is 16. After incrementing 16 by 1, we will get 17. The binary value corresponding to 17 is 10001. Let us assume that we need to embed the first bit from the secret message 1 in the run-length value 17. Since we need to embed a bit value, find the bit inverse of 10001, which is 01110. Now, adding 1111 as the prefix of 01110 will result in 11110110. If we need to embed a bit value 0, in that case, we will consider the binary value as it is, and we need to add \((Q-1)\) number of 0s as a prefix, where \(Q\) is the number of bits in the binary representation of the selected run-length count; note that this is one part of RDH in the proposed scheme. In addition to this, we will make use of the space created through the lossless compression to store the secret message bits. Figure 5: An illustrative example for modified Elias gamma encoding. In the illustrative example, we shall see that the bit plane size is \(8\times 8\) pixels, which requires 64 bits for its actual representation. Now we shall see that the final bit sequence obtained from the last stage of modified Elias gamma encoding consists of 37. Note that we already embedded a 5-bit secret message during the modified Elias gamma process. If we analyze the vacant space created through compression, it will be \(64-37=27\).