diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 7fd97b1d24..2dfbbb8620 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -20,6 +20,12 @@ if(DOXYGEN_FOUND) set(OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation") + set(OPENCV_DOCS_EXCLUDE_CUDA ON) + if(";${OPENCV_MODULES_EXTRA};" MATCHES ";cudev;") + set(OPENCV_DOCS_EXCLUDE_CUDA OFF) + list(APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "CUDA_MODULES") + endif() + # gathering headers set(paths_include) set(paths_doc) @@ -38,6 +44,15 @@ if(DOXYGEN_FOUND) if(EXISTS "${header_dir}") list(APPEND paths_include "${header_dir}") list(APPEND deps ${header_dir}) + if(OPENCV_DOCS_EXCLUDE_CUDA) + if(EXISTS "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda") + list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda") + endif() + file(GLOB list_cuda_files "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/*cuda*.hpp") + if(list_cuda_files) + list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST ${list_cuda_files}) + endif() + endif() endif() # doc folder set(docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc") @@ -124,6 +139,8 @@ if(DOXYGEN_FOUND) # set export variables string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_hal_interface} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial} ; ${tutorial_contrib_root}") string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial}") + string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXCLUDE_LIST "${CMAKE_DOXYGEN_EXCLUDE_LIST}") + string(REPLACE ";" " " CMAKE_DOXYGEN_ENABLED_SECTIONS "${CMAKE_DOXYGEN_ENABLED_SECTIONS}") # TODO: remove paths_doc from EXAMPLE_PATH after face module tutorials/samples moved to separate folders string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${example_path} ; ${paths_doc} ; ${paths_sample}") set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml") diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 1d2c43cbb1..df01651019 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -85,7 +85,7 @@ GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = +ENABLED_SECTIONS = @CMAKE_DOXYGEN_ENABLED_SECTIONS@ MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_FILES = YES @@ -104,7 +104,7 @@ INPUT = @CMAKE_DOXYGEN_INPUT_LIST@ INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = YES -EXCLUDE = +EXCLUDE = @CMAKE_DOXYGEN_EXCLUDE_LIST@ EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/* EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__* diff --git a/doc/tutorials/gpu/gpu-basics-similarity/gpu_basics_similarity.markdown b/doc/tutorials/gpu/gpu-basics-similarity/gpu_basics_similarity.markdown index 9452bc38d7..f3ee984d34 100644 --- a/doc/tutorials/gpu/gpu-basics-similarity/gpu_basics_similarity.markdown +++ b/doc/tutorials/gpu/gpu-basics-similarity/gpu_basics_similarity.markdown @@ -1,3 +1,4 @@ +@cond CUDA_MODULES Similarity check (PNSR and SSIM) on the GPU {#tutorial_gpu_basics_similarity} =========================================== @todo update this tutorial @@ -204,3 +205,4 @@ It may be just the improvement needed for your application to work. You may obse instance of this on the [YouTube here](https://www.youtube.com/watch?v=3_ESXmFlnvY). @youtube{3_ESXmFlnvY} +@endcond diff --git a/doc/tutorials/gpu/gpu-thrust-interop/gpu_thrust_interop.markdown b/doc/tutorials/gpu/gpu-thrust-interop/gpu_thrust_interop.markdown index 0332808cbb..9e47f095b5 100644 --- a/doc/tutorials/gpu/gpu-thrust-interop/gpu_thrust_interop.markdown +++ b/doc/tutorials/gpu/gpu-thrust-interop/gpu_thrust_interop.markdown @@ -1,3 +1,4 @@ +@cond CUDA_MODULES Using a cv::cuda::GpuMat with thrust {#tutorial_gpu_thrust_interop} =========================================== @@ -68,3 +69,4 @@ Next we will determine how many values are greater than 0 by using thrust::count We will use those results to create an output buffer for storing the copied values, we will then use copy_if with the same predicate to populate the output buffer. Lastly we will download the values into a CPU mat for viewing. +@endcond diff --git a/doc/tutorials/gpu/table_of_content_gpu.markdown b/doc/tutorials/gpu/table_of_content_gpu.markdown index 163f5e3b3f..8acd61780c 100644 --- a/doc/tutorials/gpu/table_of_content_gpu.markdown +++ b/doc/tutorials/gpu/table_of_content_gpu.markdown @@ -1,3 +1,4 @@ +@cond CUDA_MODULES GPU-Accelerated Computer Vision (cuda module) {#tutorial_table_of_content_gpu} ============================================= @@ -20,3 +21,4 @@ run the OpenCV algorithms. This tutorial will show you how to wrap a GpuMat into a thrust iterator in order to be able to use the functions in the thrust library. +@endcond diff --git a/doc/tutorials/introduction/transition_guide/transition_guide.markdown b/doc/tutorials/introduction/transition_guide/transition_guide.markdown index a1df271d7b..c0f063b2c5 100644 --- a/doc/tutorials/introduction/transition_guide/transition_guide.markdown +++ b/doc/tutorials/introduction/transition_guide/transition_guide.markdown @@ -236,7 +236,10 @@ for(;;){ CUDA {#tutorial_transition_hints_cuda} ---- -_cuda_ module has been split into several smaller pieces: + +CUDA modules has been moved into opencv_contrib repository. + +@cond CUDA_MODULES - _cuda_ - @ref cuda - _cudaarithm_ - @ref cudaarithm - _cudabgsegm_ - @ref cudabgsegm @@ -249,10 +252,7 @@ _cuda_ module has been split into several smaller pieces: - _cudastereo_ - @ref cudastereo - _cudawarping_ - @ref cudawarping - _cudev_ - @ref cudev - -`gpu` namespace has been removed, use cv::cuda namespace instead. Many classes has also been renamed, for example: -- `gpu::FAST_GPU` -> cv::cuda::FastFeatureDetector -- `gpu::createBoxFilter_GPU` -> cv::cuda::createBoxFilter +@endcond Documentation format {#tutorial_transition_docs} -------------------- diff --git a/doc/tutorials/tutorials.markdown b/doc/tutorials/tutorials.markdown index 53f8bc2694..5b9f58d377 100644 --- a/doc/tutorials/tutorials.markdown +++ b/doc/tutorials/tutorials.markdown @@ -76,11 +76,13 @@ As always, we would be happy to hear your comments and receive your contribution Learn how to create beautiful photo panoramas and more with OpenCV stitching pipeline. +@cond CUDA_MODULES - @subpage tutorial_table_of_content_gpu Squeeze out every little computational power from your system by utilizing the power of your video card to run the OpenCV algorithms. +@endcond - @subpage tutorial_table_of_content_ios