Most image inpainting techniques require a human to identify manually the portion to be inpainted. We propose a new detection algorithm which can automatically detect defect portions in an image, including arbitrary scratches by color ink. The proposed algorithm is based on the characteristics of uniform gray of scratches and structural information of scratches. In this algorithm, we apply top-hat transform and low-hap transformation to highlight the scratch regions and use erosion- dilation operator in morphology to finalize the regions of arbitrary scratches. Many photos are used for testing. Preliminary results show that most scratches can be automatically detected without human involvement.
展开▼