# Texture Construction Edge Detection Algorithm
## 2 Texture Construction Edge Detection Algorithm
### Optimal Edge Thinning Process
Through the partial enlargement area, it can be clearly seen that the image edge is composed of only a single pixel, which can effectively filter pixels that have not performed the maximum suppression. There are still redundant pixels around the image edges to achieve optimal edge thinning. The total number of candidate edge points in Figure 6 is 45,608, and the total number of optimal thinning edge points in Figure 7 is 38,835. In Figure 7, when compared to Figure 6, the  
between the edge points of number \(x1\)-\(x5\) in the central block \(X\), where the center pixel \(x\) is located, and the adjacent blocks \(P\), \(Q\), \(R\), and \(S\), as well as the change in the texture length, to preserve the edge texture information. The edge texture construction processing aims to use the block texture scan mask as the range to process the edge image with the optimal edge thinning process of the raster-scan method. In order to preserve the effective edge texture information in the image after the optimal edge thinning process, the process scans all edge points pixel-by-pixel and sequentially marks the edge points that meet the conditions. All edge points marked after scanning the entire image are the final edge detection results. Figure 9 shows the flow of the proposed edge texture construction processing. Each process of the edge texture construction processing is sequentially described in the flowchart of Figure 9. First, the image with optimal edge thinning is used as the source image input, and then it is determined whether all edge points in the source image are processed completely. When all edge points have been processed, the process ends and the edge image with the edge texture mark is obtained. Conversely, when there is an unprocessed edge point, the raster-scan sequence is moved to the next edge point and the subsequent pixel is processed with the point as the center pixel. Then, it is judged whether the nine points in the \(X\) block, where the center pixel is located, have edge points marked as valid points. When there are edge points marked as valid points, the process proceeds to the next process to perform block \(X\) edge point processing. The edge point of the valid point in \(x1\)-\(x5\) is first deducted, and one records the position of all edge points in the \(X\) block and proceeds to the next process to determine whether there is an edge point in \(x1\)-\(x5\). When there is no edge point, one goes to the marking processing step to process all edge points in the \(X\) block; when there are still edge points, the block texture extension analysis is performed in the next step of the flowchart. When no edge points of the nine points in the \(X\) block are marked as valid points, the number of edge points of the \(X\) block in which the center pixel is located is calculated: when the block contains at least three (inclusive) or more edge points, it goes to the block texture extension analysis; when there are less than three edge points in the block, the endpoint of the edge segment is regarded as unmarked, the initial step of the edge texture construction processing is returned to, and the next edge point is processed. Next, the method of block texture extension analysis is described as a whole. The block texture extension analysis is based on the block scan mask range of Figure 8. Through the \(X\) block where the center pixel is located and its extended connection among the four adjacent blocks \(P\), \(Q\), \(R\), and \(S\), horizontal, vertical, and diagonal edge texture changes are formed. During the processing, the texture  
Figure 8: Block texture scan mask. of the adjacent block is first determined. The position of the edge point of \(x1\)-\(x5\) in the \(X\) block is used to determine whether there are adjacent points in the adjacent block and the following three cases are distinguished.