An image processing apparatus comprising: an image acquiring section that acquires a captured image of one or more markers set in a marker settable range (b); a detection section that detects a plurality of edges (11 to 14 - Figure 8A) of the one or more markers in the image or a plurality of feature points of the one or more markers in the image, each of the plurality of feature points indicating an end point of one of the one or more markers (63a to 63j - Figure 19A) or a center of gravity of one of the one or more markers (66a to 66h - Figure 21 A); a polygon generation section that estimates a plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) based on the plurality of edges (11 to 14 - Figure 10E) or the plurality of feature points (63a to 63j - Figure 19A) and generates a virtual polygon region (70 - Figure 12A; 71 - Figure 19A) surrounded by the plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) and a plurality of vertexes (A, B, C, D - Figure 10E) each being an intersection point of the plurality of straight lines; and a camera parameter calculation section that calculates a camera parameter based on a feature value of the virtual polygon region in the image and a feature value of the virtual polygon region in a real space, wherein: the feature value of the virtual polygon region in the image is information on a shape of the virtual polygon region in the image, the feature value of the virtual polygon region in the real space is information on a shape of the virtual polygon region in the real space, and at least one of the plurality of vertexes is a virtual vertex which being included in a region outside the marker settable range (a) and being different from the edge or the feature point in the image. an image acquiring section that acquires a captured image of one or more markers set in a marker settable range (b); a detection section that detects a plurality of edges (11 to 14 - Figure 8A) of the one or more markers in the image or a plurality of feature points of the one or more markers in the image, each of the plurality of feature points indicating an end point of one of the one or more markers (63a to 63j - Figure 19A) or a center of gravity of one of the one or more markers (66a to 66h - Figure 21 A); a plurality of edges (11 to 14 - Figure 8A) of the one or more markers in the image or a plurality of feature points of the one or more markers in the image, each of the plurality of feature points indicating an end point of one of the one or more markers (63a to 63j - Figure 19A) or a center of gravity of one of the one or more markers (66a to 66h - Figure 21 A); each of the plurality of feature points indicating an end point of one of the one or more markers (63a to 63j - Figure 19A) or a center of gravity of one of the one or more markers (66a to 66h - Figure 21 A); an end point of one of the one or more markers (63a to 63j - Figure 19A) or a center of gravity of one of the one or more markers (66a to 66h - Figure 21 A); a polygon generation section that estimates a plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) based on the plurality of edges (11 to 14 - Figure 10E) or the plurality of feature points (63a to 63j - Figure 19A) and generates a virtual polygon region (70 - Figure 12A; 71 - Figure 19A) surrounded by the plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) and a plurality of vertexes (A, B, C, D - Figure 10E) each being an intersection point of the plurality of straight lines; and estimates a plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) based on the plurality of edges (11 to 14 - Figure 10E) or the plurality of feature points (63a to 63j - Figure 19A) and the plurality of edges (11 to 14 - Figure 10E) or the plurality of feature points (63a to 63j - Figure 19A) and generates a virtual polygon region (70 - Figure 12A; 71 - Figure 19A) surrounded by the plurality of straight lines (11' to 14' - Figure 10E; L11 and L12 - Figure 19A) and a plurality of vertexes (A, B, C, D - Figure 10E) each being an intersection point of the plurality of straight lines; and a camera parameter calculation section that calculates a camera parameter based on a feature value of the virtual polygon region in the image and a feature value of the virtual polygon region in a real space, wherein: the feature value of the virtual polygon region in the image is information on a shape of the virtual polygon region in the image, the feature value of the virtual polygon region in the real space is information on a shape of the virtual polygon region in the real space, and at least one of the plurality of vertexes is a virtual vertex which being included in a region outside the marker settable range (a) and being different from the edge or the feature point in the image. the feature value of the virtual polygon region in the image is information on a shape of the virtual polygon region in the image, the feature value of the virtual polygon region in the real space is information on a shape of the virtual polygon region in the real space, and at least one of the plurality of vertexes is a virtual vertex which being included in a region outside the marker settable range (a) and being different from the edge or the feature point in the image.