Rafael Cruz
Rafael Cruz

Reputation: 697

How to implement a similar of photoshop's "patch tool" function?

I have to automatically remove a barcode in a T-Shirt image, like the attached file:

barcode http://img546.imageshack.us/img546/2888/codel.jpg

I know I can do it manually in photoshop using the function "patch tool" that replaces the cropped area by image in the surrounded area but I need to either implement a code for that or get an SDK in Delphi to support this process automatically by passing to the function the (X,Y) points of the edges of the barcode.

Does anyone have any ideas?

Upvotes: 8

Views: 1270

Answers (1)

Dr. belisarius
Dr. belisarius

Reputation: 61046

As you already have the barcode position, you could generate a mask automagically and perform a Navier-Stokes Image Restoration.

Example in Mathematica:

enter image description here

Upvotes: 11

Related Questions