As programmers, we often find ourselves engrossed in the comfort of familiar development environments. We are accustomed to the architecture of the libraries we work with, the stack of languages used in the project, and we generally have a good understanding of how things function within the project. However, there are instances where we encounter situations that require us to work with unfamiliar libraries or language stacks. Depending on our experience and knowledge, completing such tasks may vary in terms of time and effort. Wouldn't it be amazing to have virtual assistance that could help us navigate through such situations? Many of you might have already guessed what I'm alluding to.

In this article, I will share my experience of contributing to OpenCV, a renowned open-source library, despite having limited knowledge of C++ and understanding its architecture. I achieved this with the assistance of ChatGPT, one of the available Large Language Models (LLMs)


Building OpenCV

Let's start with something simple - building OpenCV. While there are already ample resources available on building OpenCV locally, I'd like to showcase the remarkable capabilities of ChatGPT in handling this task effortlessly. By simply adjusting the prompt, ChatGPT can generate an installation guide for OpenCV on any platform, whether be it Windows, Linux, or Mac. The answers generated by the ChatGPT model will be included in an expand/collapse section since they are very long.

<aside> ⚠️ Note: This section of the blog was written using a free version of ChatGPT. As a result, some answers may be misleading. These answers will be marked with an **exclamation mark -**❗And will be accompanied by comments with correction.

</aside>

Prompt:

How to build OpenCV locally on Ubuntu, you can follow these steps?

Downside of using a model such as ChatGPT is that it might produce a result that is not entirely correct. If one does not know what the correct answer should look like it is a bit difficult to navigate with it. For example, The flags of the CMake are not as expected. Let clarify them

Prompt: