A boundary line detection apparatus and method and an image processing
apparatus and method as well as a recording medium by which the jaggy in
the proximity of a boundary line is removed without increasing the
sampling rate to remove are disclosed. The differences between pixel
values between a noticed pixel and pixels in the proximity of the noticed
pixel are compared with each other to detect whether or not a boundary is
present in the proximity of the noticed pixel. Then, a length, a
direction, and a start point and an end portion of the boundary line are
determined. Then, the distance between the noticed pixel and the boundary
line is calculated, and the pixel value of the noticed pixel is weighted
using the distance. Then, the pixel obtained by the weighting is
outputted.