May 12, 2008

QR Code 雜記

技術議題

字元編解碼:

ISO規格定訂為JIS(日文),台灣行動上網連盟(OMIA)定訂為UTF-8,於不同規格的軟體解碼時會有字元集的轉換問題,使用英文則可避免此問題。

列印大小:

資料的應用方式是主要決定圖像大小的因素Symbol version(模組數),一個黑點即是一個模組,而模組列印大小(墨點數)決定於列印與讀取裝置的解析度。(各Symbol version模組數、資料量、錯誤更正等級對照表)

qrsizefig

QR Code Size Decision Factor

來源:http://www.denso-wave.com/qrcode/qrgene1-e.html

qrversion

symbol versions

來源:http://www.denso-wave.com/qrcode/qrgene2-e.html

prtdot4

Printer Head Density and Module Size

來源:http://www.denso-wave.com/qrcode/qrgene3-e.html

辨視效果:

主要決定於兩區塊"影像品質"與"辨視方法":影像品質看掃描的裝置品質(一般要求30萬像數、可近拍)、裝置設定、拍攝環境與方式,辨視方法則依Symbol version複雜度(越高辨視度相對下降),影像處理方法(去雜訊、翻轉、樣式比對)引響辨視穩定性(正確率、失敗率、錯誤率)與所需成本(時間與空間)。

行動條碼引申參考

二維條碼目前於行動商務之應用大致可分為四類,包括:
1.自動化文字輸入:以二維條碼儲存個人資訊,如地址、電話號碼、行事曆等,進行名片、行程資料等之快速交換。
2.數位內容下載:以二維條碼儲存數位內容之基本資料、進行數位內容之下載。
3.網址快速連結:於使用手冊、產品規格、報章雜誌、廣告宣傳資料等資料附加二維條碼資料,以提供使用者進行網址快速連結、電話快速撥號等。
4.身分鑑別及商務交易:於手機上顯示二維條碼資料,作為交易身分見別資料、或行動付款憑證,可用於如入場券、販賣機、會員身份確認、行動付款等應用。
(來源:中文版-OMIA行動條碼應用標準規範v3-2_2007-06-08.doc)

OMIA行動條碼規格:

image

參考連結

Introduction

Rex’s blah blah blah » 行動條碼 / 二維碼 / Mobile Barcode / QRCode

http://people.debian.org.tw/~chihchun/2006/07/04/mobile-barcode/

3公分圖案 儲存4千字資訊

http://paper.udn.com/udnpaper/POH0040/121378/web/

QRCode 官方站(英文)

http://www.denso-wave.com/qrcode/aboutqr-e.html

Code Standard:

行動上網聯盟 --- OMIA

http://www.omia.org.tw/

OMIA動條碼共通規範3.2之中英文版

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=96&step=1&newsno=3830

ISO/IEC 18004:2006

http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=43655

Survey:

マイボイスコム定期アンケート(携帯電話のQRコード)

http://www.myvoice.co.jp/biz/surveys/11101/index.html(英譯)

What Japan Thinks

http://whatjapanthinks.com/tag/qr-code/

Application:

QR Code and Two dimensional Bar Code News

http://2d-code.co.uk/

Bar code Insight 条码观察家

http://blog.donews.com/barcoder/archive/2007/04.aspx

All about Mobile Life

http://mobile.kaywa.com/qr-code-data-matrix/index.html

TABA臺灣農產品生產紀錄追溯網

http://www.taba.org.tw/index.asp?a=dp&mp=7&ShowSearch=Y

農產品產銷履歷諮詢服務

http://220.128.133.13/taft/admin/elearn.php

QRコードBlog

http://www.qrcodeblog.com/

いばらき農産物ネットカタログ

http://ibrk.jp/vipsv2/search.aspx?no=00021454

中央氣象局推出的手機入口網站

http://www.cwb.gov.tw/V5/wap/wap.htm

二維碼QR Code的擅場時代

http://bbs.mayacode.com/simple/index.php?t892.html

Software:

DoCoMo QR-factory

http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/tool/

フリーソフト -> QR Code Editor | Psytec

http://www.psytec.co.jp/docomo.html

OMIA與中華電信研究所合作之離線版行動條碼編碼軟體

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=96&step=1&newsno=3495

QuickMark_WebCam

http://www.quickmark.com.tw/cht/basic/download.asp#QuickMark_WebCam

Decode Library:

Open Source QRCode Library(C#)

http://www.codeproject.com/KB/cs/qrcode.aspx

A C/C++ library for decoding QR code based on JIS X 0510 and ISO/IEC18004. (C/C++)

http://trac.koka-in.org/libdecodeqr

工研院QRcode編解碼軟體(dll)

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=72518

Open Source QR Code Library(Java)

http://qrcode.sourceforge.jp/

Google ZXing ("Zebra Crossing")(Java)

http://code.google.com/p/zxing/

Apr 21, 2008

GPS 記錄器、相簿、工具、節點編輯...

GPS應用廣泛,尤其整合了網路資源後能擴展的方向很多,本篇是一則實作測試文,為了偷懶不多作說明與修飾,若你有進一步的興趣請勤奮的點選連結,有很多DEMO可以把玩。

20080412阿里山出遊路線分享(I-gotU GT-100)

[旅程中2個大斷層,跟沒結尾的冏況,所以出現大橫貫與圖片辜兒等精采結局請勿受到驚嚇]
step 1. 安裝i-gotU Desktop
step 2. 將 *.mdb(Link) 放至 C:\Documents and Settings\******\Application Data\MobileAction\GPSTracer 取代 Tracer.mdb
step 3. 選取兩筆track→合併
---------- (分隔線)繼續下列步驟或匯出*.gpx(Link)使用其它軟體後製(edit、gpscoding、gpstagging…)---------
step 4. 於下方的"相簿"右鍵→新增圖片
step 5. 選取圖片右鍵→儲存GPS
step 6. 點選上片track 會重新載入Google Map(Ps. i-gotU Desktop圖片太多(大)可能會當)
step 7. 匯出html,gpx,kml…
clip_image002
(相關討論請參考:[Mobile01分享]i-gotU(GT-100)旅程紀錄i-gotU操作手冊)

Geocode aware

GPicSync
Automatically geocode pictures from your camera and a GPS track log.
Picasa:
Picasa is a software application for organizing and editing digital photos, Google began offering Picasa for free download.
Google Earth
Google Earth lets you fly anywhere on Earth to view satellite imagery, maps, terrain, 3D buildings and even explore galaxies in the Sky. You can explore rich geographical content, save your toured places and share with others.
Friendly.Flickr:
一個整合Flickr上下傳的編輯工具

Geotagging Albums

clip_image003

(Demo)

clip_image005clip_image007
clip_image009clip_image011
clip_image013

(DEMO)

clip_image015clip_image017
clip_image018

(DEMO)

上傳圖片前先注意有無允許自動匯入GPS資訊(否則就要手動調整囉)
You→Your Account→Privacy & Permissions→Import EXIF location data
clip_image020clip_image022
clip_image024
除了在photostream 頁面下方的KML(僅單頁)
Subscribe to parkghost's photostream – Latest | geoFeed | KML
也有第三方做的 http://kmlphotos.metaltoad.com/
clip_image026
點選clip_image027就會啟動Google Earth,紅點即是Flickr的圖片位址
clip_image029
clip_image030

(DEMO)

整體來說還有很大的進步空間…
clip_image032

整合Flickr與 Urmap與Google Map/Earth

(來源請參考:UrKML / UrGPX照片軌跡整合線上地圖的小工具)
匯出KMZ
clip_image034
Flickr with Google Earth
clip_image036
KML with Google Map(DEMO)
clip_image038
Flickr with Google Map(DEMO)
1: 5mi
clip_image040
1:2000ft
clip_image042
Flickr with Urmap(DEMO)
1:6.4km
clip_image044
1:200m
clip_image046

Editor

JOSM
File→Open→*.gpx
clip_image048
使用Google Map圖資
(Ps.基本上空照圖是要收費的,所以大部份OpenSource是沒有空照圖的)
clip_image050clip_image052
clip_image054clip_image056
左手邊垃圾桶按鈕→刪點
clip_image058
(隨便玩玩~呵) 繞圈圈
clip_image060clip_image062
Desktop Componet

swinglabs > swingx-ws > JXMapViewer

image

一些詞條 (Wikipedia)

GPS tracking
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analysing the track later, using customized software. Such systems are not new; amateur radio operators have been operating their free GPS based nationwide realtime Automatic Position Reporting System since 1982.

Data loggers
A GPS logger simply logs the position of the device at regular intervals in its internal memory. Modern GPS loggers have either a memory card slot, or internal flash memory and a USB port. Some act as a USB flash drive. This allows downloading of the data for further analysis in a computer.

GPX
GPX, or GPS eXchange Format is an XML schema designed for transferring GPS data between software applications. It can be used to describe waypoints, tracks, and routes. The format is open and can be used without the need to pay licence fees.
Geotagging:
Geotagging, sometimes referred to as Geocoding, is the process of adding geographical identification metadata to various media such as websites, RSS feeds, or images and is a form of geospatial metadata. This data usually consists of latitude and longitude coordinates, though it can also include altitude, bearing, and place names.
Geocode:
Geocoding is the process of assigning geographic identifiers (e.g., codes or geographic coordinates expressed as latitude-longitude) to map features and other data records
Waypoint
Waypoints are sets of coordinates that identify a point in physical space. For the purposes of terrestrial navigation, these coordinates usually include longitude and latitude, and sometimes altitude (particularly for air navigation).

Track、Route
An ordered collection of points may be expressed as a track or a route. Conceptually, tracks are a record of where a person has been, routes are suggestions about where they might go in the future. So, for instance, there might be timestamps for each point in a track (because someone is recording where and when they were there), but timestamps for each point in a route are unlikely to be provided, because the author is suggesting it, and nobody might ever have travelled it.
KML
Keyhole Markup Language (KML) is an XML-based language schema for expressing geographic annotation and visualization on existing or future Web-based, two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. It was created by Keyhole, Inc, which was acquired by Google in 2004. The name "Keyhole" is an homage to the KH reconnaissance satellites, the original eye-in-the-sky military reconnaissance system first launched in 1976.

KMZ
KML files are very often distributed as KMZ files, which are zipped KML files with a .kmz extension

Mar 28, 2008

自動分割大型檔案備份至GMail

前陣子還有一台Lab的備份主機可以放系統備份,可惜在當兵期間系統就蒙主恩招,現在沒有異地備份總有一種不踏實的感覺,要定期下載備份存檔總會忘記,好在網路上也有許多免費空間可以利用,尤其是GMail這樣好用又大碗的選擇不好好利用實在是太浪費了 :P

1.申請GMail

2.安裝軟體(Postfix、Mutt、Rar)
選擇Rar的原因是只用Tar加split哪怕是傳輸中+-1Byte,就完了,rar有的加入還原資訊的選項,比較保險!!!。
Ps.執行rar指令若出現下行訊息
rar: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by rar)
表示需要GLIBC_2.4。如果沒有GLIBC_2.4可以使用rar_static
cp rar_static /usr/local/bin/rar

3.Script
#!/bin/bash
#backup to local and mail
#Author: Brandon Chen
#Email: parkghost@gmail.com

src_path=/var/www/html
dst_path=/var/www/alumni/backup/

bak_file="alumni"`date +%Y%m%d%H%M`
bak_data_recovery=15%
bak_split_size=19m
bak_mail_to=*****@gmail.com

db_user=*****
db_name=*****
db_password=*****

if ! test -d $dst_path"/mail"
then
mkdir -p $dst_path"/mail"
fi

cd $dst_path
mysqldump -u$db_user -p$db_password $db_name > $bak_file".sql"
tar --exclude .svn -zcf $bak_file".tar.gz" $src_path

cd mail
rm -rf * #remove old files
rar a -rr$bak_data_recovery -m5 -v$bak_split_size $bak_file".rar" ../$bak_file".tar.gz" > /dev/null
rar a -rr$bak_data_recovery -m5 $bak_file".sql.rar" ../$bak_file".sql" > /dev/null

for name in `ls`
do
mutt -s $bak_file -a $name $bak_mail_to < /dev/null
done

4.修改Postfix的最大寄送郵件大小
[root@alumni ~]# vi /etc/postfix/main.cf
message_size_limit = 40960000 #增加此行

5.加入系統排程
[root@alumni ~]# crontab -e
0 0 15,30 * * /var/www/alumni/scripts/backup.sh

Feb 1, 2008

PHP 的新世代

曾幾何時PHP走入了開發的社群,走進企業的青睞,漸漸其它語言的框架也移植到了PHP,
講究MVC趨勢,PHP也有Template Engine(SmartyFastTemplate...),在講究快速開發的,
PHP的類RoR框架如同雨後春筍一個一個出現,早之前在新興的PHP Framework中評選了Cakephp當作開發框架,
雖然Scaffolding與Bake雛型令人驚艷,可惜早在1.03的版本時,Cake仍缺少許多基礎功能需求(I18n)
與不夠完整(Form validate),穩定性也不夠(@@花了不少時間找Bug),
近期1.2版補足不少功能,BehaviorsAuthenticationSecurity還滿實用的,
社群持續激蕩出新的Idea令人激賞,只是核心部份總看不到下一步的發展(連1.2文件也要藏起來....暈)。

觀看Zend Framework之整體優了不少:
  • 架構彈性(不像Cakephp限定流程)
  • 開發穩定(有穩定的班底、開發週期)
  • 社群層面較廣(廠商、開發人員)
  • 官方支持(IDE、前端Cache)
  • 文件完整(除了core的,還有proposal可以參考)

Zend Framework 1.5.0 Preview Release now available

http://devzone.zend.com/article/3020-Zend-Framework-1.5.0-Preview-Release-now-available
還是沒有看到Zend_Build還是停留在New Proposals

 

Zend Framework

http://framework.zend.com/whyzf/future/


Lifting the Skirt on Zend Framework 1.5 - Zend_Form

http://devzone.zend.com/article/3030-Lifting-the-Skirt-on-Zend-Framework-1.5---Zend_Form

用設定檔來做表單似乎還不錯,看來未來整合Zend_Build會更強大

 

Content Indexing with Zend_Search_Lucene

http://www.slideshare.net/shahar/content-indexing-with-zendsearchlucene/
目前看到最好的例子