Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
playground:doxycode [2024/01/21 13:45] lprobsth1playground:doxycode [2024/01/21 15:06] (current) – fix language lprobsth1
Line 49: Line 49:
 } }
 </doxycode> | </doxycode> |
 +| Here the same example - but with linenumbers enabled. The doxycode code snippet uses the same XML cache file as the example above. ||
 | <file c [enable_line_numbers="true"] test2.c> | <file c [enable_line_numbers="true"] test2.c>
 #include "canopen_dictionary.h" #include "canopen_dictionary.h"
Line 96: Line 97:
 } }
 </doxycode> | </doxycode> |
 +| <WRAP>
 +The following example is taken from [[https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html]]. \\ The tag file from [[https://docs.opencv.org/4.8.0/opencv.tag]] is used for referencing the documentation. \\
 +Building the snippet through the task runner is enabled globally for the tag file.
 +</WRAP> ||
 +| <code c>
 +#include <opencv2/aruco.hpp>
 +cv::VideoCapture inputVideo;
 +inputVideo.open(0);
 +cv::aruco::DetectorParameters detectorParams = cv::aruco::DetectorParameters();
 +cv::aruco::Dictionary dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_6X6_250);
 +cv::aruco::ArucoDetector detector(dictionary, detectorParams);
  
- +while (inputVideo.grab()) { 
- +    cv::Mat image, imageCopy; 
- +    inputVideo.retrieve(image); 
-<doxycode tagfiles="opencv4.8.0" opencv.cpp>+    image.copyTo(imageCopy); 
 +    std::vector<int> ids; 
 +    std::vector<std::vector<cv::Point2f>> corners, rejected; 
 +    detector.detectMarkers(image, corners, ids, rejected); 
 +    // if at least one marker detected 
 +    if (ids.size() > 0) 
 +        cv::aruco::drawDetectedMarkers(imageCopy, corners, ids); 
 +    cv::imshow("out", imageCopy); 
 +    char key = (char) cv::waitKey(waitTime); 
 +    if (key == 27) 
 +        break; 
 +
 +</code><doxycode tagfiles="opencv4.8.0" language=cpp>
 #include <opencv2/aruco.hpp> #include <opencv2/aruco.hpp>
 cv::VideoCapture inputVideo; cv::VideoCapture inputVideo;
Line 123: Line 147:
         break;         break;
 } }
-</doxycode>+</doxycode> |
  
QR Code
QR Code playground:doxycode (generated for current page)