Patent ID: 9639918
Date: 2017-05-02
CPC Classifications: G06T

Claim:
1. A method of anti-aliasing of an image with super-resolution comprising the steps of: (1) adopting a Canny edge detection to detect edges of an image and saving the edges as an original edge pixel frame, which comprises the steps of: smoothing the image edges by using a Gaussian filter; calculating a gradient magnitude and a gradient direction of the edges by applying a first-order partial derivative of the finite difference; adopting an non-maxima suppression to the gradient magnitude of the edges; and applying a dual-threshold algorithm to detect and connect the edges; (2) enlarging the original edge pixel frame to form a 2×2 enlarged pixel frame, retaining all information of edge pixels of the original edge pixel frame, additional pixels of the enlarged pixel frame caused by the enlargement are pixels to be interpolated; (3) replacing the pixels to be interpolated with a zero grayscale; and (4) compensating the pixels to be interpolated which are temporarily replaced by the zero grayscale along edge directions of the retained original edge pixels in the enlarged pixel frame, which comprises the steps of: dividing the edge pixels detected on the basis of the step (1) into a plurality of 4×4 pixels, and determining whether there is a special edge within the 4×4 pixel, if so, applying a corresponding 4×4 interpolation rule to calculate, and if not, determining whether there is a 2×2 universal edge within the 4×4 pixel, if so, applying a 2×2 common interpolation rule to compensate the zero grayscale pixels, if the above two edges do not exist, then applying a double-cubic interpolation algorithm to compensate the interpolation of the zero grayscale pixels; wherein the 4×4 interpolation rule is configured to determine an edge direction of the 4×4 pixel, and interpolating along the edge direction based on a center point of the 4×4 pixel, the interpolations of a top point and a left point of the center point are simultaneously compensated; the 2×2 common interpolation rule is for determining the edge direction of only four pixel points in the center of the 4×4 pixel, and interpolating along the edge direction based on the center point of the 4×4 pixel, the interpolations of the top point and the left point of the center point are simultaneously compensated; the compensation for interpolating of the center point of the 4×4 pixel, the top point, and the left point of the center point are determined by the four pixel points in the center of the 4×4 pixel.