Add Inline OpenCV Documentation in Jupyter Notebook

https://docs.opencv.org/master/d4/db1/tutorial_documentation.html
https://xeus-cling.readthedocs.io/en/latest/inline_help.html

  1. Download and install Doxygen.
  2. Rebuild OpenCV source code with doc generation ON
# cd ~/Downloads/code/opencv/opencv/debugBuild
cmake -DBUILD_DOCS=ON .
  1. Run make doxygen to generate Doxygen documentation
make doxygen
  1. Copy Doxygen tags file just built to xeus-cling “data” directory.
cp /Users/nling/opencv/installation/OpenCV-master-debug/doc/doxygen/html/opencv.tag ${CONDA_PREFIX}/share/xeus-cling/tagfiles
  1. Create/Edit config tag file for OpenCV.
# vim ${CONDA_PREFIX}/etc/xeus-cling/tags.d/opencv.json
{
    "url": "https://docs.opencv.org/4.5.2/",
    "tagfile": "opencv.tag"
}

Note: file schema is not supported (file:///Users/nling/opencv/installation/OpenCV-master-debug/doc/doxygen/html/), see Inline documentation with file scheme url for more details.

  1. Verify inline doc.
?cv::Mat
?std::vector
?xt::xtensor

Now, you should be able to see the online documentation for Mat rendered onscreen right below the cell where ?cv:Mat locates in.

Jupyter Inline documentation.png

你可能感兴趣的:(Add Inline OpenCV Documentation in Jupyter Notebook)