OpenCV-based application deployment on DRIVE PX 2


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 and
(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 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.

Dear sagar.kirtany,

Could you please refer to the following link for your topics? Thanks.

Dear SteveNV,

The link you shared is a bit dated, and it talks about native compilation of OpenCV on DRIVE PX 2. I am not sure it is entirely relevant to the questions I have raised.

It is possible that my questions seem “dumb”, but I wish to clarify my understanding. So please help me out.

Thank you.