블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

'Open Source'에 해당되는 글 4건

  1. 2011.10.24 안드로이드 내부구조 #1
  2. 2009.08.17 PTAM to be dissected on OS X
  3. 2009.07.08 to install Freeimage on mac
  4. 2007.11.05 DIY Arduino Digital Music Instrument - Day 1
2011. 10. 24. 16:39

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2009. 8. 17. 20:15 Computer Vision
Oxford 대학  Active Vision Group에서 개발한
PTAM (Parallel Tracking and Mapping for Small AR Workspaces)
Questions? E-mail ptam@robots.ox.ac.uk
README

맥미니에서의 설치를 끝내고 (test log on mac) 테스트해 보면 성능이 좋지 않아 그대로 쓸 수는 없는 상태이다.


0. Video Input
The software requires a video camera with a wide-angle lens, capable of 640x480x30Hz video capture and an appropriate driver installation (which is supported by libCVD.)




1. Camera Parameters
 
CameraCalibrator를 실행시키면 calibrator_settings.cfg 파일을 읽어 온다.
여기에 gvars (PTAM 라이브러리를 지원하는 Gvars3 라이브러리) settings이 설정되어 있...어야 하는데 빈 채로 주어졌다.

CameraCalibrator를 실행시킨 결과로 연산된 카메라 파라미터는 camera.cfg 파일에 저장된다.
실행 후 열어 보면,
Camera.Parameters=[ 3.02629 6.17916 0.524049 0.291111 2.1234 ]
라는 식으로 CameraCalibrator 실행창에서 나타나는 그대로 되어 있다. save 버튼을 눌렀을 때 저장되는 것.

PTAM을 실행시키면 settings.cfg 파일을 읽어 온다. 파일을 열어 보면, 여기에도 gvars setting을 첨가할 수 있다는 주석이 있고, 다음 명령문으로 위에서 저장한 camera.cfg 파일을 불러서 실행한다.
exec camera.cfg
즉, Camera.Parameters 변수에 값이 assign되는 것.

정리하면,
calibrator_settings.cfg -> CameraCalibrator -> camera.cfg -> settings.cfg -> PTAM







fast feature detection
http://mi.eng.cam.ac.uk/~er258/work/fast.html

ref.
http://en.wikipedia.org/wiki/Feature_detection_%28computer_vision%29



main.cc
1) settings.cfg 파일 로드 GUI.LoadFile("settings.cfg");

2) 사용자 입력 parsing GUI.StartParserThread();

3) 클래스 system (system.h) 실행 s.Run();

atexit
Set function to be executed on exit
The function pointed by the function pointer argument is called when the program terminates normally.

try-if 구문
1) Deitel 823p "catch handler"
2) theuhm@naver: "에러가 발생한 객체는 예외를 발생시킴과 동시에 try블럭 안의 모든 객체는 스코프를 벗어나 참조할 수 없게 되므로 예외를 처리하는 동안 try블럭 안에서 예외를 발생시켰을 수 있는 객체의 참조를 원천적으로 막아 더 안전하고 깔끔한 예외처리를 할 수 있는 환경을 만들어줍니다. 그리고 예외를 던질 때에 예외 객체의 클래스를 적절히 구성하면, 예외 객체에 예외를 처리하는 방법을 담아서 던질 수도 있습니다. 그렇게 구성하면 굉장히 깔끔한 코드를 얻을 수 있죠.

set
Sets are a kind of associative containers that stores unique elements, and in which the elements themselves are the keys. Sets are typically implemented as binary search trees.

namespace

system.h
1) PTAM에서 핵심적 기능을 하는 클래스들과 클래스 "System"을 선언
// Defines the System class
// This stores the main functional classes of the system
class ATANCamera;
class Map;
class MapMaker;
class Tracker;
class ARDriver;
class MapViewer;
class System;



system.cc



ATANCamera.h
FOV distortion model of Deverneay and Faugeras

Duvernay and Faugeras


'Computer Vision' 카테고리의 다른 글

Five-Point algorithm  (0) 2009.08.18
UNIX references  (0) 2009.08.17
PTAM test log on Mac OS X  (7) 2009.08.05
SLAM related generally  (0) 2009.08.04
Kalman Filter  (0) 2009.07.30
posted by maetel
2009. 7. 8. 21:56 Computer Vision
0. Freeimage 설치 실패
http://freeimage.sourceforge.net/ 에서
FreeImage3.12.0 을 다운로드하여 풀어 보니 FreeImage라는 이름의 폴더가 생성된다.
(.frameworks가 아니라서 당황하였으나, FreeImage가 library라 하였기에 frameworks라고 굳게 믿어 버렸고 경험도 있다고 자부하며, Xcode에서  프로젝트를 만들어  C++로 코딩할 때 어떻게 삽입해야 하는지를 놓고 엉뚱한 정보의 홍수에서 허우적대다가...)

다시 겸허한 마음으로
README.osx 파일을 TextEdit으로 열고, 다음 설명에 따라
Building the Library
--------------------
Makefile detects the environment by calling 'uname'. Assuming this reports 'Darwin' on your system, Makefile will automatically
defer commands to Makefile.osx. If this doesn't work, type 'make -f Makefile.osx' in place of just 'make'

The build process is as simple as this:
1) Enter the FreeImage directory
2) Build the distribution:
make
3) The libraries and header will be in the Dist directory when the build is finished

To install FreeImage in the /usr/local/lib and /usr/local/include directories (not recommended):
make install

To clean all files produced during the build process:
make clean


Additional notes
----------------

Building on Mac OS X Leopard :

Install the xcode dev tools from the Leopard disk.
When installing the dev tools make sure to have installed 10.3.9 SDK (it's not selected by default).

Terminal에서 freeimage 폴더로 들어가서 make 명령을 치면 다음과 같이 무수한 에러가 나온다.

ga07087:freeimage lym$ make
make -f Makefile.osx
g++-4.0 -Wno-ctor-dtor-privacy -Os -fexceptions -fvisibility=hidden -arch ppc -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibMNG -ISource/LibPNG -ISource/LibTIFF -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath  -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -c Source/FreeImage/BitmapAccess.cpp -o Source/FreeImage/BitmapAccess.o-ppc
Source/FreeImage/BitmapAccess.cpp:30:20: error: stdlib.h: No such file or directory
In file included from Source/FreeImage/BitmapAccess.cpp:35:
Source/FreeImage.h:55:51: error: wchar.h: No such file or directory
Source/FreeImage.h:152:22: error: inttypes.h: No such file or directory
In file included from Source/FreeImage/BitmapAccess.cpp:37:
Source/Utilities.h:31:18: error: math.h: No such file or directory
Source/Utilities.h:33:20: error: memory.h: No such file or directory
Source/Utilities.h:34:19: error: stdio.h: No such file or directory
Source/Utilities.h:35:20: error: string.h: No such file or directory
Source/Utilities.h:36:20: error: stdarg.h: No such file or directory
Source/Utilities.h:37:19: error: ctype.h: No such file or directory
Source/Utilities.h:38:20: error: assert.h: No such file or directory
Source/Utilities.h:40:18: error: string: No such file or directory

...(중략)


여기서 첫번째 에러 "error: stdlib.h: No such file or directory"는 Kernel error라고 하여 Linux 등의 kernel에서 바로 standard library에 접근할 수 없어 나타난다고 한다. (이를 해결하기 위한 Linux 사용자들의 "sudo apt-get install 어쩌구"와 같은 명령어도 통하지 않고 있다.)

등등등 사흘 간의 초삽질 끝에...
source codes을 mac에서 직접 compile하는 것은 내 능력으로 어렵다고 보고, MacPorts라는 것을 이용해 보기로 한다.


1. Macports 설치 성공
MacPorts (구 Darwin Ports)의 공식사이트: http://www.macports.org
MacPorts는 Apple 사가 진행하는 OpenDarwin 프로젝트의 일부이며, 오픈 소스 소프트웨어의 컴파일, 설치, 업그레이드를 쉽게 할 수 있게 해 주는 오픈 소스 '패키지 관리 시스템'이라고 하는데 자세히는 모르겠다. (참고: http://en.wikipedia.org/wiki/Macports)

(Mac 용 Freeimage가 frameworks 형식으로 제공되는 것이 아니라서 내게 생소했던 것이다. 그냥 소스코드와 헤더파일, 다큐먼트 등을 몽땅 모아 놓은 것을 package라 부른다.)

MacPorts를 설치하기 전에 먼저 Xcode와 X11이 설치되어 있어야 한다.

웹페이지(Installing MacPorts)의 안내에 따라 MacPorts-1.7.1-10.5-Leopard.dmg를 받아서 (클릭들만으로) 설치한 후,  착실하게 MacPorts “selfupdate” command라는 것을 따라해 보니 (웬일인지) 잘된다.

Last login: Wed Jul  8 21:17:08 on ttys000
%% sudo port -v selfupdate
Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/
receiving file list ... done

sent 36 bytes  received 384171 bytes  109773.43 bytes/sec
total size is 23568484  speedup is 61.34
receiving file list ... done

sent 36 bytes  received 6909 bytes  2778.00 bytes/sec
total size is 4061730  speedup is 584.84

MacPorts base version 1.710 installed
Downloaded MacPorts base version 1.710

The MacPorts installation is not outdated so it was not updated
%%

Macports가 업데잇될 때마다 자동으로 업그레이드해 주겠다는 뜻이겠지.


2. MacPorts로 Freeimage 설치
http://guide.macports.org/ (상세한 설명)
http://trac.macports.org/wiki/UsingMacPortsQuickStart (간략한 설명)

특정 포트 검색 명령어를 써서 freeimage가 있음을 확인했다.
%% port search freeimage
freeimage @3.12.0 (graphics)
    Library for FreeImage, a dependency-less graphics library

특정 포트에 대한 정보를 보기 위한 명령어는 "port info"
%% port info freeimage
freeimage @3.12.0 (graphics)
Variants:    universal

FreeImage is a library for developers who would like to support most popular
graphics image formats. Some highlights are: extremely simple in use, not
limited to the local PC (unique FreeImageIO) and Plugin driven!
Homepage:    http://freeimage.sourceforge.net/

Platforms:            macosx
Maintainers:          toby@macports.org

이외 port command 몇 가지를 Freeimage에 대해 실행해 보면,
%% port deps freeimage
freeimage has no dependencies
%% port variants freeimage
freeimage has the variants:
    universal: Build for multiple architectures


포트를 설치하라는 명령어: "sudo port install (포트 이름)"
참고: MacPorts Guide 3.1.8. install
%% sudo port install freeimage
Password:
--->  Fetching freeimage
--->  Attempting to fetch FreeImage3120.zip from http://nchc.dl.sourceforge.net/freeimage
--->  Verifying checksum(s) for freeimage
--->  Extracting freeimage
--->  Applying patches to freeimage
--->  Configuring freeimage
--->  Building freeimage
--->  Staging freeimage into destroot
--->  Installing freeimage @3.12.0_0
--->  Activating freeimage @3.12.0_0
--->  Cleaning freeimage

무슨 파일들이 설치되었는지 확인해 보면,
%% port contents freeimage
Port freeimage contains:
  /opt/local/include/FreeImage.h
  /opt/local/lib/libfreeimage.3.12.0.dylib
  /opt/local/lib/libfreeimage.3.dylib
  /opt/local/lib/libfreeimage.a
  /opt/local/lib/libfreeimage.dylib


MacPorts.org 사이트의 포트 검색에서 Freeimage를 찾을 수 있다.
freeimage 3.12.0
    Library for FreeImage, a dependency-less graphics library
    Maintained by: toby
    Categories: graphics
    Platforms: macosx
    Variants: universal




3.


posted by maetel
2007. 11. 5. 17:12 Footmarks
사용자 삽입 이미지


DIY Arduino Digital Music Instruments
http://nabiworks.tistory.com


David Cuartielles
Arduino 개발자이자 미디어 아티스트
Arduino 확장보드 개발
현 스웨덴 Malmo University Interaction Design 교수
현 SADI 인터렉션 랩 초청교수
스페인 출신

이종호
SADI 인터랙션 디자인 교수



2007-11-05 5pm @nabi
High is Five

talking about art and technology
- David Cuartielles



> void setup()
the creation of meaningful & beautiful & controversal relationships between us(humans) and artifacts

70s user centered design
80s HCI
90s Ubiquitous Computing
-- interface design (cognitive science)
00s palpable computing
-- physical computing (emotion engineering)



> variables
Arduino:
1) I/O board (hardware)
2) IDE (software)
3) educational method (collaboration)


> void loop
related projects:

Chinese Robotnauts

Involuntary Dance Machine

Goteborg's Science Fair

D. Palacios - Ars Electronica

Power Pilgrims

social bathroom appliance

Alcophone (2004)


DIY - Arduino I/O board 제작하기

사용자 삽입 이미지

사용자 삽입 이미지

위 그림의 몇 부분이 잘못되어 있다.



사용자 삽입 이미지

posted by maetel