< June 2007 >
      1 2
3 4 5 6 7 8 9
Fri, 22 Jun 2007:

By the time you're reading this, I'll probably be in the high himalayas, gasping for breath.

Will be back soon, with a lot of pictures, memories and a nice travelogue - just like last year.

Travel gives you the illusion that you're getting somewhere.
But half the time, you're just coming back

posted at: 08:14 | path: /travels | permalink | Tags: ,

Mon, 18 Jun 2007:

As much as I'd like to pretend to be one, I'm not a real photographer. Photographs are secondary to the experience - travel, laughter, people and memories. But sometimes I do give in and take a photo which requires patience, time and often, post-processing. Saturday night, I decided to prepare, polish and publish one of those.

Basic Tools: For stitching images the workflow involves three tools Hugin, autopano-sift and Enblend. All these tools are available with most popular distributions - apt-get install should do just fine.

The input to the tools are six photos taken with my trusty SD450. They have been taken with nearly identical modes with a Manual setting to prevent the camera from adjusting between pictures (forgot to turn off auto white-balance for this set). The camera has a panorama mode which allows me to fairly accurately align multiple pictures with enough overlap, but that's not really as useful as you might think.

Autopano: First step in creating panoramas is to identify common points. Autopano is an automatic image analysis tool which can identify common areas between photos. The command autopanog should get you the UI required to load all the photos. Other than checking absolute paths, there is nothing else that I found useful to tweak there. Autopano after computation throws out a .pto file which is then pushed onto the next tool.

Hugin: Hugin does all the further magic. After loading in the PTO file, select the image required to be the anchor or reference image of the panorama and anchor that image for position. It does really help if the horizon is horizontal for that picture. Thankfully, Hugin can actually read the EXIF data from the images to obtain information about the lens, field of view and other details which I wouldn't know how to provide. The next tab shows the data gathered by autopano in an editable view, to adjust the control points if required.

Rather than waste much time there, head over to the next tab and click on Optimize now!. It should result in Hugin working most of its miracles, in mysterious ways to perform, by realigning shearing and doing all the other important things required. About time, we got a preview of whatever is going to be the result. One of the curious behavioural defects of the tool is that the preview does not update unless manually initiated. I've wondered a couple of times about why the picture looks exactly the same whatever I do. But here's how it looks right now.

As it is very obvious, the camera's vignetting comes into play for the corners of all the images. Merely placing the layers above each other will not produce a satisfactory panorama. Therefore, rather than combine images inside Hugin, the output from this phase has to be the correspondingly distorted seperate images. So in the last tab, calculate the field of view, the optimal size and select the "Multiple TIFF" (cropped) output option. This gives us individual images which look somewhat like these (hmm... my ICC settings are off in these screenshots).

Enblend: Enblend does exactly what its name suggests. It can blend between images, performing a smooth transition between the frames to create a good looking panorama. Merely pass in all the images in order via the command like to enblend and it does the job neatly (but watch your CPU load). The blended image is not equirectilinear and requires cropping to create a rectangular image. Mine threw out a whoppingly large 161 MB uncompressed TIFF (12335x3438) file. After scaling it down, converting to JPG and re-inserting EXIF data, the image is ready for the world to see.

And that's the way it's done - only five months too late :)

Just because you can explain it doesn't mean it's not still a miracle.
                          -- Terry Pratchett, Small Gods

posted at: 09:11 | path: /tutorials | permalink | Tags: , ,

As Friday wound down, my sore body was resigning itself to a weekend to be spent mainly in bed. But what to feed the beast that roams within ? Out I went to Strand, to hunt for something cerebral, to stimulate thought and induce sleep (when consumed in excessive doses). An unsuccessful hour later, I emerged carrying a copy of Games Indians Play.

Somehow in the back of my mind, I was expecting an Indian re-run of Games People Play. But maybe I was setting the bar too high. The book begins rather uncomfortably, by stating a few prerequisites, right from the depths of disillusionment.

There are three points that the readers must be ready to acknowledge
as prerequisites: 

one, that there is indeed something wrong with us;

two, that there are aspects that do not seem to sit well in modern
civilized society; 

and three, that merely because other modern and civilized societies, 
also suffer from many ills, it does not make our own ills more 

Indeed, the book does tend to critique at a rather personal level than would be necessary. The following four chapters were a visible re-hash of nearly all literature on the subject in the last forty years. The basic systems by which selfish individuals coalesce into a mesh of cooperation explained by game theory principles. For someone who's been on Axelrod for two years, it hardly holds any interest. Except for one particular analogy.

Both India and Pakistan argue exactly as the two prisoners cited in the 
prisoner's dillemma, and arrive the 'rational and well reasoned' decision
to go nuclear - to defect - resulting in the two countries forgoing
the opportunity to save millions of rupees which could have been used

The book somewhat redeems itself, by then attacking the concept of fairness. Reading through it, I somehow seemed to recall the famed lines from Animal Farm - All animals are equal, but some animals are more equal than others. But it rather rambles along into the lack of self-regulation and the inherent disregard for others doing the same (as lunatech keeps saying: lesson #1: the universe isn't fair). Eventually to come to rest at the way Indians measure the importance of a person - purely by how many rules he can bend.

But to fulfil its initial promises, it hasn't gone far enough into the depth of the issue. Rather than discuss selection pressures which reward the behaviour that we observe, it merely presents the facts and leaves a rather dissapointed reader behind. And while the book doesn't even try to tackle the vast agrarian belt of India - it still does not understand that there's more of sub-urban India outside the big cities and inside houses. For something like the state of Kerala - a middle class majority, left-leaning socialist governments and high literacy rates seem to have alleviated at least some of the ills mentioned.

Rather than a cutting root cause analysis of the systemic problems that exist, the book seems to be written in half-disgust about the myopia of present day urban India, with game theory to back it up. Not to disagree with some of his conclusions, but the linking logic seems to from real life into game theory rather than the other way around - leaving me nothing to test his theories with. And there is just a subtle hint of silent reverence towards occidental cultures - a completely apples to oranges comparison (you eat both, right ?). The author desperately needs to read The Human Zoo, before judging the Indian concrete jungles by theories transplanted from university towns (Ithaca or wherever).

In one short phrase, the book talks more about "How/What we are ?" than rationalizing it with Why ? - an outsider's objective analysis which puts you (if you were Indian) in the same frame of mind as the emperor with the new clothes.

Along with this, I'd also picked up Just Wait Till You Have Children of Your Own!. Drains me of all bitterness, that book does. :)

The end of the human race will be that it will eventually die of civilization.
                -- Ralph Waldo Emerson

posted at: 06:48 | path: /books | permalink | Tags: ,

Sun, 10 Jun 2007:

Last monday afternoon, I tore myself from the mundane grind of office to go listen to Eben Moglen talk about GPLv3 and Beyond. The evening that was to follow was as brilliant as the golden monsoon sunset. I happened to miss the GPLv3 conference that went on last year, mostly due to personal reasons and I'd been out of the loop from the whole license process.

A Benevolent GPL: Most people assume GPL version 3 is going to get tougher on those who violate the license. But I was surprised to learn about the amnesty period for bonafide violations, to give the errant a chance to redeem themselves. The termination clause allows for a sixty day period to get back to compliance and avoid the penalties associated with copyright infringement.

Patents: I didn't hear this from Eben Moglen, but it bears repeating - "Where they were supposed to patent new inventions, companies have taken to inventing new patents". And with all due respect, that is exactly what is wrong with the current patent regimen.

The whole Microsoft deal was discussed in the meeting, where the failure of them to act up on the violations would automatically bring in Laches into effect. The FUD might actually work against Microsoft, even if they come up with the list of 253 patents because they will be deprived of all royalty claims for infringements wilfully ignored. Essentially, they're eating into their own war chest of patents with the bluffs.

The Process: There were several comments made about the GPLv3 process, which raises the bar for the creation of new licenses. If someone like OSI decides to ask more questions about community involvement in the development of the license, the proliferation of open source licenses will come to a quick grinding halt. Even moreso, the LGPL is going to become truly GPL+LE (for instance, dotgnu's class libraries and GNU classpath are GPL+LE rather than LGPL).

There will always be people who write BSD licensed code, but it lacks the unifying nature of GPL. The proprietary forks for most successful projects are doomed to die, due to the lack of the very things which make their mainline a success. It is a living tree which only sprouts dead branches - an enormous waste of manpower thanks to short term myopia.

Adoption: In this context, it would be good to remember that something as popular as Firefox is dual-licensed under GPL version 2 or *later*. As far as the world of code is concerned nearly all of that is as good as GPL v3'd, after the first commit which says "version 3 or later".

Freedoms: There have been too many comments of companies like Tivo and others who abide by the legalese, but violate the spirit of the license. But it serves some purpose to point out that the intention of the license upgrade was to plug some of the legal loopholes which have come up during the last half-decade. Those who shall suffer are those who have been exploiting those loopholes.

Essentially, the license makes no pretence about the freedoms it tries to protect - the users'. In turn, it does protect the developers who in conjunction with the former, makes up the community - from underhanded attacks by for-profit redistributors. Basically, there are people who will lose out due to the changes, but it somehow looks as though the license is slanted the right way for Joe Hacker - both for individual gain and altruism.

The difference between the Mafia and an insurance agency is that the latter doesn't burn down your house if you don't pay.

posted at: 18:03 | path: /conferences | permalink | Tags: , ,