http://robosavvy.com/forum/viewtopic.php?p=32617
按照此篇的教學下載opencv2.0版,已經修改過 cxtypes.h 中的 程式碼,後才開始編譯
- #if ((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && \
- (_MSC_VER >= 1400 || defined CV_ICC)) \
- || (defined __SSE2__ && defined __GNUC__ && __GNUC__ >= 4)
- #include <emmintrin.h>
- #define CV_SSE2 1
- #else
- #define CV_SSE2 0
- #endif
複製代碼
修改成
- #if ((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && \
- (_MSC_VER >= 1400 || defined CV_ICC)) \
- || (defined __SSE2__ && defined __GNUC__ && __GNUC__ >= 4)
- //#include <emmintrin.h>
- #define CV_SSE2 0
- #else
- #define CV_SSE2 0
- #endif
- #undef __MMX__
- #undef __SSE__
-
複製代碼
並使用下列的設定值來組態opencv ./configure --prefix=/usr/local --enable-apps --enable-shared --with-ffmpeg --with-gnu-ld --with-x --without-quicktime CXXFLAGS=-fno-strict-aliasing
編譯完成後,在Roboard上執行下列命令
./facedetect --cascade="/usr/local/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" --scale=1.5 lena.jpg
得到下列的結果illegal instruction
請問有高手可以幫忙嗎? 謝謝 |