CPC G06T 5/70 (2024.01) [G06T 2207/20081 (2013.01)] | 17 Claims |
1. A method for processing an image, comprising:
acquiring a first original image to be processed; and
acquiring a degraded image by performing down-sampling processing and blurring processing on the first original image according to a configured down-sampling processing algorithm and a blurring parameter;
wherein the down-sampling processing algorithm comprises a plurality of sampling steps,
the first original image and the degraded image are used as training samples to train an image processing model applied to an old photo restoration technology, image quality of the degraded image corresponds to an effect of an old photo, and imaqe quality of the first original image to be processed corresponds to an effect of a restored old photo,
the method further comprising:
performing compression noise processing on the first original image according to a configured compression noise parameter,
wherein the compression noise parameter comprises a coding quality coefficient; and
said performing compression noise processing on the first original image according to the configured compression noise parameter comprises:
performing image coding on pixels of the first original image according to the coding quality coefficient,
wherein the coding quality coefficient is determined by:
Qjepg=normal(aveq,varq),
wherein Qjepg represents the coding quality coefficient, aveq represents a mean of values within a preset coefficient range, varq represents a variance of the values within the preset coefficient range, normal( ) represents a normal distribution function, and normal(aveq,varq) represents returning to one of a set of numbers that obeys the normal distribution of the mean aveq and the variance varq.
|