246
edits
No edit summary |
|||
Line 61: | Line 61: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
sudo apt install libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-imgcodecs-dev | sudo apt install libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-imgcodecs-dev | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 241: | Line 234: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For additional customization, you may refer to the following table of options: | For additional customization, you may refer to the following table of options: | ||
If you encounter the following issue with <code>opencv</code> in Ubuntu 22: | |||
<syntaxhighlight lang="bash"> | |||
fatal error: opencv2/opencv.hpp: No such file or directory | |||
19 | #include <opencv2/opencv.hpp> | |||
| ^~~~~~~~~~~~~~~~~~~~ | |||
</syntaxhighlight> | |||
Apply the following to the <code>pkgconfig/opencv.pc</code> file. The include path is wrong; it is <code>/usr/include/opencv4/</code>. So, in edit the <code>/usr/lib/pkgconfig/opencv4.pc</code> as: | |||
<syntaxhighlight lang=bash> | |||
- prefix=/usr/local | |||
+ prefix=/usr | |||
</syntaxhighlight> | |||
<center>` | <center>` |
edits