In order to get Open CV modules used in this chapter, we need to modify the source code of the package and add those that are missing:
- Start Julia and type Pkg.dir("OpenCV").
- Navigate to the path displayed in the last step. Find the src folder to open the OpenCV package source code folder.
- Right-click on OpenCV_libs.jl and open in an editor such as Sublime, Visual Studio Code.
- On lines 12-29, you should find a list of modules the package will be loading from Open CV.
- Update the list to include dnn after imgproc.
Look at the following example on how the list should look:
libNames = [
"shape",
"stitching",
"objdetect",
"superres",
"videostab",
"calib3d",
"features2d",
"highgui",
"videoio",
"imgcodecs",
"video",
"photo",
"ml",
"imgproc",
"dnn",
#"flann", // TODO: resolve typeid error due to rtti flag
"viz"
]
- Also, adjust the version number according to the OpenCV version installed on your machine.
- Save the file and restart Julia.