mirror of
https://github.com/modelec/detection_pot.git
synced 2026-01-18 16:47:33 +01:00
create charuco board
This commit is contained in:
@@ -65,4 +65,13 @@ set(photo
|
||||
|
||||
add_executable(photo ${photo})
|
||||
|
||||
target_link_libraries( photo ${OpenCV_LIBS} )
|
||||
target_link_libraries( photo ${OpenCV_LIBS} )
|
||||
|
||||
set(createCharucoBoard
|
||||
${COMMON_SOURCES}
|
||||
createCharucoBoard.cpp
|
||||
)
|
||||
|
||||
add_executable(createCharucoBoard ${createCharucoBoard})
|
||||
|
||||
target_link_libraries( createCharucoBoard ${OpenCV_LIBS} )
|
||||
11
createCharucoBoard.cpp
Normal file
11
createCharucoBoard.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
int main() {
|
||||
cv::aruco::Dictionary dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_4X4_50);
|
||||
cv::aruco::CharucoBoard board(cv::Size(5, 7), 0.04f, 0.02f, dictionary);
|
||||
cv::Mat boardImage;
|
||||
board.generateImage(cv::Size(2480, 3508), boardImage, 10, 1);
|
||||
cv::imwrite("BoardImage.jpg", boardImage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user