主权项 |
1. An image processing device for generating a high-resolution image from a low-resolution image, comprising:
a non-transitory memory storing a program; and a hardware processor that executes the program and causes the image processing device: obtain the low-resolution image; generate a first high-resolution image that is higher in resolution than the low-resolution image, by performing an enlargement interpolation on the low-resolution image; generate, from the low-resolution image, a second high-resolution image that is equal in resolution to the first high-resolution image, by tracing back a process through which an image is assumed to be degraded in resolution, the process being represented by a degradation model; generate a feature at positions on the low-resolution image, the positions corresponding to positions of pixels on the first-high resolution image; calculate, for each of the plurality of pixels constituting the first high-resolution image, a difference value between a value of that pixel and a value of a corresponding pixel in the second high-resolution image; calculate a corrected difference value by correcting the calculated difference value by using the generated feature; and generate a third high-resolution image by adding corrected difference values calculated by the adjustment unit to values of corresponding pixels in the first high-resolution image, wherein the image processing device generates, as the feature, gradient information indicating a gradient of a value of a pixel in an image area in the low-resolution image corresponding to peripheral pixels of each of the plurality of pixels constituting the first high-resolution image, the gradient information being indicated by a norm operation on a rate of change in an x-axis direction and a rate of change in a y-axis direction with respect to values included in the image area, corrects the calculated difference value by using the generated gradient information, generates, as the feature, a permissible range from an image area in the low-resolution image corresponding to peripheral pixels of each of the plurality of pixels constituting the first high-resolution image, the permissible range being a range of values that can be taken by that pixel, determines whether or not the permissible range is exceeded for each pixel of the third high-resolution image, calculates a gain that increases or decreases depending on the gradient information, calculates the corrected difference value by multiplying the calculated gain by the difference value, and calculates a twice corrected difference value by multiplying the calculated gain by the corrected difference value for each pixel that exceeds the permissible range, and generates a fourth high-resolution image by adding the twice corrected difference value to each pixel of the third high-resolution image exceeding the permissible range, and outputs the fourth high-resolution image. |