mirror of
https://github.com/modelec/detection_pot.git
synced 2026-03-22 15:30:29 +01:00
up
This commit is contained in:
@@ -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} )
|
||||
target_link_libraries( arucoDetector -llccv ${OpenCV_LIBS} )
|
||||
|
||||
set(photo
|
||||
${COMMON_SOURCES}
|
||||
photo.cpp
|
||||
)
|
||||
|
||||
add_executable(photo ${photo})
|
||||
|
||||
target_link_libraries( photo -llccv ${OpenCV_LIBS} )
|
||||
29
photo.cpp
Normal file
29
photo.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <lccv.hpp>
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
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<<i<<std::endl;
|
||||
if(!cam.capturePhoto(image)){
|
||||
std::cout<<"Camera error"<<std::endl;
|
||||
}
|
||||
|
||||
cv::imwrite("calibration_images/"+std::to_string(i)+".jpg", image);
|
||||
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user