# Research on VVC Intra-Frame Bit Allocation Scheme Based on Significance Detection
## 3 Model and Proposed Method
### Options for Improving CTUs  
The purpose of this experiment is to select certain CTUs (hereinafter referred to as improved CTUs) and perform an active process to enhance the bit cost of their default algorithms and to reduce the bit cost of other CTUs during the bit allocation process of the default rate control algorithm at the CTU level. This section will focus on the determination process of the improved CTUs, while the determination of the adjustment multiplier will be presented in Section 3.4. Once all the videos in the dataset have been acquired, the saliency and complexity information for each CTU in each video (i.e., each frame) must be obtained so that the set of CTUs that require improvement in this frame can be determined. The saliency detection algorithm based on Canny edge detection is able to accurately detect the edges of the image and also has good resistance to noise. The process of saliency extraction using the Canny algorithm needs to complete the following steps:  
* Grayscaling: While the encoder enters the frame-level encoding, the complete pixel values of the luma component of the frame, i.e., the grayscale image, are extracted. * Gaussian Filtering: Smooth the grayscale map with Gaussian filtering to reduce the effect of noise. * Calculate the gradient of the image: Use the Sobel operator to calculate the gradient of the grayscale map in the horizontal and vertical directions, so as to obtain the gradient intensity and direction of each pixel point. * Non-extremely large value suppression: For each pixel, compare the size of the gradient values of two neighboring pixels in the gradient direction, and keep only the pixel with the largest gradient value in the gradient direction, which is conducive to eliminating the blurring effect on the edges. * Dual Thresholding: Classify pixel points into three categories: strong edges, weak edges, and non-edges. When the gradient value of a pixel point is higher than the higher threshold, it is categorized as a strong edge. When the gradient value of a pixel point is below a lower threshold, it is categorized as non-edge. When the gradient value of a pixel point is between the higher and lower thresholds, it is classified as a weak edge. * Edge Joining: Join weak edges and their surrounding strong edges to form complete edges. Since the saliency map obtained by the Canny-based algorithm is a binary image, we use the sum of the saliency values of all white pixel points within the pixel range of each CTU to characterize the saliency value of that CTU. At the same time, we use a color contrast-based saliency detection algorithm to simultaneously guide the CTU saliency. First, the image is converted to grayscale after applying the Laplace convolution kernel to convolve the grayscale map and produce a gradient map in which the salient regions have higher gradient values and the points larger than a set threshold are labeled as edge points. In the actual test, we use the default threshold of the algorithm as the edge threshold. Since the resulting saliency map is not a purely binary image, we extracted the CTU-level saliency values by averaging the saliency values of all pixel points for each CTU to characterize the saliency value of the CTU. To eliminate the impact of specific areas of high luminance on CTUs, all pixel points within a CTU should be counted in the average value category instead of non-black pixel points. The Canny-based saliency map with the saliency information obtained based on color contrast for the test sequence mv5 is shown in Figure 4.  
It should be noted that although the Laplace operator emphasizes high-frequency information and regions with large brightness variations, this saliency detection algorithm still has some problems. First, it is sensitive to noise and requires some noise suppression processing; second, the discretization matrix of the Laplace operator introduces a sharpening effect when processing the image, which may lead to some unnecessary details in the saliency map.