0

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)

talonmies
  • 70,661
  • 34
  • 192
  • 269
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • 1
    [`getBuildInformation()`](https://docs.opencv.org/master/db/de0/group__core__utils.html#ga0ae377100bc03ce22322926bba7fdbb5) – Dan Mašek Apr 27 '21 at 13:20
  • 1
    There is generally an executable called `opencv_version` that comes with **OpenCV** (depending on how it was installed), so you can run `opencv_version -v` – Mark Setchell Apr 27 '21 at 15:05
  • @MarkSetchell Thanks! I used that too, it is very useful. One question, does this also give info on NEON or VFPV3? I dont notice any of these in the outut of opencv_version – KansaiRobot May 02 '21 at 14:01

1 Answers1

2

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

import cv2
print(cv2.getBuildInformtion())

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.

ravikt
  • 952
  • 6
  • 15
  • Thanks! I just read about this. Seems what I am looking for. However I found out that in the particular installation I have, opencv for python is not installed, so I cannot do this. I guess I ll have to write a C++ equivalent of this to check this out – KansaiRobot Apr 27 '21 at 23:41
  • @KansaiRobot yes. I have added a small update. It will do. – ravikt Apr 28 '21 at 04:36
  • Does this function give info on NEON or VFPV3? I have gotten the output but nothing is mentioned about those two. (TBB is mentioned as "Parallel Framework") – KansaiRobot May 02 '21 at 14:00
  • It should have shown. I am not sure about the reason in your case. In raspberry-pi it shows info on NEON, VFPV3 – ravikt May 03 '21 at 05:43
  • You mean is shows as "NEON off" ? Thanks for all your help. I have decided to go on, install (I think it would take a day?) opencv on a jetson AGX I have hear and then check what messages it gives – KansaiRobot May 04 '21 at 01:11