Image processing method and image processing apparatus

By optimizing the quantization table using a co-evolutionary framework and combining DCT transform and crossover mutation operators, the problems of uneven bitrate distribution and inaccurate image quality evaluation in JPEG compressors are solved, achieving uniform bitrate and high-quality image compression.

CN116248880BActive Publication Date: 2026-05-01SUNGROW POWER SUPPLY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUNGROW POWER SUPPLY CO LTD
Filing Date
2022-12-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, JPEG compressors cannot achieve uniform bitrate distribution and high image quality optimization during image compression, resulting in high computational complexity and inaccurate image quality evaluation.

Method used

A co-evolutionary framework is used to optimize the quantization table for multiple objectives. Through DCT transformation and crossover mutation operators, a DCT subband similarity table and a bitrate lookup table are constructed. Combining convex hull and constraint environment selection strategies, the final quantization table is determined to compress the image.

Benefits of technology

It achieves uniform bitrate distribution and high image quality in compressed images, solves the problems of uneven bitrate distribution and inaccurate image quality evaluation in JPEG compressors, and improves image compression efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248880B_ABST
    Figure CN116248880B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and an image processing device, and belongs to the technical field of image processing. The image processing method comprises the following steps: performing DCT transformation on an original image, and determining a DCT subband similarity table and a code rate lookup table; determining a first population and a second population based on a default quantization table and a quantization factor; performing cross variation processing on the first population and the second population based on a target cross variation operator, obtaining a first offspring individual corresponding to the first population and a second offspring individual corresponding to the second population; evaluating the fitness values of the first offspring individual and the second offspring individual based on the DCT subband similarity table and the code rate lookup table, performing environment selection processing according to the obtained fitness values, and determining a final quantization table; and compressing the original image based on the final quantization table, and determining a compressed code stream corresponding to the original image. The method of the application can make the compressed image have a relatively uniform code rate distribution and a relatively high image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method and image processing apparatus Technical Field

[0001] This application belongs to the field of image processing technology, and in particular relates to an image processing method and an image processing apparatus. Background Technology

[0002] With the development of multimedia technology, digital images from various cameras are becoming increasingly common, posing significant challenges to disk storage and network transmission. Image compression, a crucial issue related to image storage capacity and network bandwidth consumption, has received widespread attention. Related technologies primarily optimize JPEG quantization tables by improving signal fidelity. However, improving signal fidelity does not necessarily improve visual quality, and this method cannot be optimized for specific bitrates, affecting image compression performance. Furthermore, it involves considerable computational complexity. Summary of the Invention

[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes an image processing method and an image processing apparatus, so that the compressed image obtained by compression can have both a relatively uniform bitrate distribution and high image quality.

[0004] In a first aspect, this application provides an image processing method, the method comprising:

[0005] The original image is subjected to DCT transformation to determine the DCT subband similarity table and the bitrate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion.

[0006] Based on the default quantization table and quantization factor, a first population and a second population are determined. The first population is an unconstrained population, and the second population is a population with code rate constraints.

[0007] Crossover mutation is performed on the first population and the second population based on the target crossover mutation operator to obtain the first generation individuals corresponding to the first population and the second generation individuals corresponding to the second population.

[0008] Based on the DCT subband similarity table and the code rate lookup table, the fitness values ​​of the first and second offspring individuals are evaluated, and environmental selection processing is performed based on the obtained fitness values ​​to determine the final quantization table.

[0009] The original image is compressed based on the final quantization table to determine the compressed bitstream corresponding to the original image.

[0010] According to the image processing method of this application, by using a co-evolutionary framework to iterate the quantization table based on multi-objective optimization during the image compression process to determine the final quantization table, and compressing the original image based on the final quantization table, the compressed image obtained by the final compression can have both a relatively uniform bitrate distribution and high image quality, thereby solving the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0011] According to one embodiment of this application, the step of performing DCT transformation on the original image and determining the DCT sub-band similarity table and the bitrate lookup table includes:

[0012] The original image is converted to YCbCr mode to obtain multiple image blocks;

[0013] Perform DCT transformation on the target image block among the plurality of image blocks to obtain the target discrete cosine block corresponding to the target image block;

[0014] Based on the target quantization table, the target discrete cosine block is quantized to determine the DCT subband similarity table and the bit rate lookup table; the target quantization table includes 255 quantization steps, which include quantization steps corresponding to 1-255 respectively.

[0015] According to one embodiment of this application, the step of quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table includes:

[0016] Based on the target quantization table, the target discrete cosine block is quantized to obtain a distorted image;

[0017] Based on the original image and the distorted image, determine the sub-band similarity score corresponding to the target discrete cosine block;

[0018] The similarity scores of each sub-band are weighted to determine the DSS value;

[0019] The distortion value of the compressed image is determined based on the reciprocal of the DSS value.

[0020] According to one embodiment of this application, determining the sub-band similarity score corresponding to the target discrete cosine block based on the original image and the distorted image includes:

[0021] Based on the local variance at the target location in the target sub-band of the original image and the local variance at the target location in the target sub-band of the distorted image, a first sub-band similarity value corresponding to the target location in the target sub-band is determined;

[0022] The average value of the first sub-band similarity values ​​that exceed the first threshold is calculated to determine the sub-band similarity score corresponding to the target sub-band.

[0023] According to one embodiment of this application, the step of quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table includes:

[0024] Based on the results of the DCT transformation, the DCT coefficients of all discrete cosine blocks in each frequency band are determined.

[0025] The bitrate lookup table is determined based on the number of image blocks in the original image and the DCT coefficients.

[0026] According to one embodiment of this application, the step of performing crossover and mutation processing on the first population and the second population based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population includes:

[0027] Based on the DCT subband similarity table and the bit rate lookup table, a plurality of first slopes corresponding to the target frequency band are determined. The first slope is used to characterize the relative change relationship between the distortion amplitude and the bit rate amplitude corresponding to the target frequency band.

[0028] The plurality of first slopes are sorted in descending order based on their effects;

[0029] Replace other quantization steps with the quantization step size corresponding to the first slope of the first target quantity before sorting.

[0030] According to one embodiment of this application, the fitness value evaluation of the first and second offspring individuals based on the DCT subband similarity table and the code rate lookup table, and the environment selection processing based on the obtained fitness values ​​to determine the final quantization table, includes:

[0031] The first offspring individual is processed based on the convex hull environment selection strategy to obtain the first target solution located on the convex hull;

[0032] The second offspring individual is processed based on a constraint-based environment selection strategy to obtain the second target solution corresponding to the target bitrate constraint, wherein the target bitrate is obtained from the bitrate lookup table.

[0033] Based on the first target solution and the second target solution, determine the quantization table corresponding to the iteration of the first target number;

[0034] If the target number of iterations exceeds the iteration threshold, the quantization table is determined as the final quantization table.

[0035] According to one embodiment of this application, the constraint-based environment selection strategy processes the second offspring individual to obtain a second target solution corresponding to the target bitrate constraint, including:

[0036] Determine the fitness value corresponding to each constraint region;

[0037] If the number of individuals with fitness values ​​less than the second threshold is less than the third threshold, all second offspring individuals are retained as the second target solution.

[0038] If the number of individuals with fitness values ​​less than the second threshold is not less than the third threshold, the fitness values ​​are sorted in ascending order, and the second offspring individuals corresponding to the fitness values ​​of the first second target number are determined as the second target solution.

[0039] Secondly, this application provides an image processing apparatus, the apparatus comprising:

[0040] The first processing module is used to perform DCT transformation on the original image and determine the DCT subband similarity table and the bit rate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion.

[0041] The second processing module is used to determine a first population and a second population based on a default quantization table and a quantization factor. The first population is an unconstrained population, and the second population is a population with a code rate constraint.

[0042] The third processing module is used to perform crossover and mutation processing on the first population and the second population based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population.

[0043] The fourth processing module is used to evaluate the fitness values ​​of the first and second offspring individuals based on the DCT subband similarity table and the code rate lookup table, perform environment selection processing based on the obtained fitness values, and determine the final quantization table.

[0044] The fifth processing module is used to compress the original image based on the final quantization table and determine the compressed bitstream corresponding to the original image.

[0045] According to the image processing apparatus of this application, by employing a co-evolutionary framework to iterate the quantization table based on multi-objective optimization during the image compression process to determine the final quantization table, and compressing the original image based on the final quantization table, the compressed image obtained by the final compression can have both a relatively uniform bitrate distribution and high image quality, thereby solving the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0046] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image processing method as described in the first aspect above.

[0047] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method as described in the first aspect above.

[0048] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the image processing method as described in the first aspect.

[0049] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the image processing method as described in the first aspect above.

[0050] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:

[0051] By employing a co-evolutionary framework to iterate the quantization table based on multi-objective optimization during image compression to determine the final quantization table, and then compressing the original image based on the final quantization table, the resulting compressed image can achieve both a relatively uniform bitrate distribution and high image quality. This solves the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0052] Furthermore, within the optimization framework, a simple unconstrained optimization problem (first group) and a complex constrained optimization problem (second group) are constructed. In the process of solving the problem, the simple problem assists in solving the complex problem. In the co-evolutionary framework, a rate-distortion optimal population update strategy and different environment selection strategies are applied to accelerate optimization convergence, so as to finally output a set of optimal solutions that satisfy the constraints. This optimal solution can ensure that both distortion and bitrate are within a good range.

[0053] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0054] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0055] Figure 1 is a flowchart of one of the image processing methods provided in the embodiments of this application;

[0056] Figure 2 is a second schematic flowchart of the image processing method provided in the embodiments of this application;

[0057] Figure 3 is a schematic diagram of the image processing apparatus provided in an embodiment of this application;

[0058] Figure 4 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Detailed Implementation

[0059] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0060] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0061] The image processing method, image processing apparatus, electronic device, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0062] The image processing method can be applied to the terminal, and can be executed by the hardware or software in the terminal.

[0063] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0064] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.

[0065] The image processing method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the image processing method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras, and wearable devices. The image processing method provided in this application embodiment will be described below using an electronic device as the execution subject as an example.

[0066] The image processing method of this application is described below with reference to Figures 1 and 2.

[0067] This image processing method is applied to the field of image compression, such as the compression of PNG or BMP images.

[0068] As shown in Figure 1, the image processing method includes steps 110, 120, 130, 140, and 150.

[0069] Step 110: Perform DCT transformation on the original image to determine the DCT subband similarity table and the bit rate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion.

[0070] In this step, the DCT (Discrete Cosine Transform) is also known as the Discrete Cosine Transform.

[0071] The original image is the image to be compressed. The original image is a lossless image, such as a PNG or BMP image.

[0072] After performing a discrete cosine transform on the original image, a DCT subband similarity table (DSS table) and a rate lookup table (Rate table) can be obtained.

[0073] The DCT subband similarity table is used to characterize the similarity between each subband in the distorted image obtained after DCT transformation and quantization and the original image. It can be understood that the higher the similarity, the smaller the magnitude of distortion.

[0074] The bitrate lookup table is used to represent the bitrate corresponding to each subband obtained after DCT transformation.

[0075] Here, bitrate refers to the encoding length required to encode a unit of pixel, which is the file size for storing the image.

[0076] It is understandable that DCT transformation is used to compress the original image to reduce high-frequency components and detail information, thereby reducing the image bitrate.

[0077] In some embodiments, step 110 may further include:

[0078] Convert the original image to YCbCr mode to obtain multiple image blocks;

[0079] Perform DCT transformation on the target image block in multiple image blocks to obtain the target discrete cosine block corresponding to the target image block;

[0080] Based on the target quantization table, the target discrete cosine block is quantized to determine the DCT subband similarity table and the bit rate lookup table. The target quantization table includes 255 quantization steps, which include quantization steps from 1 to 255 respectively.

[0081] In this embodiment, Y represents the luminance component in the YCbCr mode, while Cb and Cr are the two chromaticity components, respectively.

[0082] The target image patch can be any image patch from a plurality of image patches.

[0083] The target discrete cosine block is the DCT block obtained after DCT transformation.

[0084] In the actual execution process, as shown in Figure 2, the original image can be converted into YCbCr mode, the image can be divided into non-overlapping 8x8 image blocks, each image block is used as a basic processing unit, and a discrete cosine transform is performed on each image block. The image block obtained after the discrete cosine transform is the discrete cosine block corresponding to that image block.

[0085] The target quantization table includes 255 quantization steps corresponding to 1-255. In actual execution, 64 quantization steps can be randomly selected from the target quantization table to quantize the target discrete cosine block. By statistically analyzing the results after quantization, the DCT subband similarity table and the bit rate lookup table are obtained.

[0086] In some embodiments, quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table may include:

[0087] Based on the target quantization table, the target discrete cosine block is quantized to obtain a distorted image;

[0088] Based on the original image and the distorted image, determine the sub-band similarity score corresponding to the target discrete cosine block;

[0089] The similarity scores of each sub-band are weighted to determine the DSS value;

[0090] The distortion value of the compressed image is determined based on the reciprocal of the DSS value.

[0091] In this embodiment, the original image can be used as a reference image.

[0092] The distorted image is a compressed image obtained by quantizing the discrete cosine block based on the target quantization table.

[0093] Based on the results of DCT and IDCT transformations, the similarity between corresponding sub-bands in the original and distorted images can be compared to calculate the DCT sub-band similarity value for each image block, thereby determining the DCT sub-band similarity table.

[0094] In this embodiment, the DCT subband similarity table and the bitrate lookup table are determined by using the original image and the distorted image. This facilitates the evaluation of the two populations and the selection of the environment by looking up the DSS table and the Rate table during subsequent iterative optimization, thereby achieving multi-objective (i.e., distortion and bitrate) collaborative optimization.

[0095] The similarity between corresponding subbands in the reference image and the distorted image is calculated to obtain a subband similarity score. Then, the subband similarity scores are weighted to obtain the scalar DCT subband similarity (DSS) quality score.

[0096] The following explains how to determine the subband similarity score corresponding to the target discrete cosine block.

[0097] In some embodiments, determining the sub-band similarity score corresponding to the target discrete cosine block based on the original image and the distorted image may include:

[0098] Based on the local variance of the target location in the target sub-band of the original image and the local variance of the target location in the target sub-band of the distorted image, the first sub-band similarity value corresponding to the target location in the target sub-band is determined.

[0099] The average of the similarity values ​​of the first sub-band that exceed the first threshold is calculated to determine the sub-band similarity score corresponding to the target sub-band.

[0100] In this embodiment, the target sub-band can be any sub-band corresponding to the original image.

[0101] The target location can be any location within the target subband.

[0102] For example, the similarity value of the first sub-band can be determined using the following formula:

[0103]

[0104] Among them, DSS u,v (p,q) represents the similarity value of the first sub-band corresponding to the target position (p,q) in the target sub-band (u,v); σ F u,v (p,q) 2σ is the local variance at target location (p,q) within the target subband (u,v) of the original image; F’ u,v (p,q) 2 Let be the local variance at target location (p,q) in the target subband (u,v) of the distorted image; C is the numerical stability constant.

[0105] It is understandable that for the same subband, there may be multiple first subband similarity values ​​corresponding to different positions. In actual implementation, for each subband, the first subband similarity value with the highest similarity among all positions can be taken as the subband similarity score corresponding to that subband.

[0106] For example, the average of all first subband similarity values ​​exceeding the first threshold can be used as the subband similarity score corresponding to the target subband; or, the first subband similarity values ​​can be sorted in descending order, and the average of the first subband similarity values ​​at the top 5% of all positions can be used as the subband similarity score corresponding to the target subband.

[0107] Using similar steps, similarity scores can be obtained for all sub-bands in the reference image.

[0108] It should be noted that in some embodiments, different weights can be set for different sub-bands to make the results more consistent with the actual situation.

[0109] For example, different weights can be assigned to each subband similarity score, and then the 64 subband similarity scores can be weighted and calculated using the following formula:

[0110]

[0111] Where DSS is the weighted subband similarity score (i.e., DSS value), w u,v For the weights corresponding to the target subband (u,v), DSS u,v The subband similarity score is the subband similarity score corresponding to the target subband (u,v).

[0112] It is understandable that in the process of image compression, increasing or decreasing the bit rate and distortion inversely can ensure that image quality is improved while improving compression efficiency.

[0113] In this application, the distortion target (i.e., the distortion value of the compressed image) can be converted into the reciprocal of the DDS value, thereby achieving a higher bitrate and lower distortion.

[0114] For example, a distorted target can be determined using the following formula:

[0115]

[0116] Among them, D u,v (Q) represents the distorted target.

[0117] Understandably, based on the above formula, the larger the DSS value, the better the image quality, and the smaller the corresponding distortion target.

[0118] Using a similar method, the distortion targets corresponding to all subbands can be identified, and the DCT subband similarity table can be determined based on the distortion targets corresponding to all subbands.

[0119] According to the image processing method provided in the embodiments of this application, by weighting the similarity scores of each sub-band to obtain the DSS value, the precision and accuracy of image processing can be improved, and the processed image can be made more consistent with the actual situation. By taking the reciprocal of the DSS value to represent the distortion target, the bit rate and distortion can be increased or decreased inversely, thereby improving the subjective quality of the compressed image while improving the coding efficiency.

[0120] In some embodiments, quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table may include:

[0121] Based on the results of the DCT transform, the DCT coefficients of all discrete cosine blocks in each frequency band are determined.

[0122] The bitrate lookup table is determined based on the number of image patches and DCT coefficients in the original image.

[0123] In this embodiment, after the original image is divided into 8x8 blocks and subjected to DCT transformation, the DCT coefficients of all image blocks within each frequency band can be obtained, forming a corresponding histogram. Then, the distortion of each frequency band can be calculated based on the histogram. The bit rate of each frequency band can be estimated using the first-order entropy of the quantization coefficients, calculated using the following formula:

[0124]

[0125] Among them, R u,v (Q) represents the code rate corresponding to the target subband (u,v); Num blk Num represents the number of 8x8 blocks in the original image. F(u,v) This represents the number of DCT coefficients F(u,v) at position (m,n) in the target subband (u,v).

[0126] Based on similar steps, the bitrates corresponding to all subbands can be determined, and a bitrate lookup table can be determined based on the bitrates corresponding to all subbands.

[0127] Step 120: Based on the default quantization table and quantization factor, determine the first population and the second population. The first population is an unconstrained population, and the second population is a population with code rate constraints.

[0128] In this step, the quantization table can include 64 integers, with values ​​ranging from 1 to 255.

[0129] For example, the default quantization table Q can be represented as follows:

[0130]

[0131] The 64 bits in the quantization table represent 64 quantization steps. The quantization table is used to quantize DCT coefficients at different positions using different quantization steps.

[0132] The first population is an unconstrained population, representing a problem without a bitrate constraint; the second population is a bitrate-constrained population, representing a problem with a bitrate constraint.

[0133] The size of the first group can be set to be slightly smaller than the size of the second group. For example, the size of the first group N1 can be set to 16 and the size of the second group N2 can be set to 50.

[0134] The quantization factor corresponding to the first group can be determined based on the selection formula (50-(i-N2 / 2)*5), where the value of i ranges from 1 to 16.

[0135] The quantization factor corresponding to the second population can be determined based on the selection formula i*2, where the value of i ranges from 1 to 50.

[0136] Of course, in other embodiments, other values ​​may be selected based on the actual situation, and this application does not limit them.

[0137] In actual execution, two populations can be generated by scaling the default quantization table using the quantization factor method.

[0138] Step 130: Perform crossover and mutation processing on the first and second populations based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population.

[0139] In this step, it should be noted that the target crossover mutation operator is designed based on the distortion optimality principle and is used to promote the population to evolve in the direction of the optimal rate-distortion curve.

[0140] The target crossover and mutation operator includes the target crossover operator or the target mutation operator.

[0141] It should be noted that for an individual, only one operator can be selected at a time, namely, the target crossover operator or the target mutation operator.

[0142] In some embodiments, a probability factor 'a' for crossover and mutation can be defined to determine the type of the target crossover and mutation operator. Here, 'a' takes the value 0.2. Then, a random number 'b' is generated. If 'b' is less than 'a', a crossover operation is performed; otherwise, a mutation operation is performed.

[0143] During the crossover mutation process, some bits in the first and second populations can be swapped so that one individual can absorb a better quantization step size from the other individual. For example, this can greatly reduce the distortion while increasing the bit rate, or reduce the bit rate while increasing the distortion.

[0144] By performing crossover mutation on the first population Pop1 and the second population Pop2, two new populations can be obtained, namely the first generation individuals and the second generation individuals; wherein, the first generation individuals are obtained from the first population, and the second generation individuals are obtained from the second population.

[0145] That is, the offspring produced by the crossover mutation of the first population Pop1 is the first offspring individual off1, and the offspring produced by the crossover mutation of the second population Pop2 is the second offspring individual off2.

[0146] In some embodiments, for unconstrained problems, crossover mutation can be performed first to obtain the first offspring individual off1, and then the first offspring individual off1 can be merged with the second population Pop2 as the initial population for constrained problems, and crossover mutation operation can be performed. The first offspring individual off1 can accelerate the convergence speed of the second population Pop2.

[0147] In actual implementation, the relative change relationship between bitrate and distortion can be established to characterize the degree of crossover variation. For example, an objective function can be set to characterize the relative change relationship between bitrate and distortion.

[0148] The following section uses the objective function as the slope as an example to explain the specific implementation process of this step.

[0149] In some embodiments, step 130 may include:

[0150] Based on the DCT subband similarity table and the code rate lookup table, multiple first slopes corresponding to the target frequency band are determined. The first slope is used to characterize the relative change relationship between the distortion amplitude and the code rate amplitude corresponding to the target frequency band.

[0151] Sort multiple first slopes in descending order based on their effects;

[0152] Replace other quantization steps with the quantization step size corresponding to the first slope of the first target quantity before sorting.

[0153] In this embodiment, a first slope can be defined to measure the gradient of changes in bit rate and distortion in the target frequency band. The first slope can be expressed as follows:

[0154]

[0155] Where J(u,v) is the first slope; D(Q) is the change in distortion target corresponding to the target subband (u,v), that is, the change in distortion target when the quantization step size Q(u,v) on the target subband (u,v) in the quantization table changes to Q'(u,v); ΔR(Q) is the change in bit rate corresponding to the target subband (u,v), that is, the change in bit rate when the quantization step size Q(u,v) on the target subband (u,v) in the quantization table changes to Q'(u,v).

[0156] Understandably, for an individual with 64 quantization steps, the corresponding 64 first slopes can be calculated.

[0157] In some embodiments, a relevant threshold can be set to filter out the optimal partial first slope from multiple first slopes, and the quantization step size of other individuals can be replaced based on the quantization step size corresponding to the partial first slope.

[0158] It should be noted that the mutation operator modifies a single individual. Since the quantization step size is a fixed integer ranging from 1 to 255, for each frequency band, in addition to its own quantization step size, there are 254 quantization step sizes to choose from. Therefore, 254 first slopes can be calculated for each frequency band. The calculation formula is the same as that used in the crossover operator, and will not be elaborated here.

[0159] Then, the 254 first slopes are sorted, the frequency band with the best number of first targets is selected, and the quantization step size of other frequency bands is replaced with the best quantization step size.

[0160] It should be noted that, in the process of multi-objective (distortion and bitrate) optimization, the following optimization formula can be defined:

[0161]

[0162] Among them, R i This represents the range of possible values ​​for the bitrate of the i-th feasible domain.

[0163] The overall bitrate and distortion of an image can be obtained by summing the bitrate and distortion of each frequency band, as defined by the following formula:

[0164]

[0165] Where D u,v (Q) represents the distortion at the target frequency band (u,v), R u,v (Q) is the code rate at the target frequency band (u,v), and D u,v (Q) and R u,v The process of determining (Q) has been explained above and will not be repeated here.

[0166] According to the image processing method provided in the embodiments of this application, the gradient of the change in bit rate and distortion of the target frequency band is measured by defining a first slope, which facilitates the selection of the quantization step size with the best cross-mutation effect in the cross-mutation, thereby avoiding a large increase in distortion while the bit rate decreases, or a large increase in bit rate while the distortion decreases, so as to achieve the best balance between bit rate and distortion at the same time, so that the compressed image obtained subsequently has high subjective quality within the feasible bit rate range.

[0167] Step 140: Based on the DCT subband similarity table and code rate lookup table, evaluate the fitness values ​​of the first and second generation individuals, perform environment selection processing based on the obtained fitness values, and determine the final quantization table;

[0168] In this step, the final quantization table is the quantization table used to quantize the DCT blocks obtained after DCT conversion of the original image.

[0169] The final quantization table was determined after multiple iterations based on the collaborative framework.

[0170] Referring to Figure 2, after obtaining the first and second offspring individuals, the fitness values ​​of the first and second offspring individuals are evaluated by searching the DSS table and the Rate table, and environmental selection is performed. Then, based on the results of environmental selection, multiple iterations are performed to determine the final quantification table.

[0171] In some embodiments, step 140 may include:

[0172] The first generation individual is processed based on the convex hull environment selection strategy to obtain the first target solution located on the convex hull;

[0173] The constraint-based environment selection strategy is used to process the second generation individuals, and the second target solution corresponding to the target bitrate constraint is obtained. The target bitrate is obtained from the bitrate lookup table.

[0174] The quantization table corresponding to the iteration of the first objective number is determined based on the first objective solution and the second objective solution;

[0175] If the target number of iterations exceeds the iteration threshold, the quantization table will be determined as the final quantization table.

[0176] In this embodiment, the convex hull is the intersection S of all convex sets containing X in a real vector space V for a given set X.

[0177] The first objective solution is the offspring individual used for the next iteration.

[0178] It is understandable that using a convex hull-based environment selection strategy for the first generation of individuals, without bitrate constraints, aims to achieve a lower decoding rate and less distortion.

[0179] Furthermore, with the same decoding rate on the convex hull, the distortion will be lower, or with the same distortion, the bitrate will be lower. According to Shannon's rate-distortion theory, the rate-distortion curve is convex and monotonically decreasing. However, the solutions obtained from the first front surface (i.e., the first offspring individuals) after non-dominated sorting cannot be guaranteed to all lie on the convex hull. By using convex hull-based environmental selection to filter the solutions on the first front surface, only the solutions on the convex hull are selected as the first target solutions for the next iteration, so that the solutions used for the next iteration can achieve relatively low decoding rate and distortion.

[0180] The second objective solution is the offspring individual used for the next iteration.

[0181] In some embodiments, processing the second offspring individual using a constraint-based environment selection strategy to obtain the second target solution corresponding to the target bitrate constraint may include:

[0182] Determine the fitness value corresponding to each constraint region;

[0183] If the number of individuals with fitness values ​​less than the second threshold is less than the third threshold, all second-generation individuals are retained as the second objective solution.

[0184] If the number of individuals with fitness values ​​less than the second threshold is not less than the third threshold, the fitness values ​​are sorted in ascending order, and the second offspring individuals corresponding to the fitness values ​​of the first second target number are determined as the second target solution.

[0185] In this embodiment, the values ​​of the second threshold and the third threshold can be user-defined, such as setting the second threshold to 1. This application does not impose any limitations on this.

[0186] For the second generation individuals, a constraint-based environment selection strategy can be used to select a set of solutions that meet the conditions according to different bitrate constraints.

[0187] The most important step in constrained environment selection is the evaluation of fitness values.

[0188] First, we can calculate the constraint violation degree of the solution for each constraint region.

[0189] For example, the code rate constraint region corresponding to the current iteration number can be set to 0.2±0.05, 0.6±0.05, 1±0.05 and 1.4±0.05 to determine the constraint region to which each solution belongs, and then the dominance relationship between solutions can be calculated based on the two objective values ​​of each solution.

[0190] The formula for calculating the fitness value is as follows:

[0191]

[0192] Where fitness(x) is the fitness value, R y S represents the total number of solutions dominated by all y. x x represents the total number of solutions dominated by x, and x' represents the nearest neighbor solution of x.

[0193] After calculating the fitness value for each solution, the fitness values ​​of each solution are sorted.

[0194] Determine the number N of individuals with a fitness value less than 1.

[0195] If N is less than the third threshold N1, then all second-generation individuals are retained as the second objective solution;

[0196] If N is greater than the third threshold N1, then the N second offspring individuals are truncated, and the top N1 solutions in terms of fitness value are selected as the second target solutions.

[0197] Understandably, a smaller fitness value indicates better image quality.

[0198] After obtaining the first and second objective solutions, the offspring individuals obtained after environmental selection can be used as the quantization table for the (gen+1)th iteration to determine whether the number of iterations is greater than the set iteration threshold MaxGene.

[0199] If the current iteration number is not less than MaxGene, then the result of the constrained environment selection under the current iteration number is output as the solution PF of the first frontier, and the solution PF is the final quantization table that is finally determined.

[0200] If the current iteration count is less than MaxGene, then continue repeating steps 130 and 140 until the iteration count reaches the iteration threshold MaxGene.

[0201] According to the image processing method provided in the embodiments of this application, a simple unconstrained optimization problem (first group) and a complex constrained optimization problem (second group) are constructed in the optimization framework. In the process of solving the problem, the simple problem is used to assist in solving the complex problem. In the co-evolutionary framework, the rate-distortion optimal population update strategy and different environment selection strategies are applied to accelerate the optimization convergence, so as to finally output a set of optimal solutions that satisfy the constraints. The optimal solution can ensure that the distortion and bit rate are both within a good range.

[0202] Step 150: Compress the original image based on the final quantization table and determine the compressed bitstream corresponding to the original image.

[0203] In this step, the final quantization table is the solution PF determined in step 140.

[0204] By using PF as the final quantization table to compress the original image, a compressed bitstream that meets the bitrate constraints can be obtained, and the distortion of the compressed bitstream is relatively small.

[0205] Referring again to Figure 2, in the actual compression process of the original image, the original image can first be converted to YCbCr mode, and then the three components can be processed independently. Specifically, firstly, DCT transformation is performed on each of the multiple image blocks to obtain the corresponding DCT block, and then quantization processing based on the final quantization table is performed on the DCT block. Then, the quantized DCT block is scanned in a Z-shape to obtain a one-dimensional symbol string, and run-length encoding is performed on the one-dimensional symbol string to obtain the final binary bitstream, thus completing the encoding process and obtaining the compressed bitstream.

[0206] The final quantization table used in the quantization process is obtained by iterative optimization based on the co-evolutionary framework described in any of the above embodiments.

[0207] During the research and development process, the inventors discovered that in related technologies, image quantization is mainly achieved by performing a threshold operation on the transformed DCT coefficients, setting coefficients below a certain value to zero, thereby achieving image compression. Then, the compressed data is subjected to inverse DCT operation to obtain the compressed image. However, this compressed image cannot achieve the optimal level of both the compressed bitrate and the compressed image quality at the same time.

[0208] In this application, the default quantization table of JPEG is optimized from the perspective of co-evolution. The fitness value of each quantization table is evaluated using DSS, which can truly reflect the subjective quality of the human visual system, to limit the distortion of image compression. A co-evolutionary framework based on two populations is constructed to accelerate algorithm convergence. In this framework, a constrained optimization problem with bitrate constraints is solved with the help of an unconstrained optimization problem. Through the co-evolutionary algorithm, solutions within each feasible bitrate range can be obtained, so that the compressed image obtained in the final compressed image can have both a relatively uniform bitrate distribution and high image quality. This solves the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0209] According to the image processing method provided in the embodiments of this application, by using a co-evolutionary framework to iterate the quantization table based on multi-objective optimization during the image compression process to determine the final quantization table, and compressing the original image based on the final quantization table, the compressed image obtained by the final compression can have both a relatively uniform bitrate distribution and high image quality, thereby solving the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0210] The image processing method provided in this application can be executed by an image processing device. This application uses an image processing device executing the image processing method as an example to illustrate the image processing device provided in this application.

[0211] This application also provides an image processing apparatus.

[0212] As shown in Figure 3, the image processing device includes: a first processing module 310, a second processing module 320, a third processing module 330, a fourth processing module 340, and a fifth processing module 350.

[0213] The first processing module 310 is used to perform DCT transformation on the original image and determine the DCT subband similarity table and the bit rate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion.

[0214] The second processing module 320 is used to determine a first population and a second population based on a default quantization table and a quantization factor. The first population is an unconstrained population, and the second population is a population with a code rate constraint.

[0215] The third processing module 330 is used to perform crossover and mutation processing on the first population and the second population based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population.

[0216] The fourth processing module 340 is used to evaluate the fitness values ​​of the first and second generation individuals based on the DCT subband similarity table and the code rate lookup table, perform environment selection processing based on the obtained fitness values, and determine the final quantization table.

[0217] The fifth processing module 350 is used to compress the original image based on the final quantization table and determine the compressed bitstream corresponding to the original image.

[0218] According to the image processing apparatus provided in the embodiments of this application, by using a co-evolutionary framework to iterate the quantization table based on multi-objective optimization during the image compression process to determine the final quantization table, and compressing the original image based on the final quantization table, the compressed image obtained by the final compression can have both a relatively uniform bitrate distribution and high image quality, thereby solving the technical problems of uneven bitrate distribution and inaccurate image quality evaluation caused by scaling quantization factors in standard JPEG compressors.

[0219] In some embodiments, the first processing module 310 may also be used for:

[0220] Convert the original image to YCbCr mode to obtain multiple image blocks;

[0221] Perform DCT transformation on the target image block in multiple image blocks to obtain the target discrete cosine block corresponding to the target image block;

[0222] Based on the target quantization table, the target discrete cosine block is quantized to determine the DCT subband similarity table and the bit rate lookup table. The target quantization table includes 255 quantization steps, which include quantization steps from 1 to 255 respectively.

[0223] In some embodiments, the first processing module 310 may also be used for:

[0224] Based on the target quantization table, the target discrete cosine block is quantized to obtain a distorted image;

[0225] Based on the original image and the distorted image, determine the sub-band similarity score corresponding to the target discrete cosine block;

[0226] The similarity scores of each sub-band are weighted to determine the DSS value;

[0227] The distortion value of the compressed image is determined based on the reciprocal of the DSS value.

[0228] In some embodiments, the first processing module 310 may also be used for:

[0229] Based on the local variance of the target location in the target sub-band of the original image and the local variance of the target location in the target sub-band of the distorted image, the first sub-band similarity value corresponding to the target location in the target sub-band is determined.

[0230] The average of the similarity values ​​of the first sub-band that exceed the first threshold is calculated to determine the sub-band similarity score corresponding to the target sub-band.

[0231] In some embodiments, the first processing module 310 may also be used for:

[0232] Based on the results of the DCT transform, the DCT coefficients of all discrete cosine blocks in each frequency band are determined.

[0233] The bitrate lookup table is determined based on the number of image patches and DCT coefficients in the original image.

[0234] In some embodiments, the third processing module 330 can also be used for:

[0235] Based on the DCT subband similarity table and the code rate lookup table, multiple first slopes corresponding to the target frequency band are determined. The first slope is used to characterize the relative change relationship between the distortion amplitude and the code rate amplitude corresponding to the target frequency band.

[0236] Sort multiple first slopes in descending order based on their effects;

[0237] Replace other quantization steps with the quantization step size corresponding to the first slope of the first target quantity before sorting.

[0238] In some embodiments, the fourth processing module 340 can also be used for:

[0239] The first generation individual is processed based on the convex hull environment selection strategy to obtain the first target solution located on the convex hull;

[0240] The constraint-based environment selection strategy is used to process the second generation individuals, and the second target solution corresponding to the target bitrate constraint is obtained. The target bitrate is obtained from the bitrate lookup table.

[0241] The quantization table corresponding to the iteration of the first objective number is determined based on the first objective solution and the second objective solution;

[0242] If the target number of iterations exceeds the iteration threshold, the quantization table will be determined as the final quantization table.

[0243] In some embodiments, the fourth processing module 340 can also be used for:

[0244] Determine the fitness value corresponding to each constraint region;

[0245] If the number of individuals with fitness values ​​less than the second threshold is less than the third threshold, all second-generation individuals are retained as the second objective solution.

[0246] If the number of individuals with fitness values ​​less than the second threshold is not less than the third threshold, the second offspring individuals corresponding to the fitness values ​​of the first second objective number are determined as the second objective solution.

[0247] The image processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.

[0248] The image processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.

[0249] The image processing apparatus provided in this application embodiment can implement the various processes implemented in the method embodiments of Figures 1 to 2. To avoid repetition, these processes will not be described again here.

[0250] In some embodiments, as shown in FIG4, this application embodiment also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, it implements the various processes of the above-described image processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0251] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0252] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described image processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0253] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0254] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described image processing method.

[0255] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0256] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described image processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0257] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0258] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0259] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0260] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0261] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0262] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. An image processing method, characterized in that, include: The original image is subjected to DCT transformation to determine the DCT subband similarity table and the bitrate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion. Based on the default quantization table and quantization factor, a first population and a second population are determined. The first population is an unconstrained population, and the second population is a population with code rate constraints. Crossover mutation is performed on the first population and the second population based on the target crossover mutation operator to obtain the first generation individuals corresponding to the first population and the second generation individuals corresponding to the second population. Based on the DCT subband similarity table and the code rate lookup table, the fitness values ​​of the first and second offspring individuals are evaluated, and environmental selection processing is performed based on the obtained fitness values ​​to determine the final quantization table. Based on the final quantization table, the original image is compressed to determine the compressed bitstream corresponding to the original image; The process of evaluating the fitness values ​​of the first and second offspring individuals based on the DCT subband similarity table and the bitrate lookup table, and performing environment selection processing based on the obtained fitness values ​​to determine the final quantization table includes: processing the first offspring individuals based on a convex hull environment selection strategy to obtain a first target solution located on the convex hull; processing the second offspring individuals based on a constraint environment selection strategy to obtain a second target solution corresponding to a target bitrate constraint, wherein the target bitrate is obtained from the bitrate lookup table; determining the quantization table corresponding to the current iteration number based on the first and second target solutions; and determining the quantization table as the final quantization table if the current iteration number exceeds an iteration threshold. The process of processing the second offspring individuals based on a constraint environment selection strategy to obtain the second target solution corresponding to the target bitrate constraint includes: determining the fitness value corresponding to each constraint region; retaining all second offspring individuals as the second target solution if the number of fitness values ​​less than a second threshold is less than a third threshold; and sorting the fitness values ​​in ascending order if the number of fitness values ​​less than a second threshold is not less than a third threshold, and determining the second offspring individuals corresponding to the fitness values ​​of the first second target number as the second target solution.

2. The image processing method according to claim 1, characterized in that, The step of performing DCT transformation on the original image to determine the DCT subband similarity table and the bitrate lookup table includes: converting the original image to YCbCr mode to obtain multiple image blocks; performing DCT transformation on a target image block among the multiple image blocks to obtain a target discrete cosine block corresponding to the target image block; and quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table; the target quantization table includes 255 quantization steps, and the 255 quantization steps include quantization steps corresponding to 1-255 respectively.

3. The image processing method according to claim 2, characterized in that, The step of quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the bitrate lookup table includes: quantizing the target discrete cosine block based on the target quantization table to obtain a distorted image; determining the subband similarity score corresponding to the target discrete cosine block based on the original image and the distorted image; weighting each subband similarity score to determine the DSS value; and determining the distortion value of the compressed image based on the reciprocal of the DSS value.

4. The image processing method according to claim 3, characterized in that, The step of determining the sub-band similarity score corresponding to the target discrete cosine block based on the original image and the distorted image includes: determining a first sub-band similarity value corresponding to the target position in the target sub-band based on the local variance at the target position in the target sub-band of the original image and the local variance at the target position in the target sub-band of the distorted image; and averaging the first sub-band similarity values ​​that exceed a first threshold to determine the sub-band similarity score corresponding to the target sub-band.

5. The image processing method according to claim 2, characterized in that, The step of quantizing the target discrete cosine block based on the target quantization table to determine the DCT subband similarity table and the code rate lookup table includes: determining the DCT coefficients of all discrete cosine blocks in each frequency band based on the result of the DCT transform; and determining the code rate lookup table based on the number of image blocks in the original image and the DCT coefficients.

6. The image processing method according to any one of claims 1-5, characterized in that, The step of performing crossover and mutation processing on the first and second populations based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population includes: determining multiple first slopes corresponding to the target frequency band based on the DCT subband similarity table and the bitrate lookup table, wherein the first slope is used to characterize the relative change relationship between the distortion amplitude and the bitrate amplitude corresponding to the target frequency band; sorting the multiple first slopes in descending order based on effect; and replacing other quantization steps with the quantization step size corresponding to the first slope of the first target quantity before sorting.

7. An image processing apparatus, characterized in that, include: The first processing module is used to perform DCT transformation on the original image and determine the DCT subband similarity table and the bit rate lookup table. The DCT subband similarity table is used to characterize the degree of image distortion. The second processing module is used to determine a first population and a second population based on a default quantization table and a quantization factor. The first population is an unconstrained population, and the second population is a population with a code rate constraint. The third processing module is used to perform crossover and mutation processing on the first population and the second population based on the target crossover and mutation operator to obtain the first offspring individuals corresponding to the first population and the second offspring individuals corresponding to the second population. The fourth processing module is used to evaluate the fitness values ​​of the first and second offspring individuals based on the DCT subband similarity table and the code rate lookup table, perform environment selection processing based on the obtained fitness values, and determine the final quantization table. The fifth processing module is used to compress the original image based on the final quantization table and determine the compressed bitstream corresponding to the original image; the fourth processing module is specifically used to: process the first child individual based on the convex hull environment selection strategy to obtain the first target solution located on the convex hull; process the second child individual based on the constraint environment selection strategy to obtain the second target solution corresponding to the target bitrate constraint, wherein the target bitrate is obtained from the bitrate lookup table; and determine the quantization table corresponding to the current iteration number based on the first target solution and the second target solution. If the current iteration count exceeds the iteration threshold, the quantization table is determined as the final quantization table; The fourth processing module is further configured to: determine the fitness value corresponding to each constraint region; and, if the number of individuals whose fitness values ​​are less than the second threshold is less than the third threshold, retain all the second offspring individuals as the second target solution. If the number of individuals with fitness values ​​less than the second threshold is not less than the third threshold, the fitness values ​​are sorted in ascending order, and the second offspring individuals corresponding to the fitness values ​​of the first second target number are determined as the second target solution.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the image processing method as described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the image processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Quaternion discrete cosine transform-based color image quality evaluation method

    CN107945154A