Archive for August, 2009

Solved the Thai Code List – I Think

August 31, 2009

See http://bkkphotographer.wordpress.com/2009/08/13/province-number-on-thai-license-plates/ and the comments to this photo on Flickr.

A Flickr friend directed me to the web site of the Thai Department of Land Transportartion (DLT)  here. There you can download Excel spreadsheets with statistics of vehicle registrations in each province of Thailand. That’s interesting (to me) but the good news is that the spreadsheets are organized in order of the two digit code applied to license plates for buses and commercial trucks.

The spreadsheets don’t explicitly list the codes but when I combined the information I have from photographs (> 50%) with the columns in the spreadsheets I was able to fill in the blanks. I was very thin in the southern region, but I had 92 = Songkhla and that was enough to place the remainder.

The first digit of the code gives the region of Thailand as follows:

0 – Bangkok
1 – Central
2 – East
3 – Lower North East
4 – Upper North East
5 – Upper North
6 – Lower North
7- West
8 – Upper South
9 – Lower South

Within each sub-region the codes are allocated roughly north-south, west-east. There are exceptions with provinces created since the DLT created the system, for example Sa Kaeo in the East and Nong Bua Lamphu in the North East.

Code Name Thai Name
01 Bangkok กรุงเทพมหานคร
10 Chai Nat ชัยนาท
11 Sing Buri สิงห์บุรี
12 Lop Buri ลพบุรี
13 Ang Thong อ่างทอง
14 Saraburi สระบุรี
15 Ayutthaya พระนครศรีอยุธยา
16 Pathum Thani ปทุมธานี
17 Nonthaburi นนทบุรี
18 Samut Prakan สมุทรปราการ
20 Nakhon Nayok นครนายก
21 Prachin Buri ปราจีนบุรี
22 Chachoengsao ฉะเชิงเทรา
23 Chon Buri ชลบุรี
24 Rayong ระยอง
25 Chanthaburi จันทบุรี
26 Trat ตราด
27 Sa Kaeo สระแก้ว
30 Chaiyaphum ชัยภูมิ
31 Yasothon ยโสธร
32 Ubon Ratchathani อุบลราชธานี
33 Si Sa Ket ศรีสะเกษ
34 Buri Ram บุรีรัมย์
35 Nakhon Ratchasima นครราชสีมา
36 Surin สุรินทร์
37 Amnat Charoen อำนาจเจริญ
38 Nong Bua Lam Phu หนองบัวลำภู
40 Nong Khai หนองคาย
41 Loei เลย
42 Udon Thani อุดรธานี
43 Nakhon Phanom นครพนม
44 Sakon Nakhon สกลนคร
45 Khon Kaen ขอนแก่น
46 Kalasin กาฬสินธุ์
47 Maha Sarakham มหาสารคาม
48 Roi Et ร้อยเอ็ด
49 Mukdahan มุกดาหาร
50 Chiang Rai เชียงราย
51 Mae Hong Son แม่ฮ่องสอน
52 Chiang Mai เชียงใหม่
53 Phayao พะเยา
54 Nan น่าน
55 Lamphun ลำพูน
56 Lampang ลำปาง
57 Phrae แพร่
60 Uttaradit อุตรดิตถ์
61 Sukhothai สุโขทัย
62 Tak ตาก
63 Phitsanulok พิษณุโลก
64 Kamphaeng Phet กำแพงเพชร
65 Phichit พิจิตร
66 Phetchabun เพชรบูรณ์
67 Nakhon Sawan นครสวรรค์
68 Uthai Thani อุทัยธานี
70 Suphanburi สุพรรณบุรี
71 Kanchanaburi กาญจนบุรี
72 Nakhon Pathom นครปฐม
73 Ratchaburi ราชบุรี
74 Samut Sakhon สมุทรสาคร
75 Samut Songkhram สมุทรสงคราม
76 Phetchaburi เพชรบุรี
77 Prachuap Khiri Khan ประจวบคีรีขันธ์
80 Chumpon ชุมพร
81 Ranong ระนอง
82 Surat Thani สุราษฎร์ธานี
83 Phang Nga พังงา
84 Nakhon Si Thammarat นครศรีธรรมราช
85 Krabi กระบี่
86 Phuket ภูเก็ต
90 Phattalung พัทลุง
91 Trang ตรัง
92 Songkhla สงขลา
93 Satun สตูล
94 Pattani ปัตตานี
95 Yala ยะลา
96 Narathiwat นราธิวาส

I verified 44 = Sakon Nakhon and 50 = Chiang Rai today by observation.

A corollary is that the six-digit license plates are duplicated across the country. For example each province registers buses in a series starting 10-xxxx. So a unique registration has to have the two digit code pre-pended.

I want to be able to search by Lightroom catalog for such duplicates. i have the data in my add-in but it is hard to write a SQL query – not least because I still have not found a working ODBC driver for the Lightroom database.

Quote of the Day

August 31, 2009

Time Magazine’s Quote of the Day for Friday, August 28, 2009.

Open quoteIt is not ‘your’ Facebook profile. It is Facebook’s profile about you. Close quote

  • LEIF HARMSEN,
  • a former Facebook user who now crusades against the social-networking site; a small group of users are fleeing and speaking out against the site’s privacy issues

I think he has a good point. All these ‘free’ tools come with a price. I am content with my blog. Everything in it is under my control. Thank you WordPress!

Op-Ed Columnist – Until Medical Bills Do Us Part – NYTimes.com

August 31, 2009

Op-Ed Columnist – Until Medical Bills Do Us Part – NYTimes.com.

I read this op-ed in the NY Times about medical bills in the USA. It is such an acute problem and I am sad that so much of the debate is so mean spirited.

Something else struck me when I read the footer of the column.

I invite you to visit my blog, On the Ground. Please also join me on Facebook, watch my YouTube videos and follow me on Twitter.

Where does he find the time to do any work? Not just the writing of his column but all the research and networking that’s necessary for him to stay current, informed, influential and influenced. Blogging, Facebook updating, making videos and Twittering are all time consuming if you put some thought into what you’re posting.

I wonder if he’ll have time to win any more Pulitzer Prizes with all the new media updating he’s doing.

Descreening in Photoshop

August 31, 2009

I found a Photoshop recipe to remove the moire patterns that result from scanning magazines and books. See here for why I need this.

Here is an article on About.com on the subject.

  1. Scan the image at a resolution approximately 150-200% higher than what you need for final output.
  2. Go to Filter > Noise > Median.
  3. Use a radius between 1-3. Typically the higher the quality of the source, the lower the radius can be. Use your own judgement, but you will probably find that 3 works well for newspapers, 2 for magazines, and 1 for books.
  4. Go to Image > Image Size (Image > Resize > Image Size in Elements) and resample to the desired image size and resolution using the bicubic resampling option.
  5. Make sure you are zoomed to 100% magnification.
  6. Go to Filter > Sharpen > Unsharp Mask.
  7. Exact settings will depend on the image resolution, but these settings are a good starting point: Amount 50-100%, Radius 1-3 pixels, Threshold 1-5. Use your eye as the final judge.

Tips

  1. If you still see a pattern after applying the Median filter, try a slight gaussian blur before resampling. Apply just enough blur to reduce the pattern.
  2. If you notice halos or glows in the image after using Unsharp Mask, go to Edit > Fade. Use settings: 50% Opacity, Mode Luminosity. (Not available in Elements.)

I did an experiment to follow these instructions with a picture of a Chinese ‘Bullet Train’ I scanned from Fortune Magazine Asia-Pacific.

  • I did three scans at 150dpi, 300dpi and 600dpi. (I can work out how to do that using my Thai user interface to Scan Gear).
  • I tried using the technique to make a better 300dpi picture from the 600dpi scan. Here is a crop of the file as scanned:
Descreen test 1 - 600 dpi before

Descreen test 1 - 600 dpi before

  • That’s a good example of a moire pattern!
  • Here’s a screenshot after I applied the Median filter, radius 2:
Descreen test 2 - median filter (radius=2)

Descreen test 2 - median filter (radius=2)

  • Much better.
  • I kept the file the same dimensions but reduced it to 300dpi with this Image Resize setting:
Photoshop Image Size Options

Photoshop Image Size Options

  • Which left the picture looking like this:
Descreen test 3 - Resampled

Descreen test 3 - Resampled

  • Finally I applied the Unsharp Mask Filter with the following empirically derived settings:
Photoshop Unsharp Mask Settings

Photoshop Unsharp Mask Settings

  • Here’s a screenshot of the picture after I applied the Unsharp Mask Filter:
Descreen test 4 - Unsharp Mask

Descreen test 4 - Unsharp Mask

  • Finally, here is a before and after comparison using Lightroom’s Compare View:
Descreen test 5 - Before & After

Descreen test 5 - Before & After

Conclusion

The recipe worked well. If I can work out how to use Thai language Scan Gear I will compare it with using the descreen option provided with the driver.

Unknown Error in Lightroom!

August 31, 2009
An unknown error occurred while moving a photo

An unknown error occurred while moving a photo

If the error was unknown, how do you know it was an error? (That’s a philosophy question.)

No, it is NOT OK. What do I do about unknown errors?

It happened when I added a keyword to a photo and immediately tried to move it to another directory. I didn’t give the poor overworked database time to update the metadata before I started the move.

Why do I, a 53 year old human, think faster than a 2009 PC with gigabytes of memory, a fast processor, a 160GB disk and decades of development experience?

Haven’t you heard of transactions, Adobe Lightroom Team?

ScanGear in Thai

August 31, 2009

This is why I cannot de-screen the pictures I scan from books and magazines. The user interface for my Canon MP610 all-in-one scanner / printer is in Thai and I do not know how to change it.

ScanGear User Interface in Thai

ScanGear User Interface in Thai

I purchased my old Sony laptop and it was, of course, all English Windows XP. I purchased the printer in Thailand, but when I installed the software everything came up in English. No problem.

When I received the new Compaq Presario CQ40 it had the Thai version of Windows XP. I set everything up so the user interface is in English (United Kingdom).

Windows XP Regional & Language Options

Windows XP Regional & Language Options

When I installed Canon’s software it came up in Thai without asking me what I wanted. I found how how to change the language for the printer driver.

How to Change the User Interface Language

How to Change the User Interface Language

I have not found anywhere I can change it for the scanner. Canon licensed Scan Gear from another company.

There’s another tool called WIA that is English. But it is so simple that I don’t think it supports de-screening.

WIA Canon MP610

WIA Canon MP610

Note: there are ways of de-screening pictures in “post” using Photoshop. I was too lazy to research them when I scanned the Fortune Magazine article.

Microsoft Replaces Black Man With White Man In Photo

August 30, 2009

Microsoft Replaces Black Man With White Man In Photo.

I cannot remember how I found this blog entry about Microsoft editing a photo for the Polish market, replacing a black businessman’s head with that of a white man. There were predictably a lot of Microsoft hate comments and some name calling. Rather than jump into that fray – I thought I’d comment here.

  1. No one would have objected if Microsoft had substituted a different picture in the Polish ad. But to do a Photoshop job and “cut off” the black man’s head, replace it with somebody else’s and not change the hands is crass. It wasn’t a unique photo: like someone shaking hands with Bill Gates and Steve Balmer. They could get a stock photo of people at a conference table looking interested and happy for pennies in royalties.
  2. There are no secrets any more. Just like the Czech grocery store who appropriated a happy family photo from the internet for their advertising, somebody will find out sooner or later.
  3. Quite possibly it was done by an agency in Poland. They received the US ad and had an urgent deadline to translate the text, “localize” and publish it. I am certain it wasnt a conspiracy in Redmond, WA. But the damage done by embarrassment is huge. If the ad’s got Microsoft’s name on it then they’re responsible – and people love to hate Microsoft.
  4. The whole thing could be a hoax.
  5. I think it is great that people are sensitive about this kind of thing but sad it opens up so much hate-filled debate.

I’ll Fix it in Post

August 30, 2009

http://photofocus.com/2009/08/26/the-biggest-lie-in-both-the-still-photo-video-production-industry/

“Post” is another of those jargon words that make me wince. It’s short for post-production or post-processing. I.e. fiddling around in Lightroom or Photoshop to correct the mistakes I made whenI took the photo.

I think it is most used in the film and video industry but still photographers use it too.

I agree with the article most of the time. No amount of “sharpening” in Photoshop will correct an out-of-focus picture, or one where I didn’t get the subject’s head in the frame …

Damn, Damn, Damn!

But there are a two things I don’t worry about when I am taking pictures in RAW format:

  1. White balance. I use “auto” on the camera and I can change it at will in Lightroom with no penalty.
  2. Canon Picture Style. I use “standard” all the time. Lightroom emulates Canon’s Picture Styles for Raw and DNG files – again without penalty.

I know I can fix these in “post”.

Within limits I don’t worry too much about framing or exposure.

If I have plenty of high quality pixels I can crop the picture in Lightroom or Photoshop.

It’s hard to judge a correctly exposed picture on the camer’s LCD screen. Raw files have a lot of exposure latitude and I can adjust a picture a stop plus or minus with little quality penalty. Yes, it is always better to expose correctly the first time. I’ll bracket exposures if I have time.

But I don’t always have time and so I think it is best to get an in focus shot of what I want even if it is badly framed and a bit over- or under-exposed than miss the picture altogether.

Lightroom External Editing Preferences

August 30, 2009

Lightroom External Editing Preferences

Chris Orwig’s Lightroom Training drew my attention to Lightroom’s External Editing Preferences. I wondered if I had the best setup. I opened the dialog box and was bemused by Adobe’s explanations.

I find it surprising that a) PSD can be less efficient than TIFF with respect to metadata updates and b) If I don’t use the ‘maximize compatibility’ option when saving a PSD file in Photoshop Lightroom won’t be able to read the file.

What’s up? Aren’t Lightroom and Photoshop from the same company? Are there secrets that the Photoshop team keeps from the Lightroom team? How can a generic format like TIFF be more efficient at metadata updates than PSD when Adobe controls both ends?

What do I lose if I maximize compatibility in Photoshop? If it is an option there must be a downside to using it. Perhaps a performance penalty next time I open the file in Photoshop. Is this explained properly anywhere?

Inquiring minds need to know!

AutoCopy :: Add-on for Firefox

August 30, 2009

AutoCopy :: Add-on for Firefox.

Firefox AutoCopy Add-on

I’m always copying snippets of text from web pages to use on this blog or something else I am writing. This little add-on makes it a bit easier. Every time I select some text it presses Ctrl-C for me and copies it to the clipboard. It only works for text – not images.

It has a useful right-click menu that includes:

  • Undo copy
  • Previous clipboards – a history!
  • Paste to location bar
  • Paste to search bar
  • Search for (whatever is selected)
  • Open in new tab (assuming you’ve selected a URL)
  • Append URL to clipboard

My only problem with Firefox add-ons is that they are very sensitive to the Firefox version. Firefox wants to update itself almost weekly and I almost always get an error message about incompatible add-ons I have installed.

It’s another of those things that make using a PC more complex and stressful than I like. I like to minimize the number of add-ons and utilities I install – but they grow inexorably over time. I lost the lot when my old laptop’s drive crashed and it was nice to start from scratch.

I found a problem with Auto Copy when composing blog posts. When I want to add a URL I usually find the page I want in another browser tab and copy the URL from the address bar. Then I return to the editing window, select the text and insert the link.

But with Auto Copy it replaces what I just put on the clipboard with the text I’d selected in the post. That caused me to wonder what was up until I remembered Auto Copy. The work around is to select the text first and open the link creation window. Then go to the other tab and copy the URL.

Aren’t side effects wonderful‽


Follow

Get every new post delivered to your Inbox.