Hello,
I have an application containing mix of C/C++, OpenCV 3.4.0, and CUDA code. I wish to deploy and execute this application on NVIDIA DRIVE PX 2. But my understanding of the build and deployment process is fuzzy.
So far, I have:
(1) installed OpenCV 3.4.0 on host using the instructions given at OpenCV: Installation in Linux and opencv - CMake Error: Variables are set to NOTFOUND - Stack Overflow
(2) built my application for execution on the host by linking it with OpenCV host (x86_64) libraries
Now the next step is to build the same application for the target.
I have read through the OpenCV installation detailed in https://devtalk.nvidia.com/default/topic/1032772/faq/cross-compiling-opencv-3-4-0-on-pdk-5-0-5-0/. Do I need to perform this installation on the host or the target? I am assuming host, since it says “cross compilation”, but I would appreciate it if someone can confirm this.
Assuming the answer to the above question is “host” and I cross-compile OpenCV for the target on the host, how do I build my application for the target? Instead of linking host (x86_64) libs, do I simply link the target (aarch64) libs? Again, I am only theorizing here, and would like confirmation.
So I covered: (a) OpenCV installation for host on host, and (b) OpenCV installation for target on host. The third piece of this puzzle is whether I need to install OpenCV on the target, viz., OpenCV installation for target on target. If I am cross-compiling my application for the target on the host, in principle, I should get an executable which can then be transferred to the target and executed without doing anything else. But some forum posts on this topic are creating confusion in my mind. So that is my last question - do I need to install OpenCV on the target and if yes, why?
Thank you.