2006-06-28 12:54:08 OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 9866 Have anybody tried to compile OpenCV or other image processing library on uClinux? Or do something with object detection (e.g eyes detection) on Blackfin?
Laimonas
QuoteReplyEditDelete
2006-06-29 09:49:18 RE: OpenCV on uClinux
Yi Li (CHINA)
Message: 9919 I think currently there is no.
But you may try to build the library using blackfin uclinux toolchain.
I give it a try, you need first add in config.sub machine type "bfin" to make it recongnize "bfin-uclinux".
For many of the code using autoconf, this should be a quick fix.
Then ./configure --host=bfin-uclinux. However, it looks bfin-uclinux-g++ cannot compile it correctly.
If it is really a toolchain issue, you may report bug to the toolchain.
-Yi
QuoteReplyEditDelete
2006-06-29 10:12:07 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 9922 Yi:
Thanks, in next few days i will try
-Laimonas
QuoteReplyEditDelete
2006-10-13 05:57:03 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 14825 OpenCV compiles succesfully!!!
I compiled opencv-0.9.9 on 2006R1-RC2 toolchain and same release uClinux.
There is link to opencv-0.9.9 source:
prdownloads.sourceforge.net/opencvlibrary/opencv-0.9.9.tar.gz?download
Now i need to increase its perfomance, but still dont know how can i do that:)
Has anybody some suggestions?
Thanks,
Laimonas
QuoteReplyEditDelete
2006-10-13 07:36:34 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 14832 There is other discussion "Image processing library for the Blackfin" at blackfin.uclinux.org/forum/message.php?msg_id=14696
Laimonas
QuoteReplyEditDelete
2006-10-13 08:43:59 RE: OpenCV on uClinux
Yi Li (CHINA)
Message: 14837 docs.blackfin.uclinux.org/doku.php?id=optimization&s=optimize
may help. It would be nice if you could add in the wiki the steps to comile OpenCV on uClinux - people may be interested.
QuoteReplyEditDelete
2006-10-13 08:59:22 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 14838 Ok, i can add the steps to compile OpenCV on uClinux
Laimonas
QuoteReplyEditDelete
2006-10-13 09:02:51 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 14839 But first i want to try it on 2006R2 toolchain and uClinux
Laimonas
QuoteReplyEditDelete
2006-10-16 04:15:25 RE: OpenCV on uClinux
Robin Getz (UNITED STATES)
Message: 14948 Laimonas:
We have seen a moderate improvement in speed on many applications moving from gcc 3.4 to 4.1.
What were you using?
-Robin
QuoteReplyEditDelete
2006-10-17 12:35:45 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15072 Currently i used gcc 3.4 on 2006R1 toolchain and 2006R1 uClinux.
QuoteReplyEditDelete
2006-10-18 03:58:28 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15119 Hi Laimonas,
I copied the include files from folder "cv" and "cxcore" to my own folder, "opencv-0.9.9". Then create the source file "bf_edge.c" in the same directory. When I do a compile using the following command: bfin-uclinux-g++ -Wall -Wl,-elf2flt -o bf_edge bf_edge.c -I ./ -L./ -lpthread -lcv -lcxcore. I get error. Please see below:
[blackfinuser@mandrivalinux-00 opencv-0.9.9]$ bfin-uclinux-g++ -Wall -Wl,-elf2flt -o bf_edge bf_edge.c -I ./ -L./ -lpthread -lcv -lcxcore
/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5/../../../../bfin-uclinux/bin/ld.real: cannot find -lcv
collect2: ld returned 1 exit status
[blackfinuser@mandrivalinux-00 opencv-0.9.9]$
Also, I try to delete the -lcv and -lcxcore. Result is:
[blackfinuser@mandrivalinux-00 opencv-0.9.9]$ bfin-uclinux-g++ -Wall -Wl,-elf2flt -o bf_edge bf_edge.c -I ./ -L./ -lpthread
bf_edge.elf2flt(.text+0x17c): In function `_main':
: undefined reference to `_cvCreateImage'
bf_edge.elf2flt(.text+0x1a8): In function `_main':
: undefined reference to `_cvCreateImage'
bf_edge.elf2flt(.text+0x214): In function `_main':
: undefined reference to `_cvCanny'
bf_edge.elf2flt(.text+0x288): In function `_main':
: undefined reference to `_cvReleaseImage'
bf_edge.elf2flt(.text+0x294): In function `_main':
: undefined reference to `_cvReleaseImage'
collect2: ld returned 1 exit status
[blackfinuser@mandrivalinux-00 opencv-0.9.9]$
And I can see that the output files are gdb, elf2flt and elf format. May I know how to use them?
Please help. Thanks.
zhichien
QuoteReplyEditDelete
2006-10-18 07:07:15 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15127 zhichien:
You get error: "opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5/../../../../bfin-uclinux/bin/ld.real: cannot find -lcv"
It means, that linker did not find file libcv.a in your folder. This file is in "opencv-0.9.9/cv/src/.libs" folder, also you need libcxcore.a library file. This file is in "opencv-0.9.9/cxcore/src/.libs" folder.
In your folder you should have all header files from "opencv-0.9.9/cxcore/include" and "opencv-0.9.9/opencv-0.9.9/cv/include" folders.
After compiling and linking you should get file "bf_edge". This file is your executable file.
QuoteReplyEditDelete
2006-10-18 07:15:05 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15128 Hi Laimonas,
Thanks for reply.
May I know what is the .a file? I look into folder opencv-0.9.9/cv/src/ and opencv-0.9.9/cxcore/src/ directory. I coudn't find any.
zhichien
QuoteReplyEditDelete
2006-10-18 07:57:24 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15136 zhichien:
.a is library archive and libcv.a, libcxcore.a are in "opencv-0.9.9/cv/src/.libs" and
"opencv-0.9.9/cxcore/src/.libs" folders, not in "opencv-0.9.9/cv/src" and "opencv-0.9.9/cxcore/src" folders
QuoteReplyEditDelete
2006-10-18 09:20:23 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15142 Hi,
I can't see the .libs folder. I tried to view hidden files, not inside. Do you have any idea?
zhichien
QuoteReplyEditDelete
2006-10-18 10:21:08 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15151 Did you compiled OpenCV source?
In opencv-0.9.9 directory type such commands in console:
1)> ./configure --build=i686-pc-linux-gnu --host=bfin-uclinux
2)>make
QuoteReplyEditDelete
2006-10-19 01:49:52 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15192 Hi Laimonas,
I try to compile the OpenCV source and i gets this error:
_cv.cpp:70361: error: expected initializer before '*' token
_cv.cpp:70392: error: expected initializer before '*' token
####MORE ERROR HERE####
make[4]: *** [_cv_la-_cv.lo] Error 1
make[4]: Leaving directory `/home/blackfinuser/uClinux-dist/user/blkfin-apps/opencv-0.9.9/interfaces/swig/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/blackfinuser/uClinux-dist/user/blkfin-apps/opencv-0.9.9/interfaces/swig'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/blackfinuser/uClinux-dist/user/blkfin-apps/opencv-0.9.9/interfaces'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/blackfinuser/uClinux-dist/user/blkfin-apps/opencv-0.9.9'
make: *** [all] Error 2
Actually before the line also have error but i can't scroll up any more. Do you have any idea?
Thanks.
zhichien
QuoteReplyEditDelete
2006-10-19 02:47:12 RE: OpenCV on uClinux
wang wei (UNITED STATES)
Message: 15193 great !
openCV port to blackfin?
very good
good luck for you
QuoteReplyEditDelete
2006-10-19 02:51:26 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15195 Hi Laimonas,
I went into the opencv folders and found out that after the compilation(with error), I can see the ./libs folder. I copy the cv folder and cxcore folder into my folder("opencv"). I get this error while compiling. Please help, thanks.
[blackfinuser@mandrivalinux-00 opencv]$ bfin-uclinux-g++ -Wall -Wl,-elf2flt -o bf_edge bf_edge.c -I ./ -L./ -lpthread -lcv -lcxcore
/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5/../../../../bfin-uclinux/bin/ld.real: skipping incompatible .//libcv.a when searching for -lcv
/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5/../../../../bfin-uclinux/bin/ld.real: cannot find -lcv
collect2: ld returned 1 exit status
[blackfinuser@mandrivalinux-00 opencv]$ which bfin-uclinux-gcc
/opt/uClinux/bfin-uclinux/bin/bfin-uclinux-gcc
[blackfinuser@mandrivalinux-00 opencv]$
zhichien
QuoteReplyEditDelete
2006-10-19 07:21:44 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15208 zhichien:
did you use "configure" script with parameters --build=i686-pc-linux-gnu --host=bfin-uclinux
like this:
"./configure --build=i686-pc-linux-gnu --host=bfin-uclinux"
or just run "./configure" ?
I ask this question, because in error i see
"/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5/../../../../bfin-uclinux/bin/ld.real: skipping incompatible .//libcv.a when searching for -lcv" linker says, that it skips incompatible library.
Can you list all files, that exist in your "opencv" folder? Is libcv.a and libcxcore.a and bf_edge.c in the same "opencv" folder?
QuoteReplyEditDelete
2006-10-19 08:32:37 RE: OpenCV on uClinux
ZC L (SINGAPORE)
Message: 15216 Hi,
i ran this command: "./configure --build=i686-pc-linux-gnu --host=bfin-uclinux"
and 'libcv.a and libcxcore.a and bf_edge.c" all are in the same folder.
Will the toolchain version affect the outcome? I'm using 06R1.
zhichien
QuoteReplyEditDelete
2006-10-19 10:28:00 RE: OpenCV on uClinux
Laimonas Kumpys (LITHUANIA)
Message: 15238 zhichien:
i used 06R1 toolchain and now i use 06R2 toolchain. "bf_edge.c" example compiles succesfully on both toolchains. On my host i use Kubuntu 6.06 Linux distro. Sorry, i can not understand why you get such error using OpenCV.