A Stained Glass Image Filter David Mould University of Saskatchewan

Preview:

Citation preview

A Stained Glass Image FilterA Stained Glass Image Filter

David MouldDavid Mould

University of SaskatchewanUniversity of Saskatchewan

Stained Glass FilterStained Glass Filter

Goal: transform any Goal: transform any image into stained-image into stained-glass imageglass image

?

Stained GlassStained Glass

““Cartoon” – planned Cartoon” – planned tile layouttile layout

Leading emphasizes Leading emphasizes image edgesimage edges

Tiles have simple Tiles have simple shapesshapes

Few colors usedFew colors used

Voronoi regionsVoronoi regions

Mosaics; Photoshop filterMosaics; Photoshop filter

Stained Glass TilesStained Glass Tiles

Tile boundaries match Tile boundaries match image edgesimage edges

No large tilesNo large tiles

No small tilesNo small tiles

No “weird” tilesNo “weird” tiles

Stained Glass Tiles (2)Stained Glass Tiles (2)

Tiles should be Tiles should be “approximately “approximately convex” – no convex” – no bottlenecksbottlenecks

No “island” tilesNo “island” tiles

SegmentationSegmentation

ErosionErosion

DilationDilation

Morphological OperatorsMorphological Operators

Region SmoothingRegion Smoothing

Region SmoothingRegion Smoothing

Tile RepairTile Repair

Bottlenecks detected by progressive erosion.Bottlenecks detected by progressive erosion.

Disconnected components are relabeled and Disconnected components are relabeled and simultaneously dilated into the parent region.simultaneously dilated into the parent region.

Similar approach used to subdivide big tiles.Similar approach used to subdivide big tiles.

Completed CartoonCompleted Cartoon

Completed CartoonCompleted Cartoon

Bottlenecks splitLarge regions split

BackgroundsBackgrounds

BackgroundsBackgrounds

Choosing ColorsChoosing Colors

Medieval palette highly restrictedMedieval palette highly restricted

Want colors near the image colors, but –Want colors near the image colors, but –

brightbright

high contrasthigh contrast

from limited palettefrom limited palette

Heraldic TincturesHeraldic Tinctures

Medieval colorsetMedieval colorset

Corresponds closely to colors available in Corresponds closely to colors available in glassglass

Designed to be vivid and high-contrastDesigned to be vivid and high-contrast

Heraldic TincturesHeraldic Tinctures

Stained Glass FilterStained Glass Filter

SegmentationSegmentation

Region smoothingRegion smoothing

Removal of small tilesRemoval of small tiles

Subdivision of strange-shaped tilesSubdivision of strange-shaped tiles

Subdivision of large tilesSubdivision of large tiles

Tile coloringTile coloring

RenderingRendering

Color SelectionColor Selection

Choose heraldic color nearest the original Choose heraldic color nearest the original colorcolor

Map sable to off-white (clear glass)Map sable to off-white (clear glass)

Rendered ImagesRendered Images

Future WorkFuture Work

painting glasspainting glass

glass defects – scarring, chipping – as glass defects – scarring, chipping – as additional channel to match initial imageadditional channel to match initial image

later technology: flashing, etchinglater technology: flashing, etching

Questions?Questions?

Recommended