Programming Dialects for Packing Representation.


190 views
Uploaded on:
Category: Fashion / Beauty
Description
Programming Dialects for Packing Illustrations Morgan McGuire Shriram Krishnamurthi John F. Hughes Chestnut College { morgan | sk | jfh}@cs.brown.edu Encoding Pictures as Projects Depicting Pictures (1) setPixel(0,0,BLUE); setPixel(1,0,BLUE); setPixel(2,0,BLUE); … setPixel(50,0,WHITE); …
Transcripts
Slide 1

Programming Languages for Compressing Graphics Morgan McGuire Shriram Krishnamurthi John F. Hughes Brown University { morgan | sk | jfh}@cs.brown.edu

Slide 2

Encoding Images as Programs

Slide 3

Describing Images (1) setPixel(0,0,BLUE); setPixel(1,0,BLUE); setPixel(2,0,BLUE); … setPixel(50,0,WHITE); … setPixel(100,0,RED); setPixel(101,0,RED); …

Slide 4

The Cost of Bandwidth Major expense of working together on the web Yahoo!: 65,000,000 pages/day Valve: 1M €/programming patch Image pressure is an one-shot action Low versus high data transfer capacity clients Multiresolution

Slide 5

Describing Images (2) rehash 50 times setNextPixel(BLUE); rehash 50 times setNextPixel(WHITE); rehash 50 times setNextPixel(RED); nextRow(); rehash 50 times setNextPixel(BLUE); …

Slide 6

American Flag Doesn’t pack and also the French banner in the “repeat n times” dialect.

Slide 7

Adding More Primitives drawRectangle(BLUE, …); drawRectangle(RED, …); drawRectangle(WHITE, …); drawStar(WHITE, …); … Is this enough?

Slide 8

Describing Complex Images

Slide 9

Describing Complex Images JPEG: dialect comprises of recurrence area guidelines GIF: dialect comprises of setPixel and word reference lookup Preferred organization relies on upon the picture

Slide 10

Observations Images are projects Even inside of one dialect, numerous conceivable depictions produce comparable pictures Lossy pressure Description length relies on upon dialect and picture intricacy Best pressure when the dialect coordinates the picture

Slide 11

The Obvious Compression Scheme Compress the picture in a few arrangements TGA, GIF, JPG, SVG, SWF Choose the best Add a byte to the record\'s front determining the pressure dialect

Slide 12

Problems with the Obvious Scheme None of the configurations may be especially useful for our picture Even JPEG tops out around 50:1, has genuine antiques Lacking perfect elements like: Multiresolution Time/Space tradeoff Introduction of new configurations requires new program modules

Slide 13

Describing Complex Images How would we be able to show improvement over the conspicuous methodology for pictures like this?

Slide 14

Using an Expressive Language (form (vertical-inclination BLUE WHITE) (polygon DARK-BLUE …) (polygon BLACK …) (* (polygon …) (obscure tree-surface) YELLOW))

Slide 15

Using an Expressive Language What on the off chance that we outline a truly expressive dialect for speaking to pictures? Since the “data” is a program the decompressor is a piece of the “data” Each picture gets its own custom arrangement High pressure We have control over multiresolution, perceptual antiques Package for the web as a module We just need to redesign the module when the dialect itself changes What’s amiss with this arrangement?

Slide 16

Example setPixel Language Expressive Language ? setPixel(0,0,WHITE); setPixel(1,0,WHITE); setPixel(2,0,WHITE); … (obscure (+ (turn (banana)) (contort (* RED (circle))) …) 2 Mb 2 kb

Slide 17

The Encoding Problem ? Pierre can’t code!

Slide 18

The Encoding Problem Photoshop menu EMACS setPixel(0,0,WHITE); setPixel(1,0,WHITE); setPixel(2,0,WHITE); … (obscure (+ (pivot (banana)) (mutilate (* RED (circle))) …) 2 Mb 2 kb

Slide 19

Where is the “Save as Code” Menu? It is anything but difficult to change over from a picture to projects in the GIF/JPG dialect More expressive dialect = harder transformation How much harder?

Slide 20

Much Harder! Changing over the picture into a program that creates it is a hunt issue The pursuit space is the space of every single conceivable system This is a limitlessly huge space

Slide 21

Tempering Expressiveness “Good” pressure dialects are ones where: Expressive force is substantial Searching is simple How would we make seeking simple?

Slide 22

Steerable Search Techniques Genetic Algorithms Inject area data through wellness capacity Metropolis Search Inject space data through move probabilities Simulated Annealing Inject space data through slope estimation

Slide 23

Perceptual Fitness Function Tweaking this is the space expert’s occupation Perfect wellness work a bit much (or conceivable!) e ( i ) = edge channel, b ( i ) = convolve with Gaussian, | i x | = shading greatness

Slide 24

Designing the Language Desirable dialect properties for pressure Expresses numerous pictures minimalistically There are numerous projects for which another, shorter system exists that delivers outwardly comparative yield Desirable pursuit properties Mutations security All projects end

Slide 25

The Evolver Language Scalar := genuine somewhere around 0 and 1 Vector := Scalar x Scalar x Scalar Matrix := Vector* Value := Matrix | Scalar | Vector Operator := Add | Collage | Blur | Noise | … Call := Operator x Expr* Expr := Call | Scalar | Vector

Slide 26

The Evolver Language Automatic intimidation between Matrix, Vector, Scalar Every administrator has the same space and reach Primitives incorporate stock pictures and surfaces No circling develops No capacities!

Slide 27

l : Not the Ultimate Compressor!

Slide 28

l : Not the Ultimate Compressor! Replicating code is at times great Multiple occasions of an example in a picture frequently vary marginally Hard to develop both definition and various applications

Slide 29

Added Benefits of Search Artist can spare the picture instantly Webmaster utilizes Evolver toolbox to hunt down an identical project It is anything but difficult to locate a vast program rapidly Webmaster lets Evolver keep on running Upload new, littler encodings as they are discovered More time = less space = less cost Multiple limitations: size, time, antiquities, decompression time

Slide 30

Results

Slide 31

Proof of Concept TGA 1:1 (128x128)

Slide 32

Proof of Concept JPG 24:1 (64x64)

Slide 33

Proof of Concept Evolver 50:1 , boundless subtle element determination

Slide 34

Proof of Concept TGA Evolver JPG

Slide 35

Lake Matheson Original

Slide 36

Lake Matheson Original Compressed 50:1

Slide 37

Gradient Original Compressed

Slide 38

Aspens Original

Slide 39

Aspens Original Compressed 54:1

Slide 40

Maples Original

Slide 41

Maples Code Collage(HueShift(HueShift(Min(RockImage(), Collage(Rotate(0.22693111, {0.4339271, - 0.060890462, - 0.14983156}), {0.9689341, - 0.31166452, 1.0}, EnvironmentMap(Interpolate(Derivative({0.5260445, - 0.9943271, - 0.83629435}), FishImage(), 0.22693111), Collage(VSplit(VGradient(), Interpolate(Min(RockImage(), Collage(0.22693111, {0.90638816, - 0.3161332, 1.0}, EnvironmentMap({0.3538252, - 0.11179591, 0.76402247}, {0.3538252, - 0.11179591, 0.76402247}))), - 0.75621074, Derivative(HueShift(LowColorNoise(), {-0.60136193, - 0.9961748, 0.956824})))), {-0.6025814, - 0.5151359, - 0.2444776}, MiniBlur(Blur({0.48381335, 0.37744927, 0.18049468})))))), LeafImage()), LeafImage()), Rotate(Rotate(Interpolate(Max(Rotate(LeafImage(), Cosine({0.13357106, - 0.48899084, 0.46273336})), LeafImage()), {0.26036343, - 0.2474052, 0.3318561}, Add(Rotate(Interpolate(Max(LowNoise(), LeafImage()), {0.26036343, - 0.2474052, 0.3318561}, Add(Rotate(Interpolate({0.26036343, - 0.2474052, 0.3318561}, {0.26036343, - 0.2474052, 0.3318561}, Max(Rotate(Blur(Noise()), FrequencyStars()), BitAnd(VSplit(LeafImage(), {-0.3782095, 0.06973941, 0.7708523}), Collage(Blur({0.19214037, 0.7060751, 0.9632803}), {-0.94875985, 0.9535051, 0.9628181}, {-0.94875985, 0.9535051, 0.9628181})))), FrequencyStars()), Zoom({0.84155905, 0.44450688, - 0.6368634}, Interpolate(0.97325927, {0.43938103, 0.8003519, - 0.8865588}, FrequencyStars())))), FrequencyStars()), Zoom({1.0, 0.35874906, - 0.42753658}, {1.0, 0.35874906, - 0.42753658}))), FrequencyStars()), {0.30287892, - 0.7879979, 0.756324}), Distort(Distort(HueShift(Distort(Distort(Distort(HueShift(Distort(Rotate(Distort(Distort(HueShift(Distort(Rotate(Distort(Distort(Blur(Distort(Distort(RockImage(), ArcTangent(ExpandRange(ColorNoise()))), ArcTangent(ExpandRange(ColorNoise())))), ArcTangent(ExpandRange(ColorNoise()))), ArcTangent(ColorNoise())), RockImage()), ArcTangent(ColorNoise())), RockImage()), ColorNoise()), Blur(Add({0.214469, - 0.05106278, - 0.8334819}, Blur(Blur({-0.44914088, 0.86714524, - 0.038012877}))))), Distort(Distort(Blur(Distort(Distort(- 0.32682085, SunriseImage()), ArcTangent(0.84263784))), LeafImage()), ArcTangent(ColorNoise()))), ArcTangent(ColorNoise())), ExpandRange(RockImage())), 0.315652), ColorNoise()), Blur(ExpandRange(Add({0.44753784, 0.15750253, - 0.9017423}, {0.214469, - 0.05106278, - 0.8334819})))), ExpandRange(RockImage())), ColorNoise()), Blur(Rotate({0.10588625, 0.2359776, - 0.20337643}, {0.2809281, - 0.97692156, - 0.49766022}))))

Slide 42

Maples Original Compressed 56:1

Slide 43

Multi-determination JPEG 14:1 Evolver 56:1

Slide 44

Multi-determination JPEG 14:1 Evolver 56:1

Slide 45

Related work Searching for projects Massalin’s Superoptimizer Frigo & Johnson’s FFTW Palsberg, Lucier & Mamillapalli Karl Sims Programmatic picture pressure Fractal pressure MPEG-7 Steerable pursuit strategies in design MLT Radiosity

Slide 46

Conclusions It is tractable to look the space of all projects! The “visually similar” paradigm makes PC illustrations a fascinating space Keep utilizing JPEG for now…

Slide 47

Future bearings Improve picture quality/pressure How can the outline of searchable dialects be formalized? How do expressive builds influence the inquiry issue? Other intriguing areas: activity, sound pressure, picture look, robot con

Recommended
View more...