1. An image forming apparatus, comprising: an image carrier that holds a toner pattern; a memory device in which toner pattern data has been stored; a sensor that puts detection light onto the image carrier and detects reflection light from the image carrier; and a controller that performs development of toner patterns based on the toner pattern data corresponding to a first halftoning method and a second halftoning method, and identifies respective toner density values of patch images contained in each of the toner patterns from output of the sensor, the patch images corresponding to grades in a gradation respectively; wherein one of the toner patterns contains first patch images for the first halftoning method, and another of the toner patterns contains second patch images for the second halftoning; and the controller performs development of only one out of both a first patch image which is one of the first patch images and a second patch image which is one of the second patch images and identifies toner density values of both the first patch image and the second patch image from output of the sensor for the only one out of both the first patch image and the second patch image if an absolute value of a difference between the number of dots in the first patch image and the number of dots in the second patch image is equal to or less than a predetermined value and an absolute value of a difference between the number of dot-level edges in the first patch image and the number of dot-level edges in the second patch image is equal to or less than a predetermined value.