1. An image inspection apparatus for inspecting an output image on a recording medium by scanning the output image as a scanned image, the image inspection apparatus comprising: processing circuitry configured to obtain data of an output-target image used by an image forming apparatus to conduct an image forming operation, and to generate an inspection reference image using the data of the output-target image, the inspection reference image to be used for an image inspection of the scanned image; determine whether the scanned image includes a defect based on a comparison result obtained by comparing a difference between the inspection reference image and the scanned image with a given threshold, and determine the given threshold, wherein the processing circuitry is further configured to generate a first image having a normal image condition to be used for determining the given threshold, wherein the first image is a digital image generated from data or an analog image generated by scanning an image printed from the data, compute a difference between the first image and a second image obtained by scanning a threshold setting image prepared by adding an artificial defect to the first image, and determine the given threshold based on the difference between the second image and the first image.