IP Library Granted Patent US 7,012,624
Granted Patent B2
US 7,012,624 · App. 10/748,419 · Granted Mar 14, 2006

Texture synthesis for repairing damaged images

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,012,624
App. No.
10/748,419
Granted
Mar 14, 2006
Kind
B2
Abstract

A method for generating texture includes (1) selecting a target patch to be filled in a image, (2) selecting a sample patch as a candidate for filling the target patch, (3) determining a first difference between a first area surrounding the target patch and a corresponding first area surrounding the sample patch, and a second difference between a second area surrounding the target patch and a corresponding second area surrounding the sample patch, (4) multiplying a larger of the first difference and the second difference with a first weight factor, and a smaller of the first difference and the second difference with a second weight factor, and (5) summing the weighted first difference and the weighted second difference as a distance between the target patch and the sample patch.

Claims (193)

1. A method, comprising:

selecting a target patch to be filled in an image;

selecting a sample patch as a candidate for filling the target patch;

determining a first difference between a first area surrounding the target patch and a corresponding first area surrounding the sample patch, and a second difference between a second area surrounding the target patch and a corresponding second area surrounding the sample patch;

multiplying a larger of the first difference and the second difference with a first weight factor, and a smaller of the first difference and the second difference with a second weight factor; and

summing the weighted first difference and the weighted second difference as a distance between the target patch and the sample patch.

2. The method of claim 1 , wherein the sample patch is selected from the image.

3. The method of claim 1 , wherein said determining a first difference and said determining a second difference comprise:

d

n

=

[

1

A

n

i

=

1

A

n

(

p

B

i

i

-

p

B

(

x

,

y

)

i

)

2

]

1

/

2

,

where d n is the difference of an nth pair of corresponding areas, A n is the number of corresponding points in the nth pair of corresponding areas, and p i B k and p i B (x,y) are the corresponding gray values of the corresponding points in the target patch and the sample patch, respectively.

4. The method of claim 3 , wherein said multiplying and said summing comprise:

d

=

i

=

1

n

α

i

d

i

,

α

i

=

1

sequence

(

d

i

)

,

where d is the distance between the target patch and the sample patch, d i is the difference of the ith pair of corresponding boundary areas in a descending sequence, α i is the weight given to the difference d i , and n is the total number of corresponding boundary areas.

5. The method of claim 1 , further comprising:

adjusting pixel values of the sample patch to match the first and the second areas surrounding the target patch; and

filling the target patch with the adjusted sample patch.

6. The method of claim 5 , wherein said adjusting values of the sample patch comprises determining an adjusted sample patch that minimizes the following equation:

J

(

u

)

=

Ω

(

(

u

x

-

g

x

)

2

+

(

u

y

-

g

y

)

2

)

(

x

,

y

)

+

λ

Ω

(

u

-

f

)

2

(

x

,

y

)

,

where u is the adjusted sample patch, g is the sample patch, f includes the first and the second areas, Ω is an area to be filled with the adjusted sample patch u,

u

x

is a gradient of the adjusted sample patch u in x direction at point (x,y),

u

y

is a gradient of the adjusted sample patch u in y direction at point (x,y),

g

x

is a gradient of the sample patch g in x direction at point (x,y), and

g

y

is a gradient of the sample patch image g in y direction at point (x,y), and λ is a weight factor.

7. The method of claim 1 , further comprising:

rotating the sample patch;

determining another first difference between the first area surrounding the target patch and another corresponding first area surrounding the sample patch after said rotating, and another second difference between the second area surrounding the target patch and another corresponding second area surrounding the sample patch after said rotating;

multiplying the larger of said another first difference and said another second difference with the first weight factor, and the smaller of said another first difference and said another second difference with the second weight factor;

summing the weighted another first difference and the weighted another second difference as another distance between the target patch and the sample patch after said rotating.

8. The method of claim 7 , further comprising:

if the distance between the target patch and the sample patch is less than a threshold, saving the sample patch in a set of sample patches that can be used fill the target patch;

if said another distance between the target patch and the sample patch after said rotating is less than the threshold, saving said another sample patch in the set of sample patches that can be used fill the target patch; and

selecting one sample patch from the set of sample patches and filling the target patch with said one sample patch.

9. The method of claim 1 , further comprising, prior to said selecting a target patch, said selecting a sample patch, said determining, said multiplying, and said summing:

converting the image from color to gray.

10. The method of claim 9 , further comprising, after said converting the image from color to gray, said selecting a target patch, said selecting a sample patch, said determining, said multiplying, and said summing:

converting the filled image from gray to color.

11. The method of claim 1 , further comprising:

if the distance between the target patch and the sample patch is less than a threshold, saving the sample patch in a set of sample patches that can be used fill the target patch;

selecting another sample patch and repeating said determining, said multiplying, and said summing for said another sample patch to determine another distance between the target patch and said another sample patch;

if said another distance between the target patch and said another sample patch is less than the threshold, saving said another sample patch in the set of sample patches that can be used fill the target patch; and

selecting one sample patch from the set of sample patches and filling the target patch with said one sample patch.

12. A method, comprising:

selecting a target patch to be filled in the image;

selecting a sample patch as a candidate for filling the target patch;

determining a first difference between a first area surrounding the target patch and a corresponding first area surrounding the sample patch, and a second difference between a second area surrounding the target patch and a corresponding second area surrounding the sample patch;

multiplying a larger of the first difference and the second difference with a first weight factor, and a smaller of the first difference and the second difference with a second weight factor;

summing the weighted first difference and the weighted second difference as a distance between the target patch and the sample patch;

if the distance between the target patch and the sample patch is less than a threshold, saving the sample patch in a set of sample patches that can be used fill the target patch;

selecting another sample patch and repeating said determining, said multiplying, and said summing for said another sample patch to determine another distance between the target patch and said another sample patch;

if said another distance between the target patch and said another sample patch is less than the threshold, saving said another sample patch in the set of sample patches that can be used fill the target patch;

selecting one sample patch from the set of sample patches;

adjusting pixel values of the selected sample patch to match the first and the second areas surrounding the target patch; and

filling the target patch with the adjusted sample patch.

Assignments (5)
RELEASE OF SECURITY INTEREST Recorded Nov 13, 2015
From: EAST WEST BANK
To: ARCSOFT, INC.; MULTIMEDIA IMAGE SOLUTION LIMITED; ARCSOFT (HANGZHOU) MULTIMEDIA TECHNOLOGY CO., LTD.; ARCSOFT (SHANGHAI) TECHNOLOGY CO., LTD.; ARCSOFT HANGZHOU CO., LTD.
Reel/Frame 037109/0027 →
SECURITY INTEREST Recorded Aug 14, 2014
From: ARCSOFT, INC.; ARCSOFT (SHANGHAI) TECHNOLOGY CO., LTD.; ARCSOFT (HANGZHOU) MULTIMEDIA TECHNOLOGY CO., LTD.; MULTIMEDIA IMAGE SOLUTION LIMITED; ARCSOFT HANGZHOU CO., LTD.
To: EAST WEST BANK
Reel/Frame 033535/0537 →
RELEASE OF SECURITY INTEREST Recorded Jul 19, 2011
From: EAST WEST BANK
To: ARCSOFT, INC.
Reel/Frame 026616/0643 →
SECURITY AGREEMENT Recorded Apr 13, 2010
From: ARCSOFT, INC.
To: EAST WEST BANK
Reel/Frame 024218/0828 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 11, 2004
From: ZHU, YUNFANG; WANG, HUIQIONG; JIN, YIQING; WU, DONGHUI; ZHOU, LINGXIANG
To: ARCSOFT, INC.
Reel/Frame 014722/0663 →