WO2021218404A1 - 图像处理方法、图像处理装置及显示装置 - Google Patents
图像处理方法、图像处理装置及显示装置 Download PDFInfo
- Publication number
- WO2021218404A1 WO2021218404A1 PCT/CN2021/079774 CN2021079774W WO2021218404A1 WO 2021218404 A1 WO2021218404 A1 WO 2021218404A1 CN 2021079774 W CN2021079774 W CN 2021079774W WO 2021218404 A1 WO2021218404 A1 WO 2021218404A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pixel
- pixel value
- target
- value
- derivative
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 199
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000004422 calculation algorithm Methods 0.000 claims description 41
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4053—Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20224—Image subtraction
Definitions
- This application relates to the field of image processing technology, and in particular to an image processing method, an image processing device, and a display device.
- the resolution of the display is getting higher and higher, but due to the limitation of the image sensor in the display, the resolution of the image generated by the image sensor is low, and it is difficult to meet the resolution requirement of the display.
- the application provides an image processing method, an image processing device, and a display device.
- the technical solution is as follows:
- an image processing method includes:
- interpolation processing on the image to be processed to obtain an interpolated image, where the interpolated image includes a plurality of original pixels and a plurality of interpolated pixels, and the initial pixel value of each interpolated pixel is determined according to the pixel value of at least one of the original pixels;
- the first candidate pixel value is greater than the initial pixel value
- the second candidate pixel value is less than the initial pixel value
- the target original pixel is an original pixel adjacent to the interpolation pixel among the plurality of original pixels.
- the adjusting the initial pixel value of the interpolation pixel to obtain the first candidate pixel value and the second candidate pixel value includes:
- the initial pixel value of the interpolation pixel is reduced by the pixel step value to obtain a second candidate pixel value.
- the determining the first difference between the second derivative of the first candidate pixel value and the second derivative of the pixel value of the target original pixel among the plurality of original pixels includes:
- the determining the second difference between the second derivative of the second candidate pixel value and the second derivative of the pixel value of the target original pixel includes:
- the target original pixels include: two first target pixels and two second target pixels, wherein a connection line between each of the first target pixels and the interpolation pixel extends in a first direction , The connection line between each of the second target pixels and the interpolation pixels extends along a second direction, and the first direction is perpendicular to the second direction;
- the determining the first and second derivative of the first candidate pixel value according to the first candidate pixel value and the pixel value of the target original pixel includes:
- the determining the second-order derivative of the pixel value of the target original pixel according to the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel includes:
- the connecting line between is the pixel value of the pixel in the first direction, and the second-order derivative of the pixel value of the target pixel in the first direction is determined;
- the connecting line between is the pixel value of the pixel in the second direction, and the second-order derivative of the pixel value of the target pixel in the second direction is determined;
- the determining the first difference between the first second-order derivative and the second-order derivative of the pixel value of the target original pixel includes:
- the difference values of the four first directions and the difference values of the four second directions are summed to obtain a first difference value.
- the two first target pixels corresponding to the interpolation pixel in the i-th row and the j-th column in the interpolation image are respectively the pixel in the i+1-th row and the j-1th column and the i-th-th column in the interpolated image.
- the two second target pixels corresponding to the interpolated pixels in the i-th row and jth column are the pixels in the i-1th row and j-1th column and the i+1th row, respectively Column j+1 column pixel;
- the second derivative I 11 + (i, j) of the first candidate pixel value of the interpolation pixel in the i-th row and j-th column in the first direction satisfies:
- the I(i+1, j-1) is the pixel value of the pixel in the i+1th row and the j-1th column
- the I(i-1, j+1) is the i-th column.
- the I(i,j) is the initial pixel value of the pixel in the i-th row and the j-th column
- the ⁇ is the pixel step value
- i and j are both Is a positive integer greater than 1;
- the second derivative I 22 + (i, j) of the first candidate pixel value of the interpolation pixel in the i-th row and j-th column in the second direction satisfies:
- the I(i-1, j-1) is the pixel value of the pixel in the i-1th row and the j-1th column
- the I(i+1, j+1) is the i+th column.
- the target original pixels include: two first target pixels and two second target pixels, wherein a connection line between each of the first target pixels and the interpolation pixel extends in a first direction , The connection line between each of the second target pixels and the interpolation pixels extends along a second direction, and the first direction is perpendicular to the second direction;
- the determining the second second derivative of the second candidate pixel value according to the second candidate pixel value and the pixel value of the target original pixel includes:
- the determining the second-order derivative of the pixel value of the target original pixel according to the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel includes:
- the connecting line between is the pixel value of the pixel in the first direction, and the second-order derivative of the pixel value of the target pixel in the first direction is determined;
- the connecting line between is the pixel value of the pixel in the second direction, and the second-order derivative of the pixel value of the target pixel in the second direction is determined;
- the determining the second difference between the second second derivative and the second derivative of the pixel value of the target original pixel includes:
- the difference values of the four first directions and the difference values of the four second directions are summed to obtain a second difference value.
- the two first target pixels corresponding to the interpolation pixel in the i-th row and the j-th column in the interpolation image are respectively the pixel in the i+1-th row and the j-1th column and the i-th-th column in the interpolated image.
- 1 column of pixels in the j+1th column, and the two second target pixels corresponding to the interpolated pixels in the i-th row and jth column are the pixels in the i-1th row and j-1th column and the i+1th row, respectively column j + 1 column of pixels;
- I 11 - (i, j) I (i + 1, j-1) + I (i-1, j + 1) -2 ⁇ [I (i, j) - ⁇ ];
- the I(i+1, j-1) is the pixel value of the pixel in the i+1th row and the j-1th column
- the I(i-1, j+1) is the i-th column.
- the I(i,j) is the initial pixel value of the pixel in the i-th row and the j-th column
- the ⁇ is the pixel step value
- i and j are both Is a positive integer greater than 1;
- the second pixel value of the interpolation pixel in the i-th row j-th column in the second direction, the second derivative I 22 - (i, j) is satisfied:
- I 22 - (i, j) I (i-1, j-1) + I (i + 1, j + 1) -2 ⁇ [I (i, j) - ⁇ ];
- the I(i-1, j-1) is the pixel value of the pixel in the i-1th row and the j-1th column
- the I(i+1, j+1) is the i+th column.
- the performing interpolation processing on the image to be processed to obtain an interpolated image includes:
- first gradient is greater than the second gradient, use an interpolation algorithm to perform interpolation processing on the first area to be interpolated along the second direction to obtain an initial interpolated image;
- the interpolation algorithm is used to perform interpolation processing on the second area to be interpolated along the third direction to obtain an interpolated image.
- the pixel located in row 2i-1 and column 2i-1 in the interpolated image is the original pixel, and the pixel value of the pixel in row 2i-1 and column 2i-1 in the interpolated image is the same as
- the pixel values of the pixels in the i-th row and the j-th column in the image to be processed are equal.
- an image processing device including:
- the interpolation processing module is used to perform interpolation processing on the image to be processed to obtain an interpolated image.
- the interpolated image includes a plurality of original pixels and a plurality of interpolated pixels, and the initial pixel value of each interpolated pixel is based on at least one of the original pixels The pixel value is determined;
- the adjustment module is configured to adjust the initial pixel value of the interpolation pixel for each interpolation pixel to obtain a first candidate pixel value and a second candidate pixel value, and the first candidate pixel value is greater than the initial pixel value. Pixel value, the second candidate pixel value is less than the initial pixel value;
- a first determining module configured to determine the first difference between the second derivative of the first candidate pixel value and the second derivative of the pixel value of the target original pixel among the plurality of original pixels;
- a second determining module configured to determine a second difference between the second derivative of the second candidate pixel value and the second derivative of the pixel value of the target original pixel;
- An update module configured to update the initial pixel value of the interpolation pixel by using the candidate pixel value corresponding to the smaller difference value of the first difference value and the second difference value;
- the target original pixel is an original pixel adjacent to the interpolation pixel among the plurality of original pixels.
- the adjustment module is used to:
- the initial pixel value of the interpolation pixel is reduced by the pixel step value to obtain a second candidate pixel value.
- the first determining module includes:
- a first determining submodule configured to determine a first and second derivative of the first candidate pixel value according to the first candidate pixel value and the pixel value of the target original pixel;
- the second determining sub-module is configured to determine the second-order derivative of the pixel value of the target original pixel according to the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel;
- a third determining sub-module configured to determine the first difference between the first second derivative and the second derivative of the pixel value of the target original pixel
- the second determining module includes:
- a fourth determining submodule configured to determine a second second derivative of the second candidate pixel value according to the second candidate pixel value and the pixel value of the target original pixel;
- the fifth determining sub-module is configured to determine the second difference between the second second derivative and the second derivative of the pixel value of the target original pixel.
- an image processing device includes a processor, a memory, and a computer program stored on the memory and running on the processor, and the processor executes the computer program When realizing the image processing method as described in the above aspect.
- a computer-readable storage medium is provided, and instructions are stored in the computer-readable storage medium.
- the computer-readable storage medium runs on a computer, the computer executes the image described in the above-mentioned aspect. Approach.
- a display device comprising: a display panel and the image processing device as described in the foregoing aspect;
- the display panel is used for displaying the image processed by the image processing device.
- Fig. 1 is a flowchart of an image processing method provided by an embodiment of the present application
- FIG. 2 is a flowchart of a method for generating an interpolated image provided by an embodiment of the present application
- FIG. 3 is a schematic diagram of a first area to be interpolated according to an embodiment of the present application
- FIG. 4 is a schematic diagram of a second area to be interpolated according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of a relationship between a to-be-processed image and an interpolated image provided by an embodiment of the present application
- Fig. 6 is a flowchart of a method for image processing an interpolated image provided by an embodiment of the present application
- FIG. 7 is a flowchart of a method for determining the first and second derivative of the first candidate pixel value according to an embodiment of the present application
- FIG. 8 is a flowchart of a method for determining the second-order derivative of the pixel value of a target original pixel according to an embodiment of the present application
- FIG. 9 is a flowchart of a method for determining a first difference provided by an embodiment of the present application.
- FIG. 10 is a flowchart of a method for determining a second second-order derivative of a second candidate pixel value according to an embodiment of the present application
- FIG. 11 is a flowchart of a method for determining a second difference provided by an embodiment of the present application.
- FIG. 12 is a schematic diagram of an image processing effect provided by an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a first determining module provided by an embodiment of the present application.
- FIG. 15 is a schematic structural diagram of a second determining module provided by an embodiment of the present application.
- FIG. 16 is a schematic structural diagram of an interpolation processing module provided by an embodiment of the present application.
- FIG. 17 is a schematic structural diagram of another image processing apparatus provided by an embodiment of the present application.
- the image processed by the method in the related art usually produces artifacts, and the quality of the image is low.
- Fig. 1 is a flowchart of an image processing method provided by an embodiment of the present application. This method can be applied to an image processing device. As can be seen with reference to Figure 1, the method may include:
- Step 101 Perform interpolation processing on the image to be processed to obtain an interpolated image.
- the image processing device may pre-store an interpolation algorithm, and after receiving the image to be processed, the image processing device may use the pre-stored interpolation algorithm to perform interpolation processing on the image to be processed to obtain an interpolated image.
- the interpolated image may include a plurality of original pixels and a plurality of interpolated pixels, and the initial pixel value of each interpolated pixel may be determined according to the pixel value of at least one original pixel.
- the initial pixel value of each interpolation pixel in the interpolation image may be determined according to the pixel value of the original pixel adjacent to the interpolation pixel among the multiple original pixels.
- the interpolation algorithm pre-stored in the image processing device may be any one of: nearest neighbor interpolation algorithm, bilinear interpolation algorithm, and bicubic convolution interpolation algorithm.
- Step 102 For each interpolated pixel, adjust the initial pixel value of the interpolated pixel to obtain the first candidate pixel value and the second candidate pixel value.
- the pixel values of all pixels are known pixel values.
- the image processing device may adjust the initial pixel value of the interpolation pixel for each interpolation pixel to obtain the first candidate pixel value and the second candidate pixel value.
- the first candidate pixel value may be greater than the initial pixel value, and the second candidate pixel value may be less than the initial pixel value. That is, for each interpolated pixel, two candidate pixel values corresponding to the interpolated pixel can be obtained.
- Step 103 Determine a first difference between the second derivative of the first candidate pixel value and the second derivative of the pixel value of the target original pixel among the multiple original pixels.
- the image processing device may determine the second-order derivative of each original pixel among the multiple original pixels of the interpolated image. For each interpolation pixel, the image processing device may determine the second derivative of the first candidate pixel value after determining the first candidate pixel value of the interpolation pixel. And, for each interpolated pixel, the image processing device may determine the first difference between the second derivative of the first candidate pixel value of the interpolated pixel and the second derivative of the pixel value of the target original pixel among the plurality of original pixels.
- the target original pixel may be an original pixel adjacent to the interpolation pixel among a plurality of original pixels.
- the first difference is the difference between the second derivative of the first candidate pixel value of the interpolated pixel and the second derivative of the pixel value of the original pixel adjacent to the interpolated pixel among the plurality of original pixels.
- the number of adjacent original pixels is usually multiple, that is, the target original pixel can be multiple, so the image processing device can determine the first candidate pixel value of the interpolated pixel The difference between the second derivative of the pixel value of each adjacent original pixel and the sum of all the differences is determined as the first difference.
- the second-order derivative of the pixel value of each pixel in the interpolation pixel and the target original pixel can be calculated based on the pixel value of the pixel and the pixel values of other pixels adjacent to the pixel.
- Step 104 Determine a second difference between the second derivative of the second candidate pixel value and the second derivative of the pixel value of the target original pixel.
- the image processing apparatus may determine the second derivative of the second candidate pixel value after determining the second candidate pixel value of the interpolated pixel. Moreover, for each interpolated pixel, the image processing device may determine the second derivative of the second candidate pixel value of the interpolated pixel and the second derivative of each original pixel in the plurality of original pixels determined in step 103 above. The second difference of the second derivative of the pixel value of the target original pixel among the plurality of original pixels.
- the image processing device can determine the second candidate pixel value of the interpolated pixel and the pixel value of each adjacent original pixel.
- the difference value of the order derivative, and the sum of all the difference values is determined as the second difference value.
- Step 105 Use the candidate pixel value corresponding to the smaller one of the first difference and the second difference to update the initial pixel value of the difference pixel.
- the neighborhood of the pixel may be the L ⁇ L neighborhood of the pixel, and L is an odd number greater than 1, for example, L may be 5 or 7.
- the L ⁇ L neighborhood of the pixel may include L rows and L columns of pixels, that is, it includes a total of L 2 pixels, and the pixel may be located in the (L+1)/2th row of the pixel L ⁇ L neighborhood. L+1)/2 columns.
- the image processing device determines the first difference between the second derivative of the first candidate pixel value and the second derivative of the pixel value of the target original pixel according to step 103, and determines the second derivative according to step 104 After the second difference between the second derivative of the two candidate pixel values and the second derivative of the pixel value of the target original pixel, the image processing device may determine the magnitude of the first difference and the second difference.
- the candidate pixel value corresponding to the smaller difference can make the image continuity in the neighborhood of the interpolation pixel in the interpolated image better, and the candidate pixel value corresponding to the larger difference can make the interpolated pixel in the interpolated image The image continuity in the neighborhood is poor.
- the image processing device may use the smaller difference between the first difference and the second difference.
- the candidate pixel value updates the initial pixel value of the interpolated pixel, so that the interpolated image can be updated.
- the second candidate pixel value corresponding to the second difference can be used to update the initial pixel value of the interpolated pixel, that is, the pixel value of the interpolated pixel can be made equal to the The second candidate pixel value. If the second difference is less than or equal to the first difference, the first candidate pixel value corresponding to the first difference can be used to update the initial pixel value of the interpolated pixel, that is, the pixel value of the interpolated pixel can be made equal to the first backup pixel. Select the pixel value.
- the embodiments of the present application provide an image processing method, which can first perform interpolation processing on the image to be processed to obtain an interpolated image, and update the initial pixel value of each interpolated pixel in the interpolated image, and update
- the difference between the second-order derivative of the pixel value of the interpolated pixel and the second-order derivative of the pixel value of the target original pixel in the interpolated image is small, which reduces the artifacts generated in the interpolated image, and improves the neighborhood of the interpolated pixel in the interpolated image.
- the image continuity within the domain, the quality of the image obtained by the final processing is higher.
- Fig. 2 is a flowchart of a method for generating an interpolated image provided by an embodiment of the present application, and the method can be applied to an image processing device.
- the method may include:
- Step 201 Determine the first gradient of the first area to be interpolated in the first direction in the image to be processed.
- the image processing device may pre-store a formula for calculating the gradient in the first direction of the image. After the image processing device receives the image to be processed, it may use the pre-stored formula for the gradient in the first direction. Determine the first gradient of the first area to be interpolated in the first direction in the image to be processed. Wherein, the first area to be interpolated may be an L1 ⁇ L1 neighborhood of a certain pixel in the image to be processed. L1 is an odd number greater than 1.
- the first direction may be a direction with an included angle of 45° (degrees) with the pixel row direction.
- the first gradient G1 of the first area to be interpolated in the first direction can satisfy:
- m, n, and x are the preset gradient calculation coefficients, and the value of m can be 1, 3, and -1, and the value of n can also be 1, 3, and -1.
- the value of x can be 2.
- the values of m, n, and x may also be other values, for example, the value of x may also be 1, which is not limited in the embodiment of the present application.
- i can be used to represent the number of pixel rows
- j can be used to represent the number of pixel columns
- i and j can both be positive integers greater than 1, and i is less than the total number of pixel rows of the image, and j is less than the total number of pixel columns of the image.
- I(i+m,jn) is the pixel value of the pixel in the i+mth row and jnth column in the image to be processed
- I(i+mx,j-n+x) is the jth row in the i+mxth row of the image to be processed -The pixel value of the pixel in the n+x column.
- means to take the absolute value.
- Step 202 Determine the second gradient of the first area to be interpolated in the second direction in the image to be processed.
- the image processing device may also pre-store a formula for calculating the gradient in the second direction of the image, and the image processing device may use its pre-stored formula for the gradient in the second direction to determine whether the image to be processed is The second gradient in the second direction.
- the second direction may be perpendicular to the first direction.
- the second direction may be a direction with an angle of 135° with the pixel row direction.
- the second gradient G2 of the first area to be interpolated in the second direction can satisfy:
- m, n and x are the preset gradient calculation coefficients
- the value of m can be 1, 3 and -1
- the value of n can be 1, 3 and -1
- x The value of can be 2.
- the values of m, n, and x may also be other values, for example, the value of x may also be 1, which is not limited in the embodiment of the present application.
- I(i+m, j+n) is the pixel value of the pixel in the i+mth row and j+n column in the image to be processed
- I(i+mx, j-n+x) is the pixel value in the image to be processed The pixel value of the pixel in the j-n+x column of the i+mx row.
- Step 203 Detect whether the first gradient is greater than the second gradient.
- the image processing apparatus determines the first gradient of the first area to be interpolated in the first direction in the image to be processed according to step 201, and determines that the first area to be interpolated in the image to be processed is in step 202 After the second gradient in the second direction, it can be determined whether the first gradient is greater than the second gradient according to the first gradient and the second gradient.
- the image processing device can perform the following step 204; if the second gradient is greater than the first gradient, the image processing device can perform the following step 205; if the first gradient is equal to the second gradient, the first
- the image of the area to be interpolated may be a smooth texture image, and the image processing device may perform any of the following steps 204 and 205.
- a first determination formula for determining whether the first gradient is greater than the second gradient may be pre-stored in the image processing device.
- the first determination formula may satisfy:
- the image processing device determines that T1 is greater than 1 according to the above formula (3), it means that the first gradient is greater than the second gradient; if the image processing device determines that T1 is less than 1 according to the above formula (3), it means that The second gradient is greater than the first gradient; if the image processing device determines that T1 is equal to 1, according to the above formula (3), it indicates that the first gradient is equal to the second gradient.
- the first gradient may be greater than the second gradient
- the second gradient may be greater than the first gradient. Therefore, for the first area to be interpolated where the first gradient is greater than the second gradient, the image processing apparatus may execute the following step 204 to perform interpolation processing on the first area to be interpolated. For the first area to be interpolated with the second gradient greater than the first gradient, the image processing apparatus may execute the following step 205 to perform interpolation processing on the first area to be interpolated. For the first area to be interpolated with the first gradient equal to the second gradient, the image processing apparatus may perform any of the following steps 204 and 205 to perform interpolation processing on the first area to be interpolated.
- Step 204 Perform interpolation processing on the first area to be interpolated along the second direction by using an interpolation algorithm to obtain an initial interpolated image.
- the image processing device determines a certain first area to be interpolated according to the above step 203 (for example, the first area to be interpolated is the 7 ⁇ 7 neighborhood of the pixel in the i-th row and the j-th column) corresponding to The first gradient is greater than the second gradient, indicating that the image of the first area to be interpolated may be a strong edge texture image in the second direction.
- the image processing device can use an interpolation algorithm to perform the first area to be interpolated along the second direction.
- the interpolation processing obtains the pixel value of the interpolated pixel in the first area to be interpolated, that is, the initial interpolated image is obtained.
- the interpolation algorithm pre-stored in the image processing device may be any one of: nearest neighbor interpolation algorithm, bilinear interpolation algorithm, and bicubic convolution interpolation algorithm.
- FIG. 3 is a schematic diagram of a first area to be interpolated according to an embodiment of the present application.
- the pixel F1 represented by the black circle is the original pixel
- the pixel F2 represented by the white square is the original pixel.
- the pixels F3 represented by the circles are all interpolated pixels.
- the image processing device uses an interpolation algorithm to perform interpolation processing on the first area to be interpolated in the second direction, the pixel value of the pixel represented by the white square can be obtained.
- the pixel value of the pixel represented by the white square may be a known pixel value
- the pixel value of the pixel represented by the white circle Can be an unknown pixel value.
- the line between the pixel represented by the white square and the original pixel adjacent to the pixel represented by the white square in the original pixel is the first direction A or the second direction B. For example, it is 45° or 135°.
- the image processing device may use an interpolation algorithm and the pixel values of the original pixels to perform interpolation processing on the first area to be interpolated in the second direction to obtain an initial interpolated image.
- the initial pixel value of each interpolated pixel may be the image processing device according to the L1 of the interpolated pixel.
- the line connecting the interpolation pixel is parallel to the pixel value of the original pixel in the second direction, and the weight of the pixel value of each original pixel is determined.
- L1 can be equal to 7, or L1 can be equal to 5.
- the embodiment of the present application takes L1 equal to 7 as an example for description.
- L1 equal to 7
- the embodiment of the present application takes L1 equal to 7 as an example for description.
- the four original pixels are respectively: the i-3th row and the j-3th column Pixels, pixels in the i-1th column and j-1th column, pixels in the i+1th column and j+1th column, and pixels in the i+3th row and j+3th column.
- the pixel value of the interpolated pixel in the i-th row and j-th column can be based on the pixel value of the pixel in the i-3th row and j-3th column, the pixel value of the pixel in the i-1th row and j-1th column, and the i+th row Determined by the pixel value of the pixel in the j+1th column of the 1 row and the pixel value of the pixel in the j+3th row of the i+3th row.
- the distance between the pixel in the i-3th row and the j-3th column and the interpolated pixel in the i+3th row and j+3th column and the i-th row and jth column is relative to the i-1th row and j-th- 1 column of pixels, and the distance between the pixel in the i+1th row and the j+1th column and the i-th row and j-th column interpolated pixel is large, so the pixel value of the i-3th row and j-3th column pixel, and the The weight of the pixel value of the pixel in row i+3 and column j+3 is smaller. The weight is larger.
- the weight of the pixel value of the pixel in the i-3th row and the j-3th column and the pixel value of the pixel in the i+3th row and j+3th column may both be 1/6, and the weight of the i-1th row
- the weight of the pixel value of the pixel in the j-1th column and the pixel value of the pixel in the i+1th row and the j+1th column may both be 1/3.
- the pixel value of the pixel in the i-3th row and the j-3th column is I1
- the pixel value of the pixel in the i+3th column and j+3th column is I2
- the pixel in the i-1th and j-1th column The value is I3
- the pixel value of the pixel in the i+1th column and the j+1th column is I4
- Step 205 Perform interpolation processing on the first area to be interpolated along the first direction by using an interpolation algorithm to obtain an initial interpolated image.
- the image processing device determines a certain first area to be interpolated (for example, the first area to be interpolated is the 7 ⁇ 7 neighborhood of the pixel in the i-th row and the j-th column) according to the above step 203
- the second gradient is greater than the first gradient, indicating that the image of the first area to be interpolated may be a strong edge texture image in the first direction.
- the image processing device can use an interpolation algorithm to interpolate the first area to be interpolated in the first direction. Through processing, the pixel value of the interpolated pixel in the first area to be interpolated is obtained, that is, the initial interpolated image is obtained.
- step 205 For the specific process of this step 205, reference may be made to the above step 204, which will not be repeated in this embodiment of the present application.
- Step 206 Determine the third gradient of the second area to be interpolated in the third direction in the initial interpolated image.
- the image processing device may pre-store a formula for calculating the gradient of the third direction of the image, and the image processing device may use the pre-stored formula of the third direction gradient to determine the first interpolation image in the initial interpolation image. Second, the third gradient of the area to be interpolated in the third direction.
- the second area to be interpolated may be a certain L2 ⁇ L2 neighborhood in the initial interpolated image.
- L2 is an odd number greater than 1.
- the third direction C may have an angle of 45 degrees with the first direction A.
- the third direction C may be a direction with an angle of 0° with respect to the pixel row direction.
- r, s and k are the preset gradient calculation coefficients
- the value of r can be 0 and 2
- the value of s can be 1 and -1
- the value of k can be -2, 0 and 2.
- the values of r, s, and k may also be other values, which are not limited in the embodiment of the present application.
- I(ir, j+s) is the pixel value of the pixel in the irth row and the j+s column in the image to be processed
- I(i-r+2, j+s) is the i-r+th pixel in the image to be processed
- the pixel value of the pixel in the j+s column of the 2nd row, I(i-1, j+k) is the pixel value of the pixel in the i-1th row and the j+k column of the image to be processed, I(i+1, j+ k) is the pixel value of the pixel in the i+1th row and the j+kth column in the image to be processed.
- Step 207 Determine the fourth gradient of the second area to be interpolated in the fourth direction in the initial interpolated image.
- the image processing device may pre-store a formula for calculating the gradient in the fourth direction of the image, and the image processing device may use its pre-stored formula for the gradient in the fourth direction to determine that the image to be processed is in the first The fourth gradient in four directions.
- the fourth direction D may be perpendicular to the third direction C, for example, the fourth direction D may be a direction with an angle of 90° with the pixel row direction.
- the fourth gradient G4 of the second area to be interpolated in the fourth direction D can be satisfy:
- r, s, and k are the preset gradient calculation coefficients
- the value of r can be 1 and -1
- the value of s can be 0 and 2
- the value of k can be -2, 0 and 2.
- the values of r, s, and k may also be other values, which are not limited in the embodiment of the present application.
- I(ir, js) is the pixel value of the pixel in the irth row and js column in the image to be processed
- I(i+r, j-s+2) is the j-sth row in the i+rth row of the image to be processed +2 column pixel value
- I(i+k, j-1) is the pixel value of the i+kth row and j-1th column of the image to be processed
- I(i+k,j+1) is the Process the pixel value of the pixel in the i+kth row and j+1th column of the image.
- Step 208 Detect whether the third gradient is greater than the fourth gradient.
- the image processing device determines the third gradient of the second area to be interpolated in the initial interpolation image in the third direction according to step 206, and determines according to step 207 that the second area to be interpolated in the initial interpolation image is After the fourth gradient in the fourth direction, it may be determined whether the third gradient is greater than the fourth gradient according to the third gradient and the fourth gradient.
- the image processing device can perform the following step 209; if the fourth gradient is greater than the third gradient, the image processing device can perform the following step 210; if the third gradient is equal to the fourth gradient, the second
- the image of the area to be interpolated may be a smooth texture image, and the image processing device may perform any of the following steps 209 and 210.
- a second determination formula for determining whether the third gradient is greater than the fourth gradient may be pre-stored in the image processing device.
- the second determination formula may satisfy:
- the image processing device determines that T2 is greater than 1 according to the above formula (6), it means that the third gradient is greater than the fourth gradient; if the image processing device determines that T2 is less than 1 according to the above formula (6), it means that the first The fourth gradient is greater than the third gradient; if the image processing device determines that T2 is equal to 1, according to the above formula (6), it indicates that the third gradient is equal to the fourth gradient.
- the third gradient may be greater than the fourth gradient
- the fourth gradient may be greater than the third gradient. Therefore, for the second area to be interpolated with the third gradient greater than the fourth gradient, the image processing device may perform the following step 204 to perform interpolation processing on the second area to be interpolated. For the second area to be interpolated with the fourth gradient greater than the third gradient, The image processing apparatus may execute the following step 205 to perform interpolation processing on the second area to be interpolated. For the second area to be interpolated with the third gradient equal to the fourth gradient, the image processing device may perform any of the following steps 209 and 210 to perform interpolation processing on the second area to be interpolated.
- Step 209 Perform interpolation processing on the second area to be interpolated along the fourth direction by using an interpolation algorithm to obtain an interpolated image.
- the image processing device determines according to the above step 208 that the third gradient of a certain second area to be interpolated (for example, the 5 ⁇ 5 neighborhood of the pixel in the i-th row and the j-th column) is greater than the fourth gradient, It is explained that the image of the second area to be interpolated may be a strong edge texture image in the fourth direction. In this case, the image processing device may use an interpolation algorithm to perform interpolation processing on the second area to be interpolated in the fourth direction to obtain an interpolated image.
- the third gradient of a certain second area to be interpolated for example, the 5 ⁇ 5 neighborhood of the pixel in the i-th row and the j-th column
- the pixel value of the original pixel (the pixel represented by the black circle) and the pixel value of the pixel represented by the white square in the initial interpolated image are known pixel values, and the image processing device can use an interpolation algorithm ,
- the pixel value of the original pixel and the pixel value of the pixel represented by the white square perform interpolation processing on the second area to be interpolated to obtain an interpolated image.
- the pixel value of the pixel represented by the white circle can be obtained. That is, in the interpolation image obtained by performing interpolation processing on the second area to be interpolated by using an interpolation algorithm, the pixel values of all pixels are known pixel values.
- the line between the pixel represented by the white circle and the original pixel adjacent to the pixel represented by the white circle is the third direction or the fourth direction, for example, 0° or 90°.
- the initial pixel value of each interpolated pixel (the pixel represented by the white circle) can be determined by the image processing device according to the L2 ⁇ L2 neighbor of the interpolated pixel.
- the line with the interpolation pixel is parallel to the pixel value of all pixels with known pixel values in the fourth direction (including the original pixel and the pixel value obtained by the first interpolation process), and each known pixel value The weight is determined.
- L2 can be equal to 7, or L2 can be equal to 5.
- the embodiment of the present application takes L2 equal to 7 as an example for description.
- L2 equal to 7
- the pixels with known pixel values are: pixels in row i-3 and column j, pixels in row i-1 and column j, pixels in row i+1 and column j, and pixels in row i+3 and column j.
- the interpolated pixel in the i-th row and j-th column can be based on the pixel value of the pixel in the i-3 row and the j-th column, the pixel value of the pixel in the i-1th row and the j-th column, and the pixel value of the i+1-th row and j-th column pixel.
- the pixel value is determined by the pixel value of the pixel in the i+3 row and the j column.
- the distance between the pixel in the i-3th row and the jth column and the interpolated pixel in the i+3th row and the jth column and the ith row and jth column is relative to the i-1th row and jth column pixel, and the The distance between the pixel in row i+1 and the pixel in the jth row and the jth column is large, so the pixel value of the pixel in the jth column of the i-3 row and the pixel in the jth column of the i+3 row
- the weight of the value is smaller, and the weight of the pixel value of the pixel in the i-1th column and the pixel value of the pixel in the i+1th column is larger.
- the weight of the pixel value of the pixel in the i-3th row and the jth column and the pixel value of the pixel in the i+3th row and the jth column may both be 1/6, and the weight of the pixel in the i-1th row and jth column is 1/6.
- the weight of the pixel value of the pixel value and the pixel value of the pixel value of the i+1th row and the jth column may both be 1/3.
- the pixel value of the pixel in the i-3th row and the jth column is I5
- the pixel value of the i+3th row and jth column pixel is I5
- the pixel value of the i-1th row and jth column pixel is I7
- the pixel value of the pixel in row i+1 and column j is I8
- the image processing module has already performed an interpolation processing and obtained the initial interpolation image.
- the number of pixels with known pixel values in the initial interpolation image is greater than the number of pixels with known pixel values in the image to be interpolated. Therefore, when the image processing device performs interpolation processing on the second area to be interpolated in the initial interpolated image, the initial pixel value of each interpolated pixel can be determined by the pixel value of the pixel in the smaller neighborhood of the interpolated pixel. For example, L2 is equal to 5.
- the image processing device may use the pixel value of the pixel in the 5 ⁇ 5 neighborhood a of the interpolated pixel to determine.
- the pixel in the 2i-1th row and 2j-1th column in the interpolated image 302 is the original pixel, and the pixel in the 2i-1th row and 2j-1th column in the interpolated image 302
- the pixel value I H (2i-1, 2j-1) of is equal to the pixel value I L (i, j) of the pixel in the i-th row and j-th column in the image 301 to be processed. That is, the image to be processed 301 and the interpolation image 302 satisfy the following mapping relationship:
- Step 210 Perform interpolation processing on the second area to be interpolated along the third direction by using an interpolation algorithm to obtain an interpolated image.
- the image processing device determines according to the above step 210 that the second area to be interpolated (for example, the 5 ⁇ 5 neighborhood of the pixel in the i-th row and the j-th column), the fourth gradient is greater than the third gradient, indicating that the second The image of the area to be interpolated may be a strong edge texture image in the third direction.
- the image processing device may use an interpolation algorithm to perform interpolation processing on the second area to be interpolated along the third direction to obtain an interpolated image.
- step 210 For the specific process of this step 210, reference may be made to the above step 209, which will not be repeated in this embodiment of the present application.
- FIG. 6 is a flowchart of a method for image processing an interpolated image provided by an embodiment of the present application. The method can be applied to an image processing device. It can be seen with reference to FIG. 6 that the method may include:
- Step 211 Increase the initial pixel value of the interpolated pixel by the pixel step value to obtain the first candidate pixel value.
- the image processing device may pre-store the pixel step value. After the image processing device obtains the interpolated image, for each interpolated pixel, the image processing device may increase the initial pixel value of the interpolated pixel by pixel Step value to obtain the first candidate pixel value.
- the pixel step value may range from 1 to 2, and the first candidate pixel value is greater than the initial pixel value.
- Step 212 Determine the first and second derivative of the first candidate pixel value according to the first candidate pixel value and the pixel value of the target original pixel.
- the image processing device may first base on the pixel value of the target original pixel and the foregoing
- the first candidate pixel value determined in step 211 determines the first and second derivative of the first candidate pixel value.
- the target original pixels may include: two first target pixels and two second target pixels.
- the line between each first target pixel and the interpolation pixel may extend in the first direction
- the line between each second target pixel and the interpolation pixel may extend in the second direction.
- the image processing device can determine the second-order derivative of the pixel value of each target pixel among the four target pixels and the first candidate pixel value. The difference of the order derivatives.
- this step 212 may include:
- Step 2121 according to the first candidate pixel value and the pixel values of the two first target pixels, determine the second derivative of the first candidate pixel value in the first direction.
- the image processing device may determine the sum of the pixel values of the two first target pixels corresponding to the interpolation pixel and the difference between the first candidate pixel value of the interpolation pixel Is the second derivative of the first candidate pixel value of the interpolated pixel in the first direction.
- the two first target pixels corresponding to the interpolated pixel in the i-th row and j-th column in the interpolated image are respectively the pixel in the i+1-th row and the j-1th column and the i-1th in the interpolated image.
- the image processing device may use the pixel value of the pixel in the i+1th row and the j-1th column, the pixel value of the pixel in the i-1th column and the j+1th column, the pixel value of the interpolated pixel in the ith row and the jth column, and the pixel value
- the step value determines the second derivative in the first direction of the first candidate pixel value of the interpolated pixel in the i-th row and j-th column of the interpolated image.
- the second derivative I 11 + (i, j) of the first candidate pixel value of the interpolation pixel in the i-th row and j-th column in the first direction satisfies:
- I(i+1,j-1) is the pixel value of the pixel in the i+1th row and j-1th column
- I(i-1,j+1) is the i-1th column pixel value.
- the pixel value of the pixel in the row j+1 column, I(i,j) is the initial pixel value of the pixel in the ith row and the jth column, and ⁇ is the pixel step value.
- I(i,j)+ ⁇ is the first candidate pixel value.
- Step 2122 Determine the second derivative of the first candidate pixel value in the second direction according to the first candidate pixel value and the pixel values of the two second target pixels.
- the image processing device may determine the sum of the pixel values of the two second target pixels corresponding to the interpolated pixel and the difference between the first candidate pixel value of the interpolated pixel Is the second derivative of the first candidate pixel value in the second direction.
- the two second target pixels corresponding to the interpolation pixel in the i-th row and j-th column in the interpolated image are the pixel in the i-1th row and the j-1th column and the i+1th column and j+ 1 column of pixels.
- the image processing device may use the pixel value of the pixel in the i-1th row and the j-1th column, the pixel value of the pixel in the i+1th column and the j+1th column, the pixel value of the interpolated pixel in the ith row and the jth column, and the pixel value
- the step value determines the second derivative in the second direction of the first candidate pixel value of the interpolated pixel in the i-th row and j-th column of the interpolated image.
- the second derivative I 22 + (i, j) of the first candidate pixel value of the interpolation pixel in the i-th row and j-th column in the second direction satisfies:
- I(i-1, j-1) is the pixel value of the pixel in the i-1th row and j-1th column
- I(i+1, j+1) is the i+1th column.
- Step 213 Determine the second-order derivative of the pixel value of the target original pixel according to the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel.
- the image processing device determines the first second derivative of the first candidate pixel value of the interpolated pixel according to the above step 212, in order to be able to determine the second derivative of the first candidate pixel value and the target
- the difference of the second-order derivative of the pixel value of the original pixel also needs to determine the second-order derivative of the pixel value of the target original pixel based on the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel.
- the image processing device can determine the second-order derivative of the pixel value of each target pixel in the four target pixels.
- the image processing device needs to separately determine the second-order derivative of each target pixel in the first direction and the second direction, that is, the second-order derivative of each target pixel in the four target pixels in the first direction and the second direction can be determined separately. , That is, eight second-order derivatives need to be determined.
- this step 213 may include:
- Step 2131 For each target pixel of the two first target pixels and the two second target pixels, according to the pixel value of the target pixel and the connection line between the target pixel and the pixel adjacent to the target pixel Is the pixel value of the pixel in the first direction, and the second derivative of the pixel value of the target pixel in the first direction is determined.
- the image processing device may set the connection with the target pixel in the first direction
- the sum of the pixel values of the two pixels and the difference between the pixel value of the target pixel is determined as the second-order derivative of the pixel value of the target pixel in the first direction.
- the second-order derivative I 11 (i+1, j-1) of the pixel value in the first direction of the pixel value of the first target pixel in the i+1-th row and j-1th column corresponding to the interpolated pixel in the i-th row and j-th column ) satisfy:
- I 11 (i+1,j-1) I(i+2,j-2)+[I(i,j)+ ⁇ ]-2 ⁇ I(i+1,j-1), where I (i+2, j-2) is the pixel value of the pixel in the i+2th row and j-2th column.
- the second-order derivative I 11 (i-1, j+1) in the first direction of the pixel value of the first target pixel in the i-1th row and j+1th column corresponding to the interpolated pixel in the i-th row and jth column satisfies :
- I 11 (i-1,j+1) [I(i,j)+ ⁇ ]+I(i-2,j+2)-2 ⁇ I(i-1,j+1), where I (i-2, j+2) is the pixel value of the pixel in the i-2th row and j+2th column.
- the second-order derivative I 11 (i-1, j-1) in the first direction of the pixel value of the second target pixel in the i-1th row and j-1th column corresponding to the interpolated pixel in the i-th row and j-th column satisfies :
- I 11 (i-1,j-1) I(i,j-2)+I(i-2,j)-2 ⁇ I(i-1,j-1), where I(i,j -2) is the pixel value of the pixel in the i-th row and j-2th column, and I(i-2, j) is the pixel value of the pixel in the i-2th row and j-th column.
- the second-order derivative I 11 (i+1, j+1) in the first direction of the pixel value of the second target pixel in the i+1-th row and j+1-th column corresponding to the interpolated pixel in the i-th row and j-th column satisfies :
- I 11 (i+1,j+1) I(i+2,j)+I(i,j+2)-2 ⁇ I(i+1,j+1), where I(i+2 , J) is the pixel value of the pixel in the i+2th row and the jth column, and I(i, j+2) is the pixel value of the j+2th column in the i-th row.
- Step 2132 For each of the two first target pixels and the two second target pixels, according to the pixel value of the target pixel and the connection line between the target pixel and the pixel adjacent to the target pixel Is the pixel value of the pixel in the second direction, and the second derivative of the pixel value of the target pixel in the second direction is determined.
- the image processing device sets the connection with the target pixel in the second direction
- the difference between the sum of the pixel values of the two pixels and the pixel value of the target pixel is determined as the second-order derivative of the pixel value of the target pixel in the second direction.
- I 22 (i+1,j-1) I(i,j-2)+I(i+2,j)-2 ⁇ I(i+1,j-1), where I(i,j -2) is the pixel value of the pixel in the i-th row and j-2th column, and I(i+2, j) is the pixel value of the pixel in the i+2th row and j-th column.
- the second-order derivative I 22 (i-1, j+1) in the second direction of the pixel value of the first target pixel in the i-1th row and j+1th column corresponding to the interpolated pixel in the i-th row and jth column satisfies :
- I 22 (i-1,j+1) I(i-2,j)+I(i,j+2)-2 ⁇ I(i-1,j+1), where I(i-2 , J) is the pixel value of the pixel in the i-2th row and the jth column, and I(i, j+2) is the pixel value of the j+2th column in the i-th row.
- the second-order derivative I 22 (i-1, j-1) of the pixel value of the second target pixel in the second direction of the pixel value of the second target pixel in the i-1th row and j-1th column corresponding to the interpolated pixel in the i-th row and j-th column satisfy:
- I 22 (i-1,j-1) I(i-2,j-2)+[I(i,j)+ ⁇ ]-2 ⁇ I(i-1,j-1), where I (i-2, j-2) is the pixel value of the pixel in the i-2th row and j-2th column.
- I 22 (i+1,j+1) [I(i,j)+ ⁇ ]+I(i+2,j+2)-2 ⁇ I(i+1,j+1), where I (i+2, j+2) is the pixel value of the pixel in the i+2th row and j+2th column.
- Step 214 Determine a first difference between the first second-order derivative and the second-order derivative of the pixel value of the target original pixel.
- the image processing device may use the The first second-order derivative and the second-order derivative of the pixel value of the target original pixel determine the first difference.
- this step 214 may include:
- Step 2141 for each of the two first target pixels and the two second target pixels, determine the second-order derivative of the first candidate pixel value in the first direction, and the pixel value of the target pixel is in the first direction.
- the difference of the second derivative in one direction is the difference of the four first directions.
- the image processing device determines the second derivative of the first candidate pixel value in the first direction according to step 2121, and determines two first target pixels and two second targets according to step 2131. After the second-order derivative of the pixel value of each target pixel in the pixel in the first direction, the second-order derivative of the first candidate pixel value in the first direction can be determined, and the pixel value of each target pixel is in the first direction. The difference of the second derivative in the directions, the difference of the four first directions is obtained.
- Step 2142 for each of the two first target pixels and the two second target pixels, determine the second-order derivative of the first candidate pixel value in the second direction, and the pixel value of the target pixel is in the second direction. Interpolation of the second-order derivatives in the two directions obtains the four second-direction differences.
- the image processing device determines the second derivative of the first candidate pixel value in the second direction according to step 2122, and determines two first target pixels and two second targets according to step 2132. After the second-order derivative of the pixel value of each target pixel in the pixel in the second direction, the second-order derivative of the first candidate pixel value in the second direction can be determined, and the pixel value of each target pixel is in the second direction. The difference of the second-order derivative in the direction, the difference of the four second directions is obtained.
- Step 2143 Sum the difference values in the four first directions and the difference values in the four second directions to obtain the first difference value.
- the image processing device may determine the difference of the four first directions.
- the difference value and the difference value of the four second directions are summed to obtain the first difference value.
- U + (i, j) U 11 +U 12 +U 13 +U 14 +U 15 +U 16 +U 17 +U 18 . That is, the first difference U + (i, j) satisfies:
- Step 215 Reduce the initial pixel value of the interpolated pixel by the pixel step value to obtain a second candidate pixel value.
- the image processing device may also reduce the initial pixel value of the interpolated pixel by the pixel step value to obtain a second candidate pixel value.
- the second candidate pixel value is smaller than the initial pixel value.
- Step 216 Determine a second second derivative of the second candidate pixel value according to the second candidate pixel value and the pixel value of the target original pixel.
- the image processing device may determine the second difference between the second derivative of the target original pixel and the pixel value of the target original pixel and the above steps. 215 determines the second candidate pixel value, and determines the second second derivative of the second candidate pixel value.
- the image processing device can determine the second-order derivative of the pixel value of each target pixel among the four target pixels and the second candidate pixel value. The difference of the second derivative.
- this step 216 may include:
- Step 2161 according to the second candidate pixel value and the pixel values of the two first target pixels, determine the second derivative of the second candidate pixel value in the first direction.
- the image processing device may determine the sum of the pixel values of the two first target pixels corresponding to the interpolated pixel and the difference between the second candidate pixel value of the interpolated pixel Is the second derivative of the second candidate pixel value in the first direction.
- the image processing device may use the pixel value of the pixel in the i+1th row and the j-1th column, the pixel value of the pixel in the i-1th column and the j+1th column, and the interpolation in the ith row and jth column.
- the pixel value of the pixel and the pixel step value determine the second derivative in the first direction of the second candidate pixel value of the interpolated pixel in the i-th row and j-th column of the interpolated pixel.
- I 11 - (i, j) I (i + 1, j-1) + I (i-1, j + 1) -2 ⁇ [I (i, j) - ⁇ ] Equation (11)
- I(i+1,j-1) is the pixel value of the pixel in the i+1th row and j-1th column
- I(i-1,j+1) is the i-1th column pixel value.
- the pixel value of the pixel in the row j+1 column, I(i,j) is the initial pixel value of the pixel in the ith row and the jth column, and ⁇ is the pixel step value.
- I(i,j)- ⁇ is the second candidate pixel value.
- Step 2162 according to the second candidate pixel value and the pixel values of the two second target pixels, determine the second derivative of the second candidate pixel value in the second direction.
- the image processing device may determine the sum of the pixel values of the two second target pixels and the difference between the second candidate pixel value of the interpolated pixel as the second backup pixel. Select the second derivative of the pixel value in the second direction.
- the image processing device may use the pixel value of the pixel in the i-1th row and the j-1th column, the pixel value of the pixel in the i+1th column and the j+1th column, and the pixel value of the interpolated pixel in the i-th row and jth column. , And the pixel step value to determine the second derivative in the second direction of the second candidate pixel value of the interpolated pixel in the i-th row and j-th column of the interpolated image.
- the second alternate value of the pixel i-th row j-th column of the interpolation pixel in the second direction of the second derivative I 22 - (i, j) is satisfied:
- I 22 - (i, j) I (i-1, j-1) + I (i + 1, j + 1) -2 ⁇ [I (i, j) - ⁇ ] Equation (12)
- I(i-1, j-1) is the pixel value of the pixel in the i-1th row and j-1th column
- I(i+1, j+1) is the i+1th column.
- Step 217 Determine the second difference between the second second derivative and the second derivative of the pixel value of the target original pixel.
- the image processing device determines the second second derivative of the second candidate pixel value of the interpolated pixel according to the above step 216, and determines the second derivative of the pixel value of the target original pixel according to the above step 213. After that, the second difference value can be determined according to the second derivative of the second second derivative and the pixel value of the target original pixel.
- this step 217 may include:
- Step 2171 for each target pixel of the two first target pixels and the two second target pixels, determine the second derivative of the second candidate pixel value in the first direction, and the pixel value of the target pixel is in the first direction.
- the difference of the second derivative in the directions, the difference of the four first directions is obtained.
- the image processing device determines the second derivative of the second candidate pixel value in the first direction according to step 2161, and determines two first target pixels and two second targets according to step 2131. After the second-order derivative of the pixel value of each target pixel in the pixel in the first direction, the second-order derivative of the second candidate pixel value in the first direction can be determined, and the pixel value of each target pixel is in the first direction. The difference of the second derivative in the directions, the difference of the four first directions is obtained.
- the second-order derivative of the second candidate pixel value of the interpolated pixel in the i-th row and the j-th column in the first direction and the pixel value of the first target pixel in the i+1-th row and j-1 column are in the first direction.
- U 21
- the second derivative of the second candidate pixel value of the interpolated pixel in the i-th row and the j-th column in the first direction is the second derivative of the pixel value of the first target pixel in the i-1th row and the j+1th column in the first direction.
- the second derivative of the second candidate pixel value of the interpolated pixel in the i-th row and the j-th column in the first direction is the second derivative of the pixel value of the second target pixel in the i-1th row and j-1th column in the first direction.
- Step 2172 for each target pixel of the two first target pixels and the two second target pixels, determine the second derivative of the second candidate pixel value in the second direction, and the pixel value of the target pixel is in the second direction.
- the difference of the second-order derivative in the direction, the difference of the four second directions is obtained.
- the image processing device determines the second derivative of the second candidate pixel value in the second direction according to step 2162, and determines two first target pixels and two second targets according to step 2132. After the second-order derivative of the pixel value of each target pixel in the pixel in the second direction, the second-order derivative of the second candidate pixel value in the second direction can be determined, and the pixel value of each target pixel is in the second direction. The difference of the second-order derivative in the direction, the difference of the four second directions is obtained.
- the second-order derivative in the second direction of the second candidate pixel value of the interpolated pixel in the i-th row and the j-th column, and the i+1-th row and j-1th column corresponding to the interpolated pixel in the i-th row and j-th column the difference between the pixel value of the first target pixel in the second direction satisfies second derivative U 25:
- U 25
- Step 2173 Sum the difference values in the four first directions and the difference values in the four second directions to obtain a second difference value.
- the image processing device may determine the difference values of the four first directions.
- the difference value and the difference value of the four second directions are summed to obtain the second difference value.
- U - (i, j) U 21 + U 22 + U 23 + U 24 + U 25 + U 26 + U 27 + U 28. That is, the second difference U - (i, j) is satisfied:
- Step 218 Use the candidate pixel value corresponding to the smaller one of the first difference and the second difference to update the initial pixel value of the difference pixel.
- the difference between the second derivative of the pixel value of a certain pixel in the image and the second derivative of the pixel values of other pixels adjacent to the pixel is smaller.
- the image processing device determines the first difference U + (i, j) between the second derivative of the first candidate pixel value and the target original pixel according to step 214, and determines the second candidate pixel value according to step 217 the second derivative of the original target pixels of the second difference U - (i, j) then, the image processing means may determine the size of the first difference and the second difference.
- the candidate pixel value corresponding to a smaller difference value can make the continuity in the neighborhood of the interpolation pixel in the interpolation image better, and the candidate pixel value corresponding to a larger difference value can make the interpolation pixel value in the interpolation image The image continuity in the neighborhood is poor.
- the image processing device may use the device corresponding to the smaller of the first difference and the second difference.
- the selected pixel value updates the initial pixel value of the interpolated pixel.
- the second candidate pixel value corresponding to the second difference can be used to update the initial pixel value of the interpolated pixel, that is, the pixel value of the interpolated pixel can be made equal to the The second candidate pixel value. If the second difference is less than or equal to the first difference, the first candidate pixel value corresponding to the first difference can be used to update the initial pixel value of the interpolated pixel, that is, the pixel value of the interpolated pixel can be made equal to the first backup pixel. Select the pixel value.
- the image processing apparatus may execute the above steps 211 to 218 cyclically, that is, the pixel value of each interpolated pixel in the interpolated image can be continuously updated, thereby improving the quality of the interpolated image.
- the image processing device may stop when the cycle times of the above-mentioned step 211 to step 218 are cyclically executed is greater than or equal to the number threshold, and the image when the cycle is stopped is determined as the final processed image.
- the threshold of the number of times may range from 20 times to 50 times.
- the image processing device uses the first candidate pixel value and the target candidate pixel value in the second candidate pixel to update the initial pixel value of the interpolated pixel when performing step 218 for the first time, then
- the target candidate pixel value can be used to replace the initial pixel value of the interpolation pixel, and the target candidate pixel value can be adjusted to obtain a new first candidate pixel value and a new second candidate pixel value.
- the new first candidate pixel value is greater than the target candidate pixel value
- the new second candidate pixel value is less than the target candidate pixel value.
- the foregoing step 211 may be: increasing the target candidate pixel value of the interpolated pixel by the pixel step value to obtain the first candidate pixel value.
- the foregoing step 215 may be: reducing the target candidate pixel value of the interpolated pixel by the pixel step value to obtain the second candidate pixel value.
- FIG. 12 is a schematic diagram of an image processing effect provided by an embodiment of the present application.
- 401 is a to-be-processed image
- 402 is a partial image obtained by processing the to-be-processed image 401 using the image processing method provided in this embodiment of the application
- 403 is a partial image obtained by processing the to-be-processed image 401 only using an interpolation algorithm.
- FIG. 12 it can be seen that only the interpolation algorithm is used to process the image processed by the image 401 to be processed, and there are problems of artifacts and texture distortion.
- the image 402 obtained by using the image processing method provided by the embodiment of the present application has clearer texture and better image quality.
- the image processing device can obtain the interpolated pixels through the interpolation algorithm without adjusting the pixel values. Moreover, since the interpolation pixel is located at the edge of the image, it will not have a large impact on the quality of the image.
- step 202 can be performed before step 201
- step 207 can be performed before step 206
- step 212 and steps 215 to 217 can be performed before step 211.
- the embodiments of the present application provide an image processing method, which can first perform interpolation processing on the image to be processed to obtain an interpolated image, and update the initial pixel value of each interpolated pixel in the interpolated image, and update
- the difference between the second-order derivative of the pixel value of the interpolated pixel and the second-order derivative of the pixel value of the target original pixel in the interpolated image is small, which reduces the artifacts generated in the interpolated image, and improves the neighborhood of the interpolated pixel in the interpolated image.
- the image continuity within the domain, the quality of the image obtained by the final processing is higher.
- FIG. 13 is a schematic structural diagram of an image processing device provided by an embodiment of the present application. With reference to Figure 13, it can be seen that the device may include:
- the interpolation processing module 501 is configured to perform interpolation processing on the image to be processed to obtain an interpolated image.
- the interpolation image may include multiple original pixels and multiple interpolation pixels, and the initial pixel value of each interpolation pixel is determined according to the pixel value of at least one original pixel.
- the adjustment module 502 is configured to adjust the initial pixel value of the interpolated pixel for each interpolation pixel to obtain the first candidate pixel value and the second candidate pixel value.
- the first candidate pixel value is greater than the initial pixel value
- the second candidate pixel value is less than the initial pixel value
- the first determining module 503 is configured to determine the first difference between the second derivative of the first candidate pixel value and the second derivative of the pixel value of the target original pixel among the multiple original pixels.
- the target original pixel is an original pixel adjacent to the interpolation pixel among the multiple original pixels.
- the second determining module 504 is configured to determine the second difference between the second derivative of the second candidate pixel value and the second derivative of the pixel value of the target original pixel.
- the update module 505 is configured to use the candidate pixel value corresponding to the smaller difference between the first difference and the second difference to update the initial pixel value of the interpolated pixel.
- the embodiment of the present application provides an image processing device, which can first perform interpolation processing on an image to be processed to obtain an interpolated image, and update the initial pixel value of each interpolated pixel in the interpolated image, and update
- the difference between the second-order derivative of the pixel value of the interpolated pixel and the second-order derivative of the pixel value of the target original pixel in the interpolated image is small, which reduces the artifacts generated in the interpolated image and improves the area where the interpolated pixel in the interpolated image is located
- the continuity of the image, the quality of the final processed image is higher.
- the adjustment module 502 can be used to:
- the initial pixel value of the interpolated pixel is increased by the pixel step value to obtain the first candidate pixel value, and the initial pixel value of the interpolated pixel is decreased by the pixel step value to obtain the second candidate pixel value.
- the first determining module 503 may include:
- the first determining sub-module 5031 is configured to determine the first and second derivative of the first candidate pixel value according to the first candidate pixel value and the pixel value of the target original pixel.
- the second determining sub-module 5032 is configured to determine the second derivative of the pixel value of the target original pixel according to the pixel value of the target original pixel and the pixel value of the pixel adjacent to the target original pixel.
- the third determining sub-module 5033 is used to determine the first difference between the first second derivative and the second derivative of the pixel value of the target original pixel.
- the second determining module 504 may include:
- the fourth determining sub-module 5041 is configured to determine the second second derivative of the second candidate pixel value according to the second candidate pixel value and the pixel value of the target original pixel.
- the fifth determining sub-module 5042 is configured to determine the second difference between the second second derivative and the second derivative of the pixel value of the target original pixel.
- the target original pixels may include: two first target pixels and two second target pixels, wherein the connection line between each first target pixel and the interpolation pixel extends along the first direction, and each second target pixel The connecting line between the target pixel and the interpolation pixel extends along the second direction, and the first direction is perpendicular to the second direction.
- the first determining sub-module 5031 may be used for:
- the first candidate pixel value and the pixel values of the two first target pixels determine the second derivative of the first candidate pixel value in the first direction; according to the first candidate pixel value and the two second targets The pixel value of the pixel determines the second derivative of the first candidate pixel value in the second direction.
- the second determining sub-module 5032 can be used for:
- the pixel value of the pixel determines the second-order derivative of the pixel value of the target pixel in the first direction; for each of the two first target pixels and the two second target pixels, according to the pixel value of the target pixel, and The connection between the pixel adjacent to the target pixel and the target pixel is the pixel value of the pixel in the second direction, and the second-order derivative of the pixel value of the target pixel in the second direction is determined.
- the third determining sub-module 5033 can be used for:
- the difference of the four first directions and the difference of the four second directions are summed to obtain the first difference.
- the two first target pixels corresponding to the interpolated pixel in the i-th row and j-th column in the interpolated image are respectively the pixel in the i+1-th row and the j-1th column and the i-1th column and j+1 in the interpolated image.
- Columns of pixels, the two second target pixels corresponding to the interpolation pixels in the i-th row and the j-th column are the pixels in the i-1th row and the j-1th column and the i+1th column and j+1-th column pixels, respectively.
- I 11 + (i, j) I(i+1) ,J-1)+I(i-1,j+1)-2 ⁇ [I(i,j)+ ⁇ ].
- I(i+1,j-1) is the pixel value of the pixel in the i+1th row and j-1th column
- I(i-1,j+1) is the pixel in the i-1th row and j+1th column
- the pixel value of I(i,j) is the initial pixel value of the pixel in the i-th row and the j-th column
- ⁇ is the pixel step value
- both i and j are positive integers greater than 1.
- I 22 + (i, j) I(i-1 ,J-1)+I(i+1,j+1)-2 ⁇ [I(i,j)+ ⁇ ];
- I(i-1, j-1) is the pixel value of the pixel in row i-1 and column j-1
- I(i+1, j+1) is the pixel in row i+1 and column j+1 The pixel value.
- the fourth determining sub-module 5041 is configured to:
- the second candidate pixel value and the pixel values of the two first target pixels determine the second derivative of the second candidate pixel value in the first direction; according to the second candidate pixel value, and the two second targets The pixel value of the pixel determines the second derivative of the second candidate pixel value in the second direction.
- the fifth determining sub-module 5043 is used for:
- the difference of the second derivative, the difference of the four first directions is obtained;
- the difference of the four first directions and the difference of the four second directions are summed to obtain the second difference.
- I(i+1,j-1) is the pixel value of the pixel in the i+1th row and j-1th column
- I(i-1,j+1) is the pixel in the i-1th row and j+1th column
- the pixel value of I(i,j) is the initial pixel value of the pixel in the i-th row and the j-th column
- ⁇ is the pixel step value
- both i and j are positive integers greater than 1.
- I 22 - (i, j ) I (i-1 ,J-1)+I(i+1,j+1)-2 ⁇ [I(i,j)- ⁇ ];
- I(i-1, j-1) is the pixel value of the pixel in row i-1 and column j-1
- I(i+1, j+1) is the pixel in row i+1 and column j+1 The pixel value.
- the interpolation processing module 501 may include:
- the sixth determining sub-module 5011 is configured to determine the first gradient of the first area to be interpolated in the first direction in the image to be processed.
- the seventh determining sub-module 5012 is configured to determine the second gradient of the first area to be interpolated in the second direction perpendicular to the first direction.
- the first judgment sub-module 5013 is used to determine whether the first gradient is greater than the second gradient.
- the first interpolation sub-module 5014 is configured to: if the first gradient is greater than the second gradient, use an interpolation algorithm to perform interpolation processing on the first area to be interpolated in the second direction to obtain an initial interpolated image; if the second gradient is greater than the first gradient, use The interpolation algorithm performs interpolation processing on the first area to be interpolated along the first direction to obtain an initial interpolated image.
- the eighth determining sub-module 5015 is used to determine the third gradient of the second to-be-interpolated region of the initial interpolation image in the third direction.
- the angle between the third direction and the first direction is 45 degrees.
- the ninth determining sub-module 5016 is configured to determine the fourth gradient of the second area to be interpolated in the fourth direction perpendicular to the third direction.
- the second judgment sub-module 5017 is used to determine whether the third gradient is greater than the fourth gradient.
- the second interpolation sub-module 5018 is used for if the third gradient is greater than the fourth gradient, use an interpolation algorithm to perform interpolation processing on the second area to be interpolated along the fourth direction to obtain an interpolated image; if the fourth gradient is greater than the third gradient, use interpolation The algorithm performs interpolation processing on the second area to be interpolated along the third direction to obtain an interpolated image.
- the pixel located in row 2i-1 and column 2i-1 in the interpolated image is the original pixel, and the pixel value of the pixel in row 2i-1 and column 2i-1 in the interpolated image is the same as in the image to be processed
- the pixel values of the pixels in the i-th row and j-th column are equal.
- the embodiment of the present application provides an image processing device, which can first perform interpolation processing on an image to be processed to obtain an interpolated image, and update the initial pixel value of each interpolated pixel in the interpolated image, and update
- the difference between the second-order derivative of the pixel value of the interpolated pixel and the second-order derivative of the pixel value of the target original pixel in the interpolated image is small, which reduces the artifacts generated in the interpolated image and improves the area where the interpolated pixel in the interpolated image is located
- the continuity of the image, the quality of the final processed image is higher.
- FIG. 17 is a schematic structural diagram of another image processing apparatus provided by an embodiment of the present application. It can be seen with reference to FIG. 17 that the device 60 may include a processor 601, a memory 602, and a computer program stored on the memory 602 and running on the processor. The processor 601 can implement the foregoing when the computer program is executed.
- the image processing methods provided by the method embodiments are, for example, the methods shown in FIG. 1, FIG. 2, and FIG. 6 to FIG. 11.
- the embodiments of the present application provide a computer-readable storage medium in which operations are stored, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the image processing method provided by the above method embodiment For example, the methods shown in FIG. 1, FIG. 2, and FIG. 6 to FIG. 11 can be executed.
- the embodiment of the present application also provides a computer program product containing instructions.
- the computer program product runs on the computer, the computer executes the image processing method provided in the above method embodiment.
- FIG. 1 and FIG. 2 can be executed.
- the program can be stored in a computer-readable storage medium.
- the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
- An embodiment of the present application also provides a display device, which may include a display panel and the image processing device provided in the foregoing embodiments.
- the display panel can be used to display the image processed by the image processing device.
- the display device may be a liquid crystal display device, electronic paper, organic light-emitting diode (organic light-emitting diode, OLED) display device, active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED) display Devices, mobile phones, tablet computers, televisions, monitors, laptops, digital photo frames or navigators, and any other products or components with display functions.
- organic light-emitting diode organic light-emitting diode, OLED
- active-matrix organic light-emitting diode active-matrix organic light-emitting diode, AMOLED
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
Description
Claims (15)
- 一种图像处理方法,其特征在于,所述方法包括:对待处理图像进行插值处理,得到插值图像,所述插值图像包括:多个原始像素以及多个插值像素,每个所述插值像素的初始像素值根据至少一个所述原始像素的像素值确定;对于每个所述插值像素,调整所述插值像素的初始像素值,得到第一备选像素值和第二备选像素值,所述第一备选像素值大于所述初始像素值,所述第二备选像素值小于所述初始像素值;确定所述第一备选像素值的二阶导与所述多个原始像素中的目标原始像素的像素值的二阶导的第一差值;确定所述第二备选像素值的二阶导与所述目标原始像素的像素值的二阶导的第二差值;采用所述第一差值和所述第二差值中较小的差值对应的备选像素值更新所述插值像素的初始像素值;其中,所述目标原始像素为所述多个原始像素中与所述插值像素相邻的原始像素。
- 根据权利要求1所述的方法,其特征在于,所述调整所述插值像素的初始像素值,得到第一备选像素值和第二备选像素值,包括:将所述插值像素的初始像素值增加像素步进值,得到第一备选像素值;将所述插值像素的初始像素值减小所述像素步进值,得到第二备选像素值。
- 根据权利要求1或2所述的方法,其特征在于,所述确定所述第一备选像素值的二阶导与所述多个原始像素中的目标原始像素的像素值的二阶导的第一差值,包括:根据所述第一备选像素值,以及所述目标原始像素的像素值,确定所述第一备选像素值的第一二阶导;根据所述目标原始像素的像素值,以及与所述目标原始像素相邻的像素的像素值,确定所述目标原始像素的像素值的二阶导;确定所述第一二阶导与所述目标原始像素的像素值的二阶导的第一差值;所述确定所述第二备选像素值的二阶导与所述目标原始像素的像素值的二阶导的第二差值,包括:根据所述第二备选像素值,以及所述目标原始像素的像素值,确定所述第二备选像素值的第二二阶导;确定所述第二二阶导与所述目标原始像素的像素值的二阶导的第二差值。
- 根据权利要求3所述的方法,其特征在于,所述目标原始像素包括:两个第一目标像素和两个第二目标像素,其中,每个所述第一目标像素与所述插值像素之间的连线沿第一方向延伸,每个所述第二目标像素与所述插值像素之间的连线沿第二方向延伸,所述第一方向与所述第二方向垂直;所述根据所述第一备选像素值,以及所述目标原始像素的像素值,确定所述第一备选像素值的第一二阶导,包括:根据所述第一备选像素值,以及两个所述第一目标像素的像素值,确定所述第一备选像素值在所述第一方向上的二阶导;根据所述第一备选像素值,以及两个所述第二目标像素的像素值,确定所述第一备选像素值在所述第二方向上的二阶导;所述根据所述目标原始像素的像素值,以及与所述目标原始像素相邻的像素的像素值,确定所述目标原始像素的像素值的二阶导,包括:对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,根据所述目标像素的像素值,以及与所述目标像素相邻的像素中与所述目标像素之间的连线为所述第一方向的像素的像素值,确定所述目标像素的像素值在所述第一方向上的二阶导;对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,根据所述目标像素的像素值,以及与所述目标像素相邻的像素中与所述目标像素之间的连线为所述第二方向的像素的像素值,确定所述目标像素的像素值在所述第二方向上的二阶导;所述确定所述第一二阶导与所述目标原始像素的像素值的二阶导的第一差值,包括:对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,确定所述第一备选像素值在所述第一方向上的二阶导,与所述目标像素的像素 值在所述第一方向上的二阶导的差值,得到四个第一方向的差值;对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,确定所述第一备选像素值在所述第二方向上的二阶导,与所述目标像素的像素值在所述第二方向上的二阶导的差值,得到四个第二方向的差值;对四个所述第一方向的差值和四个所述第二方向的差值进行求和,得到第一差值。
- 根据权利要求4所述的方法,其特征在于,所述插值图像中第i行第j列的插值像素对应的两个所述第一目标像素分别为所述插值图像中第i+1行第j-1列像素和第i-1列第j+1列像素,所述第i行第j列的插值像素对应的两个所述第二目标像素分别为所述第i-1行第j-1列像素和第i+1列第j+1列像素;所述第i行第j列的插值像素的第一备选像素值在所述第一方向上的二阶导I 11 +(i,j)满足:I 11 +(i,j)=I(i+1,j-1)+I(i-1,j+1)-2×[I(i,j)+Δ];其中,所述I(i+1,j-1)为所述第i+1行第j-1列像素的像素值,所述I(i-1,j+1)为所述第i-1行第j+1列像素的像素值,所述I(i,j)为所述第i行第j列像素的初始像素值,所述Δ为所述像素步进值,i和j均为大于1的正整数;所述第i行第j列的插值像素的第一备选像素值在所述第二方向上的二阶导I 22 +(i,j)满足:I 22 +(i,j)=I(i-1,j-1)+I(i+1,j+1)-2×[I(i,j)+Δ];其中,所述I(i-1,j-1)为所述第i-1行第j-1列像素的像素值,所述I(i+1,j+1)为所述第i+1行第j+1列像素的像素值。
- 根据权利要求3至5任一所述的方法,其特征在于,所述目标原始像素包括:两个第一目标像素和两个第二目标像素,其中,每个所述第一目标像素与所述插值像素之间的连线沿第一方向延伸,每个所述第二目标像素与所述插值像素之间的连线沿第二方向延伸,所述第一方向与所述第二方向垂直;所述根据所述第二备选像素值,以及所述目标原始像素的像素值,确定所述第二备选像素值的第二二阶导,包括:根据所述第二备选像素值,以及两个所述第一目标像素的像素值,确定所述第二备选像素值在所述第一方向上的二阶导;根据所述第二备选像素值,以及两个所述第二目标像素的像素值,确定所述第二备选像素值在所述第二方向上的二阶导;所述根据所述目标原始像素的像素值,以及与所述目标原始像素相邻的像素的像素值,确定所述目标原始像素的像素值的二阶导,包括:对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,根据所述目标像素的像素值,以及与所述目标像素相邻的像素中与所述目标像素之间的连线为所述第一方向的像素的像素值,确定所述目标像素的像素值在所述第一方向上的二阶导;对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,根据所述目标像素的像素值,以及与所述目标像素相邻的像素中与所述目标像素之间的连线为所述第二方向的像素的像素值,确定所述目标像素的像素值在所述第二方向上的二阶导;所述确定所述第二二阶导与所述目标原始像素的像素值的二阶导的第二差值,包括:对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,确定所述第二备选像素值在所述第一方向上的二阶导,与所述目标像素的像素值在所述第一方向上的二阶导的差值,得到四个第一方向的差值;对于两个所述第一目标像素和两个所述第二目标像素中的每个目标像素,确定所述第二备选像素值在所述第二方向上的二阶导,与所述目标像素的像素值在所述第二方向上的二阶导的差值,得到四个第二方向的差值;对四个所述第一方向的差值和四个所述第二方向的差值进行求和,得到第二差值。
- 根据权利要求6所述的方法,其特征在于,所述插值图像中第i行第j列的插值像素对应的两个所述第一目标像素分别为所述插值图像中第i+1行第j-1列像素和第i-1列第j+1列像素,所述第i行第j列的插值像素对应的两个所述第二目标像素分别为所述第i-1行第j-1列像素和第i+1列第j+1列像素;所述第i行第j列的插值像素的第二备选像素值在所述第一方向上的二阶导I 11 -(i,j)满 足:I 11 -(i,j)=I(i+1,j-1)+I(i-1,j+1)-2×[I(i,j)-Δ];其中,所述I(i+1,j-1)为所述第i+1行第j-1列像素的像素值,所述I(i-1,j+1)为所述第i-1行第j+1列像素的像素值,所述I(i,j)为所述第i行第j列像素的初始像素值,所述Δ为所述像素步进值,i和j均为大于1的正整数;所述第i行第j列的插值像素的第二备选像素值在所述第二方向上的二阶导I 22 -(i,j)满足:I 22 -(i,j)=I(i-1,j-1)+I(i+1,j+1)-2×[I(i,j)-Δ];其中,所述I(i-1,j-1)为所述第i-1行第j-1列像素的像素值,所述I(i+1,j+1)为所述第i+1行第j+1列像素的像素值。
- 根据权利要求1至7任一所述的方法,其特征在于,所述对待处理图像进行插值处理,得到插值图像,包括:确定待处理图像中第一待插值区域在第一方向的第一梯度;确定所述第一待插值区域在与所述第一方向垂直的第二方向的第二梯度;若所述第一梯度大于所述第二梯度,采用插值算法沿所述第二方向对所述第一待插值区域进行插值处理,得到初始插值图像;若所述第二梯度大于所述第一梯度,采用插值算法沿所述第一方向对所述第一待插值区域进行插值处理,得到初始插值图像;确定所述初始插值图像中第二待插值区域在第三方向的第三梯度,所述第三方向与所述第一方向的夹角为45度;确定所述第二待插值区域在与所述第三方向垂直的第四方向的第四梯度;若所述第三梯度大于所述第四梯度,采用所述插值算法沿所述第四方向对所述第二待插值区域进行插值处理,得到插值图像;若所述第四梯度大于所述第三梯度,采用所述插值算法沿所述第三方向对所述第二待插值区域进行插值处理,得到插值图像。
- 根据权利要求至1至8任一所述的方法,其特征在于,所述插值图像中位于第2i-1行第2i-1列的像素为所述原始像素,且所述插值图像中第2i-1行第2i-1 列的像素的像素值与所述待处理图像中第i行第j列的像素的像素值相等。
- 一种图像处理装置,其特征在于,所述装置包括:插值处理模块,用于对待处理图像进行插值处理,得到插值图像,所述插值图像包括:多个原始像素以及多个插值像素,每个所述插值像素的初始像素值根据至少一个所述原始像素的像素值确定;调整模块,用于对于每个所述插值像素,调整所述插值像素的初始像素值,得到第一备选像素值和第二备选像素值,所述第一备选像素值大于所述初始像素值,所述第二备选像素值小于所述初始像素值;第一确定模块,用于确定所述第一备选像素值的二阶导与所述多个原始像素中的目标原始像素的像素值的二阶导的第一差值;第二确定模块,用于确定所述第二备选像素值的二阶导与所述目标原始像素的像素值的二阶导的第二差值;更新模块,用于采用所述第一差值和所述第二差值中较小的差值对应的备选像素值更新所述插值像素的初始像素值;其中,所述目标原始像素为所述多个原始像素中与所述插值像素相邻的原始像素。
- 根据权利要求10所述的装置,其特征在于,所述调整模块,用于:将所述插值像素的初始像素值增加像素步进值,得到第一备选像素值;将所述插值像素的初始像素值减小所述像素步进值,得到第二备选像素值。
- 根据权利要求10或11所述的装置,其特征在于,所述第一确定模块,包括:第一确定子模块,用于根据所述第一备选像素值,以及所述目标原始像素的像素值,确定所述第一备选像素值的第一二阶导;第二确定子模块,用于根据所述目标原始像素的像素值,以及与所述目标原始像素相邻的像素的像素值,确定所述目标原始像素的像素值的二阶导;第三确定子模块,用于确定所述第一二阶导与所述目标原始像素的像素值的二阶导的第一差值;所述第二确定模块,包括:第四确定子模块,用于根据所述第二备选像素值,以及所述目标原始像素的像素值,确定所述第二备选像素值的第二二阶导;第五确定子模块,用于确定所述第二二阶导与所述目标原始像素的像素值的二阶导的第二差值。
- 一种图像处理装置,其特征在于,所述装置包括:处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至9任一所述的图像处理方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述计算机可读存储介质在计算机上运行时,使得计算机执行如权利要求1至9任一所述的图像处理方法。
- 一种显示装置,其特征在于,所述显示装置包括:显示面板以及如权利要求10至13任一所述的图像处理装置;所述显示面板用于显示所述图像处理装置处理后的图像。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/642,455 US20220301101A1 (en) | 2020-04-26 | 2021-03-09 | Method and device for processing image, display device, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010337763.0 | 2020-04-26 | ||
CN202010337763.0A CN111553843B (zh) | 2020-04-26 | 2020-04-26 | 图像处理方法、图像处理装置及显示装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021218404A1 true WO2021218404A1 (zh) | 2021-11-04 |
Family
ID=72000297
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/079774 WO2021218404A1 (zh) | 2020-04-26 | 2021-03-09 | 图像处理方法、图像处理装置及显示装置 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20220301101A1 (zh) |
CN (1) | CN111553843B (zh) |
WO (1) | WO2021218404A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114418846A (zh) * | 2021-12-30 | 2022-04-29 | 深圳市安健科技股份有限公司 | 一种滤线栅摩尔纹的去除方法及终端 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111553843B (zh) * | 2020-04-26 | 2023-08-18 | 京东方科技集团股份有限公司 | 图像处理方法、图像处理装置及显示装置 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002033964A (ja) * | 2000-05-24 | 2002-01-31 | Hewlett Packard Co <Hp> | デジタル画像の欠陥画素補正方法 |
CN103856776A (zh) * | 2013-12-26 | 2014-06-11 | 辽宁师范大学 | 边界和曲率驱动修复的图像编码和解码方法 |
CN104871206A (zh) * | 2012-12-19 | 2015-08-26 | 马维尔国际贸易有限公司 | 用于数字图像的自适应缩放的系统和方法 |
CN106875340A (zh) * | 2017-04-05 | 2017-06-20 | 上海矽奥微电子有限公司 | 基于方向差值的图像缩放方法 |
CN107610052A (zh) * | 2017-09-22 | 2018-01-19 | 维沃移动通信有限公司 | 一种超分辨率重建方法及移动终端 |
CN111553843A (zh) * | 2020-04-26 | 2020-08-18 | 京东方科技集团股份有限公司 | 图像处理方法、图像处理装置及显示装置 |
-
2020
- 2020-04-26 CN CN202010337763.0A patent/CN111553843B/zh active Active
-
2021
- 2021-03-09 US US17/642,455 patent/US20220301101A1/en active Pending
- 2021-03-09 WO PCT/CN2021/079774 patent/WO2021218404A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002033964A (ja) * | 2000-05-24 | 2002-01-31 | Hewlett Packard Co <Hp> | デジタル画像の欠陥画素補正方法 |
CN104871206A (zh) * | 2012-12-19 | 2015-08-26 | 马维尔国际贸易有限公司 | 用于数字图像的自适应缩放的系统和方法 |
CN103856776A (zh) * | 2013-12-26 | 2014-06-11 | 辽宁师范大学 | 边界和曲率驱动修复的图像编码和解码方法 |
CN106875340A (zh) * | 2017-04-05 | 2017-06-20 | 上海矽奥微电子有限公司 | 基于方向差值的图像缩放方法 |
CN107610052A (zh) * | 2017-09-22 | 2018-01-19 | 维沃移动通信有限公司 | 一种超分辨率重建方法及移动终端 |
CN111553843A (zh) * | 2020-04-26 | 2020-08-18 | 京东方科技集团股份有限公司 | 图像处理方法、图像处理装置及显示装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114418846A (zh) * | 2021-12-30 | 2022-04-29 | 深圳市安健科技股份有限公司 | 一种滤线栅摩尔纹的去除方法及终端 |
Also Published As
Publication number | Publication date |
---|---|
CN111553843A (zh) | 2020-08-18 |
CN111553843B (zh) | 2023-08-18 |
US20220301101A1 (en) | 2022-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021218404A1 (zh) | 图像处理方法、图像处理装置及显示装置 | |
US9240033B2 (en) | Image super-resolution reconstruction system and method | |
TWI324329B (en) | Image signal processing device | |
WO2016145776A1 (zh) | 一种像素排列结构、显示装置及显示方法 | |
CN105654891A (zh) | 一种获取mura补偿值的方法、装置及显示面板 | |
TWI404019B (zh) | 資料轉換之裝置與方法、使用此裝置與方法以驅動影像顯示裝置之裝置與方法 | |
KR101980025B1 (ko) | 이미지 디스플레이 방법 및 디스플레이 시스템 | |
KR102521949B1 (ko) | 영상 보정부 및 표시 장치의 구동 방법 | |
US10475394B2 (en) | Driving method and driving device for liquid crystal display, and liquid crystal display | |
US20160247296A1 (en) | Method of Setting Grayscale Value of Liquid Crystal Panel and Liquid Crystal Display | |
CN109741705B (zh) | 一种显示面板的像素补偿方法及装置 | |
TWI672669B (zh) | 影像處理方法與裝置 | |
WO2020020076A1 (zh) | 灰阶设定方法、显示基板和显示装置 | |
US10650491B2 (en) | Image up-scale device and method | |
JP4011073B2 (ja) | 階調補正装置 | |
TWI792407B (zh) | 影像處理方法與顯示裝置 | |
KR20070063173A (ko) | 액정 표시 장치, 영상 신호 보정 방법 및 그 구동 방법 | |
US10930232B2 (en) | Method for color shift compensation based on abnormal image detection | |
US11397551B2 (en) | Method for determining offset distance of splicing screen and related apparatus | |
US20200143760A1 (en) | Driving method and driving device for display panel, and display device | |
US20060222267A1 (en) | Method and apparatus for pixel interpolation | |
JP2007086577A (ja) | 画像処理装置、画像処理方法、画像処理プログラム及び画像表示装置 | |
WO2022252555A1 (zh) | 显示面板的灰阶补偿方法及其装置 | |
TWI537873B (zh) | 影像修正方法與影像修正裝置 | |
TWI406187B (zh) | 快速高畫質視頻影像內插方法及裝置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21796104 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21796104 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27.06.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21796104 Country of ref document: EP Kind code of ref document: A1 |