Is there a way to know the options with which OpenCV was installed?

I read that when installing OpenCV you can specify a series of options (use of CUDA, TBB, NEON, etc).

My question is, suppose I have access to a (ARM) machine, in which OpenCV is already installed. Is there a way to learn which options was OpenCV installed with? (for example does it use CUDA, etc)


  • Yes, there is a way. You can use getBuildInformation().

    import cv2

    In case of cpp,

    std::cout << cv::getBuildInformation() << std::endl;

    This will return information about cmake settings, version control, compiler flags, third-party libraries etc related to opencv installation.