Page 1 of 1

NanoPi M4 OpenCV setup

Posted: Sun May 24, 2020 9:21 am
by rorygodwin
I recently received my nanopi m4 to complete a project I'm working on using opencv for image processing however I cannot figure out what I need to do. The wiki says that openCV is preinstalled in the software but I cant find it. I then proceed to install eclipse and try to install the openCV master files that are needed. This is completed. So I follow the linux eclipse opencv guide for the first project however I cannot add libraries as the terminal command pkg-config --cflags opencv returns
"Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found"

Similarly the next command pkg-config --libs opencv returns a similar error. I have tried looking online at a number of forums to solve the issue however I have not made any progress.

Please could anyone offer help where possible especially if you have had the same issues or point me to something I'm missing.

Thank you very much.

Re: NanoPi M4 OpenCV setup

Posted: Tue Nov 21, 2023 9:47 am
by Tinto1967
If OpenCV is installed but not detected by pkg-config, you need to set the PKG_CONFIG_PATH environment variable to include the directory containing the OpenCV pkg-config file.

Re: NanoPi M4 OpenCV setup

Posted: Mon Oct 06, 2025 10:46 am
by smithcohn12
I had the same issue on my NanoPi M4; installing OpenCV via sudo apt install libopencv-dev and then exporting the path with export PKG_CONFIG_PATH=/usr/lib/pkgconfig before running Eclipse solved the problem for me.
wordle unlimited