Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1639 Discussions

How to compile a C++ application that depends on OpenCV

BrayanAlfaro
Employee
479 Views

Hi,

 

I want to compile a C++ application that requires OpenCV. Is OpenCV available on DevCloud? What should be the include path to compile with g++? And how do I link the executable to the OpenCV libraries?

 

Thanks

0 Kudos
1 Solution
AlekhyaV_Intel
Moderator
416 Views

Hi,

 

OpenCV does not fall under the scope of oneAPI DevCloud. As such we will not install it.

oneAPI DevCloud users have the opportunity to build it from source.

Here's a general idea of the steps you can take in order to build it from source:

git clone https://github.com/opencv/opencv.git

cd opencv

mkdir build

cd build

cmake -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=ON ..

make -j$(nproc)

More info on the OpenCV official pages: https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html

 

If this resolves your issue, make sure to accept this as a solution. This helps others with similar issue.

 

Regards,

Alekhya

 

View solution in original post

0 Kudos
4 Replies
AlekhyaV_Intel
Moderator
453 Views

Hi,


Thank you for posting in Intel Communities. Could you please let us know which DevCloud you're using? Is it DevCloud for oneAPI or DevCloud for Edge or DevCloud for FPGA?


Regards,

Alekhya


Regards,

Alekhya


0 Kudos
BrayanAlfaro
Employee
421 Views

Hi,

 

It's DevCloud for oneAPI. So far, the only solution I've found is building OpenCV locally. Is there another way to use OpenCV in DevCloud for oneAPI?

 

Thanks,

Brayan

0 Kudos
AlekhyaV_Intel
Moderator
417 Views

Hi,

 

OpenCV does not fall under the scope of oneAPI DevCloud. As such we will not install it.

oneAPI DevCloud users have the opportunity to build it from source.

Here's a general idea of the steps you can take in order to build it from source:

git clone https://github.com/opencv/opencv.git

cd opencv

mkdir build

cd build

cmake -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=ON ..

make -j$(nproc)

More info on the OpenCV official pages: https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html

 

If this resolves your issue, make sure to accept this as a solution. This helps others with similar issue.

 

Regards,

Alekhya

 

0 Kudos
AlekhyaV_Intel
Moderator
390 Views

Hi,


Thank you for accepting our solution. If you need any further assistance, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Alekhya


0 Kudos
Reply