apt-file

# install apt-file
sudo apt install apt-file

# shows all the files a package would install (binaries, headers, docs, etc.).
sudo apt-file update

dpkg

# list all files and paths installed by the package
dpkg -L libopencv-dev

# find the package responsible for a particular file
dpkg -S /usr/include/opencv2/opencv.hpp