2 Copyright (C) 2016 Daniel Watson
3 See the end of the file for license conditions.
6 GNU AGPLv3 (or later at your option)
7 project available here:
8 https://challenge-bot.com/
10 #include <opencv2/opencv.hpp>
15 int main(int argc
, char** argv
) {
17 cout
<< "supply a video device index." << endl
;
18 cout
<< "probably 0 for beaglebone, 1 for laptop" << endl
;
20 VideoCapture
camera(atoi(argv
[1]));
21 if(!camera
.isOpened()) {
22 cout
<< "not opened :( that's bad" << endl
;
27 cvtColor(frame
, grey_image
, CV_BGR2GRAY
);
29 imwrite("image.png", frame
);
30 imwrite("image-grey.png", grey_image
);
34 This file is part of challenge-bot.
36 Challenge-bot is free software: you can redistribute it and/or modify
37 it under the terms of the GNU Affero General Public License as published by
38 the Free Software Foundation, either version 3 of the License, or
39 (at your option) any later version.
41 Challenge-bot is distributed in the hope that it will be useful,
42 but WITHOUT ANY WARRANTY; without even the implied warranty of
43 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 GNU Affero General Public License for more details.
46 You should have received a copy of the GNU Affero General Public License
47 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.