Friday, May 25, 2007

Refocus your images after the fact

Have you ever taken an out-of-focus picture and wished you could correct your mistake? Or has your artistic side desired to blur parts of a picture even though everything is is sharp focus? After all, you can use Photoshop to make all sorts of modifications to your photographs. But even Photoshop can't help you: you're stuck with the depth of field you used when you took your picture.

That may be changing soon. Ren Ng of Stanford University was awarded the 2006 ACM Doctoral Dissertation Award for his work on Digital Light Field Photography. Ren and his colleagues at the Stanford Graphics lab built a digital plenoptic camera, described in the tech report "Light Field Photography with a Hand Held Plenoptic Camera". A plenoptic camera is

...a camera that samples the 4D light field on its sensor in a single photographic exposure. This is achieved by inserting a microlens array between the sensor and main lens, creating a plenoptic camera.

This microlens array is analogous to an insect's compound eye.

Each microlens measures not just the total amount of light deposited at that location, but how much light arrives along each ray. By re-sorting the measured rays of light to where they would have terminated in slightly different, synthetic cameras, we can compute sharp photographs focused at different depths. ... we demonstrate that we can also compute synthetic photographs from a range of different viewpoints.

And that allows one to refocus the image even after one has taken the picture! You can see examples of refocused images if you follow the above link to the tech report. Utterly fascinating stuff! Ren is now at a startup called Refocus Imaging that is commercializing these ideas.

Wednesday, May 23, 2007

Torture

As some of you know, we are great fans of the hit show 24. It seems like the rest of our (discretionary) life is on hold as we race through the first 3 seasons of the show on DVD! Each season of 24 recounts a single 24-hour day within which our hero Jack Bauer, a federal agent with the Counter-Terrorism Unit, battles terrorists who are out to unleash unspeakable acts of violence on the US (assassination, nuclear detonations, viruses, ...!). The show is very well done: the action is non-stop and there are lots of surprising twists.

But one aspect of the show is a little unfortunate: torture is used routinely to try and extract critical information from the (obviously) bad guys. This aspect of of 24 was brought up in the recent Republican presidential primary debate; see op-eds by Rosa Brooks in the LA Times and Paul Krugman in the NY Times (TimesSelect subscription required for the latter) for some perspectives on this.

All this raises the question: is torture justified in these situations? With a strong negative answer we have General David Petraeus, the commander of the Multi-National Force in Iraq. Recently he wrote an open letter to the troops arguing for the adherence to our values. Here is his central argument against torture:

Some may argue that we would be more effective if we sanctioned torture or other expedient methods to obtain information from the enemy. They would be wrong. Beyond the basic fact that such actions are illegal, history shows that they also are frequently neither useful nor necessary. Certainly, extreme physical action can make someone "talk;" however, what the individual says may be of questionable value. In fact, our experience in applying the interrogation standards laid out in the Army Field Manual ... shows that the techniques in the manual work effectively and humanely in eliciting information from detainees.

We should remember this whenever we begin to think, like the characters in 24, that we have a situation where torture is justified.

Saturday, May 19, 2007

Floor on the price of oil

Tom Friedman had a recent op-ed piece entitled "Only Halfway There" (Times Select subscription required). He argues that pressuring President Bush to withdraw from Iraq is only half the game; the equally important other half is to reduce our dependence on oil:

...and there is only one way to do that: get the price of oil right. Either tax gasoline by another 50 cents to $1 a gallon at the pump, or set a $50 floor price per barrel of oil sold in America.

Introducing a direct gas tax is politically very challenging. A $50 floor on the price of oil is much more intriguing. Since the price of oil is currently well above this value, it may be more palatable to levy this tax---the tax doesn't actually kick in until the price of oil falls below $50. The likely payoff from such a tax is:

Once energy entrepreneurs know they will never again be undercut by cheap oil, you’ll see an explosion of innovation in alternatives.

Talk of a $50 floor price reminds me of a great talk by Vinod Khosla. Khosla has become a very strong proponent of the use of ethanol in cars. He makes a very persuasive case for why this isn't just possible, but is actually quite probable. First, Brazil has already made such a transition: all cars run on any mix of gas and ethanol, and fuel pumps dispense both gas and ethanol; drivers can make the choice based on price. Second, a variety of different interests seem to agree on ethanol:
  • The agriculture lobby (like ADM), loves ethanol---it gives their crops a huge market (in the US corn is currently used to make ethanol; more on this below).
  • The defense establishment believes that ethanol can provide energy security by weaning the US away from its dependence on Middle East oil.
  • Environmentalists (apparently) prefer burning ethanol to gasoline.
  • Domestic car companies may prefer cars that burn both ethanol and gasoline ("flex fuel"). On the one hand it costs very little to retrofit today's cars to burn ethanol or gas (I remember him saying its about $25 per car). On the other hand, companies like GM are feeling that they've lost the hybrid battle to Toyota. They want their own "green" marketing message, and ethanol may provide just what they need. (I wonder if this argument has weakened in the year since I heard Khosla, since now I hear more about hybrids and less about flex fuel.)
The bottom line is that ethanol may be supported by most parties, except big oil. Which brings us back to the floor on the price of oil. Khosla said that he had given this talk at Davos. After the talk, a senior executive at a major oil company came up and essentially threatened him saying that his vision of an ethanol society would fail because, if necessary, the oil companies would drop the price of oil down to, say, $20 per gallon. This would make all alternative energy sources economically non-viable, thus driving all such companies out of business. Khosla, of course, took this as a challenge and vowed to lobby for a floor on the price of oil, thus protecting the interests of these alternate energy companies!

One important note: generating ethanol from corn (the dominant strategy in the US) is not the best strategy for a variety of reasons (including cost and the amount of energy required for generation). Brazil generates ethanol from sugarcane, a much better method. But import tariffs prevent Brazilian ethanol from competing with US ethanol. Khosla was suggesting an alternate source: native plants like switch grass can be converted into ethanol. The technology isn't quite there to do this, but Khosla has great faith in the power of technology to overcome such hurdles.

Which brings me to the last point: Khosla Ventures is investing in a big way in ethanol, so he clearly has some conflict of interest. Nonetheless, he painted a compelling vision of the role of ethanol. It'll be interesting to see how the ethanol story plays out and how it compares to other sources of energy such as solar and nuclear.

Friday, May 18, 2007

Drama in the courtroom

Yet another example of real life looking like a made-for-TV courtroom drama. As you may know, Floyd Landis won the 2006 Tour de France and then tested positive for performance enhancing drugs. He now faces a two year ban from the sport and the loss of his title. Naturally, he denies doing anything wrong. So there's an arbitration hearing going on at Pepperdine University Law School. Landis's team hopes to show that the French lab that did the tests was hopelessly incompetent. The Mercury News reports that the:

... sleepy, scientific arbitration hearing turned into a pulp-fiction blockbuster Thursday, replete with revelations of sexual abuse, allegations of a threatening phone call and even a Donald Trump-style firing.

It came courtesy of Landis' fellow American Tour de France champion Greg LeMond, who disclosed he had been sexually abused as a child and received a call Wednesday from Landis' manager who threatened to reveal the secret if LeMond showed up to testify.

Shortly after LeMond dropped his bombshells, the manager, Will Geoghegan, walked up to LeMond, apologized and admitted he made the call, LeMond said. Which led to "You're fired" - the message Landis' lawyer, Maurice Suh, gave to Geoghegan while they were still standing in the hearing room.


Talk about courtroom drama! Its almost as compelling as the crucial courtroom scenes in a Perry Mason episode or the final courtroom scene in Witness for the Prosecution...! (Well, maybe not, but it does sound pretty dramatic!)


Wednesday, May 16, 2007

Spider-man 3 teaches science!

James Kakalios, a physics professor at the University of Minnesota, has written a neat opinion piece in the NY Times entitled "A Nobel for the Sandman" (Times Select subscription required to read the whole article). As those of you who have seen the new Spider-man movie know (What?! You didn't rush out to see it on opening night?!), the arch-villain that Spider-man faces is the Sandman. Not surprisingly, the Sandman is made of sand. And the computer graphics in the movie are great: the Sandman emerges from a pile of sand and dissolves away into a dust storm in a very realistic way.

James Kakalios observes that the movie "...often correctly display the fascinating properties of granular materials." In particular,

When Sandman changes his torso into a lightly packed state, Spider-Man’s ... blows futilely pass through Marko. Sandman then hardens the grains in his own hands into a rigid, close-packed state to strike Spider-Man with fists as hard as rocks.

Apparently scientists have done extensive studies of the properties of different packings of granular material. Isaac Newton may have used these studies for financial gain from his apple orchards:

For example, random pouring [of apples] fills an apple barrel to the rim, but inefficiently. Mechanical vibrations cause the apples to adjust their positions, filling open gaps and moving closer together. Barrels topped off at the orchard are thus only partly filled when they arrive at the market.

So Newton apparently used his insights for more than explaining why the moon falls just like an apple!

Fascinating things happen when you have grains of different sizes:

If you put both large and small beads in a cylinder, tip it on its side and rotate it around its horizontal axis, the contents will spontaneously segregate into alternating bands of large and small beads, like rings on a finger.

James Kakalios is the author of a book with the fascinating title of "The Physics of Superheroes"! One reviewer gives five stars with a review titled "Why can't all physics professors be like this?" I've got to put this book on my reading list!

Friday, May 11, 2007

The Elegant Universe

Reading about the Large Hadron Collider reminded me of The Elegant Universe, a wonderful and readable book on string theory by Brian Greene. In the standard model, the fundamental constituents of matter consist of a bewildering menagerie of point particles. String theory takes a different view. It claims that particles are not point-like at all, but when examined at a sufficiently small level of detail actually consist of a tiny one-dimensional vibrating loop---a string. This shift from point particles to one-dimensional strings resolves a deep conflict between the two most successful theories of modern physics: general relativity and quantum mechanics.

Einstein's theory of general relativity provides us with an unparalleled understanding of the universe at the largest scale---at the scale of stars and galaxies and clusters of galaxies. Quantum mechanics provides an unparalleled understanding of the universe at the smallest scale---at the scale of molecules and atoms and sub-atomic particles. Over the last century, scientists have verified the predictions of these theories with unimaginable accuracy. These are truly the two most successful theories of modern physics. There's only one small fly in the ointment: the two theories are incompatible. As currently formulated, they cannot be both right. They conflict when trying to explain what happens at a singularity, such as in a black hole or at the very beginning of the big bang.

String theory resolves this incompatibility. My naive understanding is that string theory does away with the point nature of the fundamental building blocks of matter, and thus eliminates the need to reason about singularities. In fact, within string theory, general relativity and quantum mechanics require one another for the them to make sense.

It's been a while since I read The Elegant Universe, so I can't provide a decent review. But I will say that Part II of the book---which explains general relativity, quantum mechanics, and their incompatibility---is a really great read. It alone is worth the price of admission. Section III---which introduces string theory---was my first introduction to string theory, and it's really well done. Section IV covers more advanced material, and I remember being somewhat lost.

All in all, I highly recommend this book.

Thursday, May 10, 2007

Large Hadron Collider

Elizabeth Kolbert has a really great article in the New Yorker on the Large Hadron Collider. So far physicists have successfully observed 16 types of elementary particles (together with their anti-particles and sub-types) predicted by the standard model of particle physics. The standard model predicts a 17th particle: the Higgs boson. The Higgs has never the experimentally observed. However, it is crucial to the standard model. As the article notes:

Without the Higgs, physicists have no way to explain why fundamental particles weigh anything at all, since, according to theory, they should be massless.

The Higgs boson is a "massive" particle and requires enormous energies to be created. The Large Hadron Collider (LHC) is able to accelerate protons up to
99.9999991% of the speed of light around a circular tunnel with a 17 mile circumference. This corresponds to the protons having an energy of 7 TeV (tera electron volts), and the resulting collisions should have enough energy to create the Higgs. In addition:

It may also be enough to uncover much more than the Higgs. Depending on how the universe is constructed, extra dimensions, mini black holes, and the source of so-called “dark matter” may all be revealed ...

All very esoteric and cool! (We are assured that the mini blackholes will be "...entirely benign..."!)

The engineering of the LHC is equally remarkable. It uses superconducting magnets to keep the protons on the circular path. These magnets are cooled to -271.25 Celsius---that's 0.10 degrees above absolute zero! There are four sets of detectors around the track, each set developed by a different team of scientists. These are supposed to detect any trace of the Higgs and these other esoteric byproducts of the collision. The data analysis task to actually identify these byproducts is equally daunting ("...like finding a needle in a needle factory").

The LHC is very expensive: some $8 billion. Funding of this sort is hard to come by for ventures with no practical implications. So there is a lot riding on its success. Kolbert ends her article with:

The promise of the Large Hadron Collider is thus also its great burden. A truly astonishing discovery there—proof, say, of extra dimensions, or of something even weirder than that, which theorists have yet to conceive of—would provide a powerful impetus to keep particle physics going for another generation. Barring a breakthrough, it’s hard to imagine how the project can continue. Such an outcome would not mean that the fundamental order of the universe is unknowable. But it might well mean that we will never know it.

Sunday, May 6, 2007

David(s) vs. Goliath and DRM

Many of you may have missed the exciting David(s) vs. Goliath story that unfolded last week in the context of the publication of the key used to decrypt HD-DVDs. You can read a detailed account in the article "Digg gives in to user revolt" published by Search Engine Land. In short, here's what happened.

HD-DVDs are encrypted to prevent copyright violations (a form of Digital Rights Management, or DRM). Needless to say, someone broke this encryption and published the key needed to decrypt HD-DVDs. Cory Doctrow, a Boing Boing writer, published this key on a class blog hosted on Blogger. Google was then served a DMCA notice by the industry-backed AACS to remove this blog entry, claiming that the key was protected by copyright. Google had to comply.

Doctrow then wrote another blog entry explaining what had happened with a pointer to a site that encouraged people to spread the key. That site became popular on Digg, a community-based site that ranks popularity of pages. But Digg was also asked to remove references to the key from their site by another DMCA notice. Users of Digg were upset by this and started "digging" other articles about this key in large numbers. Digg couldn't keep up with all the "digging", and certainly couldn't remove all the "offending" posts. On that day Digg's site was intermittently down from all the traffic! Finally, Digg listened to its users and agreed not to delete any more stories about the key from its site and instead fight the AACS over these DMCA notices. At least for the time being, the Davids (Digg users) beat out Goliath (the AACS).

These events reminded me of a very fine talk that Cory Doctrow gave at Microsoft Research on DRM. I highly recommend you read the transcript of this talk. The following is the outline of the talk:
  1. That DRM systems don't work
  2. That DRM systems are bad for society
  3. That DRM systems are bad for business
  4. That DRM systems are bad for artists
  5. That DRM is a bad business-move for MSFT
The whole talk is excellent. But section 4 (on why DRM systems are bad for artists) is particularly interesting. He traces various technological innovations through the ages that appeared to threaten copyright, and shows that artists have always done well. The basic insight is:

Technology that disrupts copyright does so because it simplifies and cheapens creation, reproduction and distribution. The existing copyright businesses exploit inefficiencies in the old production, reproduction and distribution system, and they'll be weakened by the new technology. But new technology always gives us more art with a wider reach: that's what tech is *for*.

Copyright and DRM are enormously important issues in this digital age. This talk will help you form (or refine) your opinion on them.

Bandwagon and Hollywood

So it looks like I've finally joined the bandwagon, and I don't even like basketball! I am, of course, referring to the magical run of the Golden State Warriors: clinching the final spot in the NBA playoffs in the very last game of the regular season and then knocking off the number 1 seeded Dallas Mavericks (who thought they would win the championship) in the first round of the playoffs in 6 games. Even though I don't like basketball, I was sufficiently taken by this story to actually listen to the second half of Game 6 on the radio last Thursday!

And this Cinderalla story has its very own made-for-Hollywood hero---a case of truth imitating fiction, perhaps? Today's Mercury News had a front page article on the Hollywood story of Baron Davis, the Warriors star:

Tough kid grows up in an even tougher part of South-Central Los Angeles, supported by a beloved grandmother. He lands a scholarship at an exclusive high school, where he mingles with kids of the rich and famous. He goes on to star at UCLA and make a name for himself in pro basketball.

Then come the setbacks. Injuries. Losing. Whispers that he's headstrong, melodramatic, uncoachable.

But he silences the critics by leading a misfit-filled squad to a stunning upset of the NBA's best team - playing the final game virtually on one leg because of an injury. In the last scene, his arms are stretched high as confetti falls and he's drenched in cheers.

Move over Rocky!

Now lets see how long this ride lasts, as the Warriors take on the Utah Jazz in the second round.



Saturday, May 5, 2007

John McCain

Yesterday I had the opportunity to watch a conversation with John McCain during his visit to Google. Eric Schmidt started by asking McCain a series of questions, before things took a town-hall feel with lots of questions from the audience. I thought I'd share my thoughts about what he said and my impressions.

The top level impression one gets from McCain is that he's running on the war platform. He wants to defend the US militarily, economically, and in every way possible (e.g., in the war of perception and ideas). He's going to use his military background (which is, of course, very impressive) to bolster his position as the best to be commander-in-chief. He said that for the US to lead the world, it has to regain some of the luster that it has lost over the last several years---you can't torture prisoners, you can't kidnap people and send them to other countries for interrogation (called "rendition", I think) , you can't have Guantanamo, ...

A second impression I get is McCain wants to run on a platform of optimism---the idea that we can win out over any hurdles. He said he was inspired by Reagan, the master of optimism.

This aspect of McCain appeals to the gut; it sounds good and it helps inspire. But by themselves, it's not clear what he'd actually do about it. The rest of the conversation focused on more specifics.

Eric asked McCain to talk about the unpopular war in Iraq. McCain has been critical of the way the war has been prosecuted by the administration to this point, so why does he think that the surge will work? McCain said that it wasn't just about having more troops, but that the strategy on the ground had changed---something about holding secure environments rather than withdrawing once an area was made secure (and thereby letting the insurgency get back). He didn't say much more about this, but instead went on to argue that if we withdraw now that things will be much worse than they are---worse for the US and worse for Iraq's neighbors. He argued that Iraq's neighbors need to help stabilize Iraq.

I remained unconvinced that the surge itself will succeed. But his point about working with Iraq's neighbors to stabilize Iraq is an important one. However, he didn't go into much detail on how he'd get the support of these neighbors.

Eric then asked him about Iran: does any behavior by Iran warrant war? McCain had a simple answer: Iran cannot have nuclear weapons. He said the fear is not that Iran would use nuclear weapons, but rather that it would arm a terrorist organization with nuclear weapons. That's a good point and its worth thinking about. He went to pains to point out that most of the people in Iran are actually sophisticated, cultured, educated, etc.

Eric then asked McCain to outline his major domestic priorities. McCain said he had two: climate change and spending.

Climate change as a priority was interesting. I don't know how much of this was simply pandering to the Google audience, and how much he truly believes. It'll be interesting to see what he says about climate change over the next year and half to see if this is truly a priority. McCain was quite critical of the Bush administration on its handling of climate change. He said we have to reduce greenhouse gas emissions. He referred to a a recent report by some retired military personnel that climate change is a significant security threat. I don't know what report he's referring to, but given his defense focus, maybe this report was the tipping point for him.

On spending, McCain railed against pork barrel spending ($200+ million for a bridge in Alaska to an island of 50 people...). He said that such pork-laden bills are a direct cause of corruption. He promised to veto the first pork-laden bill that crosses his desk. I think one can believe him on this.

An interesting point on his domestic priorities. Maybe he wanted to highlight only these two items and not provide a laundry list. But it was striking that things like education and health care did not make it to this list.

Eric then threw the floor open to the audience for questions. Here's a sample of the questions.

Q: Why should we be Republicans?

McCain gave a short crisp definition of what it means to be Republican. He said that Republicans are about less government, less taxes, strong defense, a strong foreign policy, less regulation, and a government closest to the people (not clear what the last point means). Republicans also want to spread freedom and democracy all over the world. (I'm not sure all conservatives will agree with this point.)

Q: Why does the genocide in Darfur continue and why haven't we done anything about it?

McCain has apparently written about the genocide in Rwanda, and thus should be quite sensitive to the catastrophe in Darfur. He acknowledged that we haven't done enough. He said there were a lot of different difficulties with doing something. His approach would be to call on capable African states to go in and stop the genocide with logistical help from the US. He would only consider sending in US troops if he was convinced that it would be beneficial. He bemoaned the fact that we don't see Darfur daily on the evening news.

Given that he has written about genocide and he has some ideas to help the situation, I'm surprised he hasn't done more about it in his position as an influential US Senator.

Q: You took a courageous stand on religious extremism in the 2000 elections. Have you changed your stand on this now?

This question refers to McCain speaking at Jerry Falwell's university (?). McCain said he believes in reconciliation---Falwell apparently came to him and McCain was more than willing to engage in a dialog.

I don't know what's really going on here: is it really about reconciliation or simply politics. But reconciliation and talking with people with whom you have fundamental disagreements is a very good idea, specially in foreign policy.

Q: What is your position on the discrimination that atheists face?

McCain himself is a man of faith, and so disagrees with the atheist's beliefs. But he was very clear about saying that he would support no public policy that discriminates against them.

Q: The "don't ask don't tell" policy towards gays in the military is discriminatory and leads to qualified individuals being asked to leave the military (e.g., Arabic language experts). A Zogby poll suggests that 70% of the military is quite comfortable with having gays in the military.

McCain said that he listens to military leaders who tell him that the policy is working and that openly gay members of the military would significantly damage morale. Until his military leaders tell him otherwise, he's comfortable with the status quo.

There's much more, and you can watch it all in the video link at the top of this post. The bottom line is that McCain is very much about the war and about appealing to ones gut. He comes across as a straight talker. But he didn't go into a lot of detail on exactly what he'd do on many of the issues---he's no policy wonk---and his domestic agenda seems limited.

On a lighter note, I have to share one of his jokes. He said that after the South Carolina primary in 2000 (where he lost after being the target of various unseemly tactics) he slept like a baby: ... sleep 2 hours, wake up and cry, sleep 2 hours, wake up and cry, ...!

Wednesday, May 2, 2007

Businesses have backup problems too!

So it seems that it's just not individuals like me that are living on the edge. TechCrunch reports that the June issue of Business 2.0 magazine was deleted from their servers prior to going to print! And their backup server didn't do it's job... Most of the text was apparently retrieved from emails to lawyers, but all the graphics had to be recreated from scratch.

Tuesday, May 1, 2007

Lies, fabrications, and half-truths

Bob Hebert has a very nice op-ed in the NY Times on the recent death of journalist David Halberstam (subscription required). The key point he makes is:

If there was one thing above all else that David taught us, it was to be skeptical of official accounts, to stay always on guard against the lies, fabrications, half-truths, misrepresentations, exaggerations and all other manifestations of falsehood that are fired at us like machine-gun bullets by government officials and others in high places, often with lethal results.

He goes on to illustrate these kinds of lies, fabrications, and half-truths in the context of the recent Congressional hearings regarding Pat Tillman and Jessica Lynch. It is indeed sobering to think that such lies, fabrications, and half-truths are part of business as usual even in a country with as free a press as the US.

In this age of spin doctoring, do you think a government that simply tells the plain unvarnished truth could succeed?

Keep chocolate pure!

I just read an editorial in the San Jose Mercury News regarding an insidious change being proposed in the ingredients of chocolate. Here's the key point:

But big candy and food makers such as Hershey and Nestle are lobbying the Food and Drug Administration to let them substitute vegetable oil and whey for two of chocolate's key ingredients and still call their products "chocolate."

Vegetable oil is cheaper than cocoa and whey is cheaper than milk.
Of course, these big manufacturers can already do this. But the FDA requires them to call such products "chocolate-flavored"! What's this world coming to? Al-Qaeda, Darfur, global warming, and now this? No "milk" in "milk chocolate"?!

/* Google Analytics tracking */