PURPOSE:To discriminate the quality of goods by providing a window area in a visual field to watch the goods to be conveyed, counting the number of picture elements as a binary output by image picking-up the goods with the image pickup device and comparing with the reference value. CONSTITUTION:In a visual field S to watch the goods to be conveyed, three windows W1, W2 and W3 are specified. An X coordinate data storing device 51 and a Y coordinate data storing device 52 respectively store the X coordinates and the Y coordinates of the respective windows. A window area output means 54 receives the output from a coordinate comparing means 53, respectively obtains the 'AND' of X1, X2 and X3 coordinate data from the storing device 51 and Y1, Y2 and Y3 coordinate data from the comparing means 53 and sends it to a counting means 55 as the window area signal. The counting means 55 examines the serial scanning data outputted from one-dimensional line sensor 4 for one scanning, detects and counts the picture data in it and sends them throughan adding means 56 to a holding means 57. The total value classified by respective windows of the holding means 57 is compared with the reference value classified by respective windows prepared separately and decides the quality of the goods.