Updating OpenCV package source code

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:

  1. Start Julia and type Pkg.dir("OpenCV").
  2. Navigate to the path displayed in the last step. Find the src folder to open the OpenCV package source code folder.
  3. Right-click on OpenCV_libs.jl and open in an editor such as Sublime, Visual Studio Code.
  4. On lines 12-29, you should find a list of modules the package will be loading from Open CV.
  5. 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"
]
  1. Also, adjust the version number according to the OpenCV version installed on your machine.
  2. Save the file and restart Julia.