If we sell a product with OpenCV and it’s dependencies, do we need to make our code GPL?

Hi! This question is not related to programming. I can’t get any clear answer from anywhere else so I’m trying my luck here.

I’m trying to figure out if we can sell a hardware product with OpenCV and it’s dependencies pre-installed without making our code GPL. Although OpenCV itself is not GPL, some packages OpenCV depends on are under GPL. And since we are selling a proprietary device (instead of a service), we are required to make our code GPL if we are using GPL software. Does anyone know if this is accurate? If so, is there anyway to get around it? How do all the hardware startups deal with this matter?

I can’t “answer” legal questions because it’s a minefield.


so you probably don’t need to open your source.

you mention third party libraries used by OpenCV.

you may be able to live without a dependency that gives you trouble.

pay attention to any of those dependencies being LGPL.

also, if they’re linked dynamically, they can be GPL and not affect your application.

I can’t comment on specifics because that’d require knowing the dependency and its license.

you better talk to a lawyer for answers you can build a business on.

Thanks for the reply @crackwitz!

I’m wondering why is OpenCV not GPL/LGPL given that it depends on some GPL/LGPL packages. E.g. libopencv depends on QT which is LGPL in Conda environment.

Also, when I read the FAQ of GPL, it says dynamic link doesn’t make a difference regarding this matter. Frequently Asked Questions about the GNU Licenses - GNU Project - Free Software Foundation

Regarding LGPL - Why should I pay more attention to it? From my reading, LGPL seems less restrictive than GPL.

not true.
you may enhance your opencv app with qt gui, but it’s not a requirement to run computer-vision algorithms

opencv is a c++ library, whatever happens “in Conda environment” is out of control for the opencv devs (not maintained by them).
if conda ships gpl’d components, – there’s your problem
you should probably build (&distribute) your own cv2 to avoid problematic libs