공돌이는 파닥파닥

어디서 놓친건지는 모르겠지만...


아마도 버젼업이 되어서 그런것 같기도 하고 -_-;;


쨋든 명령어는


gcc -dynamiclib -I/System/Library/Frameworks/JavaVM.framework/Headers -o libhello.jnilib ./hello_HelloJNI.c


이래 치니까 그냥 됬다.


아이고 내 시간...

Comment +0

The latest Long Term Support version of Ubuntu(12.04 LTS) is out and a new version of OpenCV was released as well. This means that now is a great opportunity to update my OpenCV installation guide to the latest versions, Ubuntu 12.04 LTS and OpenCV 2.4.1.

We are going to setup OpenCV to use the new Qt highgui interface, which is much better than the simple highgui interface. Also, we will install OpenCV with support for OpenGL, as well as reading and writing videos, access to a webcam, Python, C and C++ interfaces, and Intel Threading Building Blocks (TBB).

OK, so the first step is to make sure that everything in the system is updated and upgraded:

1sudo apt-get update
2sudo apt-get upgrade

Now, you need to install many dependencies, such as support for reading and writing image files, drawing on the screen, some needed tools, etc… This step is very easy, you only need to write the following command in the Terminal:

1sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

Time to get the OpenCV 2.4.1 source code:

1cd ~
3tar -xvf OpenCV-2.4.1.tar.bz2
4cd OpenCV-2.4.1

Now we have to generate the Makefile by using cmake. In here we can define which parts of OpenCV we want to compile. Since we want to use Python, TBB, OpenGL, Qt, work with videos, etc, here is where we need to set that. Just execute the following line at the terminal to create the appropriate Makefile. Note that there are two dots at the end of the line, it is an argument for the cmake program and it means the parent directory (because we are inside the build directory, and we want to refer to the OpenCV directory, which is its parent).

1mkdir build
2cd build
3cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..

Check that the above command produces no error and that in particular it reports FFMPEG as YES. If this is not the case you will not be able to read or write videos. Also, check that Python, TBB, OpenGL, V4L, OpenGL and Qt are detected.

If anything is wrong, go back, correct the errors by maybe installing extra packages and then run cmake again. You should see something similar to this:

Now, you are ready to compile and install OpenCV 2.4.1:

1make
2sudo make install

Now you have to configure OpenCV. First, open the opencv.conf file with the following code:

1sudo gedit /etc/ld.so.conf.d/opencv.conf

Add the following line at the end of the file(it may be an empty file, that is ok) and then save it:

1/usr/local/lib


Run the following code to configure the library:

1sudo ldconfig

Now you have to open another file:

1sudo gedit /etc/bash.bashrc

Add these two lines at the end of the file and save it:

1PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
2export PKG_CONFIG_PATH

Finally, close the console and open a new one, restart the computer or logout and then login again. OpenCV will not work correctly until you do this.

Now you have OpenCV 2.4.1 installed in your computer with Python, TBB, OpenGL, video, and Qt support.

Check out the cool Qt interface which provides image viewing capabilities with zoom, as well as the ability to save the current image with just one click.


http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/

Comment +0

Ubuntu 12.04.1에서.


매번 패키지 업데이트를 하다 보면


자꾸 그래픽 드라이버를 건드리는데,


재부팅을 하고 나면 번번히 해상도가 낮은 상태에서 벗어나질 못한다.


지난 번에는 이렇게 나오다가 아싸리 검은 화면이 나오고 뭐.. 그랬었는데

(그래서 결국 싹 밀고 다시 설치 했는데)


이제는 겁도 나지 않고 짜증도 나지 않는다!


Ctrl+Alt+F1(혹은 F2~F6, F8)을 눌러 콘솔을 띄움.


$ sudo service gdm stop

만약 lightdm을 쓰고 있다면

$ sudo service lightdm stop


한 후, 나의 경우 cuda tool kit의 드라이버를 설치해야 하므로


$sudo CUDA설치하는못된파일


그리고 설치를 끝낸 후


$sudo service gdm start


하면 끝...

Comment +0