Top Banner
IMAGE RESTORATION AND REALISM MILLIONS OF IMAGES SEMINAR YUVAL RADO
53

Image Restoration And Realism

Feb 15, 2016

Download

Documents

Gibson Gibson

Image Restoration And Realism. Millions of images seminar Yuval Rado. Image Realism. What is CG images? How can we tell the difference?. Today’s topics. Super – Resolution What is it? How it’s done? Algorithm. Results. CG2REAL The idea behind. Cosegmatation. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Image Restoration And Realism

IMAGE RESTORATION AND REALISMMILLIONS OF IMAGES SEMINARYUVAL RADO

Page 2: Image Restoration And Realism

2

IMAGE REALISM

•What is CG images?•How can we tell the difference?

Page 3: Image Restoration And Realism

3

TODAY’S TOPICS

• Super – Resolution• What is it?• How it’s done?• Algorithm.• Results.

• CG2REAL• The idea behind.• Cosegmatation.• Color & texture transfer.• Results.

Page 4: Image Restoration And Realism

4

SUPER – RESOLUTION

• Methods for achieving high-resolution enlargements of pixel-based images.• Estimating missing high-resolution detail that isn’t present in

the original image, and which we can’t make visible by simple sharpening.

Page 5: Image Restoration And Realism

5

HOW IT’S DONE?

• Using learning based approach for enlarging images.• In a training set, the algorithm learns the fine details that

correspond to different image regions seen at a low-resolution and then uses those learned relationships to predict fine details in other images.

Page 6: Image Restoration And Realism

6

TRAINING SET GENERATIONLow resolution image

High resolution image Low resolution enlargement via bilinear interpolation

High resolution high pass filter & contrast normalization

Low resolution high pass filter & contrast normalization

Page 7: Image Restoration And Realism

7

LOW RESOLUTION – HIGH RESOLUTION PROBLEM

Input Patch

Closest image patches from

database

Corresponding high-resolution patches from

database

Page 8: Image Restoration And Realism

8

HOW CAN WE SOLVE THIS?• Markov Network

𝑃 (𝑋|𝑌 )= 1𝑍∏

(𝑖𝑗 )Ψ 𝑖𝑗 (𝑥 𝑖 ,𝑥 𝑗 )∏

(𝑖 )Φ𝑖 (𝑥 𝑖 , 𝑦 𝑖 ) Ψ 𝑖𝑗 (𝑥 𝑖 , 𝑥 𝑗 )=exp (− 𝑑𝑖𝑗 (𝑥 𝑖 ,𝑥 𝑗 )

2𝜎2 )

Problem: very long time to calculate, not practical.

Page 9: Image Restoration And Realism

9

THE BELIEF PROPAGATION

• Not giving exact results as the Markov Network, but much faster!• Still gives good results.• Only three or for iterations of the algorithm is enough for

getting the results we need.

Page 10: Image Restoration And Realism

10

THE BELIEF PROPAGATION – CONT.

• Let be the message from node to node . • The message contains the vectors of dimensionality of the state

we estimate at node .• is the part of the corresponds to high resolution patch .• The rule of updating is:

• The marginal probability for each high resolution patch at node is:

Page 11: Image Restoration And Realism

11

FASTEST METHOD – ONE PASS ALGORITHM • Based on the belief propagation, there is a faster algorithm that

calculates only the high resolution patch compatibilities of neighboring high resolution patches that are already selected, typically the patches above and to the left, in raster-scan order processing. • One pass super resolution generates the missing high-frequency

content of a zoomed image as a sequence of predictions from local image information.

Page 12: Image Restoration And Realism

12

ONE PASS ALGORITHM – DIAGRAM

Page 13: Image Restoration And Realism

13

RESULTS • The training set pictures:

Page 14: Image Restoration And Realism

14

RESULTS – CONT. Original Image Cubic spline One pass algorithm

Page 15: Image Restoration And Realism

15

RESULTS – CONT. Cubic splineOriginal Image One pass algorithm

Page 16: Image Restoration And Realism

16

RESULTS – CONT.

Page 17: Image Restoration And Realism

17

RESULTS – TRAINING SET DEPENDENCYTraining set example Input image One pass algorithm

Page 18: Image Restoration And Realism

18

RESULTS – FAILURE EXAMPLEOriginal Image Cubic spline One pass algorithm

Page 19: Image Restoration And Realism

19

CG2REAL

• Improving the Realism of Computer Generated Images using a large Collection of Photographs.

Computer Generated CG2REAL

Page 20: Image Restoration And Realism

20

THE IDEA BEHIND?

• Use Computer Generated image as an input.• Look in real photo collection for similar images.• Mark the corresponding area in the CG image.• Transfer the color and texture from the real image to the CG

image.• Smooth the edges.

Page 21: Image Restoration And Realism

21

THE PROCESS

Page 22: Image Restoration And Realism

22

FINDING SIMILAR IMAGES

• Ordering the images in pyramid.• The key of the pyramid is a combination of two features:• The SIFT features of each image.• The color in each feature.

Page 23: Image Restoration And Realism

23

FINDING SIFT FEATURES

1. Scale Space extrema detectiona) Construct Scale Spaceb) Take Difference of Gaussiansc) Locate DoG Extrema

2. Key point localization3. Orientation assignment4. Build Key point Descriptors

Page 24: Image Restoration And Realism

24

COSEGMATATION

• Segmenting the images from the database and the input CG image.• Matching similar regions in all images.• All in one step!

Page 25: Image Restoration And Realism

25

COSEGMATATION – CONT.

• For each pixel we define a feature vector which is the concatenation of:• The pixel color in L*a*b* space.• the normalized and coordinates at .• A binary indicator vector such that is when pixel is in the image

and otherwise.

Page 26: Image Restoration And Realism

26

COSEGMATATION – CONT.

• The distance between feature vectors at pixels and in images and is a weighted Euclidean distance:

• is the L*a*b* color distance between pixel in image and pixel in image .• is spatial distance between pixels and .• The delta function encodes the distance between the binary

components of the feature vector.

Page 27: Image Restoration And Realism

27

COSEGMATATION – RESULTS

Page 28: Image Restoration And Realism

28

TEXTURE TRANSFER

• Done locally, by the results of the Cosegmatation.• Rely on the similar photographs we retrieved from the database to

provide us with a set of textures to help upgrade the realism of the CG image.• Limitations:

Can’t reuse the same region many times because this often leads to visual artifacts in the form of repeated regions.

• The idea behind: We align multiple shifted copies of each real image to the different regions of the CG image and transfer textures using graph-cut.

Page 29: Image Restoration And Realism

29

TEXTURE TRANSFER – CONT.

• For each cosegmented part of the picture, we use cross correlation of edge maps (magnitudes of gradients) to find the real image, and the optimal shift, that best matches the CG image for that particular region.• We repeat the process in a greedy manner until all regions in the CG

image are completely covered.• To reduce repeated textures, we only allow up to shifted copies of

an image to be used for texture transfer (typically ).• Now each pixel contains up to labels.

Page 30: Image Restoration And Realism

30

TEXTURE TRANSFER – CONT.

• For each pixel we use the label assignment function to choose which label we apply in that pixel.• The label assignment function:

Page 31: Image Restoration And Realism

31

TEXTURE TRANSFER – CONT. • is a data penalty term that measures distance between a patch

around pixel in the CG image and a real image.

• is the average distance in L*a*b* space between the patch centered around pixel in the CG image and the patch centered around pixel in the image associated with label .

• is the average distance between the magnitudes of the gradients of the patches.

controls the error of transferring textures between different cosegmentation regions.• and are normalized weights.

𝐶 (𝐿 )=∑𝑝𝐶𝑑 (𝑝 ,𝐿 (𝑃 ) )+∑

𝑝 ,𝑞𝐶𝑖 (𝑝 ,𝑞 ,𝐿 (𝑝 ) ,𝐿 (𝑞 ) )

Page 32: Image Restoration And Realism

32

TEXTURE TRANSFER – CONT.

• is an interaction term between two pixels and and their labels.

• M(p) is near strong edges in the CG image and near in smooth regions.• affects the amount of texture switching that can occur. For low values

of , the algorithm will prefer small patches of textures from many images and for high values of the algorithm will choose large blocks of texture from the same image.

𝐶 (𝐿 )=∑𝑝𝐶𝑑 (𝑝 ,𝐿 (𝑃 ) )+∑

𝑝 ,𝑞𝐶𝑖 (𝑝 ,𝑞 ,𝐿 (𝑝 ) ,𝐿 (𝑞 ) )

Page 33: Image Restoration And Realism

33

TEXTURE TRANSFER – CONT.

• After we choose the right label assignment using the function we described earlier we transfer the texture and smooth it nicely to the CG image via Poisson blending.

Page 34: Image Restoration And Realism

34

COLOR TRANSFER

•Has two approaches:•Color histogram matching.• Local color transfer.

Page 35: Image Restoration And Realism

35

COLOR HISTOGRAM MATCHING

• Works well between real images.• Typically fails when used In matching CG images and real

images.• This happens because the histogram of CG images is very

different the histogram of real. Due to less colors used in CG imaginary.• This leads to instability in global color transfer.

Page 36: Image Restoration And Realism

36

COLOR HISTOGRAM MATCHINGCG input Global histogram matching

Page 37: Image Restoration And Realism

37

LOCAL COLOR TRANSFER

•How it’s done?• Down sampling of the images.• Computation of the color transfer offsets per region from

the lower resolution images.• smoothing and up sampling the offsets using joint bilateral

up sampling.

Page 38: Image Restoration And Realism

38

LOCAL COLOR TRANSFER - ALGORITHM

• In each subsampled region that we have we match two histograms:• 1D histogram matching on the L* channel.• 2D histogram matching on the a* and b* channels.

• Great results obtained after no more than 10 iterations of this algorithm.

Page 39: Image Restoration And Realism

39

LOCAL COLOR TRANSFER - RESULTSCG input Color model Local color transfer

Page 40: Image Restoration And Realism

40

TONE TRANSFER

•Decompose the luminance channel of the CG image and one or more real images using a QMF pyramid (QMF - quadrature mirror filter).•We apply 1D histogram matching to match the

subband statistics of the CG image to the real images in every region.

Page 41: Image Restoration And Realism

41

TONE TRANSFER – CONT.

• Now we model the effect of the histogram matching as a change in gain:

• is the level subband coefficient at pixel .• is the corresponding subband coefficient after regional histogram matching• is the gain, when it’s greater than 1 it’s amplifies the details in the subband.

When it’s less than 1 it will diminish those details.• lower subbands are not amplified beyond higher subbands and that the gain

signals are smooth near zero crossings.

Page 42: Image Restoration And Realism

42

TONE TRANSFER – RESULTS CG input Tone model

Local color an tone transfer

Close up before

Close up after

Page 43: Image Restoration And Realism

43

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 44: Image Restoration And Realism

44

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 45: Image Restoration And Realism

45

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 46: Image Restoration And Realism

46

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 47: Image Restoration And Realism

47

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 48: Image Restoration And Realism

48

CG2REAL – RESULTS CG Image

CG2REAL Image

Page 49: Image Restoration And Realism

49

CG2REAL – FAILURES

Page 50: Image Restoration And Realism

50

CG2REAL – EVALUATION

Page 51: Image Restoration And Realism

51

CG2REAL – EVALUATION

Page 52: Image Restoration And Realism

52

THANK YOU FOR LISTENING

Page 53: Image Restoration And Realism

53

REFERENCES

• William T. Freeman, Thouis R. Jones, and Egon C. PasztorIEEE Computer Graphics and Applications 2002, Example-Based Super-Resolution.• Johnson MK, Dale K, Avidan S, Pfister H, Freeman

WT, Matusik W, CG2Real: Improving the Realism of Computer Generated Images using a Large Collection of Photographs.• http://en.wikipedia.org/wiki/Superresolution