## 3 Proposed Method
### Proposed Watermark Embedding Scheme  
The proposed method for image processing not only includes common techniques such as zooming, shrinking, resizing, cropping, re-compression, sharpening, and blurring, but it also detects malicious changes like copy-move, region overlap, and image synthesis in JPEG 2000 image files. Figure 8 shows the watermark insertion method, which first decodes the input image with an entropy decoder and extracts a quantized DWT coefficient. The embeddable bits are identified according to Section 3.1, and the JPEG 2000 image is divided into a tree structure of COBs, each containing at least \(Tb\) embeddable bits in the DWT region. A watermark is embedded into each divided block group, and a block group with a modulated area is localized and represented during watermark detection. The detection coefficient \(Tb\) determines both the size of the GOBs and the size of the watermark embedded. Larger values of \(Tb\) lead to larger block group sizes and watermark sizes, which reduce error rates but lower localization accuracy. To determine the optimal \(Tb\) value, a trade-off between localization and security must be made. The proposed segmentation process is as follows:  
1. Set the DWT area of the entire JPEG 2000 image as a root GOB.
2. Divide the mother GOB horizontally or vertically to create equal-sized child GOBs. If each child GOB has more than \(Tb\) embeddable bit coefficients, it is declared a mother GOB and further divided.
3. Repeat step 2 until no more child GOBs exist.  
Once all DWT coefficients have been divided into child GOBs, a unique watermark is generated for each GOB using a random bit sequence (RBS). The algorithm verifies the image's integrity by comparing the built-in watermark to the generated RBS. When a GOB is modified, a new RBS is generated that differs from the existing RBS. The block identification key (BIK) is generated using the following information:  
1. All the bits of DWT coefficients are declared as the watermark-embeddable bits in the current GOB;
2. Ancestral information from the root GOB to the current GOB;
3. All the bits of DWT coefficients not declared as the watermark-embeddable bits in all those neighboring GOBs;
4. Selected part of metadata of JPEG 2000 image;
5. Owner's key.  
A hashing function creates RBS from the generated BIK. Finally, entropy encoding is performed on the modified DWT coefficients to obtain a watermarked JPEG 2000 image.  
\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline \multicolumn{2}{|c|}{\(Y\)} & \multicolumn{8}{c|}{\(m\)} \\ \cline{3-10} \multicolumn{2}{|c|}{} & \(1\) & \(2\) & \(3\) & \(4\) & \(5\) & \(6\) & \(7\) \\ \hline \multirow{5}{*}{\(p\)} & \(1\) & & & & & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) \\ \cline{2-10}  & \(2\) & & & & & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) \\ \cline{2-10}  & \(3\) & & & & & & \(\bigcirc\) & \(\bigcirc\) \\ \cline{2-10}  & \(4\) & & & & & & & \(\bigcirc\) \\ \cline{2-10}  & \(5\) & & & & & & & \(\bigcirc\) \\ \cline{2-10}  & \(6\) & & & & & & & \(\bigcirc\) \\ \cline{2-10}  & \(7\) & & & & & & & \\ \hline \multirow{5}{*}{\(p\)} & \(CbCr\) & & & \(m\) & & & & \\ \cline{2-10}  & \(1\) & \(2\) & \(3\) & \(4\) & \(5\) & & \\ \cline{2-10}  & \(1\) & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \\ \cline{2-10}  & \(2\) & & & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \(\bigcirc\) & \\ \cline{2-10}  & \(3\) & & &