CPC H04N 23/843 (2023.01) [G06T 7/13 (2017.01); H04N 23/71 (2023.01)] | 7 Claims |
1. An image processing device that replaces pixel values received from an imaging device that includes a plurality of types of pixels being arranged in a first pixel arrangement wherein the types are different from one another in wavelength ranges of light to be detected, with pixel values of pixels in a second pixel arrangement that is different from the first pixel arrangement of the imaging device, the image processing device comprising:
a memory; and
a processor configured to execute:
determining whether or not there is an edge by detecting, based on color difference, a direction along which pixels having a small change in pixel values are aligned compared to at least one direction from among other directions, among surrounding pixels that are positioned around a target pixel whose pixel value is to be interpolated, and have a same color as the target pixel after replacement; and
interpolating, in a case where it is determined that there is an edge, a pixel value of the target pixel using the pixel values of the pixels along the direction of the edge among the surrounding pixels, and in a case where it is determined that there is no edge, the pixel value of the target pixel using pixel values of pixels along a direction of another edge detected based on brightness of the pixels positioned around the target pixel,
wherein the determining determines that there is an edge in a case where a difference between a color difference in pixel values of pixels arranged along a first direction with respect to the target pixel among the surrounding pixels, and a color difference in pixel values of pixels arranged along a direction intersecting with the first direction with respect to the target pixel among the surrounding pixels, is greater than or equal to a predetermined threshold.
|