-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Barna Keresztes
committed
Dec 17, 2021
1 parent
41ebcc0
commit 8b0b5bd
Showing
6 changed files
with
95 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <lccv.hpp> | ||
#include <opencv2/opencv.hpp> | ||
|
||
int main() | ||
{ | ||
std::cout<<"Sample program for LCCV video capture"<<std::endl; | ||
std::cout<<"Press ESC to stop."<<std::endl; | ||
cv::Mat image; | ||
lccv::PiCamera cam; | ||
cam.options->video_width=1024; | ||
cam.options->video_height=768; | ||
cam.options->framerate=5; | ||
cam.options->verbose=true; | ||
cv::namedWindow("Video",cv::WINDOW_NORMAL); | ||
cam.startVideo(); | ||
int ch=0; | ||
while(ch!=27){ | ||
if(!cam.getVideoFrame(image,1000)){ | ||
std::cout<<"Camera error"<<std::endl; | ||
} | ||
else{ | ||
cv::imshow("Video",image); | ||
ch=cv::waitKey(10); | ||
} | ||
} | ||
cam.stopVideo(); | ||
cv::destroyWindow("Video"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters