Patent ID: 7680339

Claim:
An image processing method comprising: using a processor to perform the following: dividing an image into a plurality of rectangles; detecting an edge magnitude and an edge direction of a first rectangle, wherein the first rectangle is one of the plurality of rectangles; calculating an edge magnitude in a direction perpendicular to a predetermined direction from a second rectangle, wherein the second rectangle is located at a position separated from a position of the first rectangle in the predetermined direction by a distance less than a length of one side of the first rectangle; and deciding an edge magnitude and an edge direction of the first rectangle on the basis of the edge magnitude detected in the detection step and the edge magnitude calculated in the calculation step, wherein the deciding step includes a second deciding step of deciding, when the edge magnitude calculated in the calculation step is larger than both the edge magnitude of the first rectangle detected in the detection step and the edge magnitude of a rectangle adjacent to the first rectangle in a predetermined direction detected in the detection step, the edge magnitude and edge direction of the first rectangle by updating the edge magnitude and edge direction of the first rectangle to the edge magnitude and edge direction of the second rectangle.