An optical method of using a vision system to inspect containers made of transparent or translucent material and including at least one visible pattern, the method being characterized in that it consists: • in illuminating the containers successively traveling past the vision system; • in forming at least one image (I i) of each container traveling past the vision system, each image possessing a determined number of pixels, each pixel having a respective intensity level; • in determining, in the image of each container, at least one treatment zone (Zt) including at least one visible pattern for inspection, and at least one search zone (Zr) in which there appears at least one marker visible pattern; • in preparing a digital mask (Mi) at least for the treatment zone (Zt) of the images; • in determining the position and the orientation of the marker visible pattern in said search zone (Zr) of the image of the container; • in applying a geometrical transformation to the digital mask (Mi) or to the treatment zone (Zt), which transformation is a function of the position and the orientation of the marker visible pattern, so as to be capable during a treatment step of placing the mask (Mi) and the treatment zone (Zt) into a position in which they coincide; • in applying image treatment to each pixel of the treatment zone (Zt), the treatment depending on the intensity value of the coincident pixel of the digital mask (Mi), in order to detect the presence of any defect in the container; and • updating the digital mask (Mi) by: • taking account of at least one image (I i) of the containers; and • deciding whether or not to modify the digital mask (Mi) as a function of said image (Ii), the modification of the mask consisting: • in determining the position and the orientation of the visible pattern for inspection in the treatment zone (Zt) of the images; • in applying a geometrical transformation to the treatment zone (Zt) of the image or to the digital mask so as to be capable of placing the digital mask (Mi) and the treatment zone (Zt) in a position in which they coincide; and • in melding at least the treatment zone (Zt) of the image and of the mask in order to update the digital mask (Mi). • in illuminating the containers successively traveling past the vision system; • in forming at least one image (I i) of each container traveling past the vision system, each image possessing a determined number of pixels, each pixel having a respective intensity level; • in determining, in the image of each container, at least one treatment zone (Zt) including at least one visible pattern for inspection, and at least one search zone (Zr) in which there appears at least one marker visible pattern; • in preparing a digital mask (Mi) at least for the treatment zone (Zt) of the images; • in determining the position and the orientation of the marker visible pattern in said search zone (Zr) of the image of the container; • in applying a geometrical transformation to the digital mask (Mi) or to the treatment zone (Zt), which transformation is a function of the position and the orientation of the marker visible pattern, so as to be capable during a treatment step of placing the mask (Mi) and the treatment zone (Zt) into a position in which they coincide; • in applying image treatment to each pixel of the treatment zone (Zt), the treatment depending on the intensity value of the coincident pixel of the digital mask (Mi), in order to detect the presence of any defect in the container; and • updating the digital mask (Mi) by: • taking account of at least one image (I i) of the containers; and • deciding whether or not to modify the digital mask (Mi) as a function of said image (Ii), the modification of the mask consisting: • in determining the position and the orientation of the visible pattern for inspection in the treatment zone (Zt) of the images; • in applying a geometrical transformation to the treatment zone (Zt) of the image or to the digital mask so as to be capable of placing the digital mask (Mi) and the treatment zone (Zt) in a position in which they coincide; and • in melding at least the treatment zone (Zt) of the image and of the mask in order to update the digital mask (Mi). • taking account of at least one image (I i) of the containers; and • deciding whether or not to modify the digital mask (Mi) as a function of said image (Ii), the modification of the mask consisting: • in determining the position and the orientation of the visible pattern for inspection in the treatment zone (Zt) of the images; • in applying a geometrical transformation to the treatment zone (Zt) of the image or to the digital mask so as to be capable of placing the digital mask (Mi) and the treatment zone (Zt) in a position in which they coincide; and • in melding at least the treatment zone (Zt) of the image and of the mask in order to update the digital mask (Mi).