Skip to content

Commit e6015d1

Browse files
committed
Few docs adjustments
1 parent 3c337af commit e6015d1

9 files changed

+41
-29
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
# How to launch
1+
# Image Grabber
2+
Image Grabber allows you to capture images (JPG) or video (AVI) with multiple Basler USB Cameras at once. It logs all
3+
captured data to a CSV file for later use.
24

5+
## How to launch
36
In the project root folder:
4-
1. cmake .
5-
2. make
6-
3. ./ImageGrabber
7+
1. Build and compile: `make`.
8+
2. Run with help: `./ImageGrabber -h`.
9+
3. Run with the arguments according to help: `./ImageGrabber ...`.
10+
4. Exit the app with `Ctrl+C`.
11+
12+
## Arguments
13+
* `-f` (`--framerate`) - Set framerate (fps) of recording (default: 25).
14+
* `-h` (`--help`) - Show help.
15+
* `-i` (`--image`) - Save images instead of video. Optional argument setting the image quality. Quality has to be
16+
between 0 and 100, the higher is the better (default: 95).
17+
* `-o` (`--output`) - Set folder for video/image and log output (default: out). This folder has to contain folders:
18+
img, log, vid.
19+
* `-v` (`--verbose`) - Print information about the camera state.

src/ArgumentsParser.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ArgumentsParser.cpp
5-
* @version 1.0
5+
* @version 2.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 03. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111

@@ -42,14 +42,14 @@ long long ArgumentsParser::LoadNumber(char *numberAsChars) {
4242

4343
void ArgumentsParser::PrintHelp() {
4444
cout << "IMAGE GRABBER" << endl <<
45-
"-f (framerate) Set framerate (fps) of recording (default: " << DEFAULT_FRAME_RATE << ")." << endl <<
46-
"-h (help) Show help." << endl <<
47-
"-i (image) Save images instead of video. Optional argument setting the image quality." << endl <<
48-
" Quality has to be between 0 and 100, the higher is the better (default: " <<
45+
"-f (--framerate) Set framerate (fps) of recording (default: " << DEFAULT_FRAME_RATE << ")." << endl <<
46+
"-h (--help) Show help." << endl <<
47+
"-i (--image) Save images instead of video. Optional argument setting the image quality." << endl <<
48+
" Quality has to be between 0 and 100, the higher is the better (default: " <<
4949
DEFAULT_IMG_QUALITY << ")." << endl <<
50-
"-o (output) Set folder for video/image and log output (default: " << DEFAULT_OUT_DIR << ")." << endl <<
51-
" This folder has to contain folders: img, log, vid." << endl <<
52-
"-v (verbose) Print information about the camera state." << endl;
50+
"-o (--output) Set folder for video/image and log output (default: " << DEFAULT_OUT_DIR << ")." << endl <<
51+
" This folder has to contain folders: img, log, vid." << endl <<
52+
"-v (--verbose) Print information about the camera state." << endl;
5353
}
5454

5555
bool ArgumentsParser::ProcessArguments(int argc, char *argv[]) {

src/ArgumentsParser.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ArgumentsParser.h
5-
* @version 1.0
5+
* @version 2.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 03. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
using namespace std;

src/ImageEventHandler.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ImageEventHandler.cpp
5-
* @version 1.0
5+
* @version 2.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 02. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
#include <iostream>
@@ -130,7 +130,7 @@ void ImageEventHandler::OnImageGrabbed(
130130
imwrite(imgNameString, imgMat, vector<int>({IMWRITE_JPEG_QUALITY, imgQuality}));
131131

132132
timestampFile << "\"img\"," << cameraSerialNum << ",\"" << imgNameString << "\","
133-
<< timestamp << ",\"" << datetimeString << "\"\n";
133+
<< timestamp << ",\"" << datetimeString << "\"" << endl;
134134
} else {
135135
vidOutput.write(imgMat);
136136

@@ -140,9 +140,8 @@ void ImageEventHandler::OnImageGrabbed(
140140
string vidNameString = vidNameStream.str();
141141

142142
timestampFile << "\"vid\"," << cameraSerialNum << ",\"" << vidNameString << "\","
143-
<< timestamp << ",\"" << datetimeString << "\"\n";
143+
<< timestamp << ",\"" << datetimeString << "\"" << endl;
144144
}
145-
timestampFile.flush();
146145

147146
if (verbose) {
148147
cout << "Camera " << cameraSerialNum << " grabbed image at " <<

src/ImageEventHandler.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ImageEventHandler.h
5-
* @version 1.0
5+
* @version 2.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 02. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
#include <iostream>

src/ImageGrabber.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ImageGrabber.cpp
5-
* @version 2.0
5+
* @version 3.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 03. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
#include <iostream>

src/ImageGrabber.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file ImageGrabber.h
5-
* @version 1.0
5+
* @version 3.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 02. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
#include <iostream>

src/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file main.cpp
5-
* @version 2.0
5+
* @version 3.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
8-
* @date 03. 04. 2021
8+
* @date 27. 04. 2021
99
*/
1010

1111
#include <iostream>

src/main.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Image Grabber
33
* Application for grabbing images from Basler cameras using Pylon API.
44
* @file main.h
5-
* @version 1.0
5+
* @version 3.0
66
* @author Daniel Konecny (xkonec75)
77
* @organisation Brno University of Technology - Faculty of Information Technologies
88
* @date 02. 04. 2021

0 commit comments

Comments
 (0)