Skip to content

Unable to include saliency module in custom OpenCV build (core,imgproc,objdetect) #4016

@Akhil-Chaturvedi

Description

@Akhil-Chaturvedi

Hello,

I’ve been trying to build a minimal OpenCV library for my Android app. My app directly uses the following modules:

  • From OpenCV core: core, imgproc, objdetect
  • From opencv_contrib: saliency

Since these depend on other modules, I also include: features2d, calib3d, flann, java.

The problem: after ~10 build attempts, the saliency module never seems to get compiled or included in the resulting build. I’ve tried multiple approaches:

  • Following YouTube tutorials
  • Repeating the full build process several times (including step-by-step runs assisted by Gemini 2.5 Pro and other AIs)
  • Adjusting CMake options to ensure OPENCV_EXTRA_MODULES_PATH points to opencv_contrib/modules

Despite that, I don’t see saliency in the final build output, while the other modules compile fine.

My questions:

  1. Is there a restriction or special requirement that prevents saliency from being compiled in a minimal build like this?
  2. Am I missing a simple step or flag that ensures saliency is included?
  3. Has anyone successfully built OpenCV with exactly this module set (core, imgproc, objdetect, saliency, and required deps)?

Any guidance would be greatly appreciated, I’m likely overlooking something small, but after many attempts I haven’t been able to get saliency working.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions