First, gradient image is constructed by using direction templates convolve with image.首先利用方向模板对图像进行卷积,求得梯度图像。