Skip to content

Fix build: vendored sample helpers, locally-built OpenCV 4.14, working Release config - #3

Open
Piero-93 wants to merge 1 commit into
HPI-CH:mainfrom
Piero-93:fix/build-opencv-4.14-release
Open

Fix build: vendored sample helpers, locally-built OpenCV 4.14, working Release config#3
Piero-93 wants to merge 1 commit into
HPI-CH:mainfrom
Piero-93:fix/build-opencv-4.14-release

Conversation

@Piero-93

Copy link
Copy Markdown

Summary

Makes the project build out-of-the-box (Debug and Release, x64) on a current
Visual Studio 2022 / v143 toolchain, where the original sample_helper_includes
folder and a system-wide OpenCV 4.2 install are not available.

Changes

Build / project

  • OpenCV path centralized in a single $(OpenCVInstallDir) user-macro in the
    .vcxproj — change one value to point at your local OpenCV install.
  • Updated to OpenCV 4.14 built from source (opencv_world4140d.lib / opencv_world4140.lib),
    replacing the hard-coded opencv_world420d.lib / c:\opencv paths.
  • Release configuration now actually builds: it had no OpenCV wiring and was missing
    /std:c++17 (required by std::filesystem). Both are now set.
  • Post-build event copies the OpenCV runtime DLL next to the executable
    (it is not provided by the NuGet packages, unlike the Azure Kinect DLLs).
  • Removed duplicate NuGet .targets imports (silenced MSB4011 warnings).

Source

  • Switched the sample-helper includes from <...> to "..." and vendored
    BodyTrackingHelpers.h / Utilities.h into the repo root, since the upstream
    ..\sample_helper_includes folder is not present.
  • Removed dead #include "opencv2/calib3d.hpp" from image_extractor.cpp and
    pointcloud_extractor.cpp (calib3d is never used; avoids needing that module).

Repo hygiene

  • .gitignore: ignore the whole /.vs folder and /k4a.
  • Removed a redundant, partial local copy of the k4a/ headers (they are provided by
    the Microsoft.Azure.Kinect.Sensor NuGet package).

Docs

  • Added PREREQUISITES.md documenting build & runtime requirements, how to point
    the project at a local OpenCV install, and the Debug-vs-Release DLL naming.

Notes for reviewers

  • OpenCV is referenced from a local install via $(OpenCVInstallDir) (default
    C:\Temp\opencv\install). Adjust that one macro to your environment — see PREREQUISITES.md.
  • Only the core, imgproc, imgcodecs, highgui OpenCV modules are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant