Standardizing Rich Web Applications for Web 3.0

Philippe Le Hégaret, <plh@w3.org>

MIT dome

About this presentation

You'll need Firefox 3.5 (only available as beta) to see some of the demonstration in this presentation.

Press the 'k' key now in order to avoid changing slides on mouse click. Use the arrow keys (left and right) to change slides instead.

W3C Sets the Standards that Make the Web Work

2006 Tech Plenary meeting, participants, from the back of room

Web 1.0

Netscape

Let's browse the Web

circa 1994

passive user experience

Web 2.0

Youtube

Let's interact with the Web

2004-today

⇉ interactive user experience:
blogs, vlogs, wikis, tweets, …

Web 2.0

But…

Facebook license debate

What's our future?

Future

By Albert Robida, 1882

Web 3.0: Improving the Web platform

Web 3.0: Web of Interaction

Future of Web interaction

Shaping the Web's user interface

Example: Gaussian Blur article

Gaussian Blur

(From wikipedia)

Blurry? Blurry?

Gaussian blur describes blurring an image by a Gaussian function. It is a widely used effect in graphics software, typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a smooth blur resembling that of viewing the image through a translucent screen, distinctly different from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination. Gaussian smoothing is also used as a pre-processing stage in computer vision algorithms in order to enhance image structures at different scales—see scale-space representation and scale-space implementation.

Mathematically, applying a Gaussian blur to an image is the same as convolving the image with a Gaussian function; this is also known as a two-dimensional Weierstrass transform. By contrast, convolving by a circle (i.e., a circular box blur) would more accurately reproduce the bokeh effect. Since the Fourier transform of a Gaussian is another Gaussian, applying a Gaussian blur has the effect of reducing the image's high-frequency components; a Gaussian blur is thus a low pass filter.

Mechanics

The Gaussian blur is a type of image-blurring filter that uses a Gaussian function (which is also used for the normal distribution in statistics) for calculating the transformation to apply to each pixel in the image. The equation of a Gaussian function in one dimension is

G x y = 1 2 π σ e - x 2 2 σ 2

in two dimensions, it is the product of two such Gaussians, one per direction:

G x y = 1 2 π σ 2 e - x 2 + y 2 2 σ 2

where x is the distance from the origin in the horizontal axis, y is the distance from the origin in the vertical axis, and σ is the standard deviation of the Gaussian distribution. When applied in two dimensions, this formula produces a surface whose contours are concentric circles with a Gaussian distribution from the center point. Values from this distribution are used to build a convolution matrix which is applied to the original image. Each pixel's new value is set to a weighted average of that pixel's neighborhood. The original pixel's value receives the heaviest weight (having the highest Gaussian value) and neighboring pixels receive smaller weights as their distance to the original pixel increases. This results in a blur that preserves boundaries and edges better than other, more uniform blurring filters; see also scale-space implementation.

In theory, the Gaussian function at every point on the image will be non-zero, meaning that the entire image would need to be included in the calculations for each pixel. In practice, when computing a discrete approximation of the Gaussian function, pixels at a distance of more than 3σ are small enough to be considered effectively zero. Thus contributions from pixels outside that range can be ignored. Typically, an image processing program need only calculate a matrix with dimensions 6 σ + 6 σ (where is the ceiling function) to ensure a result sufficiently close to that obtained by the entire gaussian distribution.

In addition to being circularly symmetric, the Gaussian blur can be applied to a two-dimensional image as two independent one-dimensional calculations, and so is termed linearly separable. That is, the effect of applying the two-dimensional matrix can also be achieved by applying a series of single-dimensional Gaussian matrices in the horizontal direction, then repeating the process in the vertical direction. In computational terms, this is a useful property, since the calculation can be performed in O ( w kernel w image h image ) + O ( h kernel w image h image ) time (where h is height and w is width; see Big O notation), as opposed to O ( w kernel h kernel w image h image ) for a non-separable kernel.

Applying multiple, successive gaussian blurs to an image has the same effect as applying a single, larger gaussian blur, whose radius is the square root of the sum of the squares of the blur radii that were actually applied. For example, applying successive gaussian blurs with radii of 6 and 8 gives the same results as applying a single gaussian blur of radius 10, since 6 2 + 8 2 = 10 . Because of this relationship, processing time cannot be saved by simulating a gaussian blur with successive, smaller blurs — the time required will be at least as great as performing the single large blur.

Gaussian blurring is commonly used when reducing the size of an image. When downsampling an image, it is common to apply a low-pass filter to the image prior to resampling. This is to ensure that spurious high-frequency information does not appear in the downsampled image (aliasing). Gaussian blurs have nice properties, such as having no sharp edges, and thus do not introduce ringing into the filtered image.

Low-pass filter

Gaussian blur is a low-pass filter, attenuating high frequency signals.

Its amplitude Bode plot (the log scale in the frequency domain) is a parabola.

Implementation

A Gaussian Blur effect is typically generated by convolving an image with a kernel of Gaussian values. In practice, it is best to take advantage of the Gaussian Blur’s linearly separable property by dividing the process into two passes. In the first pass, a one-dimensional kernel is used to blur the image in only the horizontal or vertical direction. In the second pass, another one-dimensional kernel is used to blur in the remaining direction. The resulting effect is the same as convolving with a two-dimensional kernel in a single pass, but requires fewer calculations.

Discretisation is typically achieved by sampling the Gaussian filter kernel at discrete points, normally at positions corresponding to the midpoints of each pixel. This reduces the computational cost but, for very small filter kernels, point sampling the Gaussian function with very few samples leads to a large error. In these cases, accuracy is maintained (at a slight computational cost) by integration of the Gaussian function over each pixel's area.

When converting the Gaussian’s continuous values into the discrete values needed for a kernel, the sum of the values will be different from 1. This will cause a darkening or brightening of the image. To remedy this, the values can be normalized by dividing each term in the kernel by the sum of all terms in the kernel.

Example

A rough view of the future

This is SVG

HTML Video

MathML:

G x y = 1 2 π σ 2 e - x 2 + y 2 2 σ 2

SVG: Drawing using XML

GEMï ::: Graphical Environment Manager Cross browser, configurable Graphical User Interface using SVG as Virtual Device Interface. Builds desktop-like environment and Application Environment System. Encapsulates and displays multiple SVG embedded or downloaded documents from a development project into fully featured windows. GEMï Graphical Environment Manager with Application Environment System using SVG as Virtual Device Interface 1.53 2009-01-13 svg, gui, in browser application manager, portable graphical user interface, application Dotuscomus Domenico Strazzullo Jayne De Sesa copyright © 2007-2009 Dotuscomus Inc. All rights reserved LGPL image/svg+xml "http://purl.org/dc/dcmitype/Software" GEMi SCRIPTS History Short biography of Vincenzo Lancia. automobiles, historic cars, car industry, biography of Vincenzo Lancia Dotuscomus Unknown Unknown Copyright of Lancia cars Reproduction forbidden without authorization 2008-03-18 image/svg+xml "http://purl.org/dc/dcmitype/Text" Vincenzo Lancia was born on 24 August 1881 in Fobello, Val Sesia, Italy. The son of Cavalier Giuseppe Lancia, who had made his fortune in the preserved food industry. Since they were quite well-to-do, Vincenzo's family would spend the summer in their villa in Fobello and the rest of the year in Turin, in a property they owned in corso Vittorio Emanuele. Cavalier Lancia had already mapped out the future for each of his four children: Giovanni, Arturo, Maria and Vincenzo, who was affectionately known as Censin. Vincenzo was earmarked to become a solicitor. At school, however, ‘Censin’ proved to be a disaster. He was certainly bright enough, but he simply couldn't apply himself in his studies. He was lazy and easily distracted, and eventually his father reluctantly gave up on the idea of making a lawyer of him. Instead, at the age of twelve, he was sent off to college in the hope that he would at least gain a diploma in accounting. The young Vincenzo Lancia was distracted from his studies, however, by the workshop opened by the Ceirano brothers in the yard of the family home. They built and sold bicycles under the name of Welleyes, because at the time English names had more clout with the public. Censin was a regular visitor to the Ceirano workshop and before long he became a novice mechanic. When the two brothers eventually started work on their first automobiles, the young Vincenzo was fascinated by engines. He left school and succeeded in obtaining his father's permission to go to work for the Ceirano workshop. He was taken on as an accountant (seemingly at the insistence of his father, who considered the position of accountant to be slightly less demeaning than that of mechanic), but instead of working on the company's books, he busied himself repairing engines. In 1899, having secured financial backing, the Ceirano brothers began producing a small car designed by the engineer Aristide Faccioli. The Welleyes automobile was a great success, but the Ceirano brothers simply couldn't keep up with demand. In July of that year, they accepted Giovanni Agnelli's offer, and for the sum of 30 thousand lire they sold their entire plant and the patents for the Welleyes car, which would soon be the basis for the Fiat 3.5 HP. Lancia, then 18 years old, as was Felice Nazzaro, who had recently joined the company, were both taken on by Fiat as test drivers. In its early years, Fiat took a very active part in competitions, with Lancia and Nazzaro behind the wheel. Nazzaro was a real ‘stylist’ when driving. Lancia, on the other hand, was impetuous but also quicker, whenever he wasn't hit by mechanical failure, that is. Meticulous and demanding at work, away from the workplace Lancia was light-hearted and jovial. A big, strapping lad when he was young, he grew to become a large man with a passion for good food, drinks with friends and the opera. He was quite a music buff, and was particularly fond of Wagner. In 1906 he started building cars, and on 29 November the same year, together with his friend Claudio Fogolin, he founded Lancia. In 1922, by now a successful businessman, he married Adele Miglietti, a secretary, with whom he was to have three children: Anna Maria, Gianni and Eleonora. Vincenzo Lancia continued his personal involvement in the development of new models, often test driving the cars himself. Vincenzo Lancia died prematurely on 15 February 1937 at the age of 55, the victim of a heart attack during the night. At first he thought it was nothing and did not want to wake his wife, and it wasn't until seven o'clock in the morning that the family doctor was sent for, who came as quick as he could, but by then, tragically, it was too late. Thus, one of the men who had contributed so much to the history of motoring had unexpectedly died. His work as a manufacturer was marked by intuition, originality and courage. It is no accident that his spiritual legacy is a car: the Aprilia. The model, which seems to sum up the traditions of the company and the virtues of the man, was initially received with scepticism and a certain degree of incredulity. The design seemed too daring while the technical aspects were too innovative. It took some time for this Lancia to become the queen of the road: dynamic, extremely stable, with an incredibly modern style appreciated by all. And it was the genius of Vincenzo Lancia that foresaw it all. Drawings SVG diagram of a Root's type volumetric compressor; vector image of a Lancia model automobiles, vintage cars, Lancia cars, volumex, volumetric compressor, supercharger Dotuscomus Domenico Strazzullo All rights reserved Creative Commons License 2003-04-01 image/svg+xml "http://purl.org/dc/dcmitype/Image" Lancia Coupé Volumex VX Positive displacement compressor (Roots type) on off 674 PGB 75 LANCIA β VOLUMEX Mythic Lancia models Collage of some legendary Lancia cars automobiles, vintage cars, Lancia cars Dotuscomus Jayne De Sesa All material copyright of their respective owners Creative Commons License 2007-09-01 image/svg+xml "http://purl.org/dc/dcmitype/Image"

From Domenico Strazzullo
http://www.dotuscomus.com/svg/

SVG Video Player

A classic video player, developed using SVG.

The SVG controls interface reacts to HTML 5 media events (time, volume, play, pause, load progress, etc.).

… but video codec: Youtube vs Dailymotion.

00:00 00:00

Canvas API: Drawing using scripting

brush
brush 2
line
rectangle
circle
clear

new

Canvas Painter

By Rafael Robayna

Geolocation API

Q # W 1 E 2 R 3 A * S D F C X Z 4 5 6 9 8 7 ALT SPACE 0 V G T ( / ? ) : ! , ; _ - ' . " + @ DEL B H Y U J N M K I O L $ P aA aA SYM
  • Geographical location information
  • Associated with the hosting device
  • Targeted for Web Applications

Device APIs

Mobile Web

W3C Mobile OK

Browsing the Web from mobile devices

Mobile Web: Rendering on small devices

Mobile view

Desktop view

W3C Mobile Web W3C Mobile Web on Opera

CSS Media Queries

@media all and (orientation:portrait) {
   // display area is taller than it is wide
   // toolbar is on top
}
@media all and (orientation:landscape) {
   // display area is wider than it is tall
   // toolbar is on on the left
}

Widgets: Web Applications on your desktop …

Widgets

… or your mobile

Widgets

Ubiquitous Web

Web access for anyone, anywhere, anytime, using any device

Web Accessibility Initiative

Helping to achieve W3C's goals of universality of the Web

How Can I Participate?