Boundary contour of the tablet image should be extracted when the shape defect is detected for the rotundity tablets in blister packaging. The reptile is a basic method for boundary contour tracking. A method has been presented to distinguish tablet defect based on the reptile with memory and alterable window for image boundary tracking. Some parameters have been used to distinguish tablet defect beforehand,such as the pixel density of closed contour curve,the trap and embranchment tracked by reptile and the alterable window size to stop tracking. So the efficiency would be improved effectively for the defect recognition in the behind image processing.