Cross compile Opencv for IMX53.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cross compile Opencv for IMX53.

5,096 Views
hoanganhngo
Contributor III

Hi everybody,I need to build Opencv2.2 for LTIB.I found it in FTF_CON_F0321_OpenCVontheimx53QuickStartBoard.pdf by eric gregori but it's not cleary.Can anyone else help me this problem?.I have been search all topic on imxcommunity,but it have no result.

Labels (1)
0 Kudos
11 Replies

2,572 Views
FranciscoCarril
Contributor V

can you post that file?

2,572 Views
hoanganhngo
Contributor III

Hi FranciscoCarrillo

I found some information in this document:

http://www.google.com.vn/url?sa=t&rct=j&q=&esrc=s&source=web&cd=10&ved=0CGcQFjAJ&url=http%3A%2F%2Fww...

At slide 69,70,71,there're some guides to Cross compile Opencv2.2 for imx53 QSB LTIB,but it's not cleary.imxcommunity.org changed there interface,so that I could't find what Eric Gregori said in slide 70.

I have been search all disscusion in IMX53 QSB topic but i'm still stuck in this.

Please help me in this problem,thank you so much.

0 Kudos

2,572 Views
FranciscoCarril
Contributor V

Take a look to this post

Re: Missing Content "Cross Compiling Opencv2.2 for I.MX53 QSB"

This might help  to solve your issue.

0 Kudos

2,572 Views
hoanganhngo
Contributor III

Thanks Francisco Alberto Carrillo Dominguez,I have been try this so many time.But It doesn't work.It cross about 58% when i run "make",there're an error in module high gui,i think.

0 Kudos

2,572 Views
FranciscoCarril
Contributor V

Ok, I am going to try myself and keep you posted.

2,572 Views
hoanganhngo
Contributor III

Ohhhh yeahhhh....Thank you so much Francisco,thank you!!!....From the bottom of my heart.

0 Kudos

2,572 Views
FranciscoCarril
Contributor V
Re: Cross compile Opencv for IMX53.

hoanganh ngoLevel 1

Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/gbt.o

/home/windows/Downloads/OpenCV-2.2.0/modules/ml/src/gbt.cpp: In member function 'virtual void CvGBTrees::find_gradient(int)':

/home/windows/Downloads/OpenCV-2.2.0/modules/ml/src/gbt.cpp:474: error: 'expl' was not declared in this scope

make[2]: *** [modules/ml/CMakeFiles/opencv_ml.dir/src/gbt.o] Error 1

make[1]: *** [modules/ml/CMakeFiles/opencv_ml.dir/all] Error 2

make: *** [all] Error 2

windows@ubuntu:~/Downloads/OpenCV-2.2.0$


This can be fixed with the following modification:


> Change line 14 ofOpenCV-2.2.0/modules/ml/src/gbt.cppfrom "Android" to "1"

- before -

#if Android
#define expl(x) exp(x)
#endif

- after -

#if 1
#define expl(x) exp(x)
#endif

With this Change it should work for 100%

Good luck!!

Francisco


0 Kudos

2,572 Views
hoanganhngo
Contributor III

Hi Francisco.Thank you very much for your help,but I saw this errors in highgui at 58%.

pp:49:27: error: dc1394/dc1394.h: No such file or directory

/home/lucid/OpenCV22_CrossBuild/OpenCV-2.2.0/modules/highgui/src/cap_dc1394_v2.cpp:53: error: 'dc1394error_t' does not name a type

/home/lucid/OpenCV22_CrossBuild/OpenCV-2.2.0/modules/highgui/src/cap_dc1394_v2.cpp:126: error: 'dc1394error_t' does not name a type

/home/lucid/OpenCV22_CrossBuild/OpenCV-2.2.0/modules/highgui/src/cap_dc1394_v2.cpp:157: error: 'dc1394camera_t' was not declared in this scope

/home/lucid/OpenCV22_CrossBuild/OpenCV-2.2.0/modules/highgui/src/cap_dc1394_v2.cpp:157: error: 'camera' was not declared in this scope

I guess because I'm missing 2 patch. An error occurred when I try to down 2 patch from the link

wget http://imxcommunity.org/group/computervisionusingtheimx/forum/attachment/download?id=4103961%3AUploa...

wget http://imxcommunity.org/group/computervisionusingtheimx/forum/attachment/download?id=4103961%3AUploa...

Can you attach two patch used to build opencv for arm.Thank you so much.:D.

0 Kudos

2,572 Views
FranciscoCarril
Contributor V

This looks different, the patch will not fix your error. 

  I think you have other problem.   What is your CMAKE line you are using?

0 Kudos

2,572 Views
hoanganhngo
Contributor III

This is CMAKE line i used:

cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/home/lucid/ltib/rootfs/usr/ -DCMAKE_TOOLCHAIN_FILE:PATH=${PWD}/../imx53.cmake -DCMAKE_FIND_ROOT_PATH=/home/lucid/ltib/rootfs/ -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_PYTHON=OFF -DWITH_GTK=OFF -DBUILD_EXAMPLES=ON ..


Where can i put imx53.cmake file.Do i need to modify this file.An error occurred when systems build highgui lib i think.

0 Kudos

2,572 Views
FranciscoCarril
Contributor V

Hello!

The patch #2 is lost

but I generated this new one, this should help.

Please put it in:

OpenCV-2.2.0/modules/ml/src

Go to directory

OpenCV-2.2.0/modules/ml/src

run:

patch < gbt.patch

0 Kudos