我在Ubuntu中運行了Ubuntu 12.04 32bit。在此之後我安裝了OpenCV 2.4.2(http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)。OpenCV 2.4.2 findContours拋出錯誤(使用CV示例編)
當我嘗試從CV-Page(http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html)運行findContours的示例時,它會編譯,但會在「findContours」調用中崩潰。
OpenCV Error: Assertion failed (k == STD_VECTOR_MAT) in release, file /build/build /opencv-2.3.1/modules/core/src/matrix.cpp, line 1364
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp:1364: error: (-215) k == STD_VECTOR_MAT in function release
我不知道,是什麼問題...
我運行Eclipse中的代碼。 CDT構建控制檯說:
make all
Building file: ../src/FrameTest.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/FrameTest.d" -MT"src/FrameTest.d" -o "src/FrameTest.o" "../src/FrameTest.cpp"
../src/FrameTest.cpp:26:2: warning: "/*" within comment [-Wcomment]
../src/FrameTest.cpp: In function ‘int main()’:
../src/FrameTest.cpp:319:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
../src/FrameTest.cpp: In function ‘void thresh_callback(int, void*)’:
../src/FrameTest.cpp:345:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Finished building: ../src/FrameTest.cpp
Building target: FrameTest
Invoking: Cross G++ Linker
g++ -L/home/ubu/workspace/opencv -L/usr/share -L/usr/share/doc/libcv-dev -L/lib -L/lib/i386-linux-gnu -L/home/ubu/OpenCV-2.4.2/include/opencv -L/home/ubu/OpenCV-2.4.2/include/opencv2 -o "FrameTest" ./src/FrameTest.o -lopencv_core -lopencv_highgui -lpthread -lopencv_imgproc
Finished building target: FrameTestenter code here
有人有個想法嗎?我從一箇舊的項目中使用CV2.2在VS2010中運行的其他代碼,它的工作原理... VStudio與Win與Eclipse和Ubuntu和Ubuntu的區別在哪裏?
到目前爲止感謝。
你說你安裝了OpenCV 2.4.2,但是在錯誤庫中找到opencv- 2.3.1左右請澄清這一點。 – isrish
是的,這肯定會有問題。我想卸載並重建最新版本。希望工程。 Thx – MiseriaCantare