Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 5900299

Browse files
committed
Moved black border detection code to seperate library
1 parent d8dfc3f commit 5900299

11 files changed

+40
-14
lines changed

include/hyperion/ImageProcessor.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <hyperion/ImageProcessorFactory.h>
99
#include <hyperion/LedString.h>
1010
#include <hyperion/ImageToLedsMap.h>
11-
#include <hyperion/BlackBorderProcessor.h>
11+
12+
// Black border includes
13+
#include <blackborder/BlackBorderProcessor.h>
1214

1315
///
1416
/// The ImageProcessor translates an RGB-image to RGB-values for the leds. The processing is

libsrc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include)
44
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc)
55

66
add_subdirectory(hyperion)
7+
add_subdirectory(blackborder)
78
add_subdirectory(jsonserver)
89
add_subdirectory(protoserver)
910
add_subdirectory(boblightserver)

libsrc/hyperion/BlackBorderDetector.cpp renamed to libsrc/blackborder/BlackBorderDetector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
// Local-Hyperion includes
3-
#include <hyperion/BlackBorderDetector.h>
2+
// BlackBorders includes
3+
#include <blackborder/BlackBorderDetector.h>
44

55
using namespace hyperion;
66

libsrc/hyperion/BlackBorderProcessor.cpp renamed to libsrc/blackborder/BlackBorderProcessor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
// Local-Hyperion includes
3-
#include <hyperion/BlackBorderProcessor.h>
2+
// Blackborder includes
3+
#include <blackborder/BlackBorderProcessor.h>
44

55
using namespace hyperion;
66

libsrc/blackborder/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# Define the current source locations
3+
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/blackborder)
4+
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/blackborder)
5+
6+
SET(Blackborder_HEADERS
7+
${CURRENT_HEADER_DIR}/BlackBorderDetector.h
8+
${CURRENT_HEADER_DIR}/BlackBorderProcessor.h
9+
)
10+
11+
SET(Blackborder_SOURCES
12+
${CURRENT_SOURCE_DIR}/BlackBorderDetector.cpp
13+
${CURRENT_SOURCE_DIR}/BlackBorderProcessor.cpp
14+
)
15+
16+
add_library(blackborder
17+
${Blackborder_HEADERS}
18+
${Blackborder_SOURCES}
19+
)
20+
21+
target_link_libraries(blackborder
22+
hyperion-utils
23+
)

libsrc/hyperion/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ SET(Hyperion_HEADERS
1717
${CURRENT_HEADER_DIR}/LedString.h
1818
${CURRENT_HEADER_DIR}/PriorityMuxer.h
1919

20-
${CURRENT_HEADER_DIR}/BlackBorderDetector.h
21-
${CURRENT_HEADER_DIR}/BlackBorderProcessor.h
22-
2320
${CURRENT_SOURCE_DIR}/MultiColorTransform.h
2421
)
2522

@@ -30,8 +27,6 @@ SET(Hyperion_SOURCES
3027
${CURRENT_SOURCE_DIR}/LedString.cpp
3128
${CURRENT_SOURCE_DIR}/PriorityMuxer.cpp
3229

33-
${CURRENT_SOURCE_DIR}/BlackBorderDetector.cpp
34-
${CURRENT_SOURCE_DIR}/BlackBorderProcessor.cpp
3530
${CURRENT_SOURCE_DIR}/ImageToLedsMap.cpp
3631
${CURRENT_SOURCE_DIR}/MultiColorTransform.cpp
3732
${CURRENT_SOURCE_DIR}/LinearColorSmoothing.cpp
@@ -54,6 +49,7 @@ add_library(hyperion
5449
)
5550

5651
target_link_libraries(hyperion
52+
blackborder
5753
hyperion-utils
5854
leddevice
5955
effectengine

libsrc/hyperion/ImageProcessor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// Hyperion includes
33
#include <hyperion/ImageProcessor.h>
44
#include <hyperion/ImageToLedsMap.h>
5-
#include <hyperion/BlackBorderProcessor.h>
5+
6+
// Blacborder includes
7+
#include <blackborder/BlackBorderProcessor.h>
68

79
using namespace hyperion;
810

test/TestBlackBorderDetector.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
#include <random>
44

55
// Hyperion includes
6-
#include <hyperion/BlackBorderDetector.h>
76
#include <utils/ColorRgb.h>
87

8+
// Blackborder includes
9+
#include <blackborder/BlackBorderDetector.h>
10+
911
using namespace hyperion;
1012

1113
ColorRgb randomColor()

0 commit comments

Comments
 (0)