Ask Your Question
0

I want to run DisplayImage in another PC without installing OpenCv

asked 2019-03-08 05:36:24 -0600

Hi Everybody, This could be the dumbest query.

I have compiled my first opencv program, the DisplayImage one.

Now I would like to transfer that linux binary file to another PC so that I can run DisplayImage on that PC.

How can I do that? What should I do to achieve this small goal?

PC1. OpenCv and Ubuntu 16.04 installed. DisplayImage working fine.

PC2. Here I'll be using DisplayImage program. in this PC Opencv is not installed. Ubuntu 16.04 is installed.

Thanks...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-03-09 02:56:16 -0600

berak gravatar image

there are several "layers" of dependancies to an opencv program:

  1. the opencv libs
  2. 3rdparty helpers, like libjpeg
  3. 3rdparty libs, like fmpeg, gstreamer, gtk, qt

and ways trying to get around those (but it means, you have to go back to building opencv first):

  1. you can build the opencv libs using cmake -DBUILD_SHARED_LIBS=OFF. this won't need any .so 's at runtime, but you have to link your own program manually (careful, order of libs when linking matters !)

  2. while building the opencv libs (again !), you can choose flags like : cmake -DBUILD_JPEG=ON , so it won't rely on your system's (or rather- the other boxes' ) jpeg / png / zlib install

  3. this is, where you can't do much. if you linked your prog against gtk.X.X.X, you NEED the same version on your other box, too -- no way around it, unfortunately ;(

edit flag offensive delete link more

Comments

so you mean to say there is no clear way of doing this and even if I do it's not worth doing? This method would have reduced significant amount of time, and space. That would have increased productivity. In that case how do they write production level codes or how do they write codes that can be installed to another PC?

Prasanna Routray gravatar imagePrasanna Routray ( 2019-03-09 03:00:23 -0600 )edit

i did not say it's impossible, or not feasible.

all i'm saying is: you have to decide when building the opencv libs, what you're doing with it later (and try to remove dependancy problems as good as you can)

berak gravatar imageberak ( 2019-03-09 03:17:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-08 05:36:24 -0600

Seen: 218 times

Last updated: Mar 09 '19