From 7e2f88ebb5bed3963c752a4db4446f3ae8368d38 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Sat, 10 Feb 2024 19:24:01 +0100 Subject: [PATCH] up --- CMakeLists.txt | 15 +++++++++++---- photo.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 photo.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e03cbc5..3bb9cc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,13 +15,11 @@ set(COMMON_SOURCES utils/utils.cpp ) -set(calibrationSources +add_executable(calibration ${COMMON_SOURCES} calibration.cpp ) -add_executable(calibration ${calibrationSources}) - target_link_libraries( calibration -llccv ${OpenCV_LIBS} ) # Project 2 sources and executable @@ -36,4 +34,13 @@ set(arucoDetectionSources add_executable(arucoDetector ${arucoDetectionSources}) -target_link_libraries( arucoDetector -llccv ${OpenCV_LIBS} ) \ No newline at end of file +target_link_libraries( arucoDetector -llccv ${OpenCV_LIBS} ) + +set(photo + ${COMMON_SOURCES} + photo.cpp +) + +add_executable(photo ${photo}) + +target_link_libraries( photo -llccv ${OpenCV_LIBS} ) \ No newline at end of file diff --git a/photo.cpp b/photo.cpp new file mode 100644 index 0000000..62558c8 --- /dev/null +++ b/photo.cpp @@ -0,0 +1,29 @@ +#include +#include + +void sleep(int ms){ + std::this_thread::sleep_for(std::chrono::milliseconds(ms)); +} + +int main() +{ + cv::Mat image; + lccv::PiCamera cam; + //cam.options->width=4056; + //cam.options->height=3040; + cam.options->photo_width=2028; + cam.options->photo_height=1520; + cam.options->verbose=true; + for(int i=0;i<30;i++){ + std::cout<