- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Programming Languages for Compressing Graphics Morgan McGuire Shriram Krishnamurthi John F. Hughes Brown University { morgan | sk | jfh}@ Encoding Images as Programs 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); … The Cost of Bandwidth Major cost of doing business on the web Yahoo!: 65,000,000 pages/day Valve: 1M €/software patch Image compression is a one-shot activity Low vs. high bandwidth users Multiresolution Describing Images (2) repeat 50 times setNextPixel(BLUE); repeat 50 times setNextPixel(WHITE); repeat 50 times setNextPixel(RED); nextRow(); repeat 50 times setNextPixel(BLUE); … American Flag Adding More Primitives drawRectangle(BLUE, …); drawRectangle(RED, …); drawRectangle(WHITE, …); drawStar(WHITE, …); … Describing Complex Images Describing Complex Images Observations Images are programs Even within one language, many possible descriptions produce similar images Lossy compression Description length depends on language and image complexity Best compression when the language matches the image The Obvious Compression Scheme Compress the image in several formats TGA, GIF, JPG, SVG, SWF Choose the best Add a byte to the front of the file specifying the compression language Problems with the Obvious Scheme None of the formats may be particularly good for our image Even JPEG tops out around 50:1, has serious artifacts Lacking ideal features like: Multiresolution Time/Space tradeoff Introduction of new formats requires new browser plug-ins Describing Complex Images Using an Expressive Language Using an Expressive Language What if we design a really expressive language for representing images? Because the “data” is a program the decompressor is part of the “data” Each image gets its own custom format High compression We have control over multiresolution, perceptual artifacts Package for the web as a plug-in We only need to upgrade the plug-in when the langua
文档评论(0)