Building OpenCV 3.4.6 under RTX64
NOTE: You only need to rebuild OpenCV if you wish to make changes to the source code provided.
To Access the RTX64 Vision OpenCV branch:
IntervalZero provides the latest modified OpenCV version for RTX64 Vision on GitHub.
- Open a Web browser and go to https://github.com/IntervalZero/opencv
- Download the 3.4 RTX64Vision branch
- Extract the zipped files to the desired location.
For information on OpenCV usage, visit https://opencv.org/license/.
To build OpenCV 3.4.6:
- Open the CMake user interface.
- Set Source Directory to the location of the extracted OpenCV files from above (\<opencv-3.4-Rtx64Vision>\).
- Set Destination Directory to the
RtxBuild
folder in the location of the extracted OpenCV files from above (\<opencv-3.4-Rtx64Vision>\). - Click Configure.
- Select the CMake compiler to use:
- Visual Studio 15 2017 (Win64 or x64)
- Visual Studio 14 2015 (Win64 or x64)
- Do the following:
- Select Specify toolchain file for cross-compiling and then click Next.
- Click Browse (...) and navigate to
\RtVision\3rdParty\OpenCV_3.4.6\platforms\rtx64\rtx64.toolchain.cmake
. - Click Finish.
You should end up with output similar to what is shown below:
NOTE: An error will appear if one of the tools required to build OpenCV is not found. If the RtxBuild directory does not yet exist, you will be asked to create one.
- Do the following:
- Select both the Grouped and Advanced checkboxes.
- Search for RTX64 and then enable WITH_RTX64_GIGE.
- Search for BUILD_SHARED and disable BUILD_SHARED_LIBS. The resulting output should appear as shown below:
- Search for BUILD_WITH_STATIC and make sure BUILD_WITH_STATIC_CRT is enabled. The resulting output should appear as shown below:
- Search for OPENCL and make sure all OPENCL settings are disabled. The resulting output should appear as shown below:
- Open the WITH section, and disable all settings except for:
- WITH_IPP
- WITH_PROTOBUF
- WITH_RTX64_GIGE
- Search for and disable BUILD_IPP_IW
- Search for CMAKE_C and then add /DUNDER_RTSS to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS.
- Remove /DWIN32 /D_WINDOWS for CMAKE_CXX_FLAGS and CMAKE_C_FLAGS. The resulting output should appear as shown below:
- Search for and disable CV_TRACE. The resulting output should appear as shown below:
- Close Visual Studio if it is open.
- Click Generate. The output should appear as shown below.
- Click Open Project to open the OpenCV project in Visual Studio.