Abstract:
A method and a device for enhancing an edge of an image are provided. The method includes: obtaining a first gradient value of a pixel; determining whether the pixel is at a rough edge according to the first gradient value; if yes, obtaining a first edge enhancement value of the pixel and obtaining a first edge enhancement result of the pixel according to the first edge enhancement value; if no, obtaining a second gradient value of the pixel; determining whether the pixel is at a tiny edge according to the second gradient value; if yes, obtaining a second edge enhancement value of the pixel and obtaining a second edge enhancement result of the pixel according to the second edge enhancement value; if no, obtaining the pixel value of the pixel as the edge enhancement result of the pixel; and repeating above steps until each pixel of the image is processed.