Image inpainting method based on tensor structure multi-dictionary learning and sparse coding
A sparse coding and dictionary learning technology, applied in the field of image processing, can solve the problems of not effectively using image texture and spatial structure information, destroying image block structure information, and image edge discontinuity, so as to achieve clear repair details and overcome clustering. Inaccurate, short patch time effects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042]Traditional image inpainting methods fail to effectively utilize the neighbor structure information and texture information in the image block to be inpainted, resulting in blurred and relatively large distortion in the inpainted image. For this reason, the present invention proposes a kind of image patching method based on tensor structure multi-dictionary learning and sparse coding, see figure 1 , including the following steps:
[0043] In step 1, the images in the training sample library are formed into tensor samples and classified:
[0044] 1a) Divide the images in the training sample library into image blocks with a size of m×n, and use the non-smooth image blocks and their spatial 8 neighbor image blocks to form a tensor sample t k ∈ R m×n×9 , randomly select 100,000 tensor samples as the training sample set where R m×n×9 Indicates that the size of each tensor sample is m×n×9, and k represents the index of the tensor sample in the training sample set. In thi...
Embodiment 2
[0069] The image repair method based on tensor structure multi-dictionary learning and sparse coding is the same as that in embodiment 1, the specific steps of dividing the tensor samples in the training sample set into structured and non-structural classes as described in step 1b, see figure 2 ,as follows:
[0070] 1b.1) Construct the gradient tensor of each tensor sample
[0071] 1b.2) For gradient tensors Perform HOSVD decomposition as follows
[0072]
[0073] Where A, B, and C represent gradient tensors respectively Dictionary of left singular vectors in modulo 1, modulo 2, modulo 3 matrices, is the gradient tensor The core tensors on the dictionaries A, B, and C, P, Q, and R respectively represent the core tensors Length in 1D, 2D and 3D directions, g pqr Represents a core tensor Value at position (p,q,r), × i Represents multiplication over the i modulo of tensors, Represents the outer product of vectors;
[0074] 1b.3) According to the following f...
Embodiment 3
[0086] The image repair method based on tensor structure multi-dictionary learning and sparse coding is the same as that in embodiment 1-2, step 1b.1 constructs the gradient tensor of each tensor sample The specific steps are as follows:
[0087] 1b.1.1) Calculate each image block I in the tensor sample j and the central image patch I of the tensor sample i The similarity of:
[0088]
[0089] Among them, d j Represents an image patch I in tensor samples j with its central image block I i h is a smoothing parameter that controls the similarity between image blocks, and the value of h is a positive number ranging from 1 to several hundred. In this example, the value of h is 20.
[0090] 1b.1.2) According to the following formula, calculate each image block I in the tensor sample j The gradient of each pixel in the horizontal direction and vertical direction:
[0091]
[0092] in, An image patch I representing tensor samples j The gradient of the kth point in th...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


