08-14-2017 06:56 AM
After cross compiling openCV on ubuntu, I made an image and created an executable file about edge detection, but when I booted petalinux and mounted SD card on zc702, it couldn't work out. However, the executable is 32 bits and the file format is unix.
1. install xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin
2. install dependency libraries: zlib, jpeg, libpng, xvidcore, tiff, ffmpeg
3. cross compile openCV on ubuntu
4. make an image opencv_lib.img
5. cross compile edge_detection.cpp to create a executable file edge_detection.o
6. format SD card to fat32 and copy opencv_lib.img, edge_detection.o, lena.bmp to SD card, mount the SD card on ZC702
When I tried to execute edge_detection.o, it displayed: -sh: ./edge_detection.o: No such file or directory. Also, it couldn't mount opencv_lib.img.
I've worked on it for many days, thanks so much!
08-14-2017 09:07 AM
05-28-2018 07:59 PM
Because the cross compliers are different between arm-xilinx-linux-gnueabi- and arm-linux-gnueabihf-. You generate the opencv_lib with the former.But the system ZC702_2016_3 execute the elf with the latter。So you should regenerate the opencv_lib with cross compiler arm-linux-gnueabihf-. I tried that but failed in building progress, and i gave up as it cost too much time.