Skip to content

Commit 39a0d76

Browse files
author
Gines
committed
Version 1.0.1: Windows DLL library
1 parent c047d13 commit 39a0d76

File tree

135 files changed

+377
-289
lines changed

Some content is hidden

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

135 files changed

+377
-289
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LIB_BUILD_DIR := $(BUILD_DIR)/lib
3434
STATIC_NAME := $(LIB_BUILD_DIR)/lib$(LIBRARY_NAME).a
3535
DYNAMIC_VERSION_MAJOR := 1
3636
DYNAMIC_VERSION_MINOR := 0
37-
DYNAMIC_VERSION_REVISION := 0
37+
DYNAMIC_VERSION_REVISION := 1
3838
DYNAMIC_NAME_SHORT := lib$(LIBRARY_NAME).so
3939
#DYNAMIC_SONAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR)
4040
DYNAMIC_VERSIONED_NAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_MINOR).$(DYNAMIC_VERSION_REVISION)

doc/release_notes.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,14 @@ OpenPose Library - Release Notes
7474

7575

7676

77-
## Current version (future OpenPose 1.0.1)
77+
## OpenPose 1.0.1
78+
1. Main improvements:
79+
1. Windows library turned into DLL dynamic library (i.e. portable).
80+
2. Improved documentation.
81+
2. Functions or parameters renamed:
82+
1. `openpose/utilities/macros.hpp` moved to `openpose/utilities/macros.hpp`.
83+
84+
85+
86+
## Current version (future OpenPose 1.0.2)
7887
1. No changes yet.

include/openpose/core/common.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef OPENPOSE_CORE_COMMON_HPP
2+
#define OPENPOSE_CORE_COMMON_HPP
3+
4+
#include "rectangle.hpp"
5+
#include "array.hpp"
6+
#include "macros.hpp"
7+
#include "point.hpp"
8+
9+
#endif // OPENPOSE_CORE_COMMON_HPP

include/openpose/core/cvMatToOpInput.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
#include <utility> // std::pair
55
#include <vector>
66
#include <opencv2/core/core.hpp> // cv::Mat
7-
#include "array.hpp"
8-
#include "point.hpp"
7+
#include "common.hpp"
98

109
namespace op
1110
{
12-
class CvMatToOpInput
11+
class OP_API CvMatToOpInput
1312
{
1413
public:
1514
CvMatToOpInput(const Point<int>& netInputResolution, const int scaleNumber = 1, const float scaleGap = 0.25);

include/openpose/core/cvMatToOpOutput.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33

44
#include <vector>
55
#include <opencv2/core/core.hpp> // cv::Mat
6-
#include "array.hpp"
7-
#include "point.hpp"
6+
#include "common.hpp"
87

98
namespace op
109
{
11-
class CvMatToOpOutput
10+
class OP_API CvMatToOpOutput
1211
{
1312
public:
1413
CvMatToOpOutput(const Point<int>& outputResolution, const bool generateOutput = true);

include/openpose/core/datum.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
#include <memory> // std::shared_ptr
66
#include <string>
77
#include <opencv2/core/core.hpp> // cv::Mat
8-
#include "array.hpp"
9-
#include "point.hpp"
10-
#include "rectangle.hpp"
8+
#include "common.hpp"
119

1210
namespace op
1311
{
@@ -16,7 +14,7 @@ namespace op
1614
* Datum is one the main OpenPose classes/structs. The workers and threads share by default a std::shared_ptr<std::vector<Datum>>. It contains
1715
* all the parameters that the different workers and threads need to exchange.
1816
*/
19-
struct Datum
17+
struct OP_API Datum
2018
{
2119
// -------------------------------------------------- ID parameters -------------------------------------------------- //
2220
unsigned long long id; /**< Datum ID. Internally used to sort the Datums if multi-threading is used. */

include/openpose/core/headers.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
// core module
55
#include "array.hpp"
6+
#include "common.hpp"
67
#include "cvMatToOpInput.hpp"
78
#include "cvMatToOpOutput.hpp"
89
#include "datum.hpp"
910
#include "enumClasses.hpp"
1011
#include "keypointScaler.hpp"
12+
#include "macros.hpp"
1113
#include "net.hpp"
1214
#include "netCaffe.hpp"
1315
#include "nmsBase.hpp"

include/openpose/core/keypointScaler.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
#define OPENPOSE_CORE_KEYPOINT_SCALER_HPP
33

44
#include <vector>
5-
#include "array.hpp"
6-
#include "point.hpp"
5+
#include "common.hpp"
76
#include "enumClasses.hpp"
87

98
namespace op
109
{
11-
class KeypointScaler
10+
class OP_API KeypointScaler
1211
{
1312
public:
1413
explicit KeypointScaler(const ScaleMode scaleMode);

include/openpose/core/macros.hpp

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#ifndef OPENPOSE_UTILITIES_MACROS_HPP
2+
#define OPENPOSE_UTILITIES_MACROS_HPP
3+
4+
#ifndef _WIN32
5+
#define OP_API
6+
#elif defined OP_EXPORTS
7+
#define OP_API __declspec(dllexport)
8+
#else
9+
#define OP_API __declspec(dllimport)
10+
#endif
11+
12+
#define DATUM_BASE_NO_PTR std::vector<Datum>
13+
#define DATUM_BASE std::shared_ptr<DATUM_BASE_NO_PTR>
14+
#define DEFINE_TEMPLATE_DATUM(templateName) template class OP_API templateName<DATUM_BASE>
15+
#define COMPILE_TEMPLATE_DATUM(templateName) extern DEFINE_TEMPLATE_DATUM(templateName)
16+
17+
#define UNUSED(unusedVariable) (void)(unusedVariable)
18+
19+
#define DELETE_COPY(className) \
20+
className(const className&) = delete; \
21+
className& operator=(const className&) = delete
22+
23+
#define COMPILE_TEMPLATE_BASIC_TYPES_CLASS(className) COMPILE_TEMPLATE_BASIC_TYPES(className, class)
24+
25+
#define COMPILE_TEMPLATE_BASIC_TYPES_STRUCT(className) COMPILE_TEMPLATE_BASIC_TYPES(className, struct)
26+
27+
#define COMPILE_TEMPLATE_BASIC_TYPES(className, classType) \
28+
template classType OP_API className<char>; \
29+
template classType OP_API className<signed char>; \
30+
template classType OP_API className<short>; \
31+
template classType OP_API className<int>; \
32+
template classType OP_API className<long>; \
33+
template classType OP_API className<long long>; \
34+
template classType OP_API className<unsigned char>; \
35+
template classType OP_API className<unsigned short>; \
36+
template classType OP_API className<unsigned int>; \
37+
template classType OP_API className<unsigned long>; \
38+
template classType OP_API className<unsigned long long>; \
39+
template classType OP_API className<float>; \
40+
template classType OP_API className<double>; \
41+
template classType OP_API className<long double>
42+
43+
// Includes at the end, since this macros class does not need them, but the files that call this
44+
// file. However, keeping the files at the beginning might create a circular include linking problem.
45+
#include <memory> // std::shared_ptr
46+
#include <vector>
47+
#include <openpose/core/datum.hpp>
48+
#include <openpose/core/point.hpp>
49+
#include <openpose/core/rectangle.hpp>
50+
#include <openpose/core/macros.hpp>
51+
52+
#endif // OPENPOSE_UTILITIES_MACROS_HPP

include/openpose/core/maximumBase.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
#define OPENPOSE_CORE_MAXIMUM_BASE_HPP
33

44
#include <array>
5+
#include "common.hpp"
56

67
namespace op
78
{
89
template <typename T>
9-
void maximumCpu(T* targetPtr, const T* const sourcePtr, const std::array<int, 4>& targetSize, const std::array<int, 4>& sourceSize);
10+
OP_API void maximumCpu(T* targetPtr, const T* const sourcePtr, const std::array<int, 4>& targetSize, const std::array<int, 4>& sourceSize);
1011

1112
template <typename T>
12-
void maximumGpu(T* targetPtr, const T* const sourcePtr, const std::array<int, 4>& targetSize, const std::array<int, 4>& sourceSize);
13+
OP_API void maximumGpu(T* targetPtr, const T* const sourcePtr, const std::array<int, 4>& targetSize, const std::array<int, 4>& sourceSize);
1314
}
1415

1516
#endif // OPENPOSE_CORE_MAXIMUM_BASE_HPP

0 commit comments

Comments
 (0)