https://github.com/Xilinx/xfopencv
のexamples/accmulateを試す。
0. SDxプロジェクトを作成→サンプルプロジェクトのファイルをインポート
Arty-Z7-20のPlatformを使って空のSDxプロジェクトを作成した。
File>Import>File system>を選択して、インポートするファイルを選ぶ。
xfopencv/examples/accumulateフォルダを選択し、
xf_accumulate_config.h
xf_accumulate_image_accel.cpp
xf_accumulate_image_tb.cpp
xf_config_params.h
xf_headers.h
をインポートした。
1.ヘッダのインクルードパスの設定
C/C++ Build Settings>SDS++ Compiler>Directoriesを選択
home/shohei/.Xilinx/SDx/2017.4/xfopencv/include を追加
2. リンカーのLibraries設定(Work in progress)
1. LibrariesとLibraries search path
2. Linker flagsでrpathを指定
の2つを行った。
libjpegやらがまだ読み込めていない。これについてはPetalinuxでLinuxイメージを作ってからやってみる。
3. xftypes.hの修正
common/xf_types.hでtypedefの重複のエラーがでる。(int32_tなど)
~/.Xilinx/SDx/2017.4/xfopencv/include/common/xf_types.h
のNative typesを以下のように全てコメントアウトした
// Xilinx headers #include <ap_int.h> #include <ap_fixed.h> #include <stdint.h> // Native types ->ここをコメントアウトする //typedef unsigned long uint64_t; //typedef unsigned int uint32_t; //typedef unsigned short uint16_t; //typedef long int int64_t; //typedef int int32_t; //typedef short int int16_t; //typedef unsigned char uchar_t; //typedef unsigned char uint8_t; //typedef signed char int8_t;
上のやり方は違っているようなのでやり直す→