Skip to content

Commit 7d7bd19

Browse files
CMake updated
1 parent 339ae35 commit 7d7bd19

File tree

7 files changed

+27
-30
lines changed

7 files changed

+27
-30
lines changed

README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# **PlotOpenCv C++ library**
77

8-
**v1.0.4**
8+
**v1.1.0**
99

1010

1111

@@ -41,7 +41,7 @@
4141
| 1.0.1 | 18.09.2023 | - Update used container for plots. |
4242
| 1.0.2 | 16.04.2024 | - Antialiased line drawing implemented.<br/>- Window size issue fixed.<br/>- Documentation updated. |
4343
| 1.0.3 | 17.05.2024 | - Documentation updated. |
44-
| 1.0.4 | 18.07.2024 | - CMake structure updated. |
44+
| 1.1.0 | 19.07.2024 | - CMake structure updated.<br />- Files renamed. |
4545

4646

4747

@@ -73,6 +73,11 @@ test ------------------------ Folder for test application.
7373
**Plot** class declared in **PlotOpenCv.h** file. Class declaration:
7474

7575
```cpp
76+
namespace cr
77+
{
78+
namespace utils
79+
{
80+
/// plot class.
7681
class Plot
7782
{
7883
public:
@@ -104,6 +109,8 @@ public:
104109
/// Method to show window.
105110
void show();
106111
};
112+
}
113+
}
107114
```
108115
109116
@@ -125,7 +132,7 @@ std::cout << "PlotOpenCv class version: " << PlotOpenCv::getVersion();
125132
Console output:
126133

127134
```bash
128-
PlotOpenCv class version: 1.0.4
135+
PlotOpenCv class version: 1.1.0
129136
```
130137

131138

@@ -145,8 +152,8 @@ void addPlot(std::vector<T> &points, int id, int start = 0, int end = 0,
145152
| id | Identifier for chart on a window. Provides user to update a chart or add new one. |
146153
| start | Start index of plot from vector when user wants to plot a specific range from a dataset. Should be 0 for whole dataset.|
147154
| end | End index of plot from vector when user wants to plot a specific range from a dataset. Should be 0 for whole dataset. |
148-
| color | Color of chart line. |
149-
| thickness | Thickness of chart line.|
155+
| color | Color of chart line. |
156+
| thickness | Thickness of chart line. |
150157
151158
152159
@@ -171,15 +178,15 @@ void addPlot(std::vector<std::vector<T>> &points, int id, int start = 0, int end
171178
**Table 2** - Supported data types.
172179

173180
| Supported data types |
174-
| ---------|
175-
| unsigned char |
176-
| char |
177-
| unsigned int |
178-
| unsigned short |
179-
| short int |
180-
| int |
181-
| float |
182-
| double |
181+
| ---------------------|
182+
| unsigned char |
183+
| char |
184+
| unsigned int |
185+
| unsigned short |
186+
| short int |
187+
| int |
188+
| float |
189+
| double |
183190

184191

185192

@@ -207,7 +214,6 @@ void clean();
207214
Typical commands to build **PlotOpenCv** library:
208215

209216
```bash
210-
git clone https://github.com/ConstantRobotics-Ltd/PlotOpenCv.git
211217
cd PlotOpenCv
212218
mkdir build
213219
cd build
@@ -225,14 +231,7 @@ src
225231
yourLib.cpp
226232
```
227233

228-
You can add repository **PlotOpenCv** as submodule by commands:
229-
230-
```bash
231-
cd <your respository folder>
232-
git submodule add https://github.com/ConstantRobotics-Ltd/PlotOpenCv.git 3rdparty/PlotOpenCv
233-
```
234-
235-
In you repository folder will be created folder **3rdparty/PlotOpenCv** which contains files of **PlotOpenCv** repository. New structure of your repository:
234+
create folder **3rdparty** in your repository and copy **PlotOpenCv** repository folder there. New structure of your repository:
236235

237236
```bash
238237
CMakeLists.txt
@@ -345,4 +344,4 @@ Example charts shows what visual effects user should expect depending on input d
345344
![plot_opencv_example_1](./static/plot_opencv_example_1.png)
346345
![plot_opencv_example_2](./static/plot_opencv_example_2.png)
347346
![plot_opencv_example_3](./static/plot_opencv_example_3.png)
348-
![plot_opencv_example_combined](./static/plot_opencv_example_combined.png)
347+
![plot_opencv_example_combined](./static/plot_opencv_example_combined.png)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
5151
## LINK LIBRARIES
5252
## linking all dependencies
5353
###############################################################################
54-
find_package(OpenCV)
54+
find_package(OpenCV REQUIRED)
5555
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

src/plotOpenCv.cpp renamed to src/PlotOpenCv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "plotOpenCv.h"
2-
#include "plotOpenCvVersion.h"
1+
#include "PlotOpenCv.h"
2+
#include "PlotOpenCvVersion.h"
33

44

55

src/plotOpenCv.h renamed to src/PlotOpenCv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ class Plot
130130
std::vector<double> m_points1D{};
131131
/// Dataset for two dimentional plot.
132132
std::vector<std::vector<double>> m_points2D{};
133-
134-
private:
135133
};
136134

137135
/// Background image for plotting.
File renamed without changes.
File renamed without changes.

test/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <opencv2/opencv.hpp>
33
#include <opencv2/highgui.hpp>
44
#include <vector>
5-
#include "plotOpenCv.h"
5+
#include "PlotOpenCv.h"
66

77
using namespace cr::utils;
88

0 commit comments

Comments
 (0)