1. A function approximation processing method comprising: performing by a processor the following steps: an input step of inputting image data; a binarization step of binarizing the input image data; a contour extraction step of extracting line segments of horizontal and vertical directions from the binarized image data; a tangent line segment extraction step of extracting, as a tangent line segment, a line segment that has a length satisfying predetermined conditions from the extracted line segments of horizontal and vertical directions; an anchor point extraction step of extracting, as an anchor point, a point on the extracted tangent line segment, wherein the anchor point is an endpoint on the extracted tangent line segment in a case where a line segment adjacent to the extracted tangent line segment is a tangent line segment, or the anchor point is a point that corresponds to an end point on the extracted tangent line segment that is shifted, in a case where the line segment adjacent to the extracted tangent line segment is not a tangent line segment; a curve approximation processing step of performing curve approximation processing in which a line segment between anchor points that are respectively extracted in the anchor point extraction step is approximated to a curve; and a correction step of replacing the curve approximated in the curve approximation processing step with a diagonal straight line in a case where the line segment approximated in the curve approximation processing step was originally a diagonal straight line.