Sunday, July 5, 2009

Why Python?

Oldie but goodie.

Saturday, November 1, 2008

ExifTool: It really saved my day

Problem 1: My Coolpix has the year set to 2009, and we took close to a hundred pictures before we realized the error.

Problem 2: This is really a Canon vs Nikon thing. I like my Nikon camera but I like the Canon software better which creates folders according to the picture creation date. If the Canon software would just download data from a Nikon camera, this wouldn't be problem.

So today I discovered ExifTool, installed in on MacBook and voila! Windows users have to install Perl first.

Of course, first you have to navigate to the folder containing the pictures.

To solve problem #1, give this command.


exiftool "-AllDates-=1:: 0" *.jpg


To solve problem 2, give this command:

exiftool -d %Y_%m_%d "-directory<datetimeoriginal" jpg="">

Wednesday, March 26, 2008

Master's Project Proposal Evaluation

Just evaluated 3 students this morning. As usual, this is the time to learn a few things.
  • Shashiteren with "Traffic Congestion Monitoring Base on Automated Vision System". Proposal for a C++ PC-based system to give a grade of light, medium or heavy traffic congestion. Camera faces the traffic junction. Includes counting of vehicles but may not work if vehicles are occluded by a big truck. Recommend that he place the camera at the back of the junction instead.
  • Muhammad Amir As'ari with "Cyclist Dearly Detection Using Automated Vision System". Uses night vision camera to detect illegal biker and give a warning if the number of bikers gathering at a location exceeds 5. First of all, the term "cyclist" means "a person who rides a bicycle". Next, the type of camera makes a difference. An infra-red camera will cause a bike to give a different shape than from an visible light camera.
  • Yew Foong Ching with "Real-Time PC-Based 2D Barcode Reader". Uses a camera to decode PDF417 2D barcode. She has a few barcode image which needs to be rotated, done manually with IrfanView. So far, the rotated barcode cannot be decoded with the available decoding software. If manual doesn't work, automatic is harder.

Monday, February 25, 2008

68HC000 Based Board

Wichit Sirichote have designed a board using 68HC000 and runs embedded Linux. It uses Atmel 29C040 1MB flash, HM62851 1M SRAM and Xilinx XC9536 for glue logic.



Links:

Sunday, February 17, 2008

First Couple of Weeks of CocoaRuby

or Ruby-Cocoa for that matter.

Cocoa is the default framework for writing applications for Mac OS X, and the default language for Mac OS X development is Objective-C. Ruby is the latest programming language that is taking the programming community by storm. On one hand, Objective-C offers the best performance for Mac applications. On the other hand, Ruby wins in terms of programming productivity hands down. Just look at the number of blog posts on Ruby-on-Rails.

The Cocoa-Ruby bridge offers programmers who are comfortable - not necessarily very fluent - in both Objective-C and Ruby the productivity gains of using Ruby for creating Mac applications. Yes, you do have to know the Cocoa API, too.

It turns out Cocoa-Ruby is preinstalled in the Xcode3 that comes Developer Tools for Leopard. The default Xcode2 in Tiger does not support Ruby. I had the impression a Leopard migration was necessary to do Ruby coding. Happily, I found out that I just had to download Xcode version 2.5 to perform Ruby coding under Tiger. I've downloaded and built a few Ruby Mac sample apps so far.

Now, to build my first "original" Ruby app...

Tuesday, February 12, 2008

Verbose Mac Startup

URL: http://www.oreillynet.com/pub/h/348

Verbose booting shows you the actual process of Mac OS X's startup. You'll see drivers get loaded and services launch. You can get it by holding Command - V at boot time, which brings up the familiar white on black console.

If you'd prefer to always see the system messages on boot, you can adjust the firmware from the Terminal with the nvram command.

To turn on Verbose booting, at the Terminal type the following:

sudo nvram boot-args="-v"

Disabling Verbose mode:

sudo nvram boot-args=

And to see the current firmware nvram settings:

nvram -p

More info on the boot process here: http://www.kernelthread.com/mac/osx/arch_boot.html
and here: http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/BootProcess.html

More hints here: http://nosheep.net/story/mac-os-x-start-up-keys/ and here: http://docs.info.apple.com/article.html?artnum=106482

Sunday, February 3, 2008

Learning the ARM Processor

On the way back from Intel, Penang after conducting the second lecture in ARM processors.

The students presented their first assignment. All were successful in their attempt to make the LED blink on their ARM boards. To close the project, they are to upload to YouTube the steps taken in the assignment.

Five groups used the Olimex LPC2103 board sold by SparkFun of Hong Kong. One group used the LPC2149 board made in Thailand and sold by a company in Melaka. Four groups used the GNU toolchain and programmed their boards using USB-to-serial converters. These groups seems to have the least problems. Two groups used the Keil toolchain. No problems when presenting but they could not the same stack frame as the GNU toolchain. Two groups tried to used the JTAG port.

I covered ARM assembly language and stack frames. For the second assignment, they are to interface the ARM board with a passive circuit (LED, 7-seg display, pot, etc) and write the device driver in ARM assembler.

There was a Ruby Brigade meet on Friday but couldn't attend it. ;(