Skip to content

Commit a45d7c2

Browse files
committed
RobotsAlgorithm backup BP WR-I 02-11
1 parent d126309 commit a45d7c2

File tree

348 files changed

+25875
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+25875
-0
lines changed

CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
set(CMAKE_VERBOSE_MAKEFILE ON)
4+
set(THREADS_PREFER_PTHREAD_FLAG ON)
5+
6+
set(CMAKE_SOURCE_DIR ../src/)
7+
8+
project( Robots-Algorithm )
9+
10+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++17 -Wconversion -Wall -Werror -Wextra")
11+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++17 -Wconversion -Wall -Werror -Wextra")
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wconversion -Wall -Werror -Wextra -g")
13+
14+
find_package( OpenCV 3 REQUIRED )
15+
find_package( Threads REQUIRED)
16+
17+
include_directories( ${OpenCV_INCLUDE_DIRS} )
18+
add_executable( RobotAlgorithm src/main.cpp src/FilterExecutor.cpp src/Application.cpp src/BatchApplication.cpp src/InteractiveApplication.cpp src/Specification.cpp src/Parser.cpp src/Detection.cpp src/Extraction.cpp src/CalibrationMode.cpp)
19+
target_link_libraries( RobotAlgorithm ${OpenCV_LIBS} Threads::Threads )

Doxyfile

+2,414
Large diffs are not rendered by default.

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# World of Robots - Robots
2+
3+
## Authors: Jorn Brouwer & Ties Klappe
4+
## Date: 16-03-2018
5+
6+
## To build the application the following prerequisites have to be met
7+
8+
1. Operating system Linux Debian Stable or Ubuntu 17.04 LTS
9+
2. Installed GCC compiler, version 6.3 or higher
10+
3. OpenCV 3.0 or higher
11+
4. CMake 2.8 or higher
12+
13+
14+
## Build instructions
15+
16+
1. Open a terminal and go to the root directory of this repository
17+
2. Create and enter a build directory by running: ** "mkdir build && cd build" **
18+
3. Run ** "cmake ../" **
19+
4. Build the application with the generated makefile by running: ** "make" **
20+
21+
22+
## Run instructions
23+
24+
1. Batch-mode
25+
- 1A. After building, stay in the build directory and run ** "./RobotAlgorithm ../batch/batchfile.ini" **
26+
- 1B. The second argument provides the path to a batch file, alter the path to the location where your batchfile is stored. ../batch/batchfile.ini provides an example batch file and instructions how to write a valid batch file.
27+
- 1C. Providing an invalid batch file will show an exception thrown by the application. The application won't start until you have provided a valid batch file.
28+
29+
2. Interactive-mode
30+
- 2A. After building, stay in the build directory and run ** "./RobotAlgorithm" **
31+
- 2B. While in interactive mode you can keep entering new specifications by using the console input. If you want to shut the application down, type 'exit' and confirm with the enter key.
32+
- 2C. Providing an invalid specification will show an exception thrown by the application.
33+
34+
3. Calibration-mode
35+
- 3A. Before running a batch or starting the interactive mode you might want to calibrate the color ranges.
36+
After building, stay in the build directory and run Run ** "./RobotAlgorithm calibrate mode" **
37+
- 3B. Three screens will open, one that displays the last frame captured from the camera, one that displays the frame after the extraction process and one that provides 8 sliders.
38+
- 3C. On the slider screen: adjust the sliders to new ranges (select a color with the first slider) as you please. The result of the new ranges are displayed in the second window (binary image after extraction).
39+
- 3D. When finished adjusting the ranges, move the last slider from 0 to 1: the application will save the calibrated ranges and the next time you start the application the new ranges will be used.
40+
41+
### Code/memory checking
42+
43+
4. A (Optional) if cppcheck is installed run: ** 'cppcheck ../src/ --force' **
44+
4. B (Optional) if valgrind is installed run: ** 'valgrind --log-file="valgrindlog.txt" --leak-check=full -v ./RobotAlgorithm' **
45+
46+
*Note: the root directory has been provided with a DoxyFile (doxygen configuration). Run doxygen DoxyFile to generate the doxygen.

batch/batchfile.ini

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ** World of Robots - Robots
2+
# ** Algorithm exercise
3+
# **
4+
# ** Each line should contain a specification that looks like the following form:
5+
# ** [form][whitespace][color]
6+
7+
driehoek rood
8+
halve cirkel groen
9+
halve cirkel geel
10+
cirkel wit
11+
driehoek blauw

0 commit comments

Comments
 (0)