Doxygen tutorials: some fixes in RST-docs
This commit is contained in:
@@ -196,8 +196,9 @@ if(BUILD_DOCS AND HAVE_DOXYGEN)
|
|||||||
set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||||
set(rootfile "${CMAKE_CURRENT_BINARY_DIR}/root.markdown")
|
set(rootfile "${CMAKE_CURRENT_BINARY_DIR}/root.markdown")
|
||||||
set(bibfile "${CMAKE_CURRENT_SOURCE_DIR}/opencv.bib")
|
set(bibfile "${CMAKE_CURRENT_SOURCE_DIR}/opencv.bib")
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${paths_include} ; ${paths_doc}")
|
set(tutorial_path "${CMAKE_CURRENT_SOURCE_DIR}/tutorials")
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc}")
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${paths_include} ; ${paths_doc} ; ${tutorial_path}")
|
||||||
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path}")
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${CMAKE_SOURCE_DIR}/samples/cpp ; ${paths_doc}")
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${CMAKE_SOURCE_DIR}/samples/cpp ; ${paths_doc}")
|
||||||
set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml")
|
set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml")
|
||||||
set(CMAKE_DOXYGEN_OUTPUT_PATH "doxygen")
|
set(CMAKE_DOXYGEN_OUTPUT_PATH "doxygen")
|
||||||
@@ -214,8 +215,12 @@ if(BUILD_DOCS AND HAVE_DOXYGEN)
|
|||||||
configure_file(mymath.sty "${CMAKE_DOXYGEN_OUTPUT_PATH}/latex/mymath.sty" @ONLY)
|
configure_file(mymath.sty "${CMAKE_DOXYGEN_OUTPUT_PATH}/latex/mymath.sty" @ONLY)
|
||||||
|
|
||||||
add_custom_target(doxygen
|
add_custom_target(doxygen
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/samples" "${CMAKE_DOXYGEN_OUTPUT_PATH}/html/samples"
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/pattern.png" "${CMAKE_DOXYGEN_OUTPUT_PATH}/html"
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/acircles_pattern.png" "${CMAKE_DOXYGEN_OUTPUT_PATH}/html"
|
||||||
COMMAND ${DOXYGEN_BUILD} ${doxyfile}
|
COMMAND ${DOXYGEN_BUILD} ${doxyfile}
|
||||||
DEPENDS ${doxyfile} ${rootfile} ${bibfile} ${deps})
|
DEPENDS ${doxyfile} ${rootfile} ${bibfile} ${deps}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_DOC_GENERATOR)
|
if(HAVE_DOC_GENERATOR)
|
||||||
|
@@ -9,7 +9,8 @@ MathJax.Hub.Config(
|
|||||||
vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
|
vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
|
||||||
vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
|
vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
|
||||||
hdotsfor: ["\\dots", 1],
|
hdotsfor: ["\\dots", 1],
|
||||||
mathbbm: ["\\mathbb{#1}", 1]
|
mathbbm: ["\\mathbb{#1}", 1],
|
||||||
|
bordermatrix: ["\\matrix{#1}", 1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ Here is explained in detail the code for the real time application:
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/** Load a YAML file using OpenCV **/
|
/* Load a YAML file using OpenCV */
|
||||||
void Model::load(const std::string path)
|
void Model::load(const std::string path)
|
||||||
{
|
{
|
||||||
cv::Mat points3d_mat;
|
cv::Mat points3d_mat;
|
||||||
@@ -152,7 +152,7 @@ Here is explained in detail the code for the real time application:
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/** Load a CSV with *.ply format **/
|
/* Load a CSV with *.ply format */
|
||||||
void Mesh::load(const std::string path)
|
void Mesh::load(const std::string path)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ Here is explained in detail the code for the real time application:
|
|||||||
cv::setIdentity(KF.errorCovPost, cv::Scalar::all(1)); // error covariance
|
cv::setIdentity(KF.errorCovPost, cv::Scalar::all(1)); // error covariance
|
||||||
|
|
||||||
|
|
||||||
/** DYNAMIC MODEL **/
|
/* DYNAMIC MODEL */
|
||||||
|
|
||||||
// [1 0 0 dt 0 0 dt2 0 0 0 0 0 0 0 0 0 0 0]
|
// [1 0 0 dt 0 0 dt2 0 0 0 0 0 0 0 0 0 0 0]
|
||||||
// [0 1 0 0 dt 0 0 dt2 0 0 0 0 0 0 0 0 0 0]
|
// [0 1 0 0 dt 0 0 dt2 0 0 0 0 0 0 0 0 0 0]
|
||||||
@@ -579,7 +579,7 @@ Here is explained in detail the code for the real time application:
|
|||||||
KF.transitionMatrix.at<double>(11,17) = 0.5*pow(dt,2);
|
KF.transitionMatrix.at<double>(11,17) = 0.5*pow(dt,2);
|
||||||
|
|
||||||
|
|
||||||
/** MEASUREMENT MODEL **/
|
/* MEASUREMENT MODEL */
|
||||||
|
|
||||||
// [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
|
// [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
|
||||||
// [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
|
// [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
|
||||||
@@ -744,7 +744,6 @@ You can watch the real time pose estimation on the `YouTube here <http://www.you
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<iframe title="Pose estimation of textured object using OpenCV" width="560" height="349" src="http://www.youtube.com/embed/XNATklaJlSQ?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
|
<iframe title="Pose estimation of textured object using OpenCV" width="560" height="349" src="http://www.youtube.com/embed/XNATklaJlSQ?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</br></br>
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<iframe title="Pose estimation of textured object using OpenCV in cluttered background" width="560" height="349" src="http://www.youtube.com/embed/YLS9bWek78k?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
|
<iframe title="Pose estimation of textured object using OpenCV in cluttered background" width="560" height="349" src="http://www.youtube.com/embed/YLS9bWek78k?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -204,7 +204,7 @@ Explanation
|
|||||||
{
|
{
|
||||||
int lineType = 8;
|
int lineType = 8;
|
||||||
|
|
||||||
/** Create some points */
|
/* Create some points */
|
||||||
Point rook_points[1][20];
|
Point rook_points[1][20];
|
||||||
rook_points[0][0] = Point( w/4.0, 7*w/8.0 );
|
rook_points[0][0] = Point( w/4.0, 7*w/8.0 );
|
||||||
rook_points[0][1] = Point( 3*w/4.0, 7*w/8.0 );
|
rook_points[0][1] = Point( 3*w/4.0, 7*w/8.0 );
|
||||||
|
@@ -77,8 +77,8 @@ Code
|
|||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
double alpha; /**< Simple contrast control */
|
double alpha; /*< Simple contrast control */
|
||||||
int beta; /**< Simple brightness control */
|
int beta; /*< Simple brightness control */
|
||||||
|
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
|
@@ -133,5 +133,5 @@ Check out an instance of running the program on our `YouTube channel <http://www
|
|||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<iframe width="560" height="349" src="https://www.youtube.com/embed/7PF1tAU9se4?hd=1" frameborder="0" allowfullscreen></iframe>
|
<iframe width="560" height="349" src="https://www.youtube.com/embed/7PF1tAU9se4?hd=1" frameborder="0" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -151,7 +151,7 @@ Found matches
|
|||||||
A-KAZE Matching Results
|
A-KAZE Matching Results
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
::code-block:: none
|
.. code-block:: none
|
||||||
Keypoints 1: 2943
|
Keypoints 1: 2943
|
||||||
Keypoints 2: 3511
|
Keypoints 2: 3511
|
||||||
Matches: 447
|
Matches: 447
|
||||||
|
@@ -39,7 +39,7 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
void readme();
|
void readme();
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
if( argc != 3 )
|
if( argc != 3 )
|
||||||
@@ -80,7 +80,7 @@ This tutorial code's is shown lines below.
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function readme */
|
/* @function readme */
|
||||||
void readme()
|
void readme()
|
||||||
{ std::cout << " Usage: ./SURF_descriptor <img1> <img2>" << std::endl; }
|
{ std::cout << " Usage: ./SURF_descriptor <img1> <img2>" << std::endl; }
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
void readme();
|
void readme();
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
if( argc != 3 )
|
if( argc != 3 )
|
||||||
@@ -75,7 +75,7 @@ This tutorial code's is shown lines below.
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function readme */
|
/* @function readme */
|
||||||
void readme()
|
void readme()
|
||||||
{ std::cout << " Usage: ./SURF_detector <img1> <img2>" << std::endl; }
|
{ std::cout << " Usage: ./SURF_detector <img1> <img2>" << std::endl; }
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @file SURF_FlannMatcher
|
* @file SURF_FlannMatcher
|
||||||
* @brief SURF detector + descriptor + FLANN Matcher
|
* @brief SURF detector + descriptor + FLANN Matcher
|
||||||
* @author A. Huaman
|
* @author A. Huaman
|
||||||
@@ -45,7 +45,7 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
void readme();
|
void readme();
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
* @brief Main function
|
* @brief Main function
|
||||||
*/
|
*/
|
||||||
@@ -123,7 +123,7 @@ This tutorial code's is shown lines below.
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function readme
|
* @function readme
|
||||||
*/
|
*/
|
||||||
void readme()
|
void readme()
|
||||||
|
@@ -37,7 +37,7 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
void readme();
|
void readme();
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
if( argc != 3 )
|
if( argc != 3 )
|
||||||
@@ -131,7 +131,7 @@ This tutorial code's is shown lines below.
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function readme */
|
/* @function readme */
|
||||||
void readme()
|
void readme()
|
||||||
{ std::cout << " Usage: ./SURF_descriptor <img1> <img2>" << std::endl; }
|
{ std::cout << " Usage: ./SURF_descriptor <img1> <img2>" << std::endl; }
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void goodFeaturesToTrack_Demo( int, void* );
|
void goodFeaturesToTrack_Demo( int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -65,7 +65,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function goodFeaturesToTrack_Demo.cpp
|
* @function goodFeaturesToTrack_Demo.cpp
|
||||||
* @brief Apply Shi-Tomasi corner detector
|
* @brief Apply Shi-Tomasi corner detector
|
||||||
*/
|
*/
|
||||||
|
@@ -43,7 +43,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void goodFeaturesToTrack_Demo( int, void* );
|
void goodFeaturesToTrack_Demo( int, void* );
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
@@ -66,7 +66,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function goodFeaturesToTrack_Demo.cpp
|
* @function goodFeaturesToTrack_Demo.cpp
|
||||||
* @brief Apply Shi-Tomasi corner detector
|
* @brief Apply Shi-Tomasi corner detector
|
||||||
*/
|
*/
|
||||||
|
@@ -175,7 +175,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void cornerHarris_demo( int, void* );
|
void cornerHarris_demo( int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -193,7 +193,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function cornerHarris_demo */
|
/* @function cornerHarris_demo */
|
||||||
void cornerHarris_demo( int, void* )
|
void cornerHarris_demo( int, void* )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ Let's modify the program made in the tutorial :ref:`Adding_Images`. We will let
|
|||||||
Mat src2;
|
Mat src2;
|
||||||
Mat dst;
|
Mat dst;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function on_trackbar
|
* @function on_trackbar
|
||||||
* @brief Callback for trackbar
|
* @brief Callback for trackbar
|
||||||
*/
|
*/
|
||||||
|
@@ -92,11 +92,11 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
int const max_elem = 2;
|
int const max_elem = 2;
|
||||||
int const max_kernel_size = 21;
|
int const max_kernel_size = 21;
|
||||||
|
|
||||||
/** Function Headers */
|
/* Function Headers */
|
||||||
void Erosion( int, void* );
|
void Erosion( int, void* );
|
||||||
void Dilation( int, void* );
|
void Dilation( int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
@@ -136,7 +136,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function Erosion */
|
/* @function Erosion */
|
||||||
void Erosion( int, void* )
|
void Erosion( int, void* )
|
||||||
{
|
{
|
||||||
int erosion_type;
|
int erosion_type;
|
||||||
@@ -153,7 +153,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
imshow( "Erosion Demo", erosion_dst );
|
imshow( "Erosion Demo", erosion_dst );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function Dilation */
|
/* @function Dilation */
|
||||||
void Dilation( int, void* )
|
void Dilation( int, void* )
|
||||||
{
|
{
|
||||||
int dilation_type;
|
int dilation_type;
|
||||||
@@ -192,7 +192,7 @@ Explanation
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/** @function Erosion */
|
/* @function Erosion */
|
||||||
void Erosion( int, void* )
|
void Erosion( int, void* )
|
||||||
{
|
{
|
||||||
int erosion_type;
|
int erosion_type;
|
||||||
@@ -242,7 +242,7 @@ The code is below. As you can see, it is completely similar to the snippet of co
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/** @function Dilation */
|
/* @function Dilation */
|
||||||
void Dilation( int, void* )
|
void Dilation( int, void* )
|
||||||
{
|
{
|
||||||
int dilation_type;
|
int dilation_type;
|
||||||
|
@@ -140,7 +140,7 @@ Code
|
|||||||
int display_caption( char* caption );
|
int display_caption( char* caption );
|
||||||
int display_dst( int delay );
|
int display_dst( int delay );
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* function main
|
* function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
|
@@ -122,7 +122,7 @@ Code
|
|||||||
/// Function Headers
|
/// Function Headers
|
||||||
void Hist_and_Backproj(int, void* );
|
void Hist_and_Backproj(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Read the image
|
/// Read the image
|
||||||
@@ -150,7 +150,7 @@ Code
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function Hist_and_Backproj
|
* @function Hist_and_Backproj
|
||||||
* @brief Callback to Trackbar
|
* @brief Callback to Trackbar
|
||||||
*/
|
*/
|
||||||
|
@@ -96,7 +96,7 @@ Code
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
|
@@ -97,7 +97,7 @@ Code
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
Mat src, dst;
|
Mat src, dst;
|
||||||
|
@@ -150,7 +150,7 @@ Code
|
|||||||
/// Function Headers
|
/// Function Headers
|
||||||
void MatchingMethod( int, void* );
|
void MatchingMethod( int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load image and template
|
/// Load image and template
|
||||||
@@ -171,7 +171,7 @@ Code
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function MatchingMethod
|
* @function MatchingMethod
|
||||||
* @brief Trackbar callback
|
* @brief Trackbar callback
|
||||||
*/
|
*/
|
||||||
|
@@ -109,7 +109,7 @@ Code
|
|||||||
int kernel_size = 3;
|
int kernel_size = 3;
|
||||||
char* window_name = "Edge Map";
|
char* window_name = "Edge Map";
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function CannyThreshold
|
* @function CannyThreshold
|
||||||
* @brief Trackbar callback - Canny thresholds input with a ratio 1:3
|
* @brief Trackbar callback - Canny thresholds input with a ratio 1:3
|
||||||
*/
|
*/
|
||||||
@@ -129,7 +129,7 @@ Code
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
|
@@ -67,7 +67,7 @@ Code
|
|||||||
char* window_name = "copyMakeBorder Demo";
|
char* window_name = "copyMakeBorder Demo";
|
||||||
RNG rng(12345);
|
RNG rng(12345);
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ Code
|
|||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main ( int argc, char** argv )
|
int main ( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Declare variables
|
/// Declare variables
|
||||||
|
@@ -55,7 +55,7 @@ Code
|
|||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
Mat src, src_gray;
|
Mat src, src_gray;
|
||||||
|
@@ -66,7 +66,7 @@ Code
|
|||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
Mat src, src_gray, dst;
|
Mat src, src_gray, dst;
|
||||||
|
@@ -79,7 +79,7 @@ Code
|
|||||||
/// Function Headers
|
/// Function Headers
|
||||||
void update_map( void );
|
void update_map( void );
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
@@ -114,7 +114,7 @@ Code
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function update_map
|
* @function update_map
|
||||||
* @brief Fill the map_x and map_y matrices with 4 types of mappings
|
* @brief Fill the map_x and map_y matrices with 4 types of mappings
|
||||||
*/
|
*/
|
||||||
|
@@ -132,7 +132,7 @@ Code
|
|||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ Code
|
|||||||
char* warp_window = "Warp";
|
char* warp_window = "Warp";
|
||||||
char* warp_rotate_window = "Warp + Rotate";
|
char* warp_rotate_window = "Warp + Rotate";
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
Point2f srcTri[3];
|
Point2f srcTri[3];
|
||||||
@@ -141,7 +141,7 @@ Code
|
|||||||
/// Apply the Affine Transform just found to the src image
|
/// Apply the Affine Transform just found to the src image
|
||||||
warpAffine( src, warp_dst, warp_mat, warp_dst.size() );
|
warpAffine( src, warp_dst, warp_mat, warp_dst.size() );
|
||||||
|
|
||||||
/** Rotating the image after Warp */
|
/* Rotating the image after Warp */
|
||||||
|
|
||||||
/// Compute a rotation matrix with respect to the center of the image
|
/// Compute a rotation matrix with respect to the center of the image
|
||||||
Point center = Point( warp_dst.cols/2, warp_dst.rows/2 );
|
Point center = Point( warp_dst.cols/2, warp_dst.rows/2 );
|
||||||
|
@@ -134,10 +134,10 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
|
|
||||||
char* window_name = "Morphology Transformations Demo";
|
char* window_name = "Morphology Transformations Demo";
|
||||||
|
|
||||||
/** Function Headers */
|
/* Function Headers */
|
||||||
void Morphology_Operations( int, void* );
|
void Morphology_Operations( int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
@@ -169,7 +169,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function Morphology_Operations
|
* @function Morphology_Operations
|
||||||
*/
|
*/
|
||||||
void Morphology_Operations( int, void* )
|
void Morphology_Operations( int, void* )
|
||||||
@@ -227,7 +227,7 @@ Explanation
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function Morphology_Operations
|
* @function Morphology_Operations
|
||||||
*/
|
*/
|
||||||
void Morphology_Operations( int, void* )
|
void Morphology_Operations( int, void* )
|
||||||
|
@@ -97,7 +97,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
char* window_name = "Pyramids Demo";
|
char* window_name = "Pyramids Demo";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
|
@@ -42,7 +42,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void thresh_callback(int, void* );
|
void thresh_callback(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -64,7 +64,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function thresh_callback */
|
/* @function thresh_callback */
|
||||||
void thresh_callback(int, void* )
|
void thresh_callback(int, void* )
|
||||||
{
|
{
|
||||||
Mat threshold_output;
|
Mat threshold_output;
|
||||||
|
@@ -42,7 +42,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void thresh_callback(int, void* );
|
void thresh_callback(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -64,7 +64,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function thresh_callback */
|
/* @function thresh_callback */
|
||||||
void thresh_callback(int, void* )
|
void thresh_callback(int, void* )
|
||||||
{
|
{
|
||||||
Mat threshold_output;
|
Mat threshold_output;
|
||||||
|
@@ -40,7 +40,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void thresh_callback(int, void* );
|
void thresh_callback(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -62,7 +62,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function thresh_callback */
|
/* @function thresh_callback */
|
||||||
void thresh_callback(int, void* )
|
void thresh_callback(int, void* )
|
||||||
{
|
{
|
||||||
Mat canny_output;
|
Mat canny_output;
|
||||||
|
@@ -40,7 +40,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void thresh_callback(int, void* );
|
void thresh_callback(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -62,7 +62,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function thresh_callback */
|
/* @function thresh_callback */
|
||||||
void thresh_callback(int, void* )
|
void thresh_callback(int, void* )
|
||||||
{
|
{
|
||||||
Mat src_copy = src.clone();
|
Mat src_copy = src.clone();
|
||||||
|
@@ -42,7 +42,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
/// Function header
|
/// Function header
|
||||||
void thresh_callback(int, void* );
|
void thresh_callback(int, void* );
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// Load source image and convert it to gray
|
||||||
@@ -64,7 +64,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function thresh_callback */
|
/* @function thresh_callback */
|
||||||
void thresh_callback(int, void* )
|
void thresh_callback(int, void* )
|
||||||
{
|
{
|
||||||
Mat canny_output;
|
Mat canny_output;
|
||||||
|
@@ -32,7 +32,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
/// Create an image
|
/// Create an image
|
||||||
|
@@ -158,7 +158,7 @@ The tutorial code's is shown lines below. You can also download it from `here <h
|
|||||||
/// Function headers
|
/// Function headers
|
||||||
void Threshold_Demo( int, void* );
|
void Threshold_Demo( int, void* );
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
@@ -196,7 +196,7 @@ The tutorial code's is shown lines below. You can also download it from `here <h
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function Threshold_Demo
|
* @function Threshold_Demo
|
||||||
*/
|
*/
|
||||||
void Threshold_Demo( int, void* )
|
void Threshold_Demo( int, void* )
|
||||||
@@ -258,7 +258,7 @@ Explanation
|
|||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function Threshold_Demo
|
* @function Threshold_Demo
|
||||||
*/
|
*/
|
||||||
void Threshold_Demo( int, void* )
|
void Threshold_Demo( int, void* )
|
||||||
|
@@ -26,7 +26,7 @@ Example
|
|||||||
|
|
||||||
Image Watch works with any existing project that uses OpenCV image objects (for example, *cv::Mat*). In this example, we use a minimal test program that loads an image from a file and runs an edge detector. To build the program, create a console application project in Visual Studio, name it "image-watch-demo", and insert the source code below.
|
Image Watch works with any existing project that uses OpenCV image objects (for example, *cv::Mat*). In this example, we use a minimal test program that loads an image from a file and runs an edge detector. To build the program, create a console application project in Visual Studio, name it "image-watch-demo", and insert the source code below.
|
||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: cpp
|
||||||
|
|
||||||
// Test application for the Visual Studio Image Watch Debugger extension
|
// Test application for the Visual Studio Image Watch Debugger extension
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ Before continuing, do not forget to add the command line argument of your input
|
|||||||
|
|
||||||
Now set a breakpoint on the source line that says
|
Now set a breakpoint on the source line that says
|
||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: cpp
|
||||||
|
|
||||||
Mat edges;
|
Mat edges;
|
||||||
|
|
||||||
|
@@ -125,5 +125,5 @@ Check out an instance of running code with more Image Effects on `YouTube <http:
|
|||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<iframe width="560" height="350" src="http://www.youtube.com/embed/Ko3K_xdhJ1I" frameborder="0" allowfullscreen></iframe>
|
<iframe width="560" height="350" src="http://www.youtube.com/embed/Ko3K_xdhJ1I" frameborder="0" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -36,17 +36,17 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
/** Function Headers */
|
/* Function Headers */
|
||||||
void detectAndDisplay( Mat frame );
|
void detectAndDisplay( Mat frame );
|
||||||
|
|
||||||
/** Global variables */
|
/* Global variables */
|
||||||
String face_cascade_name = "haarcascade_frontalface_alt.xml";
|
String face_cascade_name = "haarcascade_frontalface_alt.xml";
|
||||||
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
||||||
CascadeClassifier face_cascade;
|
CascadeClassifier face_cascade;
|
||||||
CascadeClassifier eyes_cascade;
|
CascadeClassifier eyes_cascade;
|
||||||
String window_name = "Capture - Face detection";
|
String window_name = "Capture - Face detection";
|
||||||
|
|
||||||
/** @function main */
|
/* @function main */
|
||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
VideoCapture capture;
|
VideoCapture capture;
|
||||||
@@ -77,7 +77,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @function detectAndDisplay */
|
/* @function detectAndDisplay */
|
||||||
void detectAndDisplay( Mat frame )
|
void detectAndDisplay( Mat frame )
|
||||||
{
|
{
|
||||||
std::vector<Rect> faces;
|
std::vector<Rect> faces;
|
||||||
|
@@ -36,7 +36,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @class WTriangle
|
* @class WTriangle
|
||||||
* @brief Defining our own 3D Triangle widget
|
* @brief Defining our own 3D Triangle widget
|
||||||
*/
|
*/
|
||||||
@@ -46,7 +46,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
WTriangle(const Point3f &pt1, const Point3f &pt2, const Point3f &pt3, const viz::Color & color = viz::Color::white());
|
WTriangle(const Point3f &pt1, const Point3f &pt2, const Point3f &pt3, const viz::Color & color = viz::Color::white());
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function WTriangle::WTriangle
|
* @function WTriangle::WTriangle
|
||||||
*/
|
*/
|
||||||
WTriangle::WTriangle(const Point3f &pt1, const Point3f &pt2, const Point3f &pt3, const viz::Color & color)
|
WTriangle::WTriangle(const Point3f &pt1, const Point3f &pt2, const Point3f &pt3, const viz::Color & color)
|
||||||
@@ -90,7 +90,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
setColor(color);
|
setColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main()
|
int main()
|
||||||
|
@@ -28,7 +28,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main()
|
int main()
|
||||||
|
@@ -28,7 +28,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function cvcloud_load
|
* @function cvcloud_load
|
||||||
* @brief load bunny.ply
|
* @brief load bunny.ply
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +50,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
return cloud;
|
return cloud;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main(int argn, char **argv)
|
int main(int argn, char **argv)
|
||||||
|
@@ -28,7 +28,7 @@ You can download the code from :download:`here <../../../../samples/cpp/tutorial
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main()
|
int main()
|
||||||
|
Reference in New Issue
Block a user