Upcoming deadlines

Click here to load reader

  • date post

    23-Feb-2016
  • Category

    Documents

  • view

    38
  • download

    0

Embed Size (px)

description

Upcoming deadlines. Midterm: Wed, Nov 3 Project presentations: last week of class Nov 29, Dec 1 Project submission: last day of class Dec 6 will accept late without penalty until Dec 10. Project comments. mostly in good shape gameplay often lacking Universal advice: set a schedule - PowerPoint PPT Presentation

Transcript of Upcoming deadlines

Image Processing and Texture Synthesis

Upcoming deadlinesMidterm: Wed, Nov 3Project presentations: last week of classNov 29, Dec 1Project submission: last day of classDec 6will accept late without penalty until Dec 10Project commentsmostly in good shapegameplay often lacking

Universal advice: set a schedulea realistic scheduleinclude recognition of delaysavoid one-person "keystone" dependencies Screen-SpaceSpecial EffectsBasic IdeaPixel shaders can modify final colorBut, execute in parallel over entire imagewithout ability to look at nearby pixels

Perform color calculation in two passes:First, render to textureSecond, render sprite or triangles to screen with texture from first pass as inputSecond PassNow, can sample texture arbitrarily in second pass, allowing typical image processing operators to be used:blurring, sharpeningedge detectionmorphological operatorswhatever you can fit in the instruction limitExample Effectstoon shading, greyscale / sepia, negativeblur, depth-of-fieldbloom"wavy" drunkenness, underwater (?)"transmission error" flicker, film grain

transitions, pausing

OperatorsSingle-point operators act simultaneously on each pixel in the imagedo not actually need multiple passesmay be easier to manage if all in one shader rather than distributed to many shadersNeighbourhood operators act at a single pixel using information from a small region of surrounding pixelsThresholdingeach pixel is compared with a threshold:

Iij = 255, if Iij > tIij = 0, if Iij < t Thresholding

Color MappingVery general case of thresholdingEach pixel value indexes into a color table

Can be called false-coloring, pseudocoloringHuman visual system sensitive to color edges, so enhances feature visibilityColor Mapping

Applying a functionMost general casePixel value takes on the value of an arbitrary function Iij = F(Iij)ConvolutionMost general linear neighbourhood operationEach pixel becomes a weighted sum of the pixel values in its neighbourhoodNot computed in-place! Use only the original values in the computationConvolution Cij = s,t Ws,t Ii+s,j+t

Convolution Cij = s,t Ws,t Ii+s,j+t

Convolution result same dimensions as original imageConvolution Cij = s,t Ws,t Ii+s,j+t

Sum over the size of the neighbourhoodConvolution Cij = s,t Ws,t Ii+s,j+t

set of weights one per point in regionConvolution Cij = s,t Ws,t Ii+s,j+t

each pixel in the neighbourhoodBoundary ConditionsWhat to do at the edges of the image?Have to do something!Three possibilities:special operators at boundarytreat pixels outside image as zero/constantuse toroidal topology (wrap around)ConvolutionCan achieve many different effects depending on what the weights areNB, set of weights called mask or kernel

blurringsharpeningedge detectionBlurringSimple filter: all weights 1/(n*n) for a neighbourhood of n x n

BlurringThe larger the mask, the stronger the blurring.

Edge detectionWhat are edges?discontinuities in image characteristicsintensitycolortextureboundaries of objects

Edge detectionCertain convolution masks can detect intensity edgesSimple masks: Sobel operators, detect edges in x direction or y directionFirst derivative operators magnitude of difference = edge strength121000-1-2-110-120-210-1Morphological OperatorsCleaning up binary imagesNonlinear neighbourhood operator

Simplest operators: erosion and dilationErosion: run eraser along boundary pixelsDilation: run paintbrush along boundaryMorphological OperatorsGeneral case:binary image inputstructuring element: binary maskset operator (intersection, union)ErosionCenter structuring element on pixelIf any 1 in the structuring element covers a 0 in the input, set the output pixel to 0Apply to entire input simulteneously

Interiors of regions (all 1's) unchangedHoles growRegions shrinkIsolated tiny regions vanishDilationReverse of erosionCover pixel with structuring elementIf any 1 in structuring element matches 1 in input, set output to 1

Regions grow, holes shrinkOpening and ClosingOpening: erosion followed by dilationopens up gaps between regions

Closing: dilation followed by erosionfills in little holesdisconnected strings of pixels become connected tidies up edge mapBloomLight bleeding into dark areas from nearby light areasphenomenon of sensor, seen in photosrelated to effect experienced as eye adjusts to amount of incident lightOne approach: greyscale dilationB(u,v) = max(G*I)convolution of Gaussian with original

WaveringRemember, we can sample the texture anywhere, not just at our own pixelAre not even obliged to sample our own pixel: i.e., can read from elsewhere in textureRecall Perlin marble:sin(x+a*T(x,y))sample location offset by Perlin turbulenceWaveringSame principle: modify location where sample is takenFunhouse mirror: static modification (location-dependent)Underwater: time-dependent modificationHallucination, drunkenness: sum of local value and offset value ("seeing double")Use for Special Effects Image processing operators can be combined and composed to create a wide variety of effectsExploring the space of nonlinear local operators is extremely difficult!One approach genetic algorithms (Karl Sims, 1991)Artificial EvolutionStriking imagesIncomprehensible code(warped-color-noise (warped-bw-noise (dissolve x 2.53 y) z 0.09 12.0) (invert z) 0.05 -2.06)Human in the loop making decisions about which genelines live or dieSims: random codeVarious primitives:+, -, *, /, mod, round, min, max, exp, log, and, or, xor, cos, tan, blur, hsv-to-rgb, noise, Random arguments:random scalar or vector, variable, another expression, an imageCombined at random, guided by small changes to what looks good to a user