“SARS” Xiaotangshan Hospital Site (“非典”时的小汤山医院遗址)

Someone sent me this link in a Chinese QQ chat room about photography. This area is in Beijing. Use Google Toolbar to translate.  http://yangyunzhong.blshe.com/post/5646/384331

Dujiangyan City Photos

Dujiangyan (都江堰) is a town about 50km north west of Chengdu city. I planned a day trip there one day when I was not scheduled to have class. The bus ride took about 45 minutes and was very smooth. There is a large high-speed highway between Chengdu and Dujiangyan, which makes it a perfect day trip. The city is famous for its massive irrigation project that took place nearly 2000 years ago and is primarily responsible for the growth and development of Sichuan, Chengdu. Dujiangyan was effected by the 2008 Sichuan earthquake. I didn’t go to the irrigation project, but I took some pictures of what the city looks like today, over 1 year after the earthquake.

01002

Collasped Agricultural Bank of China

 
01001

Collapsed Agricultural Bank of China

01004

Damaged Roadway

01005

Rebuilding

01006

Vacant Buildings

01007

Damaged BuildingDamaged Building, notice the four minority symbols on the building

01009

Ancient Temple, large mountain in the background

01010

Repainting a Famous Bridge

01011

Removing the rubble, notice the minority symbols on the gate

01012

Each piece of steel has to be hand extracted from the cement

01013

How the buildings get broken down

01014

Cold and blue river

01015

A large amount of cold water flowing very quickly

01016

01017

Destroyed Buildings

01018

Destroyed Buildings, who chose?

01019

Who chose?

Sichuan Coca-Cola factory

The Sichuan Coca-Cola bottling factory is in the town I live. It’s cool because all the tiny shops adjactent to the factory have huge Coca-Cola signs and have drinks in all size there. I like to go there to buy beverages because I know it’s fresh.

四川省新都区可口可乐

Sichuan Coca-Cola bottling plant(四川省新都区可口可乐)

Hyperfocal Distance

Finding the Hyperfocal distance is important in photography when you want to maximize the ‘depth of field’ (DOF). I use this technique very often because I like for my photos to be very sharp and have the maximum depth of field.

There is a great online resource that will help you calculate the Hyperfocal distance at any lens aperature. DOF printable charts http://www.dofmaster.com/files/charts/samplecharts.pdf.

To find the hyperfocal distance, you need to know 1) the focal distance of the lens you are using (eg~ 50mm) and 2) the current or desired aperature setting of the lens. By using the previous chart, you can find the ‘hyperfocal distance’. This is the distance at which you want to focus your lens, to have the maximum DOF for that aperature setting.

Example, referring to the chart above, I have 35mm film camera. My lens is 50mm and I like to use an aperature setting of f/22. According to the chart for 35mm cameras, at 50mm and f/22 the hyperfocal distance is about 12ft. That means I need to focus my camera an an object that is 12ft away. Everything from -half- the hyperfocal distance, 6ft, to infinity, will be infocus and sharp.

There is an easy trick to do this. If your lens has a distance meter on top, just turn the focus so that Infinity matches with the aperature setting you are using. So, if you are shooting at f/11 then turn the lens so Inifity lines up with f/11 on the lens. Then set your aperature and shoot.

Depth of Field

Depth of Field @ 50mm f/22

Total Commander for Windows XP

Total Commander is a great file manager for Windows. It supports lots of ‘plugins’ which was extend the functionality. I like it for the ‘Multiple file renamer’. Check it out http://ghisler.com/. (有中文)

Scripting Gimp (batch mode)

The Gimp has a wonderful feature that allows you to run it non-interactively (no User Interface) from the ‘command line’. This allows you to write scripts that can be used in the shell!

I have lots of film negatives that have been scanned to the computer and all were saved as .BMP files. I wrote a simple script to open each file, adjust the levels, and save as a .JPG.

; ec-levels-stretch

(define (ec pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let*
(
(filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(new_filename (string-append filename “.jpg”))
(drawable (car (gimp-image-get-active-layer image)))
)
; (gimp-levels-stretch drawable)
(file-jpeg-save 1 image drawable new_filename “” 0.85 0 1 0 “” 0 1 0 1)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
)
)

(script-fu-register “ec”
“ec”
“Batch Auto Levels”
“Emery clark”
“Emery Clark”
“2010″
“RGB* GRAY*”

)
(script-fu-menu-register “ec”
/Filters”)

; End script

Put the script in ‘/home/your_username/.gimp-2.6/scripts’ You can run this from the command line by ‘cd /dir/with/images/’ then:

gimp -i -b ‘(ec ” *.png ” )’ -b ‘(gimp-quit 0)’

Read more about batch mode http://www.gimp.org/tutorials/Basic_Batch/. Note: I have tried a modified version of this script and have yet to get it working on the Windows XP command line, please let me know if you can do it. I had to resort to a linux machine.

Installing a LAMP (Linux, Apache, MySQL, PHP) server on Ubuntu 9.10

Ubuntu makes this really easy with version 9.10. ‘System > Administration > Synaptic Package Manager > Sort > Mark by Task’. There will be an option for ‘LAMP server’.

Your web directory will be in /var/www but it will be owned by root. You can run ’sudo chown YOUR_USERNAME /var/www/’ you can put your files here and they will be visable when you visit ‘http://127.0.0.1/’ or ‘http://localhost/’ in your web browser.

Networking on Virtual Box XP Ubuntu 9.10

There are several ways to setup networking with your ‘Guest’ OS in Virtual Box. Virtual Box defaults to NAT (Network Address Translation) which typically works fine out of the box. However, to make your virtual machine visable to your Host OS or other machines on your network, you need to enable ‘Bridged Networking’ in the ‘Settings’ for your virtual machine. In order for this to work properly you will need a router with DHCP.

First, ‘Start > Run’ type ‘cmd’. Type ‘ipconfig /all’ write down all the information you see, specificially ‘DNS/Name servers’.  Then ‘Start menu > Control Panels > Networking Connections’ and Right click on ‘Local Area Connection’ > ‘Properties’. ‘General’ > ‘Internet Protocal (TCP/IP)’ > Properties > ‘Use the following address’. give your Host OS a ’static IP’ (eg~ 192.168.1.2).

Back to Networking Connections, Right-click ‘VirtualBox Host-Only Network’, same thing, except give it an address within the range of the DHCP server on your router (eg~ 192.168.1.102). Now in VirtualBox, select ‘Settings’ and enable ‘Bridged Adapter’ under ‘Network’. Start your VM. You should be able to PING your Guest OS from your Host OS. Install OpenSSH-server on your Guest OS and you can SSH!

Guest Additions on VirtualBox Ubuntu 9.10

Guest Additions is a feature of Virtual Box that allows you to install drivers on the guest OS to help integrate better with your host (XP) OS. Go to [IMPORTANT] http://download.virtualbox.org/virtualbox/ and choose your version number, probably ‘3.1.2′ and download the .iso file.

To install the guest additions, refer to the Virtual Box User Manual (F1). You will need to ’sudo apt-get install dkms’, mount and browse to the CD, and run the installer script. This will install several kernel modules, then you will need to restart the virtual machine. This will enable features such as host-guest file/folder sharing, and host-machine mouse integration. Highly reccomended.

Install Chinese language support on Ubuntu 9.10

System > Administration > Language Support > ‘Install / Remove Languages’. This will install Chinese character support and the IBUS-Pinyin input method.