Sunday, July 24, 2011

I, the DSRL Dummy: Portraits

The Tamron lens has proven quite a good general purpose lens. Last weekend Daniel and I went to the city for lunch and beers, I took time to fool around with the camera and took some portraits. The first shots came out underexposed—actually,  I have no clue why— but a little fidgeting in RawTherapee delivered some nice results, 
Underexposed shot, balanced in RawTherapee
Of course, playing with the histogram has a price; in this case: the graininess of the processed picture. You can compare with another portrait of Daniel taken at the same place but paying more attention to the settings in the camera, 
Same conditions, but unprocessed.
As you can see, the Tamron 17-50mm F2.8 lens behaves nicely at 30mm delivering a strong bokeh—that is, the blur of the out of focus areas in the picture. If you don't care about printing, say you only want to upload them to your web gallery, even heavily underexposed shots can be rescued by using RawTherapee—try the automatic auto-leveling and use it as a starting point for your fidgeting. 

The Pentax K-5 and the Tamron 17-50mm have proven a dynamic duo so far. I have no complaints about the HDR, panoramas and portrait results I have obtained from them.


Edit: I wanted to relax a little bit more so I started to process some other pictures. I really like this one. The contrast is not so good but I find the colours from the building and boats awesome,
Clarke Quay
I wish I had  shot a HDR sequence of this scene or, at least, had a polarizing filter in the lens at the time, that might have given a more dramatic sky.

Edit 2: I'm still trying to relax and play with the software, so I stitched a panorama of Clarke Quay. The shots were first equalized in RawTherapee and then stitched together in Hugin,
Clarke Quay from Brewerkz
Singapore is a colourful place to live as you can see.

Wednesday, July 20, 2011

Morning fun...

I was talking with Lyx this morning and she mentioned that she had to fill a personality test for certain job offer. It happens that the test is free for all and I joined her in filling it. 

Do you want to know my result? It was the equivalent of morning laughing out loud!

According to the results of the Jung types test, apparently I'm the INTJ (22/62/25/44) type. Here's where the laugh stock comes... ready? Kersey's website calls that type Mastermind. I've been laughing for almost 15min now. But it gets even better, typelogic.com's description of the INTJ is even more funnier as it reads like a horoscope kind of description—relationships included. Well, at least according to humanmetrics.com career services I choose my career right, but I guess Corporative Lawyer would paid more than Natural Science Research/Education.

Another nice thing about the test is that it still supports my theory that Lyx should be the main provider of our relationship, as an ENFJ (11/44/62/78) type she should be good at a Counseling, Management or Politics career—pay no heed to the lesser payed education career choices hehehe. The Kersey.com describes the archetype as the Teacher and the typelogic.com as a Benevolent Pedagoge. At least they got it right with my  dreamy idealistic loved one, she is extraordinary benevolent, caring and charismatic—I'm afraid, very afraid, of the manipulative part hehehehe.

Well, it seems like there's nothing better to lighten up the morning as an online version of the Myers-Brigss type indicator.

Monday, July 11, 2011

Last weekend movies...

I've just realized that it has been one month since I posted something on the movies and series I've been watching. It has been a long month, many things happened: I got a paper accepted for publication at Phys. Rev. E, other is in the second round of reviewing, and a third one has just been submitted. As you can imagine it has been a month with very long days between corrections, working in the next paper and trying to help my friends. Anyway, here's the list ...

  1. Made in Dagenham, ****
    I'm not a big fan of dramatizations of true stories, but this one has  everything I like: strong willed women, nice photography, anti-corruption  ideals, denouncing of corrupted union leaders. It tells the story of the seamstresses of the Ford assembling plant in Dagenham, UK, and their fight for equal pay for women in 1968, those were the days that changed the world. I have to say that I only knew about the students demonstrations, now I know about were the equal pay movement for women was born. 

  2. Detective Dee and the Mystery of the Phantom Flame, ****
    That's a bombastic translation of the sober original title 狄仁杰 (Di Renjie). A biographical epic—as most of the most beautiful Chinese movies are—telling the story of the Magistrate Dee, chancellor to the one and only Empress of China. The scenarios are majestic and very well simulated. I loved how they tried to explain each and every traditional trick that usually is given as magic in other Chinese epics.

  3. Let the Bullets Fly, ****
    The name says everything, I guess. There was a sukiyaki western in the past and now there's a noodle western. Situated in the modern warring warlords period of China—yes, there have been many of those—Let the bullets fly has the feeling of a spaghetti western; the bandits, the rich merchant that controls the town, the useless or corrupted authority.  I have always loved the westerns with their feeling of despair, redemption, and twisted honor. They always remind me of my dad, we use to watch a lot of those and WWII films.

  4. Half Nelson, ****
    Education. No, not education. Schooling in the age of broken social fabric and broken people. A somewhat idealistic and addict history teacher trying to show dialectics to his pupils and save at least one of his students from ending up as a dealer. Of course, the student wants to save him from being a junkie. Whom will save whom?

  5. A Single Man, ***
    These past month is a rarity. I have watched two dramas and really like them—the other being Half Nelson. The film, situated in the early 60s  West Coast America, deals with a homosexual well-to-do English teacher that lost his Architect life partner one year earlier. Through the narrative we are shown how the teacher cannot cope with the loss and how this breaks his daily life and interactions with other people.

  6. The Cannonball Run Trilogy, ***
    What can I say? Fast cars, lots of famous 80's actors. Actually, the first film of the movie is fresh and funny for the time and the other two just a way to capitalize from the first one. But c'mon, Roger Moore just after being Bond, Sammy Davis Jr, Dean Martin, Farrah Fawcett, Jackie Chan, Peter Fonda, that deserves two stars even when the films doesn't make any sense at all. C'mon, it deserves three starts just because the films doesn't make any sense at all!

  7. In the Valley of Elah, **
    A post Iraq invasion film. It deals with an ex-military man who lost his son after returning to America from Iraq. It is one of those father-turned-detective-to-avenge-death-of-son-because-of-military-cover-up film with completely useless police detectives included.

  8. Age of Dragons, *
    It seems like I will have to live a long life in order to watch a decent movie about dragons. I never thought I would say this, but never say never, if you have one month, get yourself a copy of Moby Dick, it may weight way more than a kilogram, have very stylized language and I think the whole thing is a HUGE metaphor, but it is worth reading and all the characters are more fleshy than the ones in this film.
In the past two months, I've been trying to fill the lazy time with some old tv series while the inter-season break finishes. So, I watched the whole second, and last, season of "Legend of the Seeker." I was a little disappointed during the two first chapter but then it picked up. Also, I got my hands on the first two seasons of a mock-cartoon called "The Venture Bros," basically a parody of all the cartoons from the 70's (Scooby Doo and Johnny Quest mainly) and I cannot wait to find the next two seasons that aired four years ago.  Also, I managed to get the first season of one of my favorites comedians: Rodney Carrington. I was really surprised to see this tv show, called "Rodney," as I had been looking for it in the past without avail. It is simpleton redneck hilarious, but doesn't have that much funny songs. I'm hoping I can find the second season soon.

At last, but not least, I managed to get all five seasons of Futurama, as well as the movies! Futurama is the most awesome science fiction cartoon, paradoxes and theorems included. I'm really curious about seeing the Futurama Theorem in the, already running, sixth season. It's great that Futurama went back to the dishes!

As you can see, it was a long month, but I managed to squeeze a lot of time while having dinner and before going to sleep, and a little bit while editing photographs. Also, I managed to read a lot on the bus; I finished the six books from Codex Alera in the past eight weeks. Truth be told, I'm very happy with all the consumerism I have being doing in the last two months. Most of the time I spent about 10 hours per day in the office and I got really stressed by the reviewers comments coming all at the same time just when we were trying to give the final touches to the last article. Thanks to the books, the tv series and films with Lyx I managed to smile, think about moral dilemmas, and basically forget about the office for a few hours at a time.

Well, this is long enough. Thank you for reading.

Tuesday, July 5, 2011

I, the DSRL Dummy: Panoramas by a Dummy

Last weekend, I took my lazy derriére—all geared up with camera and tripod—up the Kent Ridge to take pictures. The excursion's primary goal was take a set of photos to create a panorama; a secondary objective was to try and shoot manual—this one was not all that successful.

I spent two hours walking the ridge and shooting—truth be told, there was a lot of cursing because I have no practice on handling the aperture and shutter dials for manual shooting. I liked two or three of the almost one hundred pictures I shoot. Today, I sat down and decided to take these ten pictures and try to make a panorama.

First, there's a nice free GPL program for creating panoramas: Hugin. Sources and binaries for Linux/Win 7/Mac are available at Hugin download. The installer is very simple to follow and you will be playing with Hugin in a blink.

Hugin welcomes you with a tip. Dismiss it and the Panorama Stitcher's assistant is ready to upload the base pictures. Click on Load Images, select your images and load them into the stitcher. Now, click on Align, relax, go for a drink, it takes time for the stitcher to process your images. Once the images are aligned, click on Create Panorama, a window with the preview will pop up. In my case, the stitcher did a great job aligning the images so I just went back to the Assistant window and clicked on the Optimizer tab and ask the program to run a crop optimization for itself. Then, I went to the Exposure tab, chose the low dynamic range option and asked the program to run a optimization for itself.  Finally, I went to the Stitcher tab, asked the program to Calculate Optimal Size and then Save the Project and Send to Batch. The batch processor will pop up, here you can toy with more things but I just processed my file, this was the result:

The West Coast from Kent Ridge.
You can see the same image at my Picasa were you can zoom it as much as you want, just follow this link.

As you can see, the exposure optimizer does a great job. I tried to equalize the exposure of the original raw files with Raw Therapee before manipulating them in Hugin but, as you can see with the original ten files, the different exposure levels were still clearly visible. Please excuse the distorted horizon, I'm still trying to learn how to compensate for geometric distortion.

In summary, Hugin does a great job stitching panoramas. It basically did all the work by itself from aligning to balancing exposure. Awesome program.


Saturday, July 2, 2011

I, the DSRL Dummy: HDR by a Dummy...

Trying to learn how to do HDR imaging has brought me hours of fun. I want to share this fun with anybody interested in getting stress out of their system. 

For beginners like me, the first step is to get a program that automatically does most of the work. A friend of mine, Orthus, has been trying to convince me of using Adobe Photoshop CS5 & Lightroom, but the price is just out of my software range. There's good news. Luminance HDR is a free open source solution that works in Linux/Win 7/Mac operating systems. Luminance integrates many open source solutions that get calibration curves from the raw exif, mask and combine the raw files, tone maps the resulting HDR image and exports it into a LDR images. 

You can download the program here. You can find compiled binaries for your favourite Linux distro and just double-click on them. If you are using Win 7 just uncompress the file and copy it into your a directory of your choosing—I put mine on C:\Luminance HDR\—afterwards just right-click on the executable, select Create Shortcut and copy the result into your favourite location; this way you can access the executable easily.

Now, it's time to work; Luminance allows composition from both HDR (raw/pfs/tiff16&32) and LDR (jpeg/png/tiff8) files. I'm gonna work with the raw files but will post here reduced jpeg files—lower size and density with GIMP.

Under-exposed -2EV
Under-exposed -1EV

Normal Exposure 0EV
Over-exposed +1EV
Over-exposed +2EV
Now, it is time to open Luminance HDR and choose New HDR Image from the tool bar; this opens up a new window where we can choose the five raw files to compose our HDR image, just click on Load Images and voilá. Once the images are loaded you will see that each has and exposure number increasing in steps of 1 EV—Luminance grab these numbers from the image's exif— In case it doesn't happens in your case, you can set the exposure manually with the slider on the right. Click Next. Do not choose the alignment option unless you have a pretty damn awesome great machine; the aligning algorithm is computational intensive.

Now that we are in the second window of the HDR creation wizard, choose the predetermined Profile 1, click Finish and wait for the result. The time has come to play with the result. The first thing that you will notice in the tool bar is the green histogram on top of the composed HDR image. You can click on it and slide the blue window left/right. This will affect how light/dark the image appears; move it left, the image becomes lighter, move it right and the image becomes darker. You will notice a button that most probably is saying Gamma1.4, this is the mapping that Luminance used to compose your image. You can play with this too, the options are linear, gamma, and logarithmic from darker to lighter results. Find the one that pleases you the most. I'm gonna go for light, so logarithmic it is. Save the resulting image as HDR file.

The next, and final, step is choosing the tone mapping that gives you the effect that you look, click on the button Tonemap HDR image at the right of the tool bar and enjoy sliding bars; here are some examples:
Mantiuk'06, Contrast Factor 0.5, Saturation Factor 1.3, Detail Factor 5, Pre-Gamma 0.9
Mantiuk'06, Contrast Factor 0.1, Saturation Factor 1, Detail Factor 5, Pre-Gamma 0.9
Old Fattal pre 1.8.4, standard parameters. 
Fattal, Alpha 1, Beta 0.75, Color Saturation 0.57, Noise Reduction 0
As you can see, you can get images from the natural to the eerie— I like the first and the last the most— just by playing with the parameters of the different tone maps. I apologize for the ghosting in the image, it seems like it was a windy morning when I shoot them.

I hope this helps you as much as it helps me. I have found an amazing therapy in playing with the camera and software; it takes the edge off at the end of the day. 

Friday, July 1, 2011

How to show/hide text in a webpage

Today, I was trying to flex a little bit my weak html/php/javascript muscle; I thought about upgrading my publication list with a show/hide link of citations to my work. As always, whenever I don't have a clue, Google came to the rescue! I found a quite helpful discussion at webdeveloper.com that takes advantage of the css style called display.

As you can see, the script in its simpler form takes two instructions. One is the declaration of a division containing the text that you want to hide/show, this division is declared with the display:block style:

<div id="new_div" style="display: block;">Here goes the text you want to hide/show</div>

The second part of the combo is a javascript that changes the display:block style to display:none:
<a href="#" onclick= "document.getElementById('new_div').style.display =(document.getElementById('new_div').style.display == 'block')?'none':'block';">Click to show/hide the div called "new_div"</a>
Tip Hat: David Harrison's post.

If you follow the webdeveloper.com discussion you will find a way to declare the script at the head section and shortens the command to be put at the a href tag. Also, you will find a post on how to make the divisions invisible at first load.

You can see my publication list for the final result, just click on any of the Cited by links at some of the papers. You can also view the source of my webpage or drop me a comment in case of you need a little bit more help.