Image encoding and decoding method and system with adaptive parameter adjustment

By segmenting the image and adaptively adjusting sparse parameters, the problem of image quality degradation under high compression ratio in the prior art is solved, and adaptive encoding and decoding according to the image content and target position is realized, and encoding and decoding efficiency and image quality are improved.

CN119420930BActive Publication Date: 2025-03-28CHANGSHA CHAOCHUANG ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510012994.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-03-28
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The existing image encoding and decoding technology is difficult to maintain image quality under high compression ratio, especially image detail information is lost, and the encoding parameters cannot be adaptively adjusted according to the image content and importance.

Method used

By segmenting the image, the sparse parameters are adaptively adjusted according to the category of the image blocks, the important image blocks and image blocks containing the target are used to encode the exact sparse parameter, and the background and clutter are used to encode the sparse parameter with greater sparsity.

Benefits of technology

Adaptive encoding and decoding based on image content and target position is realized, the detailed characteristics of important image blocks are retained, the details of background parts are ignored, and the encoding and decoding efficiency and image quality are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420930B_ABST
    Figure CN119420930B_ABST
Patent Text Reader

Abstract

The present invention discloses an image encoding and decoding method and system with adaptive parameter adjustment, the method comprising: S1: segmenting an image based on pixel features to obtain multiple image blocks; S2: calculating a central pixel index for each image block; S3: classifying the image blocks based on feature vectors of the image blocks to obtain image block categories; S4: adaptively adjusting sparse parameters based on the categories of the image blocks, solving the minimum sparse vector based on the sparse parameters and sparsely encoding the image blocks to obtain encoded image blocks; S5: decoding based on the minimum sparse vector to obtain reconstructed image blocks, arranging the reconstructed image blocks according to the central pixel index to obtain a complete image. The present invention segments images based on pixel similarity features, which is conducive to accurate segmentation of image blocks; adaptively adjusting encoding parameters based on image block categories is conducive to accurate encoding and decoding based on distinguishing targets and backgrounds, and provides encoding efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image coding and decoding, and in particular to an image coding and decoding method and system for adaptive parameter adjustment. Background Art

[0002] Image coding and decoding technology refers to the process of compressing and decompressing image data through specific algorithms and methods. The use of image coding and decoding technology is conducive to reducing redundant information in image data, compressing the memory occupied by image storage and the bandwidth required for transmission, thereby improving the efficiency of image storage and transmission. According to different application scenarios, the common image coding and decoding technologies currently include JPEG and PNG. The above image coding and decoding technologies can support cross-platform operations and achieve the same coding and decoding effects on different systems and devices.

[0003] At present, in the field of image coding and decoding technology, there is a contradictory relationship between image quality and image compression ratio; at a high compression ratio, image detail information is lost, image quality is greatly reduced, and image clarity and accuracy are correspondingly reduced, which will affect subsequent image analysis and processing tasks. The above-mentioned image coding and decoding technologies usually use fixed coding parameters, do not have the ability to judge the importance of image content, and do not have the ability to locate targets in images, and cannot adaptively adjust parameters according to the content and importance of the image. These limitations affect the efficiency and quality of image coding, and also limit the application of image coding and decoding technologies. Summary of the invention

[0004] In view of this, the present invention proposes an image coding method and system with adaptive parameter adjustment. The present invention adjusts coding parameters according to the image block category based on image segmentation; can achieve adaptive coding and decoding based on image content and target position, and adopts accurate sparse parameter coding for important image blocks and image blocks containing targets; and adopts sparse parameter coding with greater sparseness for background and clutter.

[0005] The present invention provides an image encoding and decoding method for adaptive parameter adjustment, comprising the following steps:

[0006] S1: Obtain pixels of an image; select pixel features of the image, and segment the image based on the pixel features to obtain multiple image blocks;

[0007] S2: For each image block, calculate the center pixel index;

[0008] S3: extracting a feature vector for each image block; and classifying the image block based on the feature vector of the image block to obtain an image block category;

[0009] S4: Adaptively adjust the sparse parameters based on the category of the image block; solve the minimum sparse vector based on the sparse parameters and perform sparse coding on the image block to obtain the coded image block;

[0010] S5: Decode and reconstruct the encoded image blocks based on the minimum sparse vector to obtain reconstructed image blocks, and arrange the reconstructed image blocks according to the center pixel index to obtain a complete image.

[0011] Optionally, the S1 includes:

[0012] S11: Get the pixels of the image, initialize the pixel set and the transfer set:

[0013] Initialize an empty transfer collection ;

[0014] Initialize an empty pixel set ;

[0015] Randomly select a pixel in the image and mark it, and put it into the pixel set as the initial pixel ;

[0016] S12: Select pixel features of the image and calculate the similarity between pixels based on the pixel features:

[0017] First, the pixel features are selected as RGB space, from the pixel set Take an initial pixel from , put it in the transfer collection ;

[0018] In the image, traverse the initial pixels The neighborhood pixels and the initial pixels are calculated Similarity:

[0019] ;

[0020] in, Represents the initial pixel and neighborhood pixels The similarity of Represents pixels The red, green, and blue components in the RGB space, Represents the neighborhood pixels Red, green and blue components in RGB space;

[0021] Set the threshold of similarity between pixels to ;

[0022] if , represents the neighborhood pixels With the initial pixel If they are not similar, the neighboring pixels Add to Pixel Collection ;

[0023] if , represents the neighborhood pixels With the initial pixel Similar, then the neighboring pixels Stay at the transit collection ;

[0024] S13: Determine pixel set Is it empty?

[0025] If the pixel set Empty, indicating a transfer collection Contains all pixels similar to the initial pixel, the transfer set If the pixels in constitute an image block, proceed to the next step;

[0026] If the pixel set If it is not empty, it means there are still neighboring pixels that are not similar to the initial pixel, then jump to step S12 and execute again;

[0027] S14: Determine whether there are unmarked pixels in the image;

[0028] If there is an unmarked pixel in the image, select the pixel and mark it, and use it as a new initial pixel, and jump to step S11 and execute again;

[0029] If there are no unlabeled pixels in the image, terminate the operation and obtain all image blocks.

[0030] Optionally, the S2 includes:

[0031] For each image block, calculate the center pixel index:

[0032] ;

[0033] in, Respectively represent the central pixel of the image block Direction and The location of the direction, Represents pixels exist Direction and The index of the direction, Indicates that the image block is The number of pixels in the direction, Indicates that the image block is The number of pixels in the direction;

[0034] Find the distance The nearest integer pixel coordinate , which is the index of the center pixel of the image block.

[0035] Optionally, the S3 includes:

[0036] S31: For each image block , a convolutional neural network with an offset is used to extract the convolution feature vector:

[0037] ;

[0038] in, is an image block The index of the pixel in is the channel index of the image block, is the channel index of the convolution output, represents the convolution kernel, represents the obtained convolution feature vector, and Respectively Direction and The offset of the direction; offset and It is learned through optimization during training;

[0039] S32: Convolution feature vector Perform point-wise convolution:

[0040] ;

[0041] in, represents the weight of point-wise convolution, Represents the feature vector obtained after point-by-point convolution;

[0042] Based on the feature vector , a deep learning network is used to classify image blocks to obtain image block categories, and the image block categories include background categories and directory categories.

[0043] Optionally, in S31, the offset and The steps learned through optimization during training include:

[0044] S311: Initialization Direction and Direction offset and ,Will and Set them to random numbers close to 0 respectively;

[0045] S312: Calculation and The gradient is:

[0046] ;

[0047] in, express Direction offset The gradient of express Direction offset The gradient of represents the loss function of the deep learning network in step S32, Express request right The partial guide, Express request right The partial derivative of

[0048] S313: Update Direction and Direction offset and :

[0049] ;

[0050] in, represents the learning rate;

[0051] Iterate step S312 and step S313 until Direction and Direction offset and convergence.

[0052] Optionally, the S4 includes:

[0053] S41: Adaptively adjust the sparse parameters based on the category of the image block, specifically:

[0054] If the image patch belongs to the target category, the sparse parameters are determined using a stepwise adjustment method;

[0055] If the image patch belongs to the background category, a sparse parameter with a higher sparsity than the target category is used;

[0056] S42: image block , use the optimization method to solve the minimum value of the sparse vector and get the minimum sparse vector :

[0057] ;

[0058] in, Represents a dictionary, represents the sparse vector to be solved, represents the sparse parameter, represents the L2 norm, Represents image patches and passes through dictionaries , sparse vector The error between the reconstructed image blocks, represents the L1 norm, Indicates that by transforming Solve for the minimum value.

[0059] Optionally, in step S41, the sparse parameter Determination, including:

[0060] If the image block belongs to the target category, the sparse parameters are determined by a stepwise adjustment method, the specific steps are as follows;

[0061] S411: Set initial sparse parameters; and use the optimization method in step S42 to solve the minimum sparse vector ;

[0062] S412: Reconstruct the image block based on the minimum sparse vector and dictionary:

[0063] ;

[0064] in, represents the reconstructed image patch;

[0065] Calculate the reconstruction error:

[0066] ;

[0067] in, represents the reconstruction error;

[0068] S413: Gradually increase the sparse parameter , plot the reconstruction error With the sparsity parameter The curve of change;

[0069] Determine the stage where the curve tends to be stable. The sparse parameter at this time is the sparse parameter of the target category. .

[0070] The present invention also provides an image encoding and decoding system with adaptive parameter adjustment, comprising:

[0071] Image acquisition module: collects the image to be processed and obtains the pixels of the image;

[0072] The image segmentation module selects pixel features of the image and segments the image based on the pixel features to obtain multiple image blocks;

[0073] Center pixel module: calculates the center pixel position of the image block and obtains the center pixel index of the image block;

[0074] Image block classification module: extract the convolution feature vector of the image block, convolve the convolution feature vector point by point to obtain the feature vector of the image block; and based on the feature vector of the image block, use the deep learning network to realize image block classification;

[0075] Sparse coding module: Determine sparse parameters based on the category of image blocks, optimize and solve the minimum sparse vector; solve the minimum sparse vector based on the sparse parameters to sparsely encode the image blocks and obtain the encoded image blocks;

[0076] Image restoration module: Based on minimum sparse vector decoding, the encoded image blocks are decoded and reconstructed to obtain reconstructed image blocks. The reconstructed image blocks are arranged according to the center pixel index to obtain a complete image.

[0077] Beneficial effects:

[0078] 1. The present invention accurately segments images based on pixel similarity features; adaptively adjusts sparse parameters based on image block categories, and uses precise sparse parameter coding for important image blocks and image blocks containing targets; uses sparse parameter coding with greater sparseness for background and clutter; and in the decoding stage, quickly arranges and restores image blocks based on the center pixel index of the image block.

[0079] 2. The image obtained after system decoding and arrangement ignores the detailed features of the background part and retains the detailed features of the target part compared to the original image; while ensuring the quality of encoding and decoding, the encoding and decoding efficiency is improved as much as possible.

[0080] 3. The present invention traverses all pixels in the image, and each image block obtained by segmentation is guaranteed to have features consistent with the initial pixels; at the same time, there is partial overlap in the pixels of different image blocks, which is convenient for classification according to the significant features of the image blocks in step S3; after encoding and decoding, these image blocks are arranged according to the center pixel index, which can avoid the problem of unmatched splicing caused by partial overlap of image blocks.

[0081] 4. The present invention adopts a convolutional neural network with an offset in step S31 to facilitate the extraction of the convolution feature vector of the irregular image block; the gradient of the offset is corrected by using the loss function and the weight of the point-by-point convolution, and the offset is continuously optimized through iterative calculation, which is conducive to obtaining the optimal offset. At this time, the sampling position of the convolution kernel can adapt to the irregular image block, thereby extracting more effective features; the convolution feature vector obtained in step S31 It can extract more effective features while reducing the amount of calculation and parameters.

[0082] 5. The present invention provides a basis for selecting sparse parameters based on image block categories, which is conducive to adaptively adjusting sparse parameters for encoding; for image blocks of target categories, a step-by-step adjustment method is adopted to obtain the optimal sparse parameters on the basis of balancing coding efficiency and reconstruction error.

[0083] 6. In step S32, the present invention performs point-by-point convolution on the convolution feature vector, which is beneficial to mixing the features between channels of the convolution feature output, and utilizing the correlation between channels to improve the feature expression capability, which is convenient for subsequent deep learning network classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 A schematic diagram of a flow chart of an image encoding and decoding method with adaptive parameter adjustment provided by an embodiment of the present invention.

[0085] Figure 2 A schematic diagram of a process for segmenting an image based on pixel features to obtain multiple image blocks provided in one embodiment of the present invention.

[0086] Figure 3 This is an image obtained by preprocessing in step S1 of an embodiment of the present invention.

[0087] Figure 4 This is a complete image obtained by processing in step S5 of an embodiment of the present invention. DETAILED DESCRIPTION

[0088] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.

[0089] Embodiment 1:

[0090] An image encoding and decoding method with adaptive parameter adjustment, such as Figure 1 As shown, the following steps are included:

[0091] S1: Get the pixels of the image; select the pixel features of the image and segment the image based on the pixel features to obtain multiple image blocks:

[0092] Preprocess the image, use Gaussian blur to denoise the image, normalize the image pixel values, and eliminate the brightness differences between different images, such as Figure 1 As shown;

[0093] S11: Get the pixels of the image, initialize the pixel set and the transfer set:

[0094] Initialize an empty pixel set ;

[0095] Randomly select a pixel in the image and mark it. This pixel is called the initial pixel and put the initial pixel into the pixel set ;

[0096] Initialize an empty transfer collection ;

[0097] S12: Select pixel features of the image and calculate the similarity between pixels based on the pixel features:

[0098] First, the pixel features are selected as RGB space, from the pixel set Take an initial pixel from , put it in the transfer collection ;

[0099] In the image, traverse the initial pixels The neighborhood pixels and the initial pixels are calculated Similarity:

[0100] ;

[0101] in, Represents pixels and neighborhood pixels The similarity of Represents pixels The red, green, and blue components in the RGB space, Represents the neighborhood pixels Red, green and blue components in RGB space;

[0102] Set the threshold of similarity between pixels to ; Represents the threshold for measuring the similarity between pixels;

[0103] if , represents the neighborhood pixels With the initial pixel If they are not similar, the neighboring pixels Add to Pixel Collection ;

[0104] if , represents the neighborhood pixels With the initial pixel Similar, then the neighboring pixels Stay at the transit collection ;

[0105] S13: Determine pixel set Is it empty?

[0106] If the pixel set Empty, indicating a transfer collection Contains all neighboring pixels similar to the initial pixel, the transfer set The pixels in constitute an image block, and the process jumps to step S14 for execution;

[0107] If the pixel set If it is not empty, it means there are still neighboring pixels that are not similar to the initial pixel, then jump to step S12 for execution;

[0108] S14: Determine whether there are unmarked pixels in the image;

[0109] If there is an unmarked pixel in the image, select the pixel and mark it, use the pixel as the new initial pixel, and jump to step S11 to execute again;

[0110] If there are no unlabeled pixels in the image, terminate the operation and record the obtained image block;

[0111] In the embodiment of the present invention, Figure 1 The image shown is obtained by the preprocessing in step S1; after Gaussian blur denoising and image pixel value normalization, the target in the obtained image is clear and the brightness is appropriate.

[0112] S2: For each image block, calculate the center pixel index:

[0113] ;

[0114] in, Respectively represent the central pixel of the image block Direction and The location of the direction, Represents pixels exist Direction and The index of the direction, Indicates that the image block is The number of pixels in the direction, Indicates that the image block is The number of pixels in the direction;

[0115] Find the distance The nearest integer pixel coordinate , which is the index of the center pixel of the image block;

[0116] In the embodiment of the present invention, the central pixel of the image block is calculated. Direction and Direction location Not necessarily an integer, the image pixel index is an integer. The rounding operation results in the index of the center pixel of the image block.

[0117] S3: extracting a feature vector for each image block; and classifying the image block based on the features of the image block to obtain an image block category;

[0118] S31: For each image block , a convolutional neural network with an offset is used to extract the convolution feature vector:

[0119] ;

[0120] in, is an image block The index of the pixel in is the channel index of the image block, is the channel index of the convolution output, represents the convolution kernel, represents the obtained convolution feature vector, and Respectively Direction and Direction offset;

[0121] Offset and It is obtained through optimization learning during the training process, including:

[0122] S311: Initialization Direction and Direction offset and ,Will and Set them to random numbers close to 0 respectively;

[0123] S312: Calculation and The gradient is:

[0124] ;

[0125] in, express Direction offset The gradient of express Direction offset The gradient of represents the loss function of the deep learning network in step S32, Express request right The partial guide, Express request right The partial derivative of

[0126] S313: Update Direction and Direction offset and :

[0127] ;

[0128] in, represents the learning rate;

[0129] Iterate step S312 and step S313 until Direction and Direction offset and convergence.

[0130] S32: Convolution feature vector Perform point-wise convolution:

[0131] ;

[0132] in, represents the weight of point-wise convolution, Represents the feature vector obtained after point-by-point convolution;

[0133] Based on the feature vector , a deep learning network is used to classify image blocks to obtain image block categories, and the image block categories include background categories and directory categories.

[0134] S4: Based on the category of the image block, the sparse parameters are adaptively adjusted; based on the sparse parameters, the minimum sparse vector is solved and the image block is sparsely encoded to obtain the encoded image block:

[0135] S41: Adaptively adjust the sparse parameters based on the category of the image block, specifically:

[0136] If the image patch belongs to the target category, the sparse parameters are determined using a stepwise adjustment method;

[0137] If the image patch belongs to the background category, a sparse parameter with a higher sparsity than the target category is used;

[0138] S411: Set initial sparse parameters; and use the optimization method in step S42 to solve the minimum sparse vector ;

[0139] S412: Reconstruct the image block based on the minimum sparse vector and the dictionary to obtain a reconstructed image block:

[0140] ;

[0141] in, represents the reconstructed image patch;

[0142] Calculate the reconstruction error:

[0143] ;

[0144] in, represents the reconstruction error;

[0145] S413: Gradually increase the sparse parameter , plot the reconstruction error With the sparsity parameter The curve of change;

[0146] Determine the stage where the curve tends to be stable, and the sparse parameters at this time are the sparse parameters of the target category.

[0147] S42: image block , use the optimization method to solve the minimum value of the sparse vector and get the minimum sparse vector:

[0148] ;

[0149] in, Represents a dictionary, represents the sparse vector to be solved, represents the sparse parameter, represents the L2 norm, Represents image patches and passes through dictionaries , sparse vector The error between the reconstructed image blocks, represents the L1 norm, Indicates that by transforming Solve for the minimum value.

[0150] S5: Decode and reconstruct the encoded image block based on the minimum sparse vector to obtain a reconstructed image block, and arrange the reconstructed image block according to the center pixel index of the image block obtained in step S2 to obtain a complete image, such as Figure 4 shown.

[0151] In the embodiment of the present invention, step S4 adaptively adjusts the sparse parameters based on the category of the image block. For the background image block, unimportant detail features can be ignored, and a sparse parameter with a larger sparsity is used; for the target image block, detail features cannot be omitted, and a sparse parameter with a smaller sparsity is used. The sparse parameters obtained by step S5 are Figure 4 In the image, the target is clear, the background is blurred, and the target features are more prominent.

[0152] Embodiment 2:

[0153] The present invention also provides an image encoding and decoding system with adaptive parameter adjustment, comprising the following five modules:

[0154] Image acquisition module: collects the image to be processed and obtains the pixels of the image;

[0155] Image segmentation module: selects pixel features of the image and segments the image based on the pixel features to obtain multiple image blocks;

[0156] Center pixel module: calculates the center pixel position of the image block and obtains the center pixel index of the image block;

[0157] Image block classification module: extract the convolution feature vector of the image block, convolve the convolution feature vector point by point to obtain the feature vector of the image block; and based on the feature vector of the image block, use the deep learning network to realize image block classification;

[0158] Sparse coding module: Determine sparse parameters based on the category of image blocks, optimize and solve the minimum sparse vector; solve the minimum sparse vector based on the sparse parameters to sparsely encode the image blocks and obtain the encoded image blocks;

[0159] Image restoration module: Based on minimum sparse vector decoding, the encoded image blocks are decoded and reconstructed to obtain reconstructed image blocks. The reconstructed image blocks are arranged according to the center pixel index to obtain a complete image.

[0160] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0162] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An image encoding and decoding method with adaptive parameter adjustment, characterized in that: The method comprises: S1: Obtain pixels of an image; select pixel features of the image, and segment the image based on the pixel features to obtain multiple image blocks; S2: For each image block, calculate the center pixel index; S3: extracting a feature vector for each image block; and classifying the image block based on the feature vector of the image block to obtain an image block category; S4: Adaptively adjust the sparse parameters based on the category of the image block; solve the minimum sparse vector based on the sparse parameters and perform sparse coding on the image block to obtain the coded image block; S5: Decode and reconstruct the encoded image blocks based on the minimum sparse vector to obtain reconstructed image blocks, and arrange the reconstructed image blocks according to the center pixel index to obtain a complete image.

2. The image encoding and decoding method with adaptive parameter adjustment according to claim 1, characterized in that: The step S1 comprises: S11: Get the pixels of the image, initialize the pixel set and the transfer set: Initialize an empty transfer collection ; Initialize an empty pixel set ; Randomly select a pixel in the image and mark it, and put it into the pixel set as the initial pixel ; S12: Select pixel features of the image and calculate the similarity between pixels based on the pixel features: First, the pixel features are selected as RGB space, from the pixel set Take an initial pixel from , put it in the transfer collection ; In the image, traverse the initial pixels The neighborhood pixels and the initial pixels are calculated Similarity in RGB space: ; in, Represents the initial pixel and neighborhood pixels The similarity of Represents the initial pixels The red, green, and blue components in the RGB space, Represents the neighborhood pixels Red, green and blue components in RGB space; Set the threshold of similarity between pixels to ; if , represents the neighborhood pixels With the initial pixel If they are not similar, the neighboring pixels Add to Pixel Collection ; if , represents the neighborhood pixels With the initial pixel Similar, then the neighboring pixels Stay at the transit collection ; S13: Determine pixel set Whether it is empty; If the pixel set Empty, indicating a transfer collection Contains all neighboring pixels similar to the initial pixel, the transfer set If the pixels in constitute an image block, proceed to the next step; If the pixel set If it is not empty, it means there are still neighboring pixels that are not similar to the initial pixel, then jump to step S12 and execute again; S14: Determine whether there are unmarked pixels in the image; If there is an unmarked pixel in the image, select the pixel and mark it, and use it as a new initial pixel, and jump to step S11 and execute again; If there are no unlabeled pixels in the image, terminate the operation and obtain all image blocks.

3. The image encoding and decoding method with adaptive parameter adjustment according to claim 2, characterized in that: The S2 includes: For each image block, calculate the center pixel index: ; in, Respectively represent the central pixel of the image block Direction and The position of the direction, Represents pixels exist Direction and The index of the direction, Indicates that the image block is The number of pixels in the direction, Indicates that the image block is The number of pixels in the direction; Find the distance The nearest integer pixel coordinate , which is the index of the center pixel of the image block.

4. The image encoding and decoding method with adaptive parameter adjustment according to claim 1, characterized in that: The S3 includes: S31: For each image block , a convolutional neural network with an offset is used to extract the convolution feature vector: ; in, is an image block The index of the pixel in is the channel index of the image block, is the channel index of the convolution output, represents the convolution kernel, represents the obtained convolution feature vector, and Respectively Direction and The offset of the direction; offset and It is learned through optimization during training; S32: Convolution feature vector Perform point-by-point convolution to obtain the feature vector: ; in, represents the weight of point-wise convolution, Represents the feature vector obtained after point-by-point convolution; Based on the feature vector , a deep learning network is used to classify image blocks to obtain image block categories, and the image block categories include background categories and directory categories.

5. The image encoding and decoding method with adaptive parameter adjustment according to claim 4, characterized in that: In S31, the offset and The steps learned through optimization during training specifically include: S311: Initialization Direction and Direction offset and ,Will and Set them to random numbers close to 0 respectively; S312: Calculation and The gradient is: ; in, express Direction offset The gradient of express Direction offset The gradient of represents the loss function of the deep learning network in step S32, Express request right The partial guide, Express request right The partial derivative of S313: Update Direction and Direction offset and : ; in, represents the learning rate; Iterate step S312 and step S313 until Direction and Direction offset and convergence.

6. The image encoding and decoding method with adaptive parameter adjustment according to claim 4, characterized in that: The step S4 comprises: S41: Adaptively adjust the sparse parameters based on the category of the image block, specifically: If the image patch belongs to the target category, the sparse parameters are determined using a stepwise adjustment method; If the image patch belongs to the background category, a sparse parameter with a higher sparsity than the target category is used; S42: image block , use the optimization method to solve the minimum value of the sparse vector and get the minimum sparse vector : ; in, Represents a dictionary, represents a sparse vector, represents the sparse parameter, represents the L2 norm, Represents image patches and passes through dictionaries , sparse vector The error between the reconstructed image blocks, represents the L1 norm, Indicates that by transforming Solve for the minimum value.

7. The image encoding and decoding method with adaptive parameter adjustment according to claim 6, characterized in that: The S41 includes: If the image block belongs to the target category, the sparse parameters are determined by a stepwise adjustment method, the specific steps are as follows; S411: Set initial sparse parameters; and use the optimization method in step S42 to solve the minimum sparse vector ; S412: Reconstruct the image block based on the minimum sparse vector and the dictionary to obtain a reconstructed image block: ; in, represents the reconstructed image patch; Calculate the reconstruction error: ; in, represents the reconstruction error; S413: Gradually increase the sparse parameter , plot the reconstruction error With the sparsity parameter The curve of change; Determine the stage where the curve tends to be stable, and the sparse parameters at this time are the sparse parameters of the target category.

8. An image encoding and decoding system with adaptive parameter adjustment, characterized in that: include: Image acquisition module: collects the image to be processed and obtains the pixels of the image; Image segmentation module: selects pixel features of the image and segments the image based on the pixel features to obtain multiple image blocks; Center pixel module: calculates the center pixel position of the image block and obtains the center pixel index of the image block; Image block classification module: extract the convolution feature vector of the image block, convolve the convolution feature vector point by point to obtain the feature vector of the image block; and based on the feature vector of the image block, use the deep learning network to realize image block classification; Sparse coding module: Determine the sparse parameters based on the category of the image block and optimize the solution of the minimum sparse vector; Based on the sparse parameters, the minimum sparse vector is solved to sparsely encode the image block to obtain the encoded image block; Image restoration module: Based on minimum sparse vector decoding, the encoded image blocks are decoded and reconstructed to obtain reconstructed image blocks. The reconstructed image blocks are arranged according to the center pixel index to obtain a complete image. To implement the image encoding and decoding method with adaptive parameter adjustment as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Block adaptive carton image compression method based on dictionary learning

    CN113112557A

  • Image precoding method based on attention mechanism

    CN119011845A