1. A method of detecting impurities in a molten resin comprising: passing the molten resin through a passage having a window through which light can pass; emitting light from a light source through said window and the molten resin flowing through said passage, sensing, by means of a sensor, shadows produced when the light from said light source is interrupted by an impurity contained in the molten resin, and measuring a size of the impurity from a product of a width of the shadow and an intensity of light from the shadow; wherein judgment is made that if optical signals obtained by detecting the light that has passed through the molten resin indicate that a bright area exists around a dark area, then said dark area is determine to be a shadow of an impurity.