filling algorithms pixelwise mrfschaos mosaics patch segments are pasted, overlapping, across the...

30
Filling Algorithms Pixelwise MRFs Chaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing (Chaos Mosaics- MSR). Or a least cost path through the (chosen) overlapping images are found. Efros’01 uses dynamic programming, while Graphcut textures’03 uses… graphcut. Pixel distributions are determined by comparision with those with similar neighbourhoods. These distributions are sampled from or heuristics are performed on them to determine how to fill them.

Upload: charles-hayes

Post on 28-Mar-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Filling Algorithms

Pixelwise MRFs Chaos Mosaics

Patch segments are pasted, overlapping, across the image.

Then either:

● Ambiguities are removed by smoothing (Chaos Mosaics-MSR).

● Or a least cost path through the (chosen) overlapping images are found. Efros’01 uses dynamic programming, while Graphcut textures’03 uses… graphcut.

Pixel distributions are determined by comparision

with those with similar neighbourhoods.

These distributions are sampled from or heuristics are performed on them to determine how to fill them.

Page 2: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Synthesizing One Pixel

Infinite sample image

Generated image

Assuming Markov property, what is conditional probability distribution of p, given the neighbourhood window?

Instead of constructing a model, let’s directly search the input image for all such neighbourhoods to produce a histogram for p

To synthesize p, just pick one match at random

SAMPLE

p

Taken from Efros’ original presentation

Page 3: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Really Synthesizing One Pixel

finite sample image

Generated image

p

However, since our sample image is finite, an exact neighbourhood match might not be present

So we find the best match using SSD error (weighted by a Gaussian to emphasize local structure), and take all samples within some distance from that match

SAMPLE

Taken from Efros’ original presentation

Page 4: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

The pixel metric doesn’t matter

One of the surprising things about this is that the choice pixel metric doesn’t seem to matter.

Efros uses || . ||2 2 on RGB space, I’ve been using || . ||1, while Criminisi uses a metric based on the CIELab colour space.

It doesn’t seem to matter which you use, presumably because we are only concerned with nearest neighbours, and they are all topologically equivalent.

Page 5: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Dynamic Programming solution

block

B1 B2

Neighboring blocksconstrained by overlap

B1 B2

Minimal errorboundary cut

Chaotic Mosaics

Page 6: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Graphcuts solution

Chaotic Mosaics

Takes full advantage of the power of graphcuts method, it treats the whole image as one patch and finds optimal

joins along it.

Pros: Finds optimal (and often seamless) matches

Cons: Doesn’t find anything else, the recycling the optimal matches still

leaves you with tiling artefacts.

Page 7: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Graphcuts solution

Chaotic Mosaics

Image Quilting Graphcuts

Page 8: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

● Onion skin or Outside in● The first.● The simplest?● Works with single textures or

simple convex filling regions● Just picks away at the image one

layer at a time

Pixel choice and Filling Algorithms

Page 9: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

● Linear structure propagation● Onion skin +pushing in on linear textures● Better than Onion skin for multi textural

environments● When all you have is hammer, everything

starts to look like a nail. ~ Artefacts from trying too hard.

Pixel choice and Filling Algorithms

Missing Data Correction in Still Images and Image Sequences, Bornard et al. 2002

Page 10: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

● Linear structure propagation● Onion skin +pushing in on linear textures● Better than Onion skin for multi textural

environments● When all you have is hammer, everything

starts to look like a nail. ~ Artefacts from trying too hard.

Pixel choice and Filling Algorithms

Missing Data Correction in Still Images and Image Sequences, Bornard et al. 2002

Page 11: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Filling AlgorithmsOnion Peel Vs. Linear propagation

Push InNow

Onion Peel

Page 12: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

● Max. entropy fill● Consistent with MRF

assumptions.● Locally convex with a

minimum of occlusions at point of fill.

● Spirals in on simple shapes.

Pixel choice and Filling Algorithms

Page 13: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Why Coarse to Fine?

Standard Efros 15 pixelsStandard efros 21 pixels

New metric Efros 15 pixels

Efros uniform pixel weighting 15

C2f uniform pixel weightingCourse to fine 15 pixel nhood

The same but quicker...

Page 14: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Structures...Why Coarse to Fine?

Page 15: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

StructuresAs TexturesWhy Coarse to Fine?

Page 16: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

StructuresAs TexturesWhy Coarse to Fine?

Page 17: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Texture as structure?

?

Strong linear propagation comes from efros stylefills naturally.

Why Coarse to Fine?

Page 18: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Not readily apparent due to the onion skin fill

Efros

Linear propagation

The Efros Algorithm

with my pixel choice

Page 19: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

The algorithm often spots at the coarser levels that it has insufficient data to complete

Page 20: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly, this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the higher levels is still needed.

Page 21: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly, this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the higher levels is still needed.

Page 22: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly, this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the lowest resolution is still needed.

Page 23: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly, this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the lowest resolution is still needed.

Page 24: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the lowest resolution is still needed.

Page 25: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Annoyingly, this problem is not solvable by more data, in the sense of higher resolution images. Information about how to propagate edges at the lowest resolution is still needed.

Page 26: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

No guarantee it’s any better than linear propagation

Compare it with a smaller fill

Page 27: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Is manifold learning possible?

?

Up to a point, we don’t care what colour the books are when propagating the shelf.

Similar structural edge patterns are apparent everywhere.

Why Coarse to Fine?

Page 28: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Why Coarse to Fine?

Page 29: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Problems

● Speed Massively slower(hours rather than seconds)

than patch based synthesis even with coarse to fine reducing neighbourhood size.

● Can we reduce the search space via image segmentation?

● Alternatively turn our soft coarse to fine constraints into something harder, by only testing pixels from the neighbourhoods of the k-closest fits at a coarser level.

Page 30: Filling Algorithms Pixelwise MRFsChaos Mosaics Patch segments are pasted, overlapping, across the image. Then either: Ambiguities are removed by smoothing

Problems

Surprisingly, this could even increase robustness by preventing the growth of miss-fittings