The invention provides a method for interpolating a pixel within an image.
The image has a plurality of pixels arranged in a matrix format. The
method includes detecting if there is an edge in a block of the image
according to a Discrete Cosine Transform (DCT) data of the block, within
which the pixel is located. The method further includes if an edge is
detected, determining an interpolation direction of the pixel according
to the DCT data, and interpolating the pixel according to the
interpolation direction. The method further includes if no edge is
detected, interpolating the pixel vertically or horizontally. A device
for implementing the method is also provided.