Prerequisite:
i. Host platform: Ubuntu 11.04 (Any lower version is also accepted)
ii. OpenCV: Download OpenCV library from http://www.sourceforge.net.
Download OpenCV 2.1 for Linux.
iii. CMake: Install CMake on your system. Do this with Synaptic Package
manager. Also install GUI it makes your work easier.
iv. Tool chain for building: Use already built tool chain provided with Friendly
ARM board. This saves us a lot of time as it is very time consuming to build a
tool chain for specific platform.
v. Target Board: Friendly ARM mini6410.
Procedure:
i. First untar the downloaded file in Home folder say OpenCV-2.1.
ii. Make a new folder in this folder as 'Build'. We will store built library files in
this folder.
iii. Open CMake GUI.
iv. Fill topmost fields as:
Where is source code : /path/to/folder/OpenCV-2.1
Where to build libraries: /path/to/folder/Build
v. Now press 'Configure' button at bottom. This will open a new dialogue box.
Choose 'Unix Makefiles' from drop-down menu and choose 'Specify options
for cross-compiling'. Fill out fields as explained below.
vi. In fields for C and C++ compiler put path for tool chain provided with
Friendly ARM tool chain.
vii. Press Finish button. You will return to main CMake window with some red
variables on red background. We need to configure these variables.
viii. Enable following variables from that list
a) BUILD_PACKAGE
b) BUILD_SHARED_LIBS
c) OPENCV_BUILD_3RDPARTY-LIBS
d) WITH_JPEG
e) WITH_PNG
f) WITH_V4L
ix. Now press 'Configure' again. Now you won‘t see any variable in red. (If you
still see it, press configure again and again until you see all variables with
white background ). After this press 'Generate'.
x. Now open the terminal. cd to Build folder. Type 'make' and hit the 'Enter'.
This starts building OpenCV library. Wait until it shows 100%. It takes a long
time.
xi. Once building is over, you will see some .so files in folder 'OpenCV-
2.1/build/lib'. Copy all these files in the 'lib' folder on your Friendly ARM
board.
No comments:
Post a Comment