OpenCV 5 is coming out soon. This will be a major release to celebrate 20th OpenCV anniversary! Besides many new features and improvements that OpenCV 5.0 (and, in general, OpenCV 5.x release series) will bring, such as better optimization for various architectures, support for new deep learning topologies, much improved 3D vision algorithms etc., the other important change that has been discussed for quite some time already and that we finally are going to make is to migrate OpenCV from 3-clause BSD license to Apache 2.
Why do we do that?
BSD is a good license that has been used in OpenCV from the very beginning of the project. It allows people to use the library in any kind of project, be it education, research, personal project or up to a commercial product, without any limitations. However, in 2020 it may not be completely adequate for the current state of the computer vision field which has developed rapidly during the past 2 decades (partially, thanks to OpenCV). In particular, BSD does not say anything about patents, which means that code under a BSD license may contain implementations of some patented algorithms, and so while the code itself is “free”, it’s not free in fact because patent owners may ask users of this software to license the contained patents. In computer vision nowadays more and more algorithms are patented ranging from traditional vision algorithms to deep learning topologies and hybrid approaches.
We have been thinking about possible solutions and found that Apache 2 is the most straightforward way to address this problem. Apache 2 is newer than BSD and, besides providing the same good free use properties of BSD license, it also contains dedicated clauses concerning patents. We refer you to the text of license and to the Wikipedia article for details and for a summary comparison of open source license, but concerning patents, the Apache 2 license has 2 clauses that roughly states:
1. If a person or entity contributes code under Apache 2, the users cannot be sued for breach of that entity’s patents in that contributed code or work derived from that code, as an implicit license to those included patents is granted.
2. If a person or entity (A) decides to sue someone or some entity (B) who creates a derived work from the code in (1) above that is covered by one of (A)’s patents, then (A) loses all their Apache 2 patent suit protections potentially opening them to other legal attacks.
Note that clause 2 is not actually necessary since the license is granted in clause 1, but this adds a further penalty for breaching clause 1. Note also that this does not prevent company (A) from suing company (B) for breach of (A)’s patents in general, only for first contributing code and then suing over patents in that contributed code. It is really a mechanism to enforce clean code contributions. Finally, this is not absolute protection, e.g. it does not help against patent trolls, but Apache 2 is the current state-of-art in this respect. So, it was quite easy to make this decision.
The migration process
Since BSD license only requires us to state that the code has been taken from the certain origin and to preserve the original copyright, and it does not require the derived software to be released under the same license, this is just what we are going to do.
After OpenCV 4.4 release (to be released this month), we are going to make immediate internal “fork” of OpenCV in the same repository, with the reference to the original license and all the original copyrights. Users, who absolutely need BSD license for their products (we believe, there will be not many such people), can continue to use OpenCV 2.x, OpenCV 3.x and OpenCV 4.x, up to OpenCV 4.4 inclusively.
Starting from OpenCV pre-5.0 (that will be developed in the newly created “next” branch) and OpenCV pre-4.5 (“master” branch) the license changes to Apache 2. Contributors of all new functionality will be required to agree to include their code under Apache 2 license instead of BSD. If real patent owners are different from the actual contributors, and they contact us later, we will offer them options, such as:
1. become co-contributors and thus get credit;
2. exclude the code from the repository, as we do now in the case of possible conflicts.
How will this change affect OpenCV users?
Nothing should change, in principle, business as usual but with additional protections against patent suits. OpenCV under Apache 2 license could still be freely used for both commercial and non-commercial projects.
If you have some questions or comments, please put them below, or in the corresponding ticket in our issue tracker here.