OpenCV 3.1 Install


# References

http://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html#gsc.tab=0

http://blog.yucchiy.com/2014/10/18/install-opencv3-with-contrib/



1. Required Packages

  • GCC 4.4.x or later
  • CMake 2.8.7 or higher
  • Git
  • GTK+2.x or higher, including headers (libgtk2.0-dev)
  • pkg-config
  • Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy)
  • ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev
  • [optional] libtbb2 libtbb-dev
  • [optional] libdc1394 2.x
  • [optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev, libdc1394-22-dev
위에 나열된 필요한 패키지들을 설치한다.



[compiler] $ sudo apt-get install build-essential

[required] $ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev 

[optional] $ sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

 



2. Getting OpenCV Source Code 


OpenCV 홈페이지(http://opencv.org/downloads.html)에서 소스코드를 다운로드 하는 방법도 있고,

Git repository(https://github.com/Itseez/opencv)를 이용하는 방법도 있다.


<my_working_directory>는 opencv파일의 저장에 사용할 적절한 경로를 적어주면 된다.



 $ cd ~/<my_working_directory>

 $ git clone https://github.com/Itseez/opencv.git 

 $ git clone https://github.com/Itseez/opencv_contrib.git



* OpenCV 3.0이후 버전에서는

  opencv2.4에서 nonfree에 있던 내용들이 opencv에는 포함되어 있지 않고

  opencv_contrib의 module내에 있기 때문에 SIFT, SURF와 같은 알고리즘을 이용하기 위해서는 별도로 다운로드 및 설치가 필요함.



3. Building OpenCV from Source using CMake


opencv_contrib가 저장되어 있는 경로에 맞도록

-DOPENCV_EXTRA_MODULES_PATH="opencv_contrib의 경로"를 넣어줘야 한다.


 $ cd opencv 

 $ mkdir build && cd build

 $ cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..

 $ make -j5

 $ sudo make install




4. Let's Start Coding!


이제 OpenCV를 이용해서 코딩을 하면 된다!


간단한 예제를 하나 확인하는 것으로 마치겠습니다.

# SURF 특징 추출 및 추출된 특징의 display


Source Code (main.cpp)



#include <iostream>

#include "opencv2/core.hpp"

#include "opencv2/features2d.hpp"

#include "opencv2/xfeatures2d/nonfree.hpp"

#include "opencv2/highgui.hpp"


using namespace cv;

using namespace cv::xfeatures2d;


void readme();


int main (int argc, char** argv)

{

if (argc != 3)

{

readme (); 

return -1;

}


Mat img_1 = imread (argv[1], IMREAD_GRAYSCALE);

Mat img_2 = imread (argv[2], IMREAD_GRAYSCALE);


if (!img_1.data || !img_2.data)

{

std::cout << "--(!) Error reading images " << std::endl;

}


// -- Step 1: Detect the keypoints using SURF Detector

int minHessian = 400;


Ptr<SURF> detector = SURF::create( minHessian );


std::vector<KeyPoint> keypoints_1, keypoints_2;


detector->detect (img_1, keypoints_1);

detector->detect (img_2, keypoints_2);


// -- Draw Keypoints

Mat img_keypoints_1; Mat img_keypoints_2;


drawKeypoints (img_1, keypoints_1, img_keypoints_1, Scalar::all(-1), DrawMatchesFlags::DEFAULT );

drawKeypoints (img_2, keypoints_2, img_keypoints_2, Scalar::all(-1), DrawMatchesFlags::DEFAULT );


// -- Show detected (drawn) keypoints

imshow ("Keypoints 1", img_keypoints_1);

imshow ("Keypoints 2", img_keypoints_2);


waitKey(0);


return 0;

}


void readme()

{

std::cout << " Usage: ./SURF_detector <img1> <img2>" << std::endl;

}




CMakeLists.txt



cmake_minimum_required ( VERSION 2.8 )

project ( opencv_example )

find_package ( OpenCV REQUIRED )


include_directories ( ${OpenCV_INCLUDE_DIRS} )

add_executable ( main main.cpp )

target_link_libraries ( main ${OpenCV_LIBS} )




Results


 

 


2年ぶりにまた筑後川にいってきました。

今回は一人じゃなくて研究室の同僚達と一緒でした。

そしてハーフでした。

一年に一度はフルコースを走ろうと心に誓った自分との約束を守れなかった。


朝7時に会っていくと約束しましたが、起きたら7時を過ぎた。-_-;;;

電話して「先に出発してください」と言って、ぼくは一人で出発した。

日本の高速道路で運転するのは初めてだった。

何度も道を誤って迷ったりして、ぎりぎりに到着したけど参加ができてよかった。

*9時半まで受け取りだと桑畑さんが電話をしてくれた。色々ありがとう。


着いたら会場内にはもういっぱいの人々が…


簡単にストレッチングしてから、9時50分に桑畑さんと一緒に出発!

10㎞頃、桑畑さんの速度に付いて行けなかったので、

(また)「先にいってくださいと」言って、自分のフェイスでゆっくり走った。

(今日2回目の「先にいってください」という言葉)

風が砂を吹き飛ばして少し大変だったけど、

天気が晴れたので本当によかった。


Oscarさんが撮ってくれた。



みんな完走しました。


終わった後には,一緒に豚汁とおにぎりを。

そして、戸田さんと恭子さんが用意してくれた(アルコールゼロ)ビル!

最高でした!


久留米温泉に!

桑畑さんのガイドのおかげさまで、無事に帰ることができました。

ありがとう。


皆様、お疲れ様でした。


■ 大会名:8th 筑後川マラソン2012

■ 日時:2012年10月7日

■ 場所:福岡県久留米市筑後川百年公園

■ 参加者:5名

   ◇ ハーフ:桑畑瞬也,蔡現旭

   ◇ 10km:戸田優子, Oscar Martinez Mozos

   ◇ 5km:新山恭子


배번: 3527

기록: 2:06:57 (넷타임: 2:05:49)

순위: 전체(남자) 454/814, 20대: 


아직도 20대다!

まだ20代だ!


그냥 하는 것.

꾸준히 그냥 하는 것.

그것 이외에 당신이 생각하는 정답으로 가는길은 없다.

Last updated 2013.02.27.

--

2012   
2012.10.10. (福岡県 久留米市) / 筑後川マラソン2012 / half / 2:05:49
- Oscar Martinez Mozos,戸田優子,新山恭子,桑畑瞬也 (IRVS)

2011   
2011.11.16. (山口県 下関市) / 下関海響マラソン2011 / full / 4:52:27
- alone

2010   
2010.10.10. (福岡県 久留米市) / 筑後川マラソン2010 / full / 4:47:24
- alone

2009   
2010.03.29. (울산 문수) / 제6회 울산매일전국마라톤대회 / 10km / 약 50분
- 연구실 단체 (ISLAB)

2008   
2008.04.27. (울산 염포산) / 제9회 울산현대산악마라톤대회 / 11.6km / 00:58:24
- 연구실 단체 (ISLAB)
2008.03.23. (울산 문수) / 제5회 울산매일전국마라톤대회 / half / 1:44:50.23
- 연구실 단체 (ISLAB)
2008.03.01. (울산 문수) / 제9회 울산마라톤대회 / half / 1:46:27
- 연구실 단체 (ISLAB)

2007   
2007.08.18. (부산 해운대) / 제3회 부산섬머비치울트라마라톤대회 / 100km / 13:34:46.09
- alone
2007.04.29. (울산 염포산) / 제8회 울산현대산악마라톤대회 / 11.6km / 00:58:55
- 연구실 단체 (ISLAB)
2007.03.25. (울산 문수) / 제4회 울산매일전국마라톤대회 / 10km / 00:44:37
- 연구실 단체 (ISLAB)
2007.01.28. (경남 고성) / 제6회 경남고성전국마라톤대회 / 10km / 00:43:24.97
- 이태경
2007.01.13. (부산 을숙도) / 제3회 부산비치울트라마라톤대회 / 100km / 13:57:25.87
- alone

2006   
2006.11.26. (경남 진주) / 진주마라톤대회 / full / 3:32:46.60
- alone 
2006.11.12. (울산 문수) / 제3회 울산인권마라톤대회 / half / 1:32:09.93
- 김동현, 이태경
2006.05.13. (경북 포항)/ 제4회 호미곶월광소나타 100 / 100km / 80km 퍼짐
- alone
2006.03.12. (서울 광화문) / 2006 서울국제마라톤대회 / full / 3:38:17
- 달이 아지아

2005   
2005.03.13. (서울 광화문) / 2005 서울국제마라톤대회 / full / 3:51:17
- alone 
2005.02.27. (경남 밀양) / 제2회 밀양아리랑마라톤대회 / 10km / 00:45:36
- alone

2004   
2004.10.31. (경북 경주) / 동아일보2004경주오픈마라톤 / full / 3:46:59
- 연구실 단체 (ISLAB)
2004.09.19. (부산 을숙도) / 제1회 을숙도강변마라톤대회 / half / 1:59:51
- 김효성
2004.09.12. (울산 문수) / 전마협울산하프마라톤대회 / half / -
- 연구실 단체 (ISLAB)
2004.06.13. (울산 문수) / 제5회 울산광역시장배전국하프마라톤대회 / half / 1:38:41.32
- 연구실 단체 (ISLAB)
2004.05.16. (경기도 임진각) / 2004 adidas king of the road / half / 1:40:02.84
- 태호형, 성은이형, 희영이형
2004.04.03. (경북 경주) / 제13회 경주벚꽃마라톤대회 / 10km / 00:44:03
김지훈, 김효성
2004.02.22. (경남 밀양) / 제1회 밀양아리랑마라톤대회 / 10km / 00:48:38
- alone
--
 

20130227_haenaki_record(2004-2012).xls







やめます。

http://www.ros.org/wiki/kinect/Tutorials/Adding%20a%20Kinect%20to%20an%20iRobot%20Create


Adding a Kinect to an iRobot Create/Roomba

Description: This tutorial has step by step instructions for modifying the iRobot Create/Roomba to power a Kinect.

Keywords: iRobot Create, Kinect, Roomba

Tutorial Level: BEGINNER

Overview

The iRobot Create/Roomba has an Roomba Open Interface (ROI) Connector which supplies unregulated power from the Create/Roomba battery. The Kinect however requires a regulate 12V to power the sensors and camera. This tutorial will show you how to add a 12V regulator to the Create/Roomba for the Kinect.

Parts List

Required:

  • Kinect with power supply splitter (Warning: You will need to permanently modify/damage the splitter).

  • Voltage regulator 12V 1A (e.g. NTE966).

  • 0.33μF and 0.1μF capacitors.
  • A small prototyping board (e.g. schmartboard 201-0001-01).

  • A DB25 connector.
  • Heat shrink tubing for covering up solder joints

Optional:

Building the 12V Regulator

We are going to build the following circuit:

  • regulator.png

Solder the components onto the prototype board as shown below:

  • regulator_board.png

Note: Make sure that the capacitor polarity is correct with negative towards ground.

Using 22 AWG wire or greater (i.e. 20, 18, etc.), solder on the wires that will connect to the unregulated voltage and the Kinect. Below shows the wires soldered to the board with a Powerpole connector on the unregulated Voltage side, this can come in handy later if you want to disconnect the regulator from the RooStick or Create serial cable.

  • regulator_with_connector.png

Finally use heat shrink to cover the regulator to prevent accidental shorting.

  • regulator_with_shrinkwrap.png

Connecting to the Kinect

Take the Kinect USB and power splitter cable and cut the cable connected to the power adapter about 10 inches from the splitter. Inside the cable there is a brown and white wire, the brown is +12V and the white GND. Confirm Voltages by plugging the wall adapter into a wall and using a digital multimeter.

  • wall_adapter_cable.png

Now solder the wires to the regulated voltage (+12V to +Vo and GND to GND) from the regulator as shown below. Make sure to cover the solder joints with heat shrink to prevent shorting.

  • soldered_wall_adapter.png

Now the regulator and the Kinect splitter should look like below.

  • full_assembly.png

Connecting to Unregulated Voltage

DB25 Connector on the Create

Buy a male DB25 connector from your local electronics store. Then connect a pigtail to the connector with +12V to pin 10 and GND to pin 14.

  • db25_create.jpg

  • pigtail.jpg

Plugging It In

Connect the DB25 connector pigtail to the Voltage regulator assembly using the Powerpole connectors. Now plug the DB25 connector into your Create/Roomba and press the power button on the robot. You will see the green light on the Kinect power splitter light up, letting you know everything is working.

  • powered_cable.png


+ Recent posts