Skip to content

Commit 5bf7a0e

Browse files
authored
v0.45.0 (#176)
* v0.45.0 * Update release_notes.txt
1 parent 3fc7c3a commit 5bf7a0e

File tree

75 files changed

+2034
-166
lines changed

Some content is hidden

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

75 files changed

+2034
-166
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ option(RSID_DEBUG_FILE "Log everything to rsid_debug.log file" OFF)
6363
option(RSID_DEBUG_SERIAL "Log all serial communication" OFF)
6464
option(RSID_DEBUG_PACKETS "Log packet sent/received over the serial line" ON)
6565
option(RSID_DEBUG_VALUES "Replace default common values with debug ones" OFF)
66-
option(RSID_PREVIEW "Enable preview" OFF)
6766
option(RSID_SAMPLES "Build samples" OFF)
6867
option(RSID_TIDY "Enable clang-tidy" OFF)
6968
option(RSID_PEDANTIC "Enable extra compiler warnings" OFF)
@@ -74,8 +73,13 @@ option(RSID_TOOLS "Build additional tools" ON)
7473
option(RSID_PY "Build python wrapper" OFF)
7574
option(RSID_NETWORK "Enable networking. Required for license and update checker." ON)
7675

77-
# install option
78-
option(RSID_INSTALL "Generate the install target and rsidConfig.cmake" OFF)
76+
if(NOT ANDROID)
77+
# preview option
78+
option(RSID_PREVIEW "Enable preview" OFF)
79+
80+
# install option
81+
option(RSID_INSTALL "Generate the install target and rsidConfig.cmake" OFF)
82+
endif()
7983

8084
if(RSID_NETWORK)
8185
add_compile_definitions(RSID_NETWORK)
@@ -113,7 +117,7 @@ if(MSVC AND RSID_NETWORK)
113117
include(cmake/winreg.cmake)
114118
endif()
115119

116-
if(RSID_SECURE OR RSID_MOCK_LICENSE)
120+
if(RSID_SECURE)
117121
include(cmake/Mbedtls.cmake)
118122
endif()
119123

cmake/Mbedtls.cmake

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
11
include(FetchContent REQUIRED)
22

33
function(fetch_mbedtls)
4-
FetchContent_Declare(
5-
mbedtls
6-
URL https://github.com/Mbed-TLS/mbedtls/releases/download/v2.28.8/mbedtls-2.28.8.tar.bz2
7-
URL_HASH SHA256=241c68402cef653e586be3ce28d57da24598eb0df13fcdea9d99bfce58717132
8-
)
9-
10-
# Prevent warning about empty PROJECT_VERSION vars
11-
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
12-
13-
# Set flags
14-
set(USE_STATIC_MBEDTLS_LIBRARY ON CACHE BOOL "Build mbed TLS static library." FORCE)
15-
set(INSTALL_MBEDTLS_HEADERS OFF CACHE BOOL "Install mbed TLS headers." FORCE)
16-
set(ENABLE_PROGRAMS OFF CACHE BOOL "Build mbed TLS programs." FORCE)
17-
set(ENABLE_TESTING OFF CACHE BOOL "Build mbed TLS tests." FORCE)
18-
19-
# MakeAvailable
20-
FetchContent_MakeAvailable(mbedtls)
21-
22-
# Set IDE folders
23-
set_target_properties(mbedtls PROPERTIES FOLDER "external/mbedtls")
24-
set_target_properties(mbedcrypto PROPERTIES FOLDER "external/mbedtls")
25-
set_target_properties(mbedx509 PROPERTIES FOLDER "external/mbedtls")
26-
set_target_properties(lib PROPERTIES FOLDER "external/mbedtls")
27-
set_target_properties(apidoc PROPERTIES FOLDER "external/mbedtls")
4+
FetchContent_Declare(
5+
mbedtls
6+
OVERRIDE_FIND_PACKAGE
7+
URL https://github.com/Mbed-TLS/mbedtls/releases/download/v2.28.8/mbedtls-2.28.8.tar.bz2
8+
URL_HASH SHA256=241c68402cef653e586be3ce28d57da24598eb0df13fcdea9d99bfce58717132
9+
)
10+
11+
# Prevent warning about empty PROJECT_VERSION vars
12+
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
13+
14+
# Set flags
15+
set(USE_STATIC_MBEDTLS_LIBRARY ON CACHE BOOL "Build mbed TLS static library." FORCE)
16+
set(INSTALL_MBEDTLS_HEADERS OFF CACHE BOOL "Install mbed TLS headers." FORCE)
17+
set(ENABLE_PROGRAMS OFF CACHE BOOL "Build mbed TLS programs." FORCE)
18+
set(ENABLE_TESTING OFF CACHE BOOL "Build mbed TLS tests." FORCE)
19+
20+
# MakeAvailable
21+
FetchContent_MakeAvailable(mbedtls)
22+
23+
# Set IDE folders
24+
set_target_properties(mbedtls PROPERTIES FOLDER "external/mbedtls")
25+
set_target_properties(mbedcrypto PROPERTIES FOLDER "external/mbedtls")
26+
set_target_properties(mbedx509 PROPERTIES FOLDER "external/mbedtls")
27+
set_target_properties(lib PROPERTIES FOLDER "external/mbedtls")
28+
set_target_properties(apidoc PROPERTIES FOLDER "external/mbedtls")
29+
30+
if (WIN32 OR ANDROID)
31+
# cmake find_package defines for mbedtls
32+
set(MBEDTLS_INCLUDE_DIR mbedtls_SOURCE_DIR CACHE INTERNAL "" FORCE)
33+
set(MBEDTLS_LIBRARY mbedtls CACHE INTERNAL "" FORCE)
34+
set(MBEDX509_LIBRARY mbedx509 CACHE INTERNAL "" FORCE)
35+
set(MBEDCRYPTO_LIBRARY mbedcrypto CACHE INTERNAL "" FORCE)
36+
37+
mark_as_advanced(MBEDTLS_INCLUDE_DIR)
38+
mark_as_advanced(MBEDTLS_LIBRARY)
39+
mark_as_advanced(MBEDX509_LIBRARY)
40+
mark_as_advanced(MBEDCRYPTO_LIBRARY)
41+
endif ()
2842
endfunction()
2943

3044
fetch_mbedtls()

cmake/OS.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
33
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
44
message(STATUS "Windows platform")
55
set(CMAKE_CXX_STANDARD 14)
6+
67
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
78
message(STATUS "Linux platform")
89
set(CMAKE_CXX_STANDARD 14)
910
add_definitions(-DLINUX)
11+
12+
elseif(ANDROID)
13+
message(STATUS "Android platform")
14+
set(CMAKE_CXX_STANDARD 14)
15+
add_definitions(-DANDROID_STL=c++_shared)
16+
set(CMAKE_OBJECT_PATH_MAX 2048)
17+
1018
else()
1119
message(FATAL_ERROR "${CMAKE_SYSTEM_NAME} is currently unsupported")
1220
endif()

cmake/libcurl.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (WIN32)
22
include(FetchContent REQUIRED)
3-
3+
44
find_package(CURL QUIET NO_DEFAULT_PATH HINTS ${CMAKE_BINARY_DIR}/libcurl)
55

66
if(NOT CURL_FOUND)
@@ -66,4 +66,3 @@ else()
6666
.")
6767
endif()
6868
endif(WIN32)
69-

include/RealSenseID/AuthenticateStatus.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum class RSID_API AuthenticateStatus
5151
Spoof_3D,
5252
Spoof_LR,
5353
Spoof_Disparity,
54+
Spoof_Vision,
5455
Spoof_Surface,
5556
Spoof_Plane_Disparity,
5657
Spoof_2D_Right,

include/RealSenseID/DeviceConfig.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,27 @@ struct RSID_API DeviceConfig
6767
Low = 2 // default
6868
};
6969

70+
/**
71+
* @brief Defines the policy for frontal face orientation.
72+
*
73+
* - None: No restriction on face angle (default).
74+
* - Moderate: Allow some deviation from a forward-facing orientation.
75+
* - Strict: The face should be directly oriented toward the camera.
76+
*/
77+
enum class FrontalFacePolicy
78+
{
79+
None = 0, // default
80+
Moderate = 1,
81+
Strict = 2
82+
};
83+
84+
7085
CameraRotation camera_rotation = CameraRotation::Rotation_0_Deg;
7186
SecurityLevel security_level = SecurityLevel::Low;
7287
AlgoFlow algo_flow = AlgoFlow::FaceDetectionOnly;
7388
DumpMode dump_mode = DumpMode::None;
7489
MatcherConfidenceLevel matcher_confidence_level = MatcherConfidenceLevel::Low;
75-
90+
FrontalFacePolicy frontal_face_policy = FrontalFacePolicy::None;
7691

7792
/**
7893
* @brief Specifies the maximum number of consecutive spoofing attempts allowed before the device rejects further
@@ -101,6 +116,7 @@ RSID_API const char* Description(DeviceConfig::SecurityLevel level);
101116
RSID_API const char* Description(DeviceConfig::AlgoFlow algoMode);
102117
RSID_API const char* Description(DeviceConfig::DumpMode dump_mode);
103118
RSID_API const char* Description(DeviceConfig::MatcherConfidenceLevel matcher_confidence_level);
119+
RSID_API const char* Description(DeviceConfig::FrontalFacePolicy policy);
104120

105121
template <typename OStream>
106122
inline OStream& operator<<(OStream& os, const DeviceConfig::CameraRotation& rotation)
@@ -136,4 +152,11 @@ inline OStream& operator<<(OStream& os, const DeviceConfig::MatcherConfidenceLev
136152
os << Description(matcher_confidence_level);
137153
return os;
138154
}
155+
template <typename OStream>
156+
inline OStream& operator<<(OStream& os, const DeviceConfig::FrontalFacePolicy& policy)
157+
{
158+
os << Description(policy);
159+
return os;
160+
}
161+
139162
} // namespace RealSenseID

include/RealSenseID/EnrollStatus.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ enum class RSID_API EnrollStatus
5050
Spoof_3D,
5151
Spoof_LR,
5252
Spoof_Disparity,
53+
Spoof_Vision,
5354
Spoof_Surface,
5455
Spoof_Plane_Disparity,
5556
Spoof_2D_Right

include/RealSenseID/FwUpdater.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#pragma once
55

66
#include "RealSenseID/RealSenseIDExports.h"
7+
#include "RealSenseID/SerialConfig.h"
78
#include "RealSenseID/Status.h"
89

910
#include <string>
@@ -23,7 +24,7 @@ class RSID_API FwUpdater
2324
*/
2425
struct Settings
2526
{
26-
const char* port = nullptr; // serial port to perform the update on
27+
SerialConfig serial_config; // serial port to perform the update on
2728
bool force_full = false; // if true update all modules and blocks regardless of crc checks
2829
};
2930

include/RealSenseID/MatcherDefines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ struct TagResult
5656
// a probe vector with mask VS. gallery vector without mask.
5757
typedef enum AdjustableThresholdsConfig
5858
{
59-
ThresoldConfig_pNM_gNM = 0,
60-
ThresoldConfig_pM_gNM = 1,
61-
ThresoldConfig_pM_gM = 2,
59+
ThresholdConfig_pNM_gNM = 0,
60+
ThresholdConfig_pM_gNM = 1,
61+
ThresholdConfig_pM_gM = 2,
6262
NumThresholdConfigs
6363
} ThresholdsConfigEnum;
6464

include/RealSenseID/RealSenseIDExports.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33

44
#pragma once
55

6+
// clang-format off
67
#ifdef _WIN32
7-
#if rsid_EXPORTS
8-
#define RSID_API __declspec(dllexport)
8+
#if rsid_EXPORTS
9+
#define RSID_API __declspec(dllexport)
10+
#else
11+
#define RSID_API __declspec(dllimport)
12+
#endif // rsid_EXPORTS
13+
#elif defined(__linux__) || defined(__ANDROID__)
14+
#define RSID_API __attribute__((visibility("default")))
915
#else
10-
#define RSID_API __declspec(dllimport)
11-
#endif // rsid_EXPORTS
12-
#elif LINUX
13-
#define RSID_API __attribute__((visibility("default")))
14-
#else
15-
#define RSID_API
16-
#endif //_WIN32
16+
#define RSID_API
17+
#endif //_WIN32
18+
// clang-format on

0 commit comments

Comments
 (0)