Ask Your Question

jrbent's profile - activity

2017-04-15 10:15:17 -0600 commented question error when build opencv3.1 with contrib

I am also having this problem with 3.2 Did you find a solution? The link that berak posted doesn't apply. Thanks

2017-03-26 11:17:55 -0600 asked a question OpenCV installation error: SyntaxError related to python

Hi, I am trying to install openCV on a remote server, and I keep getting hung up at this error at 98% after running make.

Here is my cmake command

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/jbent1/local/opencv-master -DWITH_IPP=OFF -D WITH_LAPACK=OFF -D BUILD_PYTHON_SUPPORT=ON -D PYTHON3_EXECUTABLE=/home/jbent1/local/python/bin/python3 -D PYTHON3_LIBRARIES=/home/jbent1/local/python/lib/libpython3.4m.a -D PYTHONINTERP_FOUND=1 ..

The error message:

    Linking CXX shared library ../../lib/libopencv_videostab.so
[ 98%] Built target opencv_videostab
[ 98%] Generating pyopencv_generated_include.h, pyopencv_generated_funcs.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_ns_reg.h
Traceback (most recent call last):
  File "/home/jbent1/local/opencv-master/modules/python/python2/..//src2/gen2.py", line 4, in <module>
    import hdr_parser, sys, re, os
  File "/home/jbent1/local/opencv-master/modules/python/src2/hdr_parser.py", line 855
    has_mat = len(list(filter(lambda x: x[0] in {"Mat", "vector_Mat"}, args))) > 0
                                                      ^
SyntaxError: invalid syntax
make[2]: *** [modules/python2/pyopencv_generated_include.h] Error 1
make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2
make: *** [all] Error 2

Any help would be greatly appreciated, as I am totally confused by this. Thanks

2017-01-14 14:47:25 -0600 asked a question Error (undefined reference to 'main') in the eclipse CDT setup tutorial

Hi! I am trying to work through the "Using OpenCV with Eclipse (plugin CDT)" tutorial on this site I keep getting an error when I build the the project as is stated in the tutorial. The output is:

 **** Build of configuration Debug for project DisplayImage ****

make all 
Building file: ../src/DisplayImage.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/opencv -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/DisplayImage.d" -MT"src/DisplayImage.d" -o"src/DisplayImage.o" "../src/DisplayImage.cpp"
Finished building: ../src/DisplayImage.cpp

Building target: DisplayImage
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o"DisplayImage"  ./src/DisplayImage.o   -lopencv_core -lopencv_imgproc -lopencv_highgui
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
makefile:45: recipe for target 'DisplayImage' failed
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [DisplayImage] Error 1

The DisplayImage.cpp code is pasted directly from the tutorial, and the makefile, I suppose, was automatically generated in Eclipse. If anyone can help me with this, I would be very grateful! Thanks!