Skip to content

opencv2/tracking/tracking_legacy.hpp requires private headers #19260

@luiscarox

Description

@luiscarox
System information (version)
  • OpenCV => 4.5.1
  • Operating System / Platform => Ubuntu 18.04
  • Compiler => gcc 8.4
Detailed description

In order to use cv::legacy::Tracker (https://docs.opencv.org/master/db/dfe/classcv_1_1legacy_1_1Tracker.html), I get a compiler error when including opencv2/tracking/tracking_legacy.hpp

In file included from /home/xxx/opencv-5.4.1/install/include/opencv4/opencv2/tracking/tracking_legacy.hpp:55
...
/home/xxx/opencv-5.4.1/install/include/opencv4/opencv2/tracking/tracking_internals.hpp:18:10: fatal error: opencv2/video/detail/tracking.private.hpp: No such file or directory
 #include "opencv2/video/detail/tracking.private.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steps to reproduce
  • Build OpenCV with opencv_contrib, ensure the tracking module is built
  • Run the install target and install into a location
  • Try to include tracking_legacy.hpp from the installed location (and NOT the opencv source folder)

The following code will trigger the compiler error:

#include <opencv2/tracking.hpp>
#include <opencv2/tracking/tracking_legacy.hpp>
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions