Sunday, October 28, 2012

Luminance HDR - A Linux HDR tool that I can actually use.

About a year ago, I came across Luminance HDR during a search
for linux HDR tools. I wasn't so impressed back then.

Now, after try Luminace HDR again, I was stunned by the result I get. 
And Yes, I find a Linux HDR tool that I can actually use! 

I took these pictures at Franciscan Monastery, a lost gem in DC.
You will find original photos at the end of the post.


Tuesday, October 23, 2012

Dead Center Photography

Inspired by this group:

Another look, another perspective!


 

Thursday, October 18, 2012

Canon 5D Mark II vs Mark III

First of all, I have to admit that I do not have neither 5D Mark II or Mark III. But I do own a Canon 5D thou. It was a little surprise for me when I heart about Mark III because I was still thinking about upgrade to Mark II.

Don't get me wrong, I love my 5D and I don't need the video features. That why I am still thinking about upgrade to Mark II (and never did). Should I upgrade to Mark III then? or Should I just save some money by upgrade to Mark II? ... Here what I found out:

You can find full spec and full review of Mark II here and Mark III here.

5D Mark II Mark III
Price  discontinue 1,799 3,459
year Aug 2005 Sept 2008 Mar 2012
Photography Features
LCD Size 2.5" 3.0" 3.2"
Max Resolution 4368x2912 5616x3744 5760x3940
(megapixels) 12.7 21.2 22.3
Processor Digic II Digic 4 Digic 5
ISO (Auto) 100-1600 in 1/3 stops 100-6400 in 1/3 stops 100-25600 in 1/3 stops
(manual) 50, 3200 50, 12800 and 51200 50, 51200 and 102400
Auto focus points 9 9 61
Viewfinder Coverage 96% 98% 100%
Continuous Drive 3 fps (60 JPEG, 17 RAW) 3.9 fps (78 JPEG, 13 RAW) 6 fps
Exposure Compensation ±2 EV (at 1/3 EV, 1/2 EV steps) ±2 EV (at 1/3 EV, 1/2 EV steps) ±5 EV (at 1/3 EV, 1/2 EV steps)
AE Bracketing ±2 (3 frames at 1/3 EV, 1/2 EV steps) ±2 (3 frames at 1/3 EV, 1/2 EV steps) ±3 (2, 3, 5, 7 frames at 1/3 EV, 1/2 EV steps)
Muli-exposure no no up to 9 exposures
HDR in cameras no no 5 options
Horizon level no no dual axis leveling
Weight 895g 850g 950g
Memory Card 1 CF 1 CF 1 CF and 1 SD
Video Features
1080 n/a yes yes
720 n/a no 60,50
640 n/a 30,25 30,25
Longest clip n/a 12 mins (approx) 30 mins
Microphone/ Headphone Jack n/a mono/no mono/yes
Audio level ctrl n/a yes (pre recording) yes (while recording)
Aperture control in video n/a no yes
Histogram in video n/a no yes
Chromatic Aberration fix n/a no yes
Time code support n/a no yes

Overall, Mark III is an improvement over Mark II in the photography featrues, little bit bigger censor, faster processor, wider range ISO, more auto focus points, two memory cards, etc. Mark III is greatly improve on HDR support, such as, HDR in cameras, AE Bracketing and Multi-exposure, and 6 fps would help to get better HDR pictures. For me, I wish to have 5 or 7 frame AE Bracketing for quite some time.

Beside HDR, I would say, other improved features are nice the have. It's won't convince me to pay almost double to get Mark III.

Obviously the different between Mark II and Mark III is in video features. I don't know much about it but I can see that Mark III is greatly improve over Mark II. If the video features are important to you, then you should consider Mark III.

On the other hand, if you are looking for your first canon full frame camera, spend some time looking at  Mark II, specially at this price. It is a great photography tools and it is must better than 5D. It come with video features that you can explore. If I am not mistake, Mark II is very successful in this area too.

For me, I already have 5D. I am still happy with it and I don't really need video features. So I probably wait and see how Mark IV is going to look like.

Sunday, October 14, 2012

Setup Keyboard Layout for OpenBox

OpenBox doesn't have a keyboard layout setup program to assist you, as ubuntu or window does. However it is not that difficult to do it yourself.  There are two things that you need to do: add new keyboard layout and show what current layout you are using. The easiest way to setup US and Thai keyboard layout for OpenBox is to add this two commands into you OpenBox autostart file, locale at: ~/.config/openbox/autostart

## enable thai keyboard 
setxkbmap -layout us,th -option grp:toggle
xxkb &
The command setxkbmap is setting layout to US(us) as the first layout and Thai (th) as second. I choose right-alt key to switch the layout by using option 'grp:toggle'. Learn more about other layouts or options, look at the file '/usr/share/X11/xkb/rules/base.lst'. You might want to read resources I listed at the end of the post too.

The second command xxkb will give you a layout switcher and indicator on your panel. Make sure you have the "&" at the end of the line, otherwise the autostart won't finished. The xxkb need a config file '.xxkbrc' in your home directory. Here is mine:

Saturday, October 13, 2012

Observer Pattern In Ruby

Let add one more pattern into the design pattern series by consider Observer pattern. In observer pattern, there is a subject which will be observed by multiple observers. When an event happen with the subject, all observers who registered with the subject will get notify. One obvious example of this pattern is you and my blog. If you are subscribed to my blog, you will get notify when my blogs get updated. This relation between subject and observers provide a clear pattern. It's clear enough to be implemented as a module in ruby standard library, called Observable.

In this post, I am going to use this observable module to implement a program that allow me follow stocks prices, and also calculate the average over time.

Assume that the stock market allow me to read current stock price with a function call "get_current_price(stock_symbol)".  With this method, I can implement a simple class, SimpleStockWatcher, to read the current price and calculate the average as follow:
class SimpleStockWatcher 
  def initialize(symbol)
    @symbol = symbol
    @sum = 0
    @count = 0
  end

  def update
    price = get_current_price(@symbol)
    @sum += price
    @count += 1
    show(price)
  end

  def show(price)
    puts "Symbol #{@symbol}"
    puts "  Time:          #{Time.now}"
    puts "  Current Price: #{price}"
    puts "  Average:       #{@sum/@count}"
  end
end
If I want to monitor Bank of America (BOA), and Google (GOOG), I implement the following loop:
stocks = [ SimpleStockWatcher("BOA"), SimpleStockWatcher("GOOG") ]
loop do
  stocks.each(&:update)
  sleep(1)
end
This loop will print the stocks price and average very second.

Now, I want to add more analysis, say 30 or 100 days moving average. No problem, I add more code into the SimpleStockWatcher. Then every second we get the stock prices, average, 30-day moving average, and 100-days moving average.

Let get a bit more complicate, I want to show only current price and 30-days moving average for stock "BOA". For "GOOG", I want to show current price, the average, and 100-days moving average. How do I satisfy this requirement?

Thursday, October 11, 2012

Transformer Prime and Linux Installer

Android is a great platform for consuming. I means, using it for internet, email, read books, keep your notes, etc. One may go as future as write a book, create art work, edit photos, compose musics, etc. There is an app for every thing you want, even for a linux enthusiastic like me. What I mean is I can use linux side by side with android.

First of all, you can find instruction to install Ubuntu on prime here on the xda-developers site, if you are interested. It's risky, but you will get full ubuntu running on the prime. I won't go into this approach thou. It's not what I aim for.

For me, I prefer another method, chroot to a linux image file. This method allow me to run linux along side with android. I can do things that android does great, like reading email, facebook, websurfing, view pictures, read books, etc. I also can do things that normally android won't allow you. Actually, I can do pretty much every thing that linux provide you.

The idea is to create a linux image file on your android device, mount the image file to android system, and chroot to it.

Guess what, there is an app for that too. It's call "linux installer". Unfortunately, it's some what doesn't work perfectly on transformer prime.

The app work only with rooted device, which mean you need to unlock you prime. After installed linux installer 4.1 (the version at the time this blog is written) from the market to your prime, you have to setup before you can go ahead with installation by select menu and setup. By default, there are couple options are disable. I choose to enable all of them, specially
  • Bind Android
  • Allow write to /system
  • Allow remount with dev/exec
should be turn on. It's make the chroot integrate better with android.

By default, the debian/squeeze is chosen for distribution/version. Don't forget to choose your hostname, and domain name. I leave the chroot launcher script and other options untouched. 

For the loop file location, I leave it at the default location. You should take note where it is. My is "/storage/sdcard0/Linux.loop". It's important that you need to know about this.

For the loop file size, it's need to be above 300MB. However, we are not going to use this loop file anyway, so choose some thing small, say 300.