The traditional Sobel operator has low edge localization accuracy, poor noise and edge detection continuity. In order to solve these problems, this paper proposes an image fusion algorithm combining fusion improved Sobel operator, Canny operator and LoG operator to optimize edge detection results. First, we use the Morphological smoothing to preprocess the image of the cigarette packet, and keep the edge information and remove the noise. Secondly, we extend the template of the vertical and horizontal directions of the traditional Sobel operator, and increase the 6-direction template, and enhance the edge extraction ability. Then, we use the Otsu method to apply the threshold. Finally, in order to optimize the edge detection effect, the image fusion method proposed in this paper is used to deal with the experiment. The experimental results show that the image fusion method has a much higher edge detection effect than the traditional Sobel operator.