Rhonda Software

Highest quality full cycle software development.

Expert in areas of Computer Vision, Multimedia, Messaging, Networking and others. Focused on embedded software development. Competent in building cross-platform solutions and distributed SW systems.

Offer standalone custom solutions as well as integration of existing products. Opened for outsourcing services.

Visit us at: http://www.rhondasoftware.com

ARM-wrestling with OpenCV

Posted on : 12-03-2009 | By : Igor Stepura | In : OpenCV

122

I played with two ARM9-based single board computers (SBC) recently to investigate how OpenCV would operate on embedded platforms. The SBCs are – TS-7800 and SBC2440-III.

OpenCV uses floating point operations a lot, but not all of the ARM processors have FP coprocessor, so developers should use either some FP library, or as in my case – use Linux kernel FP emulation. There are two types of such emulation OABI and EABI. More details can be found here and here. Kernel release 2.6.16 was the first one to include ARM EABI support.

Unfortunately, CPUs of both SBCs do not support floating point in hardware, but luckily enough, TS-7800 has Debian Linux with 2.6.21 kernel. So I had a chance to compare OpenCV performance for OABI and EABI.

Both SBCs have necessary tool-chains in package – TS-7800 has Linux and Windows(Cygwin) tool-chains, SBC-2440 – only Linux one.  In addition to these I downloaded newer release of Codesourcery ARM tool-chain for Windows, because the one from TS-7800 SW package didn’t work properly with Cygwin.

I wrote a pretty simple script to ease OpenCV (version 1.1pre1 from here) configuration for various toolchains. Here it is:

#!/bin/bash
##======== TS-7800 environment settings======
#### Linux host. EABI complier
#export DEVROOT=/opt/crosstool/arm-none-linux-gnueabi
#export APP_PREFIX=arm-none-linux-gnueabi
#export GCC_HOST=i686-pc-linux-gnu
##-O3 kills gcc : cvpyrsegmentation.cpp:1021: internal compiler error: in verify_local_live_at_start, at flow.c:546
#export OFLAGS=-O2

### Linux host. OABI compiler
#export DEVROOT=/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2
#export APP_PREFIX=arm-linux
#export GCC_HOST=i686-pc-linux-gnu
##Any optimization causes SEGFAULTS during face detection application execution
#export OFLAGS=-O0

### Windows (Cygwin) host. EABI compiler (Codesourcery 2008q3-72)
export APP_PREFIX=arm-none-linux-gnueabi
export DEVROOT=/opt/crosstool/codesourcery
export CYGPATH=d:/cygwin/bin/cygpath
export GCC_HOST=i686-pc-cygwin

###Windows (Cygwin) host. OABI compiler
#export APP_PREFIX=arm-unknown-linux-gnu
#export DEVROOT=/opt/crosstool/gcc-3.3.4-glibc-2.3.2
#export CYGPATH=d:/cygwin/bin/cygpath
#export GCC_HOST=i686-pc-cygwin
##Any optimization causes SEGFAULTS during face detection application execution
#export OFLAGS=-O0

##======== SBC2440-III environment settings======
####Linux host only. OABI compiler only. (Out of the box kernel does not support EABI)
#export DEVROOT=/usr/local/arm/3.4.1
#export APP_PREFIX=arm-linux
#export GCC_HOST=i686-pc-linux-gnu
##Any optimization causes SEGFAULTS during face detection application execution
#export OFLAGS=-O0
##===============================================

export PATH=$DEVROOT/$APP_PREFIX/bin:$PATH

./configure \
 --target=$APP_PREFIX \
 --host==$APP_PREFIX \
 --build=$GCC_HOST \
 --disable-shared \
 --enable-static \
 --without-imageio  --without-carbon \
 --without-quicktime --without-python \
 --without-gtk --without-swig \
 --without-v4l \
 --disable-apps \
 --prefix=$DEVROOT/$APP_PREFIX \
 CC=$DEVROOT/bin/$APP_PREFIX-gcc \
 CXXFLAGS="-fsigned-char $OFLAGS -pipe" \
 LD=$DEVROOT/bin/$APP_PREFIX-ld \
 CPP=$DEVROOT/bin/$APP_PREFIX-cpp \
 CXXCPP=$DEVROOT/bin/$APP_PREFIX-cpp \
 CXX=$DEVROOT/bin/$APP_PREFIX-g++ \
 AR=$DEVROOT/bin/$APP_PREFIX-ar \
 RANLIB=$DEVROOT/bin/$APP_PREFIX-ranlib \
 NM=$DEVROOT/bin/$APP_PREFIX-nm \
 STRIP=$DEVROOT/bin/$APP_PREFIX-strip \
 AS=$DEVROOT/bin/$APP_PREFIX-as

Just uncomment setting you need, and comment all the others and you’re all set. -fsigned-char in CXXFLAGS is a must. OpenCV will (somehow) work even without this flag, but some functionality will be broken – JPEG parser for example (to say the truth, it will still be broken event with -fsigned-char, but at least it will correctly parse JPEG headers).
After script finished run make and then make install . Libraries and headers will be placed in directory, specified with --prefix= parameter.

Now when OpenCV is built and ready it’s time to “feel the power in your ARMs”.

I used facedetect sample application (/samples/c/) to test OpenCV on SBCs. I had to remove UILib -related code and add ome more parameter to application, named --extension, which allows specifying of input file type (BMP, YML, JPG). Changes I made to file can be observed here
The makefile I sued to build the application is written in a way similar to the previous configure script:

# TS-7800 environment settings
#DEVROOT=/opt/crosstool/arm-none-linux-gnueabi
#APP_PREFIX=arm-none-linux-gnueabi
#SBC2440-III environment settings
#DEVROOT=/usr/local/arm/3.4.1
#APP_PREFIX=arm-linux
#CodeSourcery setup
DEVROOT=/opt/crosstool/codesourcery
APP_PREFIX=arm-none-linux-gnueabi

CC = $(DEVROOT)/bin/$(APP_PREFIX)-g++
CPP = $(DEVROOT)/bin/$(APP_PREFIX)-cpp
LD=$(DEVROOT)/bin/$(APP_PREFIX)-ld

CXXFLAGS = -I"$(DEVROOT)/$(APP_PREFIX)/include" -I"$(DEVROOT)/$(APP_PREFIX)/include/opencv"
CXXFLAGS+= -fsigned-char
LDFLAGS = -static -L"$(DEVROOT)/$(APP_PREFIX)/lib" -lcv -lhighgui -lcxcore -lml -lcvaux -lpthread -ldl

all: facedetect.o
$(CC) facedetect.o $(LDFLAGS) -o facedetect

facedetect.o:
$(CC) $(CXXFLAGS) -c facedetect.c

clean:
rm -f facedetect facedetect.o

Copy and paste this text to a file, say makefile_facedetect, and then use it: make -f makefile_facedetect. It will build statically linked executable – I didn’t want to bother with shared OpenCV libraries.
The file used to detect face was lena.jpg (512×512) from OpenCV samples/c/ directory. I also converted it to BMP and YML, since JPEG parser does not work properly on ARM.
Execution results
TS-7800
EABI build: detection time = 31 512.1ms

SBC-2440-III
OABI build: detection time = 448 151 ms

Conclusions:
1) EABI is MUCH better than OABI
2) Even with EABI FP support, there is still much needed to be improved in OpenCV to make it usable on ARM processors.

Comments (122)

Which version of OpenCV you’ve used for performance measures?

I’m trying to complete the first step you mentioned, i.e. “make (i) Opencv
> work on the ARM-montavista-linux (which I did quite quickly)”.
>
> When I try to compile the OpenCV sources, I get the following error
> compiling cv/src/cvpyrsegmentation.cpp
>
> if /bin/sh ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I.
> -I. -I../.. -I. -I../../cv/include -I../../cxcore/include -I../..
> -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -MT
> cvpyrsegmentation.lo -MD -MP -MF “.deps/cvpyrsegmentation.Tpo” -c -o
> cvpyrsegmentation.lo cvpyrsegmentation.cpp; \
> then mv -f “.deps/cvpyrsegmentation.Tpo” “.deps/cvpyrsegmentation.Plo”;
> else rm -f “.deps/cvpyrsegmentation.Tpo”; exit 1; fi
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cv/include
> -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3
> -fomit-frame-pointer -MT cvpyrsegmentation.lo -MD -MP -MF
> .deps/cvpyrsegmentation.Tpo -c cvpyrsegmentation.cpp -fPIC -DPIC -o
> .libs/cvpyrsegmentation.o
> cvpyrsegmentation.cpp: In function `CvStatus
> icvPyrSegmentation8uC3R(uchar*, int, uchar*, int, CvSize, CvFilter,
> CvSeq**, CvMemStorage*, int, int, int)’:
> cvpyrsegmentation.cpp:1021: internal compiler error: in
> verify_local_live_at_start, at flow.c:546
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Send email to MontaVista Software, Inc. for instructions.
> make[3]: *** [cvpyrsegmentation.lo] Error 1
> make[3]: Leaving directory `/home/opencv/tmp/opencv-1.0.0/cv/src’
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/opencv/tmp/opencv-1.0.0/cv’
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> make[1]: Leaving directory `/home/opencv/tmp/opencv-1.0.0′
>
>
> Do you know something about it?
>
> Thanks in advance and regards.

This is exactly same error which is described in the very beginning of my configure script. Setting optimization level to -O2 or -O0 will help you.

Think you
my configure script is
root@danvinci-desktop:/work/opencv-1.1.0# export OFLAGS=-O2

root@danvinci-desktop:/work/opencv-1.1.0# ./configure –prefix=/opt/opencv1 –host=arm-linux –without-gtk –without-carbon –without-quicktime –without-1394libs –without-ffmpeg –without-python –without-swig –enable-static –disable-shared –disable-apps CXX=arm_v5t_le-g++ CPPFLAGS=-I/opt/mv_pro_4.0/montavista/pro/devkit/lsp/ti-davinci/include/ CC=arm_v5t_le-gcc AR=arm_v5t_le-ar RANLIB=arm_v5t_le-ranlib

but still the same error
cvpyrsegmentation.cpp:1021: internal compiler error: in
> verify_local_live_at_start, at flow.c:546

You set OFLAGS but never use it in your ./configure script execution. Just append CXXFLAGS=-O2 to ./configure parameters

It was OpenCV 1.1 pre1

Hello,Igor, I am trying to transplant opencv to my embedded board,but there is Some probloms,as follows:
my opencv version is opencv 1.1 pre1
cross-compile chain is arm-linux-3.4.1
my configure comand is : ./configure –host=arm-linux –prefix=/usr/local/lib/opencv/ –exec-prefix=/usr/local/lib/opencv/ –without-gtk –without-carbon –without-quicktime –without-1394libs –without-ffmpeg –without-python –without-swig –enable-static –disable-shared –disable-apps CXX=arm-linux-g++ CPPFLAGS=-I/usr/include CXXFLAGS=-O2
then I run make,something unhappy happened as :
cvcap_v4l.cpp: In function `void mainloop_v4l2(CvCaptureCAM_V4L*)’:
cvcap_v4l.cpp:1216: error: impossible constraint in `asm’
{standard input}: Assembler messages:
{standard input}:402: Error: bad instruction `btsl r3,[r1,#-128]’

Hellen, this error is caused with problem with includes. BTSL instruction which compiler was complaining about is an i386 one. Seems like macro FD_ZERO() (on line 1216 in cvcap_v4l.cpp) was substituted to i386 version instead on ARM. Most probably it’s “CPPFLAGS=-I/usr/include” that causes this problem – it should point to your toolchain “include” directory.

Thank you very much,I just crossed compile it successfully according to your recommends.
Thank you ,Igor~~

Hello,Igor,Although my make && make install had been successful,Some problems happened again when I tried to cross compile lkdemo.c ( lkdemo.c is a sample in $prefix/share/opencv/samples/c ).
my cross compile command is:
arm-linux-gcc lkdemo.c -o lkdemo `pkg-config –cflags –libs opencv`
then there are so many undefined reference below,just like:
[root@localhost c]# arm-linux-gcc lkdemo.c -o lkdemo `pkg-config –cflags –libs opencv`
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x5334): In function `$a’:
: undefined reference to `cvCbrt’
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x5350): In function `$a’:
: undefined reference to `cvCbrt’
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x536c): In function `$a’:
: undefined reference to `cvCbrt’
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x57b8): In function `$a’:
: undefined reference to `cvCbrt’

Then I tried to cross compile the lkdemo.c which was separated into two steps:
first I use the command line #arm-linux-gcc -I $prefix/include/opencv -o lkdemo.o -c lkdemo.c
everyting is OK, lkdemo.o had benn generated
after that I typed #arm-linux-gcc -static -o lkdemo -L $prefix/lib lkdemo.o -lcxcore -lcv -lhighgui -lcvaux -lml
then some erros comeed as follows:
/usr/local/lib/opencv/lib/libcxcore.a(cxrand.o)(.text+0x9d8): In function `$a’:
: undefined reference to `log’
/usr/local/lib/opencv/lib/libcxcore.a(cxrand.o)(.text+0xa94): In function `$a’:
: undefined reference to `log’
/usr/local/lib/opencv/lib/libcxcore.a(cxrand.o)(.text+0xac8): In function `$a’:
: undefined reference to `log’
/usr/local/lib/opencv/lib/libcxcore.a(cxrand.o)(.text+0xbac): In function `$a’:
: undefined reference to `log’
/usr/local/lib/opencv/lib/libcxcore.a(cxutils.o)(.text+0xec4): In function `cvSolveCubic’:
: undefined reference to `sqrt’
IN THE ABOVE two steps,it looks like my linker or my link phase is not right,Can you give me some recommendation or some suggestion?

Is my problem also generated by ‘–without-gtk’? So the functions in the highgui.h can’t be used?
I am really very confusing now~~

hello!
I am trying to transplant opencv1.0.0 to embedded board,but there are some problems,as follows:
cross-compile chain:arm-linux-2.95.3
my configure command is :./configure –host=arm-linux –target=arm-linux –without-gtk –without-carbon –without-quicktime –without-1394libs –without-python –without-swing –disable-apps CXX=/usr/local/arm/2.95.3/bin/arm-linux-g++ CPPFLAGS=-I/usr/local/arm/2.95.3/arm-linux/include/ –prefix=/Project/OpenCV/arm/usr/
Then ru make and make install,and it success.
but when i compile my program there arm problems:
arm-linux-gcc: -lcv: linker input file unused since linking not done
arm-linux-gcc: -lhighgui: linker input file unused since linking not done
arm-linux-gcc: -lcvaux: linker input file unused since linking not done
arm-linux-gcc: -lml: linker input file unused since linking not done
arm-linux-gcc: -lm: linker input file unused since linking not done

can you give me some advise to solve it.
thank you

Hello Igor.
First of all thank you for the great material.
I work with a similar SBC, the SBC2440-I. I used your script for the installation of opencv on the host computer (ubuntu 8.10, 32 bit), uncommenting from the line “== SBC2440-III environment settings==”. Although I successfully go through the installation, when I try to compile a simple test archive, I get the following errors:

/tmp/cc7ambMf.o(.text+0x2c): In function `main’:
: undefined reference to `cvLoadImage’
/tmp/cc7ambMf.o(.text+0x40): In function `main’:
: undefined reference to `cvNamedWindow’
/tmp/cc7ambMf.o(.text+0x4c): In function `main’:
: undefined reference to `cvShowImage’
/tmp/cc7ambMf.o(.text+0x54): In function `main’:
: undefined reference to `cvWaitKey’
/tmp/cc7ambMf.o(.text+0x60): In function `main’:
: undefined reference to `cvReleaseImage’
/tmp/cc7ambMf.o(.text+0x68): In function `main’:
: undefined reference to `cvDestroyWindow’
collect2: ld returned 1 exit status

Seems like it doesn’t know what to do with highgui functions.
The compilation comand I use is: /usr/local/arm/3.4.1/bin/arm-linux-gcc -I/usr/local/arm/3.4.1/arm-linux/include/opencv -lcv -lhighgui -lstdc++ -o Im1 Im1.cpp
where Im1 is the file name. This file compiles without a problem with gcc compiler with similar comand (gcc -I/usr/local/include/opencv -lhighgui -o Im1 Im1.cpp)

The file is a silly test file: (I only put it here in case you think it might be the problem)

#include
#include “cv.h”
#include “highgui.h”

int main(int argc, char** argv)

{
IplImage* img = cvLoadImage( argv[1] );
cvNamedWindow(“Im1”,0);
cvShowImage(“Im1”,img);
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow(“Im1”);
}

I would greatly appreciate any help or advise you could give me on the subject
Thanks in advance

Valery,
1) You seem to be missing -L flag that specifies OpenCV libraries path in build command. In your case it should be -L/usr/local/arm/3.4.1/arm-linux/lib
2) The OpenCV build made with configure script from this post would have no UI support (–without-gtk parameter to configure script), so HighUI library will throw exceptions for any UI-related code. You’ll have to cross-compile GTK and remove “–without-gtk” from configure script to get UI working.

Do let me know if you have more questions.

Igor,
Thanks for the quick reply. I tried to follow your advise, but got into trouble cross-compiling gtk. Here’s what I did:
-Downloaded gtk+-2.12.12.tar.gz, extracted it.
-Downloaded the dev’s for pango atk and cairo and afterwards ran the following command:
./configure CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc –enable-shared –host=arm-linux –target=arm-linux –prefix=/usr/local/arm/3.4.1/arm-linux/ –without-libtiff –without-libjpeg –x-libraries=/usr/local/arm/3.4.1/arm-linux/lib
This returned the following error message:
checking for XOpenDisplay… no
configure: error: *** libX11 not found. Check ‘config.log’ for more details.
– Then I downloaded libx11-6_1.0.3-7_arm.deb (libx11 already configured for arm), extracted, manually copied the …/libx11-6_1.0.3-7_arm/usr/lib/libX11.so.6.2.0 to /usr/local/arm/3.4.1/arm-linux/lib,changed its mode to executable and created two soft links libX11.so and libX11.so.6. However this didn’t fix the problem.
– After searching the web I saw few people suggesting that it might be the absence of the libxext package. I downloaded and extracted libxext-dev_1.0.1-2_arm.deb and libxext6_1.0.1-2_arm.deb, (also configured for arm) and again, manually copied to /usr/local/arm/3.4.1/arm-linux/lib the files:libXext.a and libXext.so.6.4.0. I also created the links libXext.so and libXext.so.6
Unfortunately this didn’t help to install gtk ether, the error remained.
I would appreciate any suggestion you might have regarding the problem.
Thank you,
Valery

I haven’t tried cross-compilling of GTK yet, so I can’t say what could have caused your problem for sure. General advise for all the “dances” with ./configure – look into config.log to see exact cause of the failure. Usually configure script creates and compiless small test applications and determines if needed library is present basing on compilation/linking output. Just check why test code for XOpenDisplay failed.

Has anyone had any luck getting OpenCV running with the ARM-powered SheevaPlug w/Debian? I get the following error:

uvcvideo: Failed to submit URB 0 (-28)
VIDIOC_STREAMON error 28, No space left on device.

It seems like SheevaPlug / Debian recognizes my Logitech cameras, and it looks like I successfully open it from Python. However, when I try to grab a frame from it (using Python) I have problems.

Thanks for any ideas …

Brian, have you tried running luvcview on your SheevaPlug? I wonder would it work or not. According to “internets” ENOSPC(-28) could be caused either with USB bandwith or with memory problems.
Take a look at this post for example – http://lists.berlios.de/pipermail/linux-uvc-devel/2008-January/002775.html

You can try building OpenCV with libjpeg support, so it will get frames in MJPEG format, which requires less memory for each frame. May be it would help.

Great info.

How compatible are those optimizations for the iPhone ARM processors?

Hi Igor,
A long time since I had my first doubt…
As I stated in my last post, I use the SBC2440-I for image processing from webcam (starts with face detection)
I compiled OpenCV, and the program I want to run on ARM Qemu virtual machine as a native compilation, and it works fine. The program uses the Haar cascade classifier. It runs fine on the PC (the x86 compiled version), but on the SBC it returns “segmentation fault” message, once it gets to the instruction:
CvSeq* faces = cvHaarDetectObjects( img, cascade, storage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(40, 40) );
I believe, the program you ran on the SBC2440-III uses the same classifier and the same function. I think, I ether extrapolate the memory with this command, or some pointer gets lost… Have you had this problem? The SBC-I and the SBC-III versions might be slightly different, my board has 64M or nand flash and 64M of RAM. It runs the 2.6.13 linux kernel with yaffs as the file folder system.
When I installed OpenCV on Qemu virtual machine I didn’t pass -fsigned-char in CXXFLAGS. Do you think that might be the problem?
Hope you can shed some light on my problem
Thanks in advance.

P.S. I decided it would probably be easier with the code, so here it is (pretty standard)

#include “highgui.h”
#include “cv.h”

#include
#include
#include
#include
#include
#include

using namespace std;

const char* cascade_name =

“haarcascade_frontalface_alt.xml”;

void detect_and_draw( IplImage* image );

int main( int argc, char** argv )
{
IplImage* img;
IplImage* frame;
IplImage* frame_copy;
clock_t start, end;

CvCapture* capture = cvCreateCameraCapture(0);

// get 20 frames:

for (int i=1; i<21 ; i++)
{
cout << “Frame ” << i << “. \n”;

//Tempo comeca aqui (timing execution)
start = clock();
///////////////////////////
frame=cvQueryFrame(capture);
if(!frame){ cout <width,frame->height),8,1);
cvCvtColor(frame,img,CV_BGR2GRAY);

detect_and_draw(img);

//Tempo verificado aqui
end = clock();
///////////////////////////////////////
printf (“Execution time: %.1f ms.\n”,(double)( ((end + 0.0)-(start + 0.0))*1000 / CLOCKS_PER_SEC) );

// Grava o vigesimo frame com janela de rosto no arquivo test1.jpg
// Saves the twentieth image

if (i==20){
cvSaveImage(“test1.jpg”,img);
}

cvReleaseImage( &img );
} // fecha o laco de 20 vezes

cvReleaseCapture(&capture);

return 0;

} //termina main end main

/////////////////////////////////////////////////////////////////////////////////
// Detecta face e desenha quadrado

void detect_and_draw( IplImage* img )

{

static CvMemStorage* storage = 0;

static CvHaarClassifierCascade* cascade = 0;

////////////////////////////////////////////////////

int scale = 1;

IplImage *temp = cvCreateImage( cvSize( img->width/scale, img->height/scale), 8, 3 );

CvPoint pt1, pt2;
pt1.x=0;
pt1.y=0;

int i;

cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );

//////////////////////////////////////////////////////////////////////////

if( !cascade )

{

fprintf( stderr, “ERRO!: Nao carregou o classificador cascade\n” );

return;

}

storage = cvCreateMemStorage(0);

if( cascade )

{

CvSeq* faces = cvHaarDetectObjects( img, cascade, storage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(40, 40) );

for( i = 0; i total : 0); i++ )

{

CvRect* r = (CvRect*)cvGetSeqElem( faces, i );

pt1.x = r->x*scale;

pt2.x = (r->x+r->width)*scale;

pt1.y = r->y*scale;

pt2.y = (r->y+r->height)*scale;

cvRectangle( img, pt1, pt2, CV_RGB(255,0,0), 3, 8, 0 );

}

}
if (pt1.x == 0 && pt1.y == 0)
{
cout << ” Nao achei rosto \n”;
}
else { cout << ” rosto ok!\n”;
}

/////////////////////////////////////////////////////////////

cvReleaseImage( &temp );
cvReleaseHaarClassifierCascade( &cascade );
cvReleaseMemStorage(&storage );
}

I had SEGFAULTs on SBC2440-III when tried to run facedetect too. It faulted either in cvHaarDetectObjects() or in cvResize() depending on parameters I passed to sample facedetect application. Issue had gone when I set -O0 flag to compiler (Check comments in OABI compiler sections in my configuration script, I mentioned that). I still don’t know real root cause for these SEGFAULTs, but I suspect they have something to do with GCC version or with particular GCC build issues.

Igor
Thanks for the previous reply.
However, It still returns segfault.
This is the command I use to configure opencv:
./configure –host=i686-pc-linux-gnu –target=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++ LD=arm-linux-ld CPP=arm-linux-cpp CXXCPP=arm-linux-cpp AR=arm-linux-ar RANLIB=arm-linux-ranlib NM=arm-linux-nm STRIP=arm-linux-strip AS=arm-linux-as –prefix=/usr/local/arm/ –exec-prefix=/usr/local/arm/ –disable-shared –enable-static –without-imageio –without-carbon –without-quicktime –without-python –without-gtk –without-swig –disable-apps CXXFLAGS=”-fsigned-char -O0″
I even changed the default CXXFLAG from -O3 to -O0 in the configure executable before running, as I saw that when I do make, it still used -O3 optimizing.
Then, after successful installation I create the binary code (also sucessfuly) with:
sudo arm-linux-g++ -fsigned-char -O0 -static /home/v/project/ACTSC.cpp -o /home/v/Desktop/TvoyuMat -I /usr/local/arm/include/opencv/ -L /usr/local/arm/lib/ -lcv -lhighgui -lcxcore -lcvaux -lpthread -ldl
But when I run it on the board, I still get segfault while executing cvHaarDetectObject. What am I doing wrong?
P.S. Humorous note: The name of the created binary file shows how I feel, he he he.
Thanks again

Igor, you also mentioned that you had segfaults depending on parameters you passed to the application. Which parameters didn’t result in segfault?

Valery, these SEGFAULTs seem to be caused with some compiler bug. I’ve compiled OpenCV & facedetect application myself today with 2 compilers – the one that was in SBC2440-III SW package (gcc 3.4.1) and the OABI compiler that went with TS-7800 (gcc 3.3.4). Application compiled with SBC2440-III compiler segfaulted, while application compiled with TS-7800 compiler ran fine. Most probably I used gcc 3.3.4 to build OpenCV to run on SBC2440-III (it was a while ago, so I don’t remember this for sure). You can get “good” compiler here – ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7200-linux/cross-toolchains/ . I’ve used crosstool-cygwin-gcc-3.3.4-glibc-2.3.2, you might want to use linux version crosstool-linux-gcc-3.4.4-glibc-2.3.2 or even try gcc 4.0.1.

I Igor, thanks for your infos on this topic. Your tutorial is the best one I found out on the web till now.

I’m working on ARM9 (Olimex SAM9-L9260). I have a question about compiler and EABI/OABI support. How can I get a EABI or OABI compiler and how can I distinguish if my compiler is EABi or OABI or neither of them?

I’m using crosstool provided by Dan kegel but I’m not able to configure his script to avoid the problem of SEGFAULT on face detection.

Any suggestions will be appreciated.

thanks in advance

francesco

Francesco, it’s pretty easy to check what ABI executable was build for.
Just do “readelf -h | grep Flags” . In case of OABI binary it should display

Flags: 0x2, has entry point, GNU EABI

or

Flags: 0x0

For EABI:

Flags: 0x5000002, has entry point, Version5 EABI

or

Flags: 0x4000002, has entry point, Version4 EABI

You can also check your if embedded distro’s kernel supports EABI by grepping for “ABI” in kernel config – “zcat /proc/config.gz | grep ABI

In case of EABI kernel it would display something like this:

CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set

If kernel supports only OABI, you migth try different toolchain (like the one I suggested for Valery).

Good luck.

P.S. Found interesting forum thread that might also be helpful http://forum.sparkfun.com/viewtopic.php?p=58439&sid=242428f3e3b32b6d505b60d23e1aa62e

Hi Igor,

face detection on my ARM board, thank to your support, work fine but computation time is too much for my application as you mentioned in your notes.
I need to develop an application for tracking moving objects. Do you have any suggestion to find a very simple Algorithm (for ARM Architecture with no FPU) able to check the presence of particular object in a given image?

thank you

F

Well, Francesco, welcome to the world of Computer Vision. I have no direct answer for you question, just very old and good advice “… seek, and ye shall find …”. This is where all fun starts.
You might want to start from looking at CMUcam – they were able to do face detection on ARM7. Source is at http://www.cmucam.org/browser

Hi Igor,

your support is very precious, i looked at the camera you suggested. This camera work at 60 Mhz and guarantee 1 face detection every 5 6 seconds. It’s not enough for our purpose. Might ARM9 (with FPU) be faster? Do you know any ARM9 evaluation board equipped with FPU?

Thank you again for your time.

F

Hi Igor,

I am trying to compile OpenCV source on WinXP + Cygwin, but when I try I get the following error I have no clue why. May be I am missing some thing.

/cxcore/cxdxt.cpp:59: error: expected `)’ before ‘/’ token

Configure options:
./configure –disable-shared –enable-static –without-imageio –without-carbon –without-quicktime –without-python –without-gtk –without-swig –without-v4l CC=$DEVROOT/bin/g++ CXXFLAGS=”-fsigned-char -O0 -pipe”

Thanks
Sen

What OpenCV version do you try to compile? I never saw this error with OpenCV 1.1pre1.
I have no ideas about what could have caused it, but you might try looking at preprocessor output to see what exactly is passed to compiler in /cxcore/cxdxt.cpp:59 (there’s a lot of macro-typedefs-to-break-your-brains there). To get preprocessor output you’ll have to edit /cxcore/src/Makefile and change the line that goes after .cpp.o: target.
You’ll need to change -c option to -E, so the whole line will look like
$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -E -o $@ $<.
After that run make cxdxt.o from /cxcore/src/ and you will get cxdxt.o as a preprocessed source file you can inspect.

Add a #undef log2 above the log2 function defined in cxdxt.cpp — basically the pre-compiler is pulling the log2 macro from cmath.h and replacing the method declaration with the macro definition.

Hi, this helped me, but brought me an other error:

cxcore/cxmatmul.cpp: in function ‘void cv::gemm(const cv::Mat&, const cv::Mat&, double, const cv::Mat6):
cxcore/cxmatmul.cpp:624: error: requested for member ‘data’ in ’32’, which is of non-class type ‘int’
[…]

hi Igor,
I’ve try your tutorial with my source code. like this:

#include “cv.h”
#include “ml.h”
#include “cxcore.h”
#include “cxtypes.h”
#include “highgui.h”

int main(int argc, char* argv[])
{
IplImage* img = cvLoadImage( “edk.jpg” );
cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE );
cvShowImage(“Example1”, img);
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( “Example1” );
return 0;
}
It seems compiled successfully and yield ‘tescv’ application.I want to apply it to my Mini2440 board. After I copy tescv and edk.jpg, and executing, there is no response from my Mini2440. what is the problem?
I use arm-linux-g++ 3.4.1 like the tutorial but the board use 4.3.2, does it matter?
thanks, Enas -Indonesia

Enas. OpenCV configured and built using my script will not have GUI support, any call to GUI functions will cause program abort. This might be the reason why your program hangs. Moreover, as I wrote in post, OpenCV has issues with JPEG files on ARM, so they won’t be properly loaded.

hello Igor, can I have the source code you use in this tutorial? I have some error when compile the source code in ‘samples’ folder
thanks

Dear Igor,
Do you have any idea how to make program with opencv in mini2440? (like sbc2440) I have angstrom-linux in my mini2440

Hi there,

first of all thanks for your skript. It helped me to understand how to get going with compiling opencv for ARM. Nonetheless i’m stucking right at the beginning. I used your script and modified it to fit my needs.

Here it comes:

#!/bin/bash
### Windows (Cygwin) host.
export APP_PREFIX=arm-none-eabi
export DEVROOT=/cygdrive/c/_devtools/CodeSourcery/SourceryG++Lite
export CYGPATH=C:/Program\ Files/cygwin/bin/

./configure \
–target=$APP_PREFIX \
–host=$GCC_HOST \
–disable-shared \
–enable-static \
–without-imageio –without-carbon \
–without-quicktime –without-python \
–without-gtk –without-swig \
–without-v4l \
–disable-openmp \
–disable-apps \
–prefix=$DEVROOT/$APP_PREFIX \
CC=$DEVROOT/$APP_PREFIX/bin/gcc \
CXXFLAGS=”-fsigned-char $OFLAGS -pipe” \
LD=$DEVROOT/$APP_PREFIX/bin/ld \
CPP=$DEVROOT/$APP_PREFIX/bin/cpp \
CXXCPP=$DEVROOT/$APP_PREFIX/bin/cpp \
CXX=$DEVROOT/$APP_PREFIX/bin/g++ \
AR=$DEVROOT/$APP_PREFIX/bin/ar \
RANLIB=$DEVROOT/$APP_PREFIX/bin/ranlib \
NM=$DEVROOT/$APP_PREFIX/bin/nm \
STRIP=$DEVROOT/$APP_PREFIX/bin/strip \
AS=$DEVROOT/$APP_PREFIX/bin/as

When executing the script file opencv won’t configure correctly but end with an error:

configure: error: in /cygdrive/opencv
configure: error: C++ compiler cannot create executables.

The config.log shows:

configure:3079: $? = 0
configure:3086: /cygdrive/c/_devtools/CodeSourcery/SourceryG++Lite/arm-none-eabi/bin/g++ -v >&5
Using built-in specs.
Target: arm-none-eabi
Configured with: /scratch/maxim/arm-lite/src-4.3-arm-none-eabi-lite/gcc-4.3/configure –build=i686-pc-linux-gnu –host=i686-mingw32 –target=arm-none-eabi –enable-threads –disable-libmudflap –disable-libssp –disable-libstdcxx-pch –with-gnu-as –with-gnu-ld –enable-languages=c,c++ –disable-shared –with-newlib –with-pkgversion=’Sourcery G++ Lite 2009q1-161′ –with-bugurl=https://support.codesourcery.com/GNUToolchain/ –disable-nls –prefix=/opt/codesourcery –with-headers=yes –with-sysroot=/opt/codesourcery/arm-none-eabi –with-build-sysroot=/scratch/maxim/arm-lite/install-4.3-arm-none-eabi-lite/host-i686-mingw32/arm-none-eabi –with-libiconv-prefix=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/host-libs-2009q1-161-arm-none-eabi-i686-mingw32/usr –with-gmp=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/host-libs-2009q1-161-arm-none-eabi-i686-mingw32/usr –with-mpfr=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/host-libs-2009q1-161-arm-none-eabi-i686-mingw32/usr –disable-libgomp –enable-poison-system-directories –with-build-time-tools=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/tools-i686-pc-linux-gnu-2009q1-161-arm-none-eabi-i686-mingw32/arm-none-eabi/bin –with-build-time-tools=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/tools-i686-pc-linux-gnu-2009q1-161-arm-none-eabi-i686-mingw32/arm-none-eabi/bin
Thread model: single
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-161)
configure:3090: $? = 0
configure:3097: /cygdrive/c/_devtools/CodeSourcery/SourceryG++Lite/arm-none-eabi/bin/g++ -V >&5
g++.exe: ‘-V’ option must have argument
configure:3101: $? = 1
configure:3124: checking for C++ compiler default output file name
configure:3146: /cygdrive/c/_devtools/CodeSourcery/SourceryG++Lite/arm-none-eabi/bin/g++ -fsigned-char -pipe conftest.cpp >&5
g++.exe: CreateProcess: No such file or directory
configure:3150: $? = 1
configure:3188: result:
configure: failed program was:

Do you have an idea what i’ve done wrong?

Hi there,

thanks for your great script. I get opencv 1.1pre1 configured in no time, but i’m having trouble compiling it.

When typing “make” I get the following errors:

cxerror.cpp:96: error: ‘pthread_key_t’ does not name a type
cxerror.cpp:424: error: ‘g_TlsIndex’ was not declared in this scope
cxerror.cpp:424: error: ‘phtread_key_create’ was not declared in this scope

Do you have any idea why this happens?

I reckon you’re using Cygwin host. Have you set CYGPATH variable before running the script? Section 2.6.1.2 “Working with Cygwin” of Sourcery G++ Lite “Getting Started” document.

I am bit confused why most websites who have an article state argument to./configure attribute –host = arm-linux. while in your case you states –host=i686-pc-linux. Now is the host the real host (e.g. x86 based laptop on which we are compiling) or is it the target which hosts the compiled program – either after NFS mounted or other method (e.g. Gumstix, Davinci, Beagleboard) ?

Good catch! I checked with autoconf documentation and you’re right – the –host parameter specifies “the type of system on which the package runs”. So in my case it should be set to $APP_PREFIX and –build should be set to $GCC_HOST.

It didn’t cause errors with CodeSourcery toolchains, however, since they always compile for arm-linux and –host could be set to any value only to enable cross-compilation mode for “configure” script.

http://www.gnu.org/software/autoconf/manual/html_node/Specifying-Target-Triplets.html#Specifying-Target-Triplets

Hello Igor!
Thanks for the information, it’s been very useful.
I’m trying to setup opencv on a ts7250 board, to use it for some small processing and then streaming it to another program on my computer to make heavier processing on the video.
After a LOT of tweaking, I managed to compile the example code that I obtained in http://nashruddin.com/StrEAMinG_oPENcv_vIdEos_ovER_tHe_nEtWoRk as a first try, but I’m not displaying the video on the board (I’ve commented it out of stream_server.c code) because it does not have a video output. I’ve used a OABI compiler and the shared opencv libraries.
The problem is: cvCapture fails. So I thought “I guess it means that I need to compile the videodev driver, modprobe it, and then run the program again.”
Well, I did it, but still no success.
You have any pointers on what should I do now? 🙂

Lucas, if you’re going to use web-camera as video source for OpenCV you need to:
1) Make sure that your kernel has v4l2 support (check kernel config)
2) Enable v4l support in OpenCV (it’s disabled in my script). Add “–with-v4l” option to ./configure parameters

Igor, I am using the -with-v4l option in the configure parameters, and also I’ve managed to compile a patched 2.6.32.3 kernel with the modules:
gspca_pac207, gspca_main, v4l1-compat, v4l2-common, v4l2-int-device, videodev (it looks like the gspca_pac207 driver needs the v4l1-compat module).

But when I try to run that test application, a new error appears:

HIGHGUI ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream.: Bad file descriptor
HIGHGUI ERROR: V4L: Unable to determine size of incoming image
cvCapture failed

I am using the 1.1pre1 opencv version.

Lucas, it looks like your camera outputs video in its own weird format. You can check http://hansdegoede.livejournal.com/3636.html and http://forum.skype.com/index.php?showtopic=225971 on how people deal with that.

Igor,Today I tried to cross compile opencv1.1pre1 with arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu which I downloaded from codesourery.
My ease install shell scrip is as follows:
#!/bin/sh
#This is a transplant opencv’s shell script
export DEVROOT=/home/crosstool/arm-2009q3
export APP_PREFIX=arm-none-linux-gnueabi
export GCC_HOST=i686-pc-linux-gnu
export OFLAGS=-O2
export PATH=$DEVROOT/$APP_PREFIX/bin:$PATH
./configure –target=$APP_PREFIX –host=$APP_PREFIX –build=$GCC_HOST –disable-shared –enable-static –without-carbon –without-quicktime –without-python –without-gtk –without-swig –disable-apps –prefix=$DEVROOT/$APP_PREFIX CC=$DEVROOT/bin/$APP_PREFIX-gcc CXXFLAGS=”-fsigned-char $OFLAGS -pipe” LD=$DEVROOT/bin/$APP_PREFIX-ld CPP=$DEVROOT/bin/$APP_PREFIX-cpp CXXCPP=$DEVROOT/bin/$APP_PREFIX-cpp CXX=$DEVROOT/bin/$APP_PREFIX-g++ AR=$DEVROOT/bin/$APP_PREFIX-ar RANLIB=$DEVROOT/bin/$APP_PREFIX-ranlib NM=$DEVROOT/bin/$APP_PREFIX-nm STRIP=$DEVROOT/bin/$APP_PREFIX-strip AS=$DEVROOT/bin/$APP_PREFIX-as

I wrote this script just like yours,after runing this script :

General configuration ================================================
Compiler: /home/crosstool/arm-2009q3/bin/arm-none-linux-gnueabi-g++
CXXFLAGS: -fsigned-char -O2 -pipe
DEF_CXXFLAGS: -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer
PY_CXXFLAGS: -Wall -pipe -O3 -fomit-frame-pointer
OCT_CXXFLAGS: -fno-strict-aliasing -Wall -Wno-uninitialized -pipe -O3 -fomit-frame-pointer

Install path: /home/crosstool/arm-2009q3/arm-none-linux-gnueabi

HighGUI configuration ================================================

Windowing system ————–
Use Carbon / Mac OS X: no
Use gtk+ 2.x: no
Use gthread: no

Image I/O ———————
Use ImageIO / Mac OS X: no
Use libjpeg: no
Use zlib: no
Use libpng: no
Use libtiff: no
Use libjasper: no
Use libIlmImf: no

Video I/O ———————
Use QuickTime / Mac OS X: no
Use xine: no
Use gstreamer: no
Use ffmpeg: no
Use dc1394 & raw1394: no
Use v4l: yes
Use v4l2: yes
Use unicap: no

Wrappers for other languages =========================================
SWIG
Python no
Octave no

Additional build settings ============================================
Build demo apps no

Now run make …

THEN I took make & make install :
[root@localhost opencv-1.1.0]# make && make install
make all-recursive
make[1]: Entering directory `/home/opencv-1.1.0′
Making all in cxcore
make[2]: Entering directory `/home/opencv-1.1.0/cxcore’
Making all in src
make[3]: Entering directory `/home/opencv-1.1.0/cxcore/src’
/bin/sh ../../libtool –tag=CXX –mode=compile /home/crosstool/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c -o dummy.lo dummy.cpp
/home/crosstool/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c dummy.cpp -o dummy.o
mv -f .deps/dummy.Tpo .deps/dummy.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /home/crosstool/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c -o cxalloc.lo cxalloc.cpp
/home/crosstool/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c cxalloc.cpp -o cxalloc.o
In file included from _cxcore.h:60,
from cxalloc.cpp:42:
../../cxcore/include/cxmisc.h:133: error: #elif with no expression
make[3]: *** [cxalloc.lo] error 1
make[3]: Leaving directory `/home/opencv-1.1.0/cxcore/src’
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory `/home/opencv-1.1.0/cxcore’
make[1]: *** [all-recursive] error 1
make[1]: Leaving directory `/home/opencv-1.1.0′
make: *** [all] error 2
[root@localhost opencv-1.1.0]#

Can you tell me why and how to avoid this error?

Newer versions of CodeSourcery toolchain are built around GCC 4.4.1 which seems to be more strict on preprocessor directives than GCC 4.3.
Just replace #elif on line 133 in cxcore/include/cxmisc.h with #else. That should fix this error.

note: –host==$APP_PREFIX
The dubbel ‘=’ gave problems here. Should be a single one;)

Hi Igor,

You mentioned time required for detecting lena.jpg according to both EABI and AOBI are following

TS-7800
EABI build: detection time = 31 512.1ms

SBC-2440-III
OABI build: detection time = 448 151 ms

do you mean it takes 31 second (half minute) using EABI and 448 second (7 and half minutes) using AOBI ?

I am developing opencv application for traffic surveilance system. Its detecting number of cars in specific ROI (street). Right now i developing it under Desktop PC and plan to use TS 7800 with usb camera as smart camera later.

Do you think it will be very slooww if I use SBC board such TS-7800 ..??

Thanks in advance

That’s right. It takes ~30 sec to detect face in 512×512 picture using EABI builds. And OABI builds are significantly slower.

The speed of your system will mostly depend on method you’ll choose to detect cars and, of course on implementation of this method for your target HW.

As I wrote before, CMUCam project people were able to detect face in 5-6 sec. on 60 MHz ARM7 processor using simplified Viola-Jones algorithm. You might want to study their code/documentation to see if something similar will fit your project needs.

When compiling an empty main i get the following error:

/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-6/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ -o dist/Release__final_/GNU-Linux-x86/cv_test build/Release__final_/GNU-Linux-x86/main.o -L/home/s050322/OpenCV-2.0.0/src/.libs -lcv -lhighgui -lcxcore -lml -lcvaux
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvClose(CvFileStorage*)’:
cxpersistence.cpp:(.text+0xe14): undefined reference to `gzclose’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvGets(CvFileStorage*, char*, int)’:
cxpersistence.cpp:(.text+0x1470): undefined reference to `gzgets’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvPuts(CvFileStorage*, char const*)’:
cxpersistence.cpp:(.text+0x16f4): undefined reference to `gzputs’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvRewind(CvFileStorage*)’:
cxpersistence.cpp:(.text+0x1c508): undefined reference to `gzrewind’
cxpersistence.cpp:(.text+0x1c5e0): undefined reference to `gzrewind’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvEof(CvFileStorage*)’:
cxpersistence.cpp:(.text+0x1c814): undefined reference to `gzeof’
cxpersistence.cpp:(.text+0x1c8ec): undefined reference to `gzeof’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `cvOpenFileStorage’:
cxpersistence.cpp:(.text+0x1f4e4): undefined reference to `gzopen’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxrand.o): In function `cv::theRNG()’:
cxrand.cpp:(.text+0x6ce8): undefined reference to `pthread_key_create’
cxrand.cpp:(.text+0x6cfc): undefined reference to `pthread_getspecific’
cxrand.cpp:(.text+0x6e40): undefined reference to `pthread_setspecific’
/home/s050322/OpenCV-2.0.0/src/.libs/libcxcore.a(lib_cxcore_la-cxsystem.o): In function `cv::getTickCount()’:
cxsystem.cpp:(.text+0xa60): undefined reference to `clock_gettime’
collect2: ld returned 1 exit status

Does anyone know what the problem is here?

Adding -lz -lpthread after -lcvaux should fix these errors

Hi Igor,

I would like to know if you have played with a camera. I have a arm achitecture mounted on a robot and there is also a camera mounted on it. I would like my camera to play in live (non stop) in order to see what my robot can see. I am able to grab images.

Do you if there a way to do it with opencv? I think this requires the opening of a window. so maybe i need to do some special in the configure step.

My cross compilation seems to be ok.

I just have any idea of playing the camera in live.

If camera on your robot supports v4l API you should be able to get video frames using cvCreateCameraCapture()/cvGrabFrame()/cvRetrieveFrame().
If you want to display video on your board’s display – you will need to cross-compile GTK and then recompile OpenCV with GTK support to enable OpenCV UI functions.
The easiest way to get GTK working on embedded system is to use DirectFB for rendering – see here http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB for details.

You might also consider streaming video from your robot using network interface (if it has one). Here’s an example of simple streaming server/client using OpenCV http://nashruddin.com/Streaming_OpenCV_Videos_Over_the_Network

Hi Igor, I’m doing the image processing project on my arm board. I tried to transplant opencv to my arm board.
(i just follow Hellen Wang instructions)
my opencv version is opencv 1.1 pre1
cross-compile chain is arm-linux-3.4.1
my configure comand is : ./configure –host=arm-linux –prefix=/usr/local/lib/opencv/ –exec-prefix=/usr/local/lib/opencv/ –without-gtk –without-carbon –without-quicktime –without-1394libs –without-ffmpeg –without-python –without-swig –enable-static –disable-shared –disable-apps CXX=arm-linux-g++ CPPFLAGS=-I/usr/local/arm/3.4.1/include CXXFLAGS=-O2

finally, i got this error…what is going on? it said the linking not done. how to fix it?

[root@localhost c]# arm-linux-g++ -I/usr/local/lib/opencv/include/opencv/ -L/usr/local/lib/opencv/lib -lcxcore -lcv -lhighgui -lcvaux -lml -o lkdemo -c lkdemo.c
arm-linux-g++: -lcxcore: linker input file unused because linking not done
arm-linux-g++: -lcv: linker input file unused because linking not done
arm-linux-g++: -lhighgui: linker input file unused because linking not done
arm-linux-g++: -lcvaux: linker input file unused because linking not done
arm-linux-g++: -lml: linker input file unused because linking not done

Now, i can compile one file. The “drawing” has generated. the command as follows:

[root@localhost c]# arm-linux-g++ -I/usr/local/lib/opencv/include/opencv/ -o drawing.o -c drawing.c
the drawing.o file has generated.

[root@localhost c]# arm-linux-g++ -static -o drawing -L/usr/local/lib/opencv/lib drawing.o -lcxcore -lcv -lhighgui -lcvaux -lml -lpthread

although i compiled successfully, i don’t know why i need to add -lpthread at the end of the second command. Moreover, Why i can’t use this two command for each program?
Another question if i want to compile the file .cpp , like your uploaded facedetect.cpp how to do it?
Thanks

You need pthread library because it’s a dependency for OpenCV, and for static builds linker merges all the required libraries into executable.

Command I used to build facedetect.cpp can be found in my post. it’s basically the same you used to build “drawing”

You forgot to add -static to you gcc options, so it assumed dynamic linking and since OpenCV libs were built as static, linker just skipped them.

Hi Igor!
now, i am going to generate your facedetect.cpp to the binary file. The steps as follows:

[root@localhost c]# arm-linux-g++ -I/usr/local/lib/opencv/include/opencv/ -o facedetect.o -c facedetect.cpp

[root@localhost c]# arm-linux-g++ -static -o facedetect -L/usr/local/lib/opencv/lib facedetect.o -lcv -lhighgui -lcxcore -lml -lcvaux -lpthread -ldl

The “facedetect” file has generated. I tried to copy it into my arm board. The error message was displayed.
[root@FriendlyARM testing]# ./face
ERROR: Could not load classifier cascade
Usage: facedetect [–cascade=””]
[–nested-cascade[=”nested_cascade_path”]]
[–scale[=
[filename|camera_index]

Then, i tried to fix this problem. I put the two xml, lena.jpg and facedetect binary file in the same directory.Then, I typed this command as follows:
[root@FriendlyARM testing]# ./face –cascade=haarcascade_frontalface_alt.xml –n

ested-cascade=haarcascade_eye_tree_eyeglasses.xml

The command has accepted. But nothing to display? I think that the program didn’t read the lena.jpg. How to fix this problem?

Jason, you really should have read my post more carefully =).
1. OpenCV on ARM won’t work properly with JPG files. You should use BMP instead.
2. OpenCV built with in my configuration does not have UI support (–without-gtk ). If you want to see results of OpenCV work you should use cvSaveImage() to store processed image.

I’ve uploaded my version of facedetect.cpp to patsebin http://pastebin.ca/1868798 to make sure you’re using the correct version. This version expects haarcascade_frontalface_alt.xml and lena.bmp files in the same directory. After image is processed, application will create two files: out_w_h.bmp which will contain input image with face regions marks and facedetect.txt.

To run application:
./facedetect --cascade=haarcascade_frontalface_alt.xml

hello!
I also have the same error as yours:
arm-linux-g++: -lcxcore: linker input file unused because linking not done
arm-linux-g++: -lcv: linker input file unused because linking not done
arm-linux-g++: -lhighgui: linker input file unused because linking not done
arm-linux-g++: -lcvaux: linker input file unused because linking not done
arm-linux-g++: -lml: linker input file unused because linking not done

can you tell me how to solve these problem! thank you

Hi Igor,

I know that this is a pretty long shot, but you are the only source that at least mentions the problem: I’m currently trying to get cvHaarDetectObjects to work on a PowerPC 405, and I also get a Segmentation Fault. The code runs fine on my big machine.

Do you perhaps have any other clues than setting the optimization-level to 0? I did that, but there is no change.

I would be very thankful for any hints as to what might be causing the problem or how else I can try to solve it.

Thanks in advance!

Jakob, I’m not quite sure of what could have caused SEGFAULT in your case, but general approaches would be:
1) Using different (newer) cross-compiler.
2) Debugging your application in GDB and finding the cause of the issue.

That’s it.

hello!Igor:
i compiled one drawing.c use arm-linux-g++,and download in the s3c6410(arm11),which used linux 2.6.24 kernel(system).
but when i ./drawing,then display:
[root@(none) mnt]# ./drawing
OpenCV ERROR: Unspecified error (The function is not implemented. Rebuild the li
brary with Windows, GTK+ 2.x or Carbon support)
in function cvNamedWindow, window.cpp(71)
what is this error?how could i solve it ?

As I wrote in previous comments – you’ll have to cross-compile GTK and then recompile OpenCV with GTK support to enable drawing functions.

thank you!,
but when i cross-compile GTK lib ,should i download the GTK lib and opencv lib to the board system ? if it needed ,which directory should i put the the GTK lib and opencv lib in the board’s system?

You can build all necessary libraries as static libs (–enable-static –disable-shared) so they will be linked into your executable.

hi! but when i cross-compile gtk+2.10.13,
when i run make,then :

gdkcursor-directfb.c: In function ‘IA__gdk_cursor_new_for_display’:
gdkcursor-directfb.c:231: error: ‘__u32’ undeclared (first use in this function)
gdkcursor-directfb.c:231: error: (Each undeclared identifier is reported only once
gdkcursor-directfb.c:231: error: for each function it appears in.)
gdkcursor-directfb.c:231: error: ‘dst’ undeclared (first use in this function)
gdkcursor-directfb.c:269: error: expected ‘;’ before ‘color’
gdkcursor-directfb.c:274: error: ‘__u8’ undeclared (first use in this function)
gdkcursor-directfb.c:274: error: expected ‘;’ before ‘a’
gdkcursor-directfb.c:275: error: expected ‘;’ before ‘alpha’
gdkcursor-directfb.c:277: error: ‘alpha’ undeclared (first use in this function)
gdkcursor-directfb.c:277: error: ‘color’ undeclared (first use in this function)
gdkcursor-directfb.c:267: warning: unused variable ‘mbit’
gdkcursor-directfb.c:266: warning: unused variable ‘bit’
make[4]: *** [gdkcursor-directfb.lo] Error 1
make[4]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk/directfb’
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk’
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13′
make: *** [all] Error 2
have you got any idea to solve this problem?
thank you very much!!

Can you tell me why this error happen?
when cross-compile gtk-2.10.13
gdkimage-directfb.c: In function ‘gdk_image_new_bitmap’:
gdkimage-directfb.c:154: error: ‘G_GNUC_FUNCTION’ undeclared (first use in this function)
gdkimage-directfb.c:154: error: (Each undeclared identifier is reported only once
gdkimage-directfb.c:154: error: for each function it appears in.)
gdkimage-directfb.c: In function ‘_gdk_image_new_for_depth’:
gdkimage-directfb.c:212: error: ‘G_GNUC_FUNCTION’ undeclared (first use in this function)
gdkimage-directfb.c:183: warning: unused variable ‘ret’
make[4]: *** [gdkimage-directfb.lo] Error 1
make[4]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk/directfb’
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk’
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13/gdk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/gtkdfb/src/gtk+-2.10.13′
make: *** [all] Error 2
root@huxin-desktop:/usr/gtkdfb/src/gtk+-2.10.13#

Hi Igore,

I am considering running openCV 2.0 on a SBC. I will need to process two analog and two digital video streams simultaneously. Do you or any of the readers have any suggestions on what SBC to use?

Thank you!

Hi can you help me how to import the library OpenCV to Xlilinx EDK, or Xilinx SDK ?

I suppose Xilinx EDK uses GCC-based compiler toolchain, so you just need to modify my scritp and set correct environment variables. And, of course, fix compilation errors that might occur 🙂

Thank you for your response, of course I work on Windows, I have built my project and I have these errors, can you help me to resolve these errors:

**** Full rebuild of configuration Debug for project new01 ****

make clean all
rm -rf blink_and_face_detection.o blink_and_face_detection.d new01.elf
mb-g++ -IC:/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new/microblaze_0/include -c -xl-mode-executable -mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.20.a -IC:\OpenCV\cv\include -IC:\OpenCV\cvaux\include -IC:\OpenCV\cxcore\include -IC:\OpenCV\otherlibs\highgui -IC:/OpenCV/cv/include -IC:/OpenCV/cvaux/include -IC:/OpenCV/cxcore/include -IC:/OpenCV/otherlibs/highgui -g -O0 -oblink_and_face_detection.o ../blink_and_face_detection.c
../blink_and_face_detection.c: In function ‘int main(int, char**)’:
../blink_and_face_detection.c:203: warning: passing ‘float’ for argument 1 to ‘CvSize cvSize(int, int)’
../blink_and_face_detection.c:203: warning: passing ‘float’ for argument 2 to ‘CvSize cvSize(int, int)’
../blink_and_face_detection.c: In function ‘int is_eye_pair(CvSeq*, int, CvRect*)’:
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 1 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 2 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c: In function ‘int locate_eye(IplImage*, IplImage*, CvRect*, CvRect*)’:
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 1 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 2 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:529: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:529: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’
Invoking: MicroBlaze C++ Compiler

Building target: new01.elf
mb-g++ -o new01.elf blink_and_face_detection.o -xl-mode-executable -mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.20.a -LC:/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new/microblaze_0/lib -T../new01.ld
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: region ilmb_cntlr_dlmb_cntlr is full (new01.elf section .text)
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .init [00000050 -> 00000077] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .fini [00000078 -> 00000097] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .rodata [00000098 -> 00000767] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .data [00000768 -> 00000ca3] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .ctors [00000ca4 -> 00000cab] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .dtors [00000cac -> 00000cb3] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .eh_frame [00000cb4 -> 00000cb7] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .jcr [00000cb8 -> 00000cbb] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .bss [00000cc0 -> 00000e3f] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .heap [00000e40 -> 0000123f] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: section .stack [00001240 -> 0000163f] overlaps section .text [00000050 -> 000127cb]
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: new01.elf: section .text lma 0x50 overlaps previous sections
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: new01.elf: section .fini lma 0x78 overlaps previous sections
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: new01.elf: section .rodata lma 0x98 overlaps previous sections
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: new01.elf: section .data lma 0x768 overlaps previous sections
blink_and_face_detection.o: In function `exit_nicely(char*)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:683: undefined reference to `cvDestroyAllWindows’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:686: undefined reference to `cvReleaseCapture’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:688: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:690: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:692: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:694: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:696: undefined reference to `cvReleaseMemStorage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:698: undefined reference to `cvReleaseHaarClassifierCascade’
blink_and_face_detection.o: In function `init()’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:618: undefined reference to `cvLoad’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:622: undefined reference to `cvCreateCameraCapture’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:627: undefined reference to `cvSetCaptureProperty’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:629: undefined reference to `cvSetCaptureProperty’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:629: undefined reference to `cvQueryFrame’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:639: undefined reference to `cvInitFont’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:640: undefined reference to `cvNamedWindow’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:640: undefined reference to `cvCreateMemStorage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:659: undefined reference to `cvCreateStructuringElementEx’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:660: undefined reference to `cvGetSize’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:660: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:661: undefined reference to `cvGetSize’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:661: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:662: undefined reference to `cvGetSize’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:662: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:671: undefined reference to `cvNamedWindow’
blink_and_face_detection.o: In function `delay_frames(int)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:594: undefined reference to `cvQueryFrame’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:600: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:602: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:602: undefined reference to `cvWaitKey’
blink_and_face_detection.o: In function `is_blink(CvSeq*, int, CvRect, CvRect)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:556: undefined reference to `cvBoundingRect’
blink_and_face_detection.o: In function `is_eye_pair(CvSeq*, int, CvRect*)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:398: undefined reference to `cvBoundingRect’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:407: undefined reference to `cvBoundingRect’
blink_and_face_detection.o: In function `locate_eye(_IplImage*, _IplImage*, CvRect*, CvRect*)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:487: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:494: undefined reference to `cvSetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:495: undefined reference to `cvMatchTemplate’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:495: undefined reference to `cvMinMaxLoc’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:498: undefined reference to `cvResetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:498: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:537: undefined reference to `cvSetZero’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:545: undefined reference to `cvSetImageROI’
blink_and_face_detection.o: In function `get_connected_components(_IplImage*, _IplImage*, CvRect, CvSeq**)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:340: undefined reference to `cvSetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:348: undefined reference to `cvSetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:348: undefined reference to `cvSub’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:349: undefined reference to `cvThreshold’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:350: undefined reference to `cvMorphologyEx’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:350: undefined reference to `cvResetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:354: undefined reference to `cvResetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:354: undefined reference to `cvResetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:356: undefined reference to `cvClone’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:362: undefined reference to `cvFindContours’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:364: undefined reference to `cvClearMemStorage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:366: undefined reference to `cvReleaseImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:378: undefined reference to `cvHaarDetectObjects’
blink_and_face_detection.o: In function `detectFaces(_IplImage*)’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:314: undefined reference to `cvGetSeqElem’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:324: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:327: undefined reference to `cvQueryFrame’
blink_and_face_detection.o: In function `main’:
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:106: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:106: undefined reference to `cvWaitKey’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:126: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:131: undefined reference to `cvWaitKey’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:162: undefined reference to `cvCvtColor’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:175: undefined reference to `cvCvtColor’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:186: undefined reference to `cvSetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:201: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:203: undefined reference to `cvCopy’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:203: undefined reference to `cvResetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:207: undefined reference to `cvGetSize’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:211: undefined reference to `cvCreateImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:219: undefined reference to `cvClone’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:232: undefined reference to `cvSetImageROI’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:238: undefined reference to `cvGetTextSize’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:242: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:242: undefined reference to `cvPutText’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvRectangle’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvShowImage’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:264: undefined reference to `cvClone’
/cygdrive/c/Users/Hayfa/Desktop/jih/SDK/SDK_Workspace/new01/Debug/../blink_and_face_detection.c:282: undefined reference to `cvWaitKey’
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/lib/m/libxil.a(write.o): In function `write’:
/gnu/mb/build/nt/bld_gcc/gcc/libgloss/microblaze/write.c:36: undefined reference to `outbyte’
/gnu/mb/build/nt/bld_gcc/gcc/libgloss/microblaze/write.c:34: undefined reference to `outbyte’
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/lib/m/libxil.a(read.o): In function `read’:
/gnu/mb/build/nt/bld_gcc/gcc/libgloss/microblaze/read.c:35: undefined reference to `inbyte’
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/m/crtend.o:(.init+0x0): relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against `.text’
collect2: ld returned 1 exit status
make: *** [new01.elf] Error 1
Build complete for project new01

2 comments:
1) You seem to have forgotten to pass OpenCV libraries to linker. Check your build tool configuration and make sure that linker settings are correct.
2) “undefined reference to inbyte/outbyte” is most probably caused with STDIO not properly set in your system. Check this post for details http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2005/12/msg00394.html

Thanks for your response
I resolved the second comment “undefined reference to inbyte/outbyte”, by liberate more space in hard drive in my computer.

But about the linking of OpenCV, I have set the library path (-L), the libraries -lcv -lcvaux and -lhighgui, and Include Paths (-I)

But I obtain these errors (I use the OpenCV pre1.1):

**** Full rebuild of configuration Debug for project new01 ****

make clean all
rm -rf blink_and_face_detection.o blink_and_face_detection.d new01.elf
mb-g++ -c -IC:/Users/Hayfa/Desktop/Fin/SDK/SDK_Workspace/new/microblaze_0/include -xl-mode-executable -mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.20.a -IC:\OpenCV\cv\include -IC:\OpenCV\cvaux\include -IC:\OpenCV\cxcore\include -IC:\OpenCV\otherlibs\highgui -IC:/OpenCV/cv/include -IC:/OpenCV/cvaux/include -IC:/OpenCV/cxcore/include -IC:/OpenCV/otherlibs/highgui -g -O0 -oblink_and_face_detection.o ../blink_and_face_detection.c
../blink_and_face_detection.c: In function ‘int main(int, char**)’:
../blink_and_face_detection.c:203: warning: passing ‘float’ for argument 1 to ‘CvSize cvSize(int, int)’
../blink_and_face_detection.c:203: warning: passing ‘float’ for argument 2 to ‘CvSize cvSize(int, int)’
../blink_and_face_detection.c: In function ‘int is_eye_pair(CvSeq*, int, CvRect*)’:
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 1 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 2 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:441: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c: In function ‘int locate_eye(IplImage*, IplImage*, CvRect*, CvRect*)’:
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 1 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 2 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:478: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:529: warning: passing ‘float’ for argument 3 to ‘CvRect cvRect(int, int, int, int)’
../blink_and_face_detection.c:529: warning: passing ‘float’ for argument 4 to ‘CvRect cvRect(int, int, int, int)’

Building target: new01.elf
mb-g++ -o new01.elf blink_and_face_detection.o -lcv -lcvaux -lcxcore -lhighgui -xl-mode-executable -mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.20.a -LC:/Users/Hayfa/Desktop/Fin/SDK/SDK_Workspace/new/microblaze_0/lib -LC:/OpenCV/lib -T../new01.ld
/cygdrive/e/Xilinx/11.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld: cannot find -lcv
collect2: ld returned 1 exit status
make: *** [new01.elf] Error 1
Build complete for project new01

how do you compile opencv to ARM on windowsXP?

I used Cygwin for that. CodeSourcery GCC for ARM works fine in Cygwin. Some vendors provide Eclipse-based build tools for ARM boards.

Hi, Igor.
I’m building OpenCV on an embedded board based on ARM9, AT91SAM9260. I had a problem when compiling a demo in /samples/c. The error message:
gcc: pkg-config –cflags opencv: No such file or directory.
gcc: pkg-config –libs opencv: No such file or directory.
I’ve checked pkg-config and it’s Ok.
Can you help me?
P/s: My OS on target is Debian Lenny.

What is the build command that you’re using? It looks like GCC is confused with the way you provided pkg-config –cflags opencv.
Usually the command should look like

gcc -o test test.c $(pkg-config –libs –cflags libpng)

[…] is no way around this.  Not all microcontrollers have a floating point coprocessor.  However, this article lead us to believe that their would be too much lag with the floating point emulation…. […]

Hi

I am trying to cross-compile a armtest.c file using arm-linux-gcc ,
toolchain 4.3.2. The .c file is using open cv 2.0.0 libraries. when I try to
cross compile the file, the following error is coming

root@tanushri-desktop:~# arm-linux-gcc -o2 -I/usr/local/include/
opencv armtest.c -L//root/Downloads/OpenCV-2.0.0/src/.libs -lcv –
lhighgui -lcxcore -lml -lcvaux -lrt -lpthread -ldl -lz -lpng12 -ljpeg –
o armtest
cc1: warning: include location “/usr/local/include/opencv” is unsafe
for cross-compilation
In file included from /usr/local/include/opencv/cxcore.h:70,
from /usr/local/include/opencv/cv.h:58,
from armtest.c:12:
/usr/local/include/opencv/cxtypes.h: In function ‘cvRound’:
/usr/local/include/opencv/cxtypes.h:240: warning: incompatible
implicit declaration of built-in function ‘lrint’
/opt/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/
4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lcv

HELP!

Are you sure that OpenCV libraries you’ve built located in /root/Downloads/OpenCV-2.0.0/src/.libs?

I am trying to cross-compile a armtest.c file using arm-linux-gcc ,
toolchain 4.3.2. The .c file is using open cv 2.0.0 libraries. when I try to
cross compile the file, the following error is coming

root@tanushri-desktop:~# arm-linux-gcc -o2 -I/usr/local/include/
opencv armtest.c -L//root/Downloads/OpenCV-2.0.0/src/.libs -lcv –
lhighgui -lcxcore -lml -lcvaux -lrt -lpthread -ldl -lz -lpng12 -ljpeg –
o armtest
cc1: warning: include location “/usr/local/include/opencv” is unsafe
for cross-compilation
In file included from /usr/local/include/opencv/cxcore.h:70,
from /usr/local/include/opencv/cv.h:58,
from armtest.c:12:
/usr/local/include/opencv/cxtypes.h: In function ‘cvRound’:
/usr/local/include/opencv/cxtypes.h:240: warning: incompatible
implicit declaration of built-in function ‘lrint’
/opt/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/
4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lcv
HELP!

Thanks

Are you sure that OpenCV libraries you’ve built located in /root/Downloads/OpenCV-2.0.0/src/.libs?

noone can help me??

Hi,Igor .I’ve configured(./confugure –host=arm-linux –disable-shared)
OpenCV for mini 2440 and it past ‘make’ well,but while compilation I cannot
get rid from error :

/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm
-none-linux-gnueabi/bin/ld:
cannot find -lml
collect2: ld returned 1 exit status

I compile as follow:

arm-linux-gcc `pkg-config –cflags opencv` -c video_server_arm.c -o
video_server_arm.o
arm-linux-gcc video_server_arm.o -o video_server_arm `pkg-config –libs
opencv` -I /usr/include/opencv -lpthread

/usr/include/opencv—here cv.h and highgui.h reside

Hard to say what the reason is. Try passing path to OpenCV libraries using –L/path/to/opencv/libs parameter of LD.

hi Igor Stepura

plz tell me how to cross compile GTK & recompile OpenCV with GTK support to enable UI.i m trying for 15days but i can’t…..

thank you

Hi,Igor. Thank for reply.
Could you suggest any reference….how to make cross compile Opencv for arm-linux-gcc tool chain.
I think my problem is: ./configure –host=arm-linux –disable-shared –with-gtk=no –prefix=/usr/local/arm/4.3.2/bin
(said on 20-01-2011)

I made Concurrent Server/Client app….Meanwhile my server is my laptop(I use it own web camera) and it runs on Ubuntu 10.10.Now I try to make FriendlyARM Mini2440 (S3C2440A) board to be a Server(using usb camera) and I got stuck in cross-compiling my code.

Hi Igor,
At the moment I’m using OpenCV on Intel CPU (I’m using the implementation of algorithms like optical flow, Haar features detection, distance functions etc.).
Due to performance issues, I’m using IPP as a lower layer (which is optimized for Intel HW).
I’m considering porting the engine to ARM CortexA9 (or a similar chip).
Do you know if there is an OpenCV (or any other similar lib) ported to ARM CortexA9, including HW optimizations for the chip ?
(The issue of HW optimization is critical for my implementation).
Thanks,
Gil.

I have cross compiled opencv 2.0.0 for arm. With enable-static disable-share options.
i have already set pkg-config path.
now
I am compiling my program by executing following line:
arm-none-linux-gnueabi-g++ -static `pkg-config –cflags –libs opencv` -o opencv2 opencvtest.c

I am getting following error:

/tmp/cc9X3vda.o: In function `main’:
opencvtest.c:(.text+0x38): undefined reference to `cvCreateImage’
opencvtest.c:(.text+0x54): undefined reference to `cvGetSize’
opencvtest.c:(.text+0x70): undefined reference to `cvCreateImage’
opencvtest.c:(.text+0x84): undefined reference to `cvReleaseImage’
opencvtest.c:(.text+0x90): undefined reference to `cvReleaseImage’
collect2: ld returned 1 exit status

help.

HI Igor,

[root@localhost c]# arm_v5t_le-g++ `pkg-config –cflags –libs opencv` drawing.c -o drawing
/tmp/cc8ghTZG.o(.text+0x144): In function `main’:
drawing.c: undefined reference to `cvCreateImage’
/tmp/cc8ghTZG.o(.text+0x154):drawing.c: undefined reference to `cvNamedWindow’
/tmp/cc8ghTZG.o(.text+0x15c):drawing.c: undefined reference to `cvSetZero’
/tmp/cc8ghTZG.o(.text+0x168):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x2ec):drawing.c: undefined reference to `cvLine’
/tmp/cc8ghTZG.o(.text+0x2f8):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x300):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x44c):drawing.c: undefined reference to `cvRectangle’
/tmp/cc8ghTZG.o(.text+0x458):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x460):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x6fc):drawing.c: undefined reference to `cvEllipse’
/tmp/cc8ghTZG.o(.text+0x708):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x710):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x9f4):drawing.c: undefined reference to `cvPolyLine’
/tmp/cc8ghTZG.o(.text+0xa00):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0xa08):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0xc70):drawing.c: undefined reference to `cvFillPoly’
/tmp/cc8ghTZG.o(.text+0xc7c):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0xc84):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0xdac):drawing.c: undefined reference to `cvCircle’
/tmp/cc8ghTZG.o(.text+0xdb8):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0xdc0):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x10c4):drawing.c: undefined reference to `cvInitFont’
/tmp/cc8ghTZG.o(.text+0x1118):drawing.c: undefined reference to `cvPutText’
/tmp/cc8ghTZG.o(.text+0x1124):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x112c):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x11b0):drawing.c: undefined reference to `cvInitFont’
/tmp/cc8ghTZG.o(.text+0x11cc):drawing.c: undefined reference to `cvGetTextSize’
/tmp/cc8ghTZG.o(.text+0x1214):drawing.c: undefined reference to `cvCloneImage’
/tmp/cc8ghTZG.o(.text+0x1330):drawing.c: undefined reference to `cvPutText’
/tmp/cc8ghTZG.o(.text+0x133c):drawing.c: undefined reference to `cvShowImage’
/tmp/cc8ghTZG.o(.text+0x1344):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x135c):drawing.c: undefined reference to `cvWaitKey’
/tmp/cc8ghTZG.o(.text+0x1364):drawing.c: undefined reference to `cvReleaseImage’
/tmp/cc8ghTZG.o(.text+0x136c):drawing.c: undefined reference to `cvReleaseImage’
/tmp/cc8ghTZG.o(.text+0x1374):drawing.c: undefined reference to `cvDestroyWindow’
/tmp/cc8ghTZG.o(.text.cvSubS[cvSubS]+0x110): In function `cvSubS’:
drawing.c: undefined reference to `cvAddS’
collect2: ld returned 1 exit status

All functions of the drawing.c are “undefined reference “, why? what I should do could sovle the problem? Thanks very much!

I get the following error after i have successfully installed openCV. Plz help..!

/home/pranit/Desktop/arm-2007q3/bin/arm-none-linux-gnueabi-g++ test.o -static -L”/home/pranit/Desktop/arm-2007q3/arm-none-linux-gnueabi/lib” -lcv -lhighgui -lcxcore -lml -lcvaux -lpthread -ldl -o test
/home/pranit/Desktop/arm-2007q3/arm-none-linux-gnueabi/lib/libcxcore.a(lib_cxcore_la-cxsystem.o): In function `cv::getTickCount()’:
cxsystem.cpp:(.text+0xa1c): undefined reference to `clock_gettime’
collect2: ld returned 1 exit status
make: *** [all] Error 1

Hi Anil, please try adding “-lrt” to the linker command and check if that fixes the issue.

Hey Igor! I have a question for you, regarding cross-compiling GTK. I am trying to cross compile OpenCV programs for the BeagleBoard xM (ARM8).

I have configured OpenCV by removing “–without-gtk”. This should mean that the cross-compiled program will have gtk support, right? However, how do I cross compile GTK for ARM on an Ubuntu 10.04 machine? I searched the net a LOT, but there are no real good guides – and I’m a beginner to linux. Could you help me out with this?

I cross compile using this command:

rex@ubuntu:~/Desktop/Project$ arm-none-linux-gnueabi-g++ -O2 -I /home/rex/Desktop/Project/opencv/include/opencv facedetect.cpp -L/home/rex/Desktop/Project/opencv/lib -lcv -lhighgui -lcxcore -lml -lcvaux -lrt -lpthread -ldl -lz -lpng12 -ljpeg -o facedetect -static

I’ll really appreciate your help. 🙂

Hi Igor,

First I set
jdoe@ubuntu:~/opencv-1.1.0$ export DEVROOT=/usr/local/poky/eabi-glibc
jdoe@ubuntu:~/opencv-1.1.0$ export APP_PREFIX=arm-none-linux-gnueabi
jdoe@ubuntu:~/opencv-1.1.0$ export GCC_HOST=i686-pc-linux-gnu
jdoe@ubuntu:~/opencv-1.1.0$ export OFLAGS=-O2

and then do (./configure…..)

jdoe@ubuntu:~/opencv-1.1.0$ ./configure –target=$APP_PREFIX –host=$APP_PREFIX –build=$GCC_HOST –disable-shared –enable-static –without-imageio –without-carbon –without-quicktime –without-python –without-swig –without-v4l –disable-apps –prefix=$DEVROOT/$APP_PREFIX CC=$DEVROOT/bin/$APP_PREFIX-gcc CXXFLAGS=”-fsigned-char $OFLAGS -pipe” LD=$DEVROOT/bin/$APP_PREFIX-ld CPP=$DEVROOT/bin/$APP_PREFIX-cpp CXXCPP=$DEVROOT/bin/$APP_PREFIX-cpp CXX=$DEVROOT/bin/$APP_PREFIX-g++ AR=$DEVROOT/bin/$APP_PREFIX-ar RANLIB=$DEVROOT/bin/$APP_PREFIX-ranlib NM=$DEVROOT/bin/$APP_PREFIX-nm STRIP=$DEVROOT/bin/$APP_PREFIX-strip AS=$DEVROOT/bin/$APP_PREFIX-as

configure: loading site script /usr/local/poky/eabi-glibc/site-config-arm-none-linux-gnueabi
checking build system type… i686-pc-linux-gnu
checking host system type… arm-none-linux-gnueabi
checking target system type… arm-none-linux-gnueabi
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for arm-none-linux-gnueabi-strip… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-strip
checking whether make sets $(MAKE)… (cached) yes
checking for C++ compiler default output file name… a.out
checking whether the C++ compiler works… yes
checking whether we are cross compiling… yes
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C++ compiler… yes
checking whether /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ accepts -g… yes
checking for style of include used by make… GNU
checking dependency style of /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++… gcc3
checking for arm-none-linux-gnueabi-gcc… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc
checking whether we are using the GNU C compiler… yes
checking whether /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc accepts -g… yes
checking for /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc option to accept ISO C89… none needed
checking dependency style of /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc… gcc3
checking how to run the C preprocessor… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-cpp
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ld used by /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld
checking if the linker (/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld) is GNU ld… yes
checking for /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld option to reload object files… -r
checking for BSD-compatible nm… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-nm
checking whether ln -s works… yes
checking how to recognize dependent libraries… pass_all
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking how to run the C++ preprocessor… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-cpp
checking for arm-none-linux-gnueabi-g77… no
checking for arm-none-linux-gnueabi-xlf… no
checking for arm-none-linux-gnueabi-f77… no
checking for arm-none-linux-gnueabi-frt… no
checking for arm-none-linux-gnueabi-pgf77… no
checking for arm-none-linux-gnueabi-cf77… no
checking for arm-none-linux-gnueabi-fort77… no
checking for arm-none-linux-gnueabi-fl32… no
checking for arm-none-linux-gnueabi-af77… no
checking for arm-none-linux-gnueabi-xlf90… no
checking for arm-none-linux-gnueabi-f90… no
checking for arm-none-linux-gnueabi-pgf90… no
checking for arm-none-linux-gnueabi-pghpf… no
checking for arm-none-linux-gnueabi-epcf90… no
checking for arm-none-linux-gnueabi-gfortran… no
checking for arm-none-linux-gnueabi-g95… no
checking for arm-none-linux-gnueabi-xlf95… no
checking for arm-none-linux-gnueabi-f95… no
checking for arm-none-linux-gnueabi-fort… no
checking for arm-none-linux-gnueabi-ifort… no
checking for arm-none-linux-gnueabi-ifc… no
checking for arm-none-linux-gnueabi-efc… no
checking for arm-none-linux-gnueabi-pgf95… no
checking for arm-none-linux-gnueabi-lf95… no
checking for arm-none-linux-gnueabi-ftn… no
checking for g77… no
checking for xlf… no
checking for f77… no
checking for frt… no
checking for pgf77… no
checking for cf77… no
checking for fort77… no
checking for fl32… no
checking for af77… no
checking for xlf90… no
checking for f90… no
checking for pgf90… no
checking for pghpf… no
checking for epcf90… no
checking for gfortran… no
checking for g95… no
checking for xlf95… no
checking for f95… no
checking for fort… no
checking for ifort… no
checking for ifc… no
checking for efc… no
checking for pgf95… no
checking for lf95… no
checking for ftn… no
checking whether we are using the GNU Fortran 77 compiler… no
checking whether accepts -g… no
checking the maximum length of command line arguments… 1572864
checking command to parse /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-nm output from /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc object… ok
checking for objdir… .libs
checking for arm-none-linux-gnueabi-ar… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ar
checking for arm-none-linux-gnueabi-ranlib… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ranlib
checking for arm-none-linux-gnueabi-strip… (cached) /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-strip
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions… no
checking for /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc option to produce PIC… -fPIC
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc PIC flag -fPIC works… yes
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc static flag -static works… yes
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc supports -c -o file.o… yes
checking whether the /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-gcc linker (/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… no
checking whether to build static libraries… yes
configure: creating libtool
appending configuration tag “CXX” to libtool
checking for ld used by /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++… /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld
checking if the linker (/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld) is GNU ld… yes
checking whether the /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ linker (/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld) supports shared libraries… yes
checking for /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ option to produce PIC… -fPIC
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ PIC flag -fPIC works… yes
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ static flag -static works… yes
checking if /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ supports -c -o file.o… yes
checking whether the /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ linker (/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs… immediate
appending configuration tag “F77” to libtool
checking for OpenMP support… no
checking whether to build debug version (no optimization)… no
configure: TARGET=arm-none-linux-gnueabi
checking for pow in -lm… yes
checking for dlopen in -ldl… yes
checking for pthread_create in -lpthread… yes
checking whether byte ordering is bigendian… (cached) no
checking for working alloca.h… yes
checking for alloca… yes
checking malloc.h usability… yes
checking malloc.h presence… yes
checking for malloc.h… yes
checking assert.h usability… yes
checking assert.h presence… yes
checking for assert.h… yes
checking for lrint… yes
checking for pkg-config… /usr/local/poky/eabi-glibc/bin/pkg-config
checking for “gtk+-2.0 gdk-pixbuf-2.0″… yes
checking GTK_CFLAGS… -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/gtk-2.0 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/lib/gtk-2.0/include -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/atk-1.0 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/cairo -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/pango-1.0 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/glib-2.0 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/lib/glib-2.0/include -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/pixman-1 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/freetype2 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/libpng12
checking GTK_LIBS… -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
checking for “gthread-2.0″… yes
checking GTHREAD_CFLAGS… -pthread -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/include/glib-2.0 -I/usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/usr/lib/glib-2.0/include
checking GTHREAD_LIBS… -pthread -lgthread-2.0 -lrt -lglib-2.0
checking ffmpeg/avcodec.h usability… no
checking ffmpeg/avcodec.h presence… no
checking for ffmpeg/avcodec.h… no
checking ffmpeg/swscale.h usability… no
checking ffmpeg/swscale.h presence… no
checking for ffmpeg/swscale.h… no
checking libraw1394/raw1394.h usability… no
checking libraw1394/raw1394.h presence… no
checking for libraw1394/raw1394.h… no
checking jpeglib.h usability… yes
checking jpeglib.h presence… yes
checking for jpeglib.h… yes
checking for jpeg_destroy_decompress in -ljpeg… yes
checking zlib.h usability… yes
checking zlib.h presence… yes
checking for zlib.h… yes
checking for gzopen in -lz… yes
checking png.h usability… yes
checking png.h presence… yes
checking for png.h… yes
checking libpng/png.h usability… no
checking libpng/png.h presence… no
checking for libpng/png.h… no
checking for png_read_image in -lpng12… yes
checking for png_get_valid… yes
checking for png_set_tRNS_to_alpha… yes
checking tiff.h usability… no
checking tiff.h presence… no
checking for tiff.h… no
checking jasper/jasper.h usability… no
checking jasper/jasper.h presence… no
checking for jasper/jasper.h… no
checking ImfCRgbaFile.h usability… no
checking ImfCRgbaFile.h presence… no
checking for ImfCRgbaFile.h… no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating opencv.pc
config.status: creating opencv.spec
config.status: creating docs/Makefile
config.status: creating data/Makefile
config.status: creating cxcore/Makefile
config.status: creating cxcore/include/Makefile
config.status: creating cxcore/src/Makefile
config.status: creating cv/Makefile
config.status: creating cv/include/Makefile
config.status: creating cv/src/Makefile
config.status: creating cvaux/Makefile
config.status: creating cvaux/include/Makefile
config.status: creating cvaux/src/Makefile
config.status: creating ml/Makefile
config.status: creating ml/include/Makefile
config.status: creating ml/src/Makefile
config.status: creating otherlibs/Makefile
config.status: creating otherlibs/highgui/Makefile
config.status: creating apps/Makefile
config.status: creating apps/haartraining/Makefile
config.status: creating apps/haartraining/include/Makefile
config.status: creating apps/haartraining/src/Makefile
config.status: creating interfaces/Makefile
config.status: creating interfaces/swig/Makefile
config.status: creating interfaces/swig/filtered/Makefile
config.status: creating interfaces/swig/general/Makefile
config.status: creating interfaces/swig/python/Makefile
config.status: creating interfaces/swig/octave/Makefile
config.status: creating tests/Makefile
config.status: creating tests/python/Makefile
config.status: creating tests/octave/Makefile
config.status: creating tests/cv/Makefile
config.status: creating tests/cv/src/Makefile
config.status: creating tests/cxts/Makefile
config.status: creating tests/cxcore/Makefile
config.status: creating tests/cxcore/src/Makefile
config.status: creating utils/Makefile
config.status: creating samples/Makefile
config.status: creating samples/c/Makefile
config.status: creating samples/python/Makefile
config.status: creating samples/octave/Makefile
config.status: creating cvconfig.h
config.status: executing depfiles commands

General configuration ================================================
Compiler: /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++
CXXFLAGS: -fsigned-char -O2 -pipe
DEF_CXXFLAGS: -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer
PY_CXXFLAGS: -Wall -pipe -O3 -fomit-frame-pointer
OCT_CXXFLAGS: -fno-strict-aliasing -Wall -Wno-uninitialized -pipe -O3 -fomit-frame-pointer

Install path: /usr/local/poky/eabi-glibc/arm-none-linux-gnueabi

HighGUI configuration ================================================

Windowing system ————–
Use Carbon / Mac OS X: no
Use gtk+ 2.x: yes
Use gthread: yes

Image I/O ———————
Use ImageIO / Mac OS X: no
Use libjpeg: yes
Use zlib: yes
Use libpng: yes
Use libtiff: no
Use libjasper: no
Use libIlmImf: no

Video I/O ———————
Use QuickTime / Mac OS X: no
Use xine: no
Use gstreamer: no
Use ffmpeg: no
Use dc1394 & raw1394: no
Use v4l: no
Use v4l2: no
Use unicap: no

Wrappers for other languages =========================================
SWIG
Python no
Octave no

Additional build settings ============================================
Build demo apps no

Now run make …

Then I run make and get error

jdoe@ubuntu:~/opencv-1.1.0$ make
make all-recursive
make[1]: Entering directory `/home/jdoe/opencv-1.1.0′
Making all in cxcore
make[2]: Entering directory `/home/jdoe/opencv-1.1.0/cxcore’
Making all in src
make[3]: Entering directory `/home/jdoe/opencv-1.1.0/cxcore/src’
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c -o dummy.lo dummy.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c dummy.cpp -o dummy.o
mv -f .deps/dummy.Tpo .deps/dummy.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c -o cxalloc.lo cxalloc.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c cxalloc.cpp -o cxalloc.o
mv -f .deps/cxalloc.Tpo .deps/cxalloc.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxarithm.lo -MD -MP -MF .deps/cxarithm.Tpo -c -o cxarithm.lo cxarithm.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxarithm.lo -MD -MP -MF .deps/cxarithm.Tpo -c cxarithm.cpp -o cxarithm.o
mv -f .deps/cxarithm.Tpo .deps/cxarithm.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxarray.lo -MD -MP -MF .deps/cxarray.Tpo -c -o cxarray.lo cxarray.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxarray.lo -MD -MP -MF .deps/cxarray.Tpo -c cxarray.cpp -o cxarray.o
mv -f .deps/cxarray.Tpo .deps/cxarray.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxcmp.lo -MD -MP -MF .deps/cxcmp.Tpo -c -o cxcmp.lo cxcmp.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxcmp.lo -MD -MP -MF .deps/cxcmp.Tpo -c cxcmp.cpp -o cxcmp.o
mv -f .deps/cxcmp.Tpo .deps/cxcmp.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxconvert.lo -MD -MP -MF .deps/cxconvert.Tpo -c -o cxconvert.lo cxconvert.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxconvert.lo -MD -MP -MF .deps/cxconvert.Tpo -c cxconvert.cpp -o cxconvert.o
mv -f .deps/cxconvert.Tpo .deps/cxconvert.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxcopy.lo -MD -MP -MF .deps/cxcopy.Tpo -c -o cxcopy.lo cxcopy.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxcopy.lo -MD -MP -MF .deps/cxcopy.Tpo -c cxcopy.cpp -o cxcopy.o
mv -f .deps/cxcopy.Tpo .deps/cxcopy.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdatastructs.lo -MD -MP -MF .deps/cxdatastructs.Tpo -c -o cxdatastructs.lo cxdatastructs.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdatastructs.lo -MD -MP -MF .deps/cxdatastructs.Tpo -c cxdatastructs.cpp -o cxdatastructs.o
mv -f .deps/cxdatastructs.Tpo .deps/cxdatastructs.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdrawing.lo -MD -MP -MF .deps/cxdrawing.Tpo -c -o cxdrawing.lo cxdrawing.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdrawing.lo -MD -MP -MF .deps/cxdrawing.Tpo -c cxdrawing.cpp -o cxdrawing.o
mv -f .deps/cxdrawing.Tpo .deps/cxdrawing.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdxt.lo -MD -MP -MF .deps/cxdxt.Tpo -c -o cxdxt.lo cxdxt.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxdxt.lo -MD -MP -MF .deps/cxdxt.Tpo -c cxdxt.cpp -o cxdxt.o
mv -f .deps/cxdxt.Tpo .deps/cxdxt.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxerror.lo -MD -MP -MF .deps/cxerror.Tpo -c -o cxerror.lo cxerror.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxerror.lo -MD -MP -MF .deps/cxerror.Tpo -c cxerror.cpp -o cxerror.o
mv -f .deps/cxerror.Tpo .deps/cxerror.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cximage.lo -MD -MP -MF .deps/cximage.Tpo -c -o cximage.lo cximage.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cximage.lo -MD -MP -MF .deps/cximage.Tpo -c cximage.cpp -o cximage.o
mv -f .deps/cximage.Tpo .deps/cximage.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxjacobieigens.lo -MD -MP -MF .deps/cxjacobieigens.Tpo -c -o cxjacobieigens.lo cxjacobieigens.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxjacobieigens.lo -MD -MP -MF .deps/cxjacobieigens.Tpo -c cxjacobieigens.cpp -o cxjacobieigens.o
mv -f .deps/cxjacobieigens.Tpo .deps/cxjacobieigens.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxlogic.lo -MD -MP -MF .deps/cxlogic.Tpo -c -o cxlogic.lo cxlogic.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxlogic.lo -MD -MP -MF .deps/cxlogic.Tpo -c cxlogic.cpp -o cxlogic.o
mv -f .deps/cxlogic.Tpo .deps/cxlogic.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxlut.lo -MD -MP -MF .deps/cxlut.Tpo -c -o cxlut.lo cxlut.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxlut.lo -MD -MP -MF .deps/cxlut.Tpo -c cxlut.cpp -o cxlut.o
mv -f .deps/cxlut.Tpo .deps/cxlut.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmathfuncs.lo -MD -MP -MF .deps/cxmathfuncs.Tpo -c -o cxmathfuncs.lo cxmathfuncs.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmathfuncs.lo -MD -MP -MF .deps/cxmathfuncs.Tpo -c cxmathfuncs.cpp -o cxmathfuncs.o
mv -f .deps/cxmathfuncs.Tpo .deps/cxmathfuncs.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmatmul.lo -MD -MP -MF .deps/cxmatmul.Tpo -c -o cxmatmul.lo cxmatmul.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmatmul.lo -MD -MP -MF .deps/cxmatmul.Tpo -c cxmatmul.cpp -o cxmatmul.o
mv -f .deps/cxmatmul.Tpo .deps/cxmatmul.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmatrix.lo -MD -MP -MF .deps/cxmatrix.Tpo -c -o cxmatrix.lo cxmatrix.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmatrix.lo -MD -MP -MF .deps/cxmatrix.Tpo -c cxmatrix.cpp -o cxmatrix.o
mv -f .deps/cxmatrix.Tpo .deps/cxmatrix.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmean.lo -MD -MP -MF .deps/cxmean.Tpo -c -o cxmean.lo cxmean.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmean.lo -MD -MP -MF .deps/cxmean.Tpo -c cxmean.cpp -o cxmean.o
mv -f .deps/cxmean.Tpo .deps/cxmean.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmeansdv.lo -MD -MP -MF .deps/cxmeansdv.Tpo -c -o cxmeansdv.lo cxmeansdv.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxmeansdv.lo -MD -MP -MF .deps/cxmeansdv.Tpo -c cxmeansdv.cpp -o cxmeansdv.o
mv -f .deps/cxmeansdv.Tpo .deps/cxmeansdv.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxminmaxloc.lo -MD -MP -MF .deps/cxminmaxloc.Tpo -c -o cxminmaxloc.lo cxminmaxloc.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxminmaxloc.lo -MD -MP -MF .deps/cxminmaxloc.Tpo -c cxminmaxloc.cpp -o cxminmaxloc.o
mv -f .deps/cxminmaxloc.Tpo .deps/cxminmaxloc.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxnorm.lo -MD -MP -MF .deps/cxnorm.Tpo -c -o cxnorm.lo cxnorm.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxnorm.lo -MD -MP -MF .deps/cxnorm.Tpo -c cxnorm.cpp -o cxnorm.o
mv -f .deps/cxnorm.Tpo .deps/cxnorm.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxouttext.lo -MD -MP -MF .deps/cxouttext.Tpo -c -o cxouttext.lo cxouttext.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxouttext.lo -MD -MP -MF .deps/cxouttext.Tpo -c cxouttext.cpp -o cxouttext.o
mv -f .deps/cxouttext.Tpo .deps/cxouttext.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxpersistence.lo -MD -MP -MF .deps/cxpersistence.Tpo -c -o cxpersistence.lo cxpersistence.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxpersistence.lo -MD -MP -MF .deps/cxpersistence.Tpo -c cxpersistence.cpp -o cxpersistence.o
mv -f .deps/cxpersistence.Tpo .deps/cxpersistence.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxprecomp.lo -MD -MP -MF .deps/cxprecomp.Tpo -c -o cxprecomp.lo cxprecomp.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxprecomp.lo -MD -MP -MF .deps/cxprecomp.Tpo -c cxprecomp.cpp -o cxprecomp.o
mv -f .deps/cxprecomp.Tpo .deps/cxprecomp.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxrand.lo -MD -MP -MF .deps/cxrand.Tpo -c -o cxrand.lo cxrand.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxrand.lo -MD -MP -MF .deps/cxrand.Tpo -c cxrand.cpp -o cxrand.o
mv -f .deps/cxrand.Tpo .deps/cxrand.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxsumpixels.lo -MD -MP -MF .deps/cxsumpixels.Tpo -c -o cxsumpixels.lo cxsumpixels.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxsumpixels.lo -MD -MP -MF .deps/cxsumpixels.Tpo -c cxsumpixels.cpp -o cxsumpixels.o
mv -f .deps/cxsumpixels.Tpo .deps/cxsumpixels.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxsvd.lo -MD -MP -MF .deps/cxsvd.Tpo -c -o cxsvd.lo cxsvd.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxsvd.lo -MD -MP -MF .deps/cxsvd.Tpo -c cxsvd.cpp -o cxsvd.o
mv -f .deps/cxsvd.Tpo .deps/cxsvd.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxswitcher.lo -MD -MP -MF .deps/cxswitcher.Tpo -c -o cxswitcher.lo cxswitcher.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxswitcher.lo -MD -MP -MF .deps/cxswitcher.Tpo -c cxswitcher.cpp -o cxswitcher.o
mv -f .deps/cxswitcher.Tpo .deps/cxswitcher.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxtables.lo -MD -MP -MF .deps/cxtables.Tpo -c -o cxtables.lo cxtables.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxtables.lo -MD -MP -MF .deps/cxtables.Tpo -c cxtables.cpp -o cxtables.o
mv -f .deps/cxtables.Tpo .deps/cxtables.Plo
/bin/sh ../../libtool –tag=CXX –mode=compile /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxutils.lo -MD -MP -MF .deps/cxutils.Tpo -c -o cxutils.lo cxutils.cpp
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../.. -DNDEBUG -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -MT cxutils.lo -MD -MP -MF .deps/cxutils.Tpo -c cxutils.cpp -o cxutils.o
mv -f .deps/cxutils.Tpo .deps/cxutils.Plo
/bin/sh ../../libtool –tag=CXX –mode=link /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -no-undefined -o lib_cxcore.la cxalloc.lo cxarithm.lo cxarray.lo cxcmp.lo cxconvert.lo cxcopy.lo cxdatastructs.lo cxdrawing.lo cxdxt.lo cxerror.lo cximage.lo cxjacobieigens.lo cxlogic.lo cxlut.lo cxmathfuncs.lo cxmatmul.lo cxmatrix.lo cxmean.lo cxmeansdv.lo cxminmaxloc.lo cxnorm.lo cxouttext.lo cxpersistence.lo cxprecomp.lo cxrand.lo cxsumpixels.lo cxsvd.lo cxswitcher.lo cxtables.lo cxutils.lo -lpthread -ldl -lm
mkdir .libs
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ar cru .libs/lib_cxcore.a cxalloc.o cxarithm.o cxarray.o cxcmp.o cxconvert.o cxcopy.o cxdatastructs.o cxdrawing.o cxdxt.o cxerror.o cximage.o cxjacobieigens.o cxlogic.o cxlut.o cxmathfuncs.o cxmatmul.o cxmatrix.o cxmean.o cxmeansdv.o cxminmaxloc.o cxnorm.o cxouttext.o cxpersistence.o cxprecomp.o cxrand.o cxsumpixels.o cxsvd.o cxswitcher.o cxtables.o cxutils.o
/usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-ranlib .libs/lib_cxcore.a
creating lib_cxcore.la
(cd .libs && rm -f lib_cxcore.la && ln -s ../lib_cxcore.la lib_cxcore.la)
/bin/sh ../../libtool –tag=CXX –mode=link /usr/local/poky/eabi-glibc/bin/arm-none-linux-gnueabi-g++ -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fsigned-char -O2 -pipe -no-undefined -version-info 2:0:0 -o libcxcore.la -rpath /usr/local/poky/eabi-glibc/arm-none-linux-gnueabi/lib dummy.lo lib_cxcore.la -lpthread -ldl -lm
libtool: link: cannot find the library `/home/eballetbo/release/purple-3.2/build/tmp-poky/cross/armv7a/arm-none-linux-gnueabi/lib/libstdc++.la’ or unhandled argument `/home/eballetbo/release/purple-3.2/build/tmp-poky/cross/armv7a/arm-none-linux-gnueabi/lib/libstdc++.la’
make[3]: *** [libcxcore.la] Error 1
make[3]: Leaving directory `/home/jdoe/opencv-1.1.0/cxcore/src’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jdoe/opencv-1.1.0/cxcore’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jdoe/opencv-1.1.0′
make: *** [all] Error 2

Any help with
libtool: link: cannot find the library `/home/eballetbo/release/purple-3.2/build/tmp-poky/cross/armv7a/arm-none-linux-gnueabi/lib/libstdc++.la’ or unhandled argument `/home/eballetbo/release/purple-3.2/build/tmp-poky/cross/armv7a/arm-none-linux-gnueabi/lib/libstdc++.la’

please

Thanks
Marko

Hi Ygor

Do you think with mini 2440 that would be possible to perform a live blob tracking (white dot on black background) at 30fps for a 240*240 video from cmos cam ?

Or totally irrealist ?

Thanks

Fred

Hi,Igor!
I try cross compile OpenCV-2.0.0
While “make”(after ./configure –host=arm-linux –disable-shared ) I get some error

/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgtk-x11-2.0

May be the problem in my toolchain?

Hi
I was trying to make openCV for CMUCAM 3. The arm toolchain is downloaded from CodeSourcery. As instructed above I am making the following changes and going ahead.
Since the CMUCAM toolchain is EABI and am working on linux x86 machine; The settings for me are as follows –

[/code]

# #### Linux host. EABI complier
# #export DEVROOT=~/home/vikram/CodeSourcery/Sourcery_G++_Lite
# #export APP_PREFIX=arm-none-eabi
# #export GCC_HOST=i686-redhat-linux-gnu
# ##-O3 kills gcc : cvpyrsegmentation.cpp:1021: internal compiler error: in verify_local_live_at_start, at flow.c:546
# #export OFLAGS=-O2

[code /]

The configure is taking successfully. But I am getting errors while make – ing the code. The errors are as follows –

[/code]

cxerror.cpp:96: error: ‘pthread_key_t’ does not name a type
cxerror.cpp:424: error: ‘g_TlsIndex’ was not declared in this scope
cxerror.cpp:424: error: ‘pthread_key_create’ was not declared in this scope

[code/]

The similar problem has been encountered before and I think this error is due to some lame mistake which am unable to think about . Please help !

vikram

I’m trying to stream 2 cameras connected to the same USB hub..
theoretically usb 2.0 is capable enough of sending 60MB/s of data through it.
but whenever i try to stream, it Throws up a error.
The error i get is
VIDIOC_QUERYMENU: Invalid argument
HIGHGUI ERROR: V4L: Property (5) not supported by device
libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON: No space left on device

I know the problem is coz of the usb hub as the hub puts all the usb hub devices on to the same bus. The code works fine if the cameras are connected over the native ports than through the usb hubs, I wonder y..
isn’t there any way out thorough this..??

Hellen, adding -lm after -lml should fix your linking error.
It’s not related to “–without-gtk” configuration parameter, but answering your second question – no, you can’t use HighUI functions, since you’ve disabled GTK usage – you will have to cross-compile or find elsewhere GTK (and its dependencies) for ARM to use OpenCV UI on your development board.

Got it,thank you~~

Francesco, I’d say that having face detection in 5-6 sec. on 60MHz ARM7 is very good results. ARM9 will certainly be faster, however my guess is that having FPU on board won’t speed up detection a lot. This is the case, when algorithm tweaking adds much more performance boost than simple HW changes.
You might want to experiment with OpenCV algorithms/cascades – in some cases decreasing detection quality (for example – increasing detection “window” size, or reducing number of stages in cascade) will result in significant performance gains.

Igor, another questions……. 🙂

where can I found the variables in charge of decreasing/increasing window size and the number of stages of the algorithm?

Where can I found a tutorial for OpenCV beginners (with regard to face detection)?

Thank you again

Francesco, window size I mentioned was a parameter for cvHaarDetectObjects(). You can find brief function description here http://opencv.willowgarage.com/documentation/pattern_recognition.html#cvHaarDetectObjects. “Number of stages” meant number of stages in cascade, that OpenCV uses to detect faces. Decreasing number of stages might improve detection speed on the price of detection quality (higher false positives ratio). You can get general idea of cascades from original Viola-Jones article named “Robust Real-time Object Detection” – just Google for “viola jones face detection”.
There is a book on OpenCV – “Learning OpenCV: computer vision with the OpenCV library” with limited preview available on GoogleBooks here, you might find it interesting.

It looks like a conflict between GTK and Glib. Newer versions of Glib deprecate macro G_GNUC_FUNCTION (see http://library.gnome.org/devel/glib/2.15/glib-Miscellaneous-Macros.html#G-GNUC-FUNCTION:CAPS ) and GTK DirectFB back end is always built with G_DISABLE_DEPRECATED defined.
Try modifying `/usr/gtkdfb/src/gtk+-2.10.13/gdk/directfb/Makefile *after* you ran ./configure and remove -DG_DISABLE_DEPRECATED from it.

actually I had given the wrong path..now I have cross compiled it successfully.

Thanks

Write a comment