opencv_dnn module is placed in the secondary opencv_contrib repository, which isn't distributed in binary form, therefore you need to build it manually.
I recommend you follow these steps. Liunx users can also follow but there is a faster way
if you go back to the folder, "installOpencvWithModules", you will see a shell file called installopenCV.sh. all you need to do is
- Download that file, by either cloning the repository and taking it out or some other method.
- Open terminal or another command-line interpreter, then get to the directory where you saved the file
- Then type:
sudo chmod -x _path_installOpenCV.sh. for "path" replace it with the path file starting from your home folder Example:sudo chmod -x /home/"compuername"/Desktop/installOpenCV.sh - The type
sudo sh ./installopenCV.sh. This will actually install it. It might take while, and it might also ask for admin password so make sure to watch for that