Inspection of container

PURPOSE:To achieve a high sensitivity in the detection of a fouling by compressing a data indicating a seam to discriminate image data being masked with a moving range given to a straight line extracted. CONSTITUTION:First, a picture signal of an internal surface of a container with a seam as obtained from a direction of a specified angle is at least binary coded. Then, an image data binary coded is compressed to extract a linear component and the linear component is discriminated as fouling or seam depending on whether it turns to the top of the container or not. When it is determined to be a seam, the data with a seam range given to a seam linearity is extracted being masked with a seam band to discriminate. Thus, the seam component is extracted and the fouling is detected being separated from the seam thereby enabling highly accurate detection of a fouling.