Ask Your Question

Arrigo's profile - activity

2015-02-27 22:03:26 -0600 asked a question createOptFlow_DualTVL1.cpp from opencv_matlab does not compile

After fixing all the problems with the MATLAB extension module already known and documented (like using Python 2.7 instead of 3.x, etc) I still get the error below when I build the opencv_matlab project with Visual Studio 2013 under Win 8. Any ideas about how to fix this is highly appreciated.

Thanks -Arrigo

1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------ 2>------ Build started: Project: opencv_matlab_sources, Configuration: Release x64 ------ 3>------ Build started: Project: opencv_matlab, Configuration: Release x64 ------ 3> Building Custom Rule C:/OpenCV-3.0.0-dev-contrib/modules/matlab/CMakeLists.txt 3> CMake does not need to re-run because C:\OpenCV-3.0.0-dev\build\modules\matlab\CMakeFiles\generate.stamp is up-to-date. 3> Compiling Matlab source files. This could take a while... 3> CMake Error at C:/OpenCV-3.0.0-dev-contrib/modules/matlab/compile.cmake:47 (message): 3> Failed to compile createOptFlow_DualTVL1: createOptFlow_DualTVL1.cpp 3>
3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(502) 3>CUSTOMBUILD : warning C4099: 'matlab::ArgumentParser::Variant' : type name first seen 3> using 'struct' now seen using 'class' 3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(488) : see declaration of 'matlab::ArgumentParser::Variant' 3>
3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(565) 3>CUSTOMBUILD : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of 3> data 3>
3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(567) 3>CUSTOMBUILD : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of 3> data 3>
3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(570) 3>CUSTOMBUILD : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of 3> data 3>
3>
3> c:\opencv-3.0.0-dev-contrib\modules\matlab\include\opencv2\matlab\mxarray.hpp(572) 3>CUSTOMBUILD : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of 3> data 3>
3>
3> C:\OpenCV-3.0.0-dev\build\modules\matlab\src\createOptFlow_DualTVL1.cpp(38) 3>CUSTOMBUILD : error C2065: 'Ptr_DualTVL1OpticalFlow' : undeclared identifier 3>
3>
3> C:\OpenCV-3.0.0-dev\build\modules\matlab\src\createOptFlow_DualTVL1.cpp(38) 3>: error C2146 : syntax error : missing ';' before identifier 'retval' 3>
3>
3> C:\OpenCV-3.0.0-dev\build\modules\matlab\src\createOptFlow_DualTVL1.cpp(38) 3>CUSTOMBUILD : error C2065: 'retval' : undeclared identifier 3>
3>
3> C:\OpenCV-3.0.0-dev\build\modules\matlab\src\createOptFlow_DualTVL1.cpp(43) 3>CUSTOMBUILD : error C2065: 'retval' : undeclared identifier 3>
3>
3> C:\OpenCV-3.0.0-dev\build\modules\matlab\src\createOptFlow_DualTVL1.cpp(53) 3>CUSTOMBUILD : error C2065: 'retval' : undeclared identifier 3>
3>
3>
3>
3>
3>
3>
========== Build: 2 succeeded, 1 failed, 24 up-to-date, 0 skipped ==========

2013-06-28 16:50:42 -0600 asked a question Why is Visual Studio running CMake?

Every time I build OpenCV from sources I see a lot dialogs popping up saying that CMake has modified some file and the solution is out of date. This happens also when CMake is not running at all. Why is that? Is Visual Studio running CMake in some post-compile script? Is this really necessary? I'm asking this since I'm still having problems building Opencv2.4.5 with GPU support under Visual Studio 2010. I swear that at some point when I reopened CMake after a build, some GPU configuration settings had values different from the values that I had originally set.

2013-06-26 12:03:29 -0600 asked a question OpenCV Error: Gpu API call in superres sample code

When I run superres_test.cpp from OpenCV 2.4.5 under VS 2010, Windows 8, I get this error:

Input           : C:test.avi [560 x 420]
Scale factor    : 2
Iterations      : 180
Temporal radius : 4
Optical Flow    : farneback
Mode            : GPU
[  0] : OpenCV Error: Gpu API call (invalid device function ) in unknown function, file c:\opencv-2.4.5\src\modules\gpu\include\opencv2\gpu\device\detail/transform_detail.hpp, line 361
OpenCV Error: Gpu API call

I am running this on a laptop with a NVIDIA Quadro K2000M GPU (capability 3.0)

Any ideas on how to debug this?

Thanks,

-Arrigo

2013-06-26 10:45:31 -0600 commented answer CV_NO_GUI_ERROR thrown on Windows 8

hi berak, that fixed it, thanks! I just created a Bug #3116 to report this problem.

2013-06-25 19:28:48 -0600 asked a question CV_NO_GUI_ERROR thrown on Windows 8

I have compiled from sources OpenCV 2.4.5 with Visual Studio 2010 under Windows 8. I have verified that the WITH_WIN32UI option is checked in the CMake configuration, however when I call imshow() I get:

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support ... , file ......\modules\highgui\src\window.cpp, line 501

I assume that the WITH_WIN32UI options refers to "Rebuild the library with Windows..."

Any ideas?

Thanks,

-Arrigo