摘要 |
<p>The present invention relates to an image splicing method and apparatus. The image splicing method includes: acquiring a first image and a second image, where an overlapping region exists between the first image and the second image; determining a to-be-processed region within the overlapping region, where a region within the overlapping region except the to-be-processed region is a remaining region; acquiring a luminance component or chrominance component of each pixel of the remaining region, and obtaining a weight value of each adjacent pixel pair of the remaining region; setting a weight value of an adjacent pixel pair within the to-be-processed region, where the weight value of the adjacent pixel pair of the to-be-processed region is greater than a weight value of an adjacent pixel pair of the remaining region; determining a splicing path having the least seam line intensity of all splicing paths within the overlapping region as an optimal seam line; and performing image splicing on the first image and the second image along the optimal seam line. According to the image splicing method and apparatus of the present invention, a seam line can be excluded from a to-be-processed region, so as to ensure that the to-be-processed region is spliced naturally and to improve subjective perception of a user in viewing an image.</p> |