import graphic and animation tools: import matplotlib.pyplot as plt from matplotlib; import FuncAnimation as animation class; # create graphic instance: fig = plt.figure(); ax1=fig.add\_subplot(num, num, num); line1= ax1.plot(num, curve, color, linewidth); # set keyframe feature points: point\_ani=plt.plot(x1, y1, 'point1', x2, y2, 'point2', . . . ); # def updata(num): point\_ani.set\_data(x[num], y[num]); return [point\_ani]; # generate dynamic graphic: ani = animation.FuncAnimation(fig=fig,func=updata,frames=np.arange(num,num), inter-

val=num).

### **5. Practice on the Brightness Feature Extraction and Feature Graphic Design**

Taking a square engraving graphic from the Shuangdun Site as an example, the practice is conducted on the image feature extraction and intelligent feature graphic design. Specifically, the process is given as follows.

1. Image brightness feature extraction;

The 112 × 112 image after preprocessing is input into the image feature extracted model. With the optimal parameters are set as the brightness enhancement coefficient *k* = 2.5, brightness threshold *θ<sup>T</sup>* = 128 and connected region threshold *T<sup>A</sup>* = 25, the brightness feature map output from the extracted model is shown in Figure 11a.

effect of feature graphics. Taking the dynamic graphic of a line graphic for example, the

pseudo code for algorithm implementation can be described as follows briefly:

ani = animation.FuncAnimation(fig=fig,func=updata,frames=np.arange(num,num),

Taking a square engraving graphic from the Shuangdun Site as an example, the practice is conducted on the image feature extraction and intelligent feature graphic design.

The 112 × 112 image after preprocessing is input into the image feature extracted model. With the optimal parameters are set as the brightness enhancement coefficient *k* = 2.5, brightness threshold *θT* = 128 and connected region threshold *TA* = 25, the brightness

The brightness feature map is sampled and optimized, where the sampling interval *s* = 2, the number of samples *n* = 56, and the optimal spacing *l* = 4 pixel units. The preliminary sampling result is shown in Figure 11b and the optimized sampling result is shown in Figure 11c. The specific process is that we take the progressive scanning and interval sampling to the image brightness feature map output from the proposed model with the sampling number *n* = 56 and the sampling interval *s* = 2. Then, we select the pixel points if their brightness value is higher than the preset brightness threshold *θ*<sup>0</sup> = 150 and output them to form the brightness feature sampling matrix. Further optimization is conducted with the optimized spacing *l* = 4. If the space between the sampling points is less than *l* = 4 pixel units, we reserve the pixel point with min x + y to form the key feature point matrix. At last, the drawMatches() method is used to connect the optimized sampling points whose spacing is less than the set value *l*<sup>0</sup> = 6, and the feature graphics is formed, which

**5. Practice on the Brightness Feature Extraction and Feature Graphic Design**

feature map output from the extracted model is shown in Figure 11a.

consequently shows that the lines are partially smoothed.
