1. A method of producing a reference image, comprising: forming plural images by a CCD camera by imaging a plurality of glass bottles as samples, wherein said samples may contain defective glass bottles; and producing a reference image from the obtained plural images, a range of brightness when light is applied to a non-defective glass bottle being specified in said reference image.