2013年7月1日月曜日

Dynabook AZにlubuntu 13.04をインストールする 2



ここのページを参考にさせて頂きました
http://kapper1224.sblo.jp/article/65991627.html

ホストPCにUSBメモリを挿入し、saucy-preinstalled-desktop-armhf+ac100.tar.gzをコピー

USBをDynabook AZのUSBIFに挿し、電源を投入する

インストール確認メッセージが出るのでyを押下

10分ぐらいで、Welcome画面が表示されるので、日本語を選択する
Wifiの設定し、タイムゾーンを選択、アカウントの作成を行うと、システムのインストールが開始される

その後10分未満でlogin画面が表示される

WiFi,音声の動作は確認。パーティションをAndroidのまま使用しているため、Androidnの残骸がマウントされている

Dynabook AZにlubuntu 13.04をインストールする 1

いまさらですが、Dynabook AZにubuntu環境を構築

ここのページを参考にさせて頂きました

ただし、ファームがダウンロードできないため、http://cdimage.ubuntu.com/lubuntu/daily-preinstalled/current/にアクセスし

ここからbootimgとfilesystemを取得

あとは、USBケーブルを接続し、ctrl+escを押しながら電源を投する。成功すれば、電源LEDが点灯する。画面は真っ暗


 nvflash --bl /usr/lib/nvflash/fastboot.bin --download 6 saucy-preinstalled-desktop-armhf+ac100.bootimg

コマンドで、bootimgを書き換え

Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618441a09617
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: /usr/lib/nvflash/fastboot.bin
| 940112/940112 bytes sent
/usr/lib/nvflash/fastboot.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
sending file: saucy-preinstalled-desktop-armhf+ac100.bootimg
/ 8388608/8388608 bytes sent
saucy-preinstalled-desktop-armhf+ac100.bootimg sent successfully

のようなメッセージが表示される

電源を長押しして一旦電源を切る

2013年6月30日日曜日

LIBLINEARをubuntuで試してみた

ここからLIBLINEARのライブラリを取得し、展開する


terminalを起動し、展開したフォルダーに移動しmakeを行う

./train heart_scale で辞書を作成

......*
optimization finished, #iter = 69
Objective value = -121.097755
nSV = 195

./predict heart_scale heart_scale.model res

で作成した辞書に元のデータで試してみる
Accuracy = 84.4444% (228/270)


デフォルト設定だと今ひとつの精度である

./train でHelpが表示される

Usage: train [options] training_set_file [model_file]
options:
-s type : set type of solver (default 1)
  for multi-class classification
0 -- L2-regularized logistic regression (primal)
1 -- L2-regularized L2-loss support vector classification (dual)
2 -- L2-regularized L2-loss support vector classification (primal)
3 -- L2-regularized L1-loss support vector classification (dual)
4 -- support vector classification by Crammer and Singer
5 -- L1-regularized L2-loss support vector classification
6 -- L1-regularized logistic regression
7 -- L2-regularized logistic regression (dual)
  for regression
11 -- L2-regularized L2-loss support vector regression (primal)
12 -- L2-regularized L2-loss support vector regression (dual)
13 -- L2-regularized L1-loss support vector regression (dual)
-c cost : set the parameter C (default 1)
-p epsilon : set the epsilon in loss function of SVR (default 0.1)
-e epsilon : set tolerance of termination criterion
-s 0 and 2
|f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2,
where f is the primal function and pos/neg are # of
positive/negative data (default 0.01)
-s 11
|f'(w)|_2 <= eps*|f'(w0)|_2 (default 0.001)
-s 1, 3, 4, and 7
Dual maximal violation <= eps; similar to libsvm (default 0.1)
-s 5 and 6
|f'(w)|_1 <= eps*min(pos,neg)/l*|f'(w0)|_1,
where f is the primal function (default 0.01)
-s 12 and 13
|f'(alpha)|_1 <= eps |f'(alpha0)|,
where f is the dual function (default 0.1)
-B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)
-wi weight: weights adjust the parameter C of different classes (see README for details)
-v n: n-fold cross validation mode
-q : quiet mode (no outputs)

2013年6月18日火曜日

raspberry pi にリモート接続

ssh pi@192.168.1.?

でリモートログイン


ファイル転送用にFileZillaをインストール

サイトマネージャを使用してraspberry 接続用の設定を作成
プロトコルにSFPTを選択する

raspberry piにつなげたキーボードの設定がおかしいので設定が間違っているようだ

raspberry piの設定

最新版をここから取得
http://www.raspberrypi.org/downloads

zipを展開して、空の4GのSDカードを準備

sudo dd bs=4M if=2013-05-25-wheezy-raspbian.img of=/dev/sdb

でSDカードにイメージの書き込み

2013年6月11日火曜日

ubuntuでのOpenCVのファイルをコンパイルしてみた

g++ -o $1.out $1 -I/usr/local/include/opencv2 -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_core

を記したシェルスクリプトを作成し、コマンドラインで

./open.sh hoge.cpp

とすると hoge.cpp.outファイルが作成される

開発環境が今ひとつなので、Windowsでソースを作っておき、動作しているソースをコンパイルしたほうが簡単そうである。

いずれ大きなものをコンパイルするには、makeの書き方を覚えないといけない