# mtngardener's profile - activity

2013-06-15 00:08:46 -0600 commented answer How to go back to QT4 after failing to work with QT5?

Thanks! I didn't know how to set CMake variables. Is there a good way to do this from the CMake gui in Windows? I am never actually executing the CMake commands directly, just clicking the "configure" and "generate" buttons.

2013-06-15 00:05:55 -0600 answered a question Compilation problem with Qt in trunk version

For MS VS2012 Express I solved it the equivalent (I think) way of adding my Qt4\include directory to the VC++->common propeties-> "include directories" on the property sheet for both debug and release build configs.

2013-06-14 02:09:45 -0600 commented question How to go back to QT4 after failing to work with QT5?

I still can't answer my own questions, though I am a member now for much longer than two days =)

The answer is that you have to edit cmake/OpenCVFindLibsGUI.cmake to do this, or else delete all of the QT5 files. I didn't want to delete QT5 so I commented out the conditional at the beginning of that file which searches for QT5 packages, and if it finds them then it will cause you to use QT5:

if(WITH_QT)

# if(NOT CMAKE_VERSION VERSION_LESS 2.8.3 AND NOT WITH_QT EQUAL 4)

# find_package(Qt5Core) # find_package(Qt5Gui) # find_package(Qt5Widgets) #find_package(Qt5Test)

# set(HAVE_QT ON)

2013-06-13 20:20:29 -0600 asked a question How to go back to QT4 after failing to work with QT5?

I ran into issues with QT5, so I am trying to go back to QT4.

Somehow CMake still wants QT5 and I don't know how it knows QT5 was ever installed. How can I tell CMake to forget QT5?

Here is my failed CMake output (just the beginning):

CMake Warning at cmake/OpenCVFindLibsGUI.cmake:19 (find_package): By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Core", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Core" with any of the following names:

Qt5CoreConfig.cmake
qt5core-config.cmake

2013-06-05 00:16:06 -0600 commented question To run test.cpp from windows tutorial I had to edit include files. Why?

It appears that the answer might be that I should have been including via "Additional Include dirs" the full /install/include/opencv2/ directory. So really I did need to include the files, but it needs to be handled in a more general way. Somehow I missed this step in the tutorial.

2013-06-05 00:12:48 -0600 commented answer What is the purpose of _c.h files?

So I should be pointing my VS2012 project's "Additional Include Dirs" to "install/include/opencv2"? If I do that, then do I need any of the #include "opencv2/foo" statements?

2013-06-05 00:03:43 -0600 commented question What is the purpose of _c.h files?

It is version 2.4.9, I'd guess, since my lib files end with "249.lib".

2013-06-03 02:24:08 -0600 asked a question What is the purpose of _c.h files?

I am running into issues with my OpenCV install. Trying to run various tutorials I am getting errors during compilation where constants aren't defined. When I search for the definitions I find that they are in files that end with _c.h. These files don't seem to be included anywhere. I don't see how to build without including them, but for some of them, when I add them it just makes the problems worse (for example, including highgui_c.h fixes a problem, but including core_c.h causes a chain of additional requirements that seems insoluble).

What is the idea behind _c.h files? When should they be included? How should they be included?

I am running with VC2012 on Windows 7. I am able to build and run the example code. I am currently trying to get the Camera Calibration tutorial code to run:

http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html#source-code

2013-06-03 02:15:41 -0600 commented question To run test.cpp from windows tutorial I had to edit include files. Why?

I was right there is more going wrong. When I try and do the camera tutorial I end up with the same highgui_c issue, and also one with core_c.h that is worse.

2013-06-02 17:48:07 -0600 asked a question To run test.cpp from windows tutorial I had to edit include files. Why?

In order to build the test.cpp from:

http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

# include "opencv2/highgui/highgui_c.h"

This makes me worry that there is some underlying problem in my setup. Without this edit there were errors like "CV_CAP_PROP_FRAME_WIDTH isn't defined". The only place it appears to be defined is in highgui_c.h. And without this extra include highgui_c.h isn't included anywhere. Is there something I am missing?

Correction: You should instead add the %OPENCV_DIR% plus /bin variable you create to you %PATH% or else later on you won't find all your OpenCV DLLs at run time. So add "; %OPENCV_DIR%/bin" to path (leave out the quotes).

I have the answer, I posted it but I guess I am too new to answer my own question.

Short version is: Add environment variable manually via control panel -> system -> advanced system settings -> environment variables

You also need to add the new %OPENCV_DIR% plus /bin variable you create to you %PATH% or else later on you won't find all your OpenCV DLLs at run time. So add "; %OPENCV_DIR%/bin" to path (leave out the quotes).

2013-06-02 13:26:27 -0600 asked a question What is the right way to move the OpenCV binaries in Windows+VS?

I am a novice with VS2012 (and any development on Windows) but I have followed: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation

The documentation is great, but at the "Set the OpenCV enviroment variable and add it to the systems path" step it seems to be missing something. In the previous section it leaves your files in /Build/bin and in this next section it wants them in /build/{platform_type}/{compiler}.

How is this done correctly? By manually moving the files from various directories after the build+install? Or is there a way to configure the build+install to put the files in the /build/{platform_type}/{compiler} directory when "build install" is run?

C:\Users\mtngardener>setx -m OPENCV_DIR "c:\Users\mtngardener\built_apps\install\bin" ERROR: Access to the registry path is denied.

This is the same question as a previous poster had, but I can't use the "run as admin" option that was suggested there. However my sysadmin did add the ability for me to run regedit. So I believe I'd be able to make the update to the registry manually. Can someone tell me how to do the equivalent of "setx -m OPENCV_DIR "c:\Users\mtngardener\built_apps\install\bin"" with regedit?

Also, in the answer to the original question it was suggested that "you should use this path for environment variable: D:\OpenCV\Build{platform_type}{compiler_type}, e.g. D:\OpenCV\Build\x64\vc10."

How is this done correctly? By manually moving the files from various directories after the build+install? Or is there a way to configure the build+install to put the files in that directory when "build install" is run?

I am a novice with VS2012 (and any development on Windows) but I have followed: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation

The documentation is great, but at the "Set the OpenCV enviroment variable and add it to the systems path" step it seems to be missing something. In the previous section it leaves your files in /Build/bin and in this section it wants them in /build/{platform_type}/{compiler}.