Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/motion/MogMotionDetection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(CMAKE_CXX_STANDARD 17)

include(../../ComponentSetup.cmake)

find_package(OpenCV 4.9.0 EXACT REQUIRED PATHS /opt/opencv-4.9.0
find_package(OpenCV 4.13.0 EXACT REQUIRED PATHS /opt/opencv-4.13.0
COMPONENTS opencv_objdetect opencv_ml opencv_video opencv_highgui)

find_package(mpfComponentInterface REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions cpp/motion/MogMotionDetection/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -28,7 +28,7 @@

ARG BUILD_REGISTRY
ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_cpp_component_build:${BUILD_TAG} as build_component
FROM ${BUILD_REGISTRY}openmpf_cpp_component_build:${BUILD_TAG} AS build_component

RUN --mount=source=MogMotionDetection,target=MogMotionDetection \
--mount=source=STRUCK,target=STRUCK \
Expand All @@ -38,9 +38,9 @@ ARG RUN_TESTS=false
RUN if [ "${RUN_TESTS,,}" == true ]; then cd $BUILD_DIR/test && ./MogMotionDetectionTest; fi


FROM ${BUILD_REGISTRY}openmpf_cpp_executor:${BUILD_TAG} as install_component
FROM ${BUILD_REGISTRY}openmpf_cpp_executor:${BUILD_TAG} AS install_component

ENV LD_LIBRARY_PATH $PLUGINS_DIR/MogMotionDetection/lib
ENV LD_LIBRARY_PATH=$PLUGINS_DIR/MogMotionDetection/lib

COPY --from=build_component $BUILD_DIR/plugin/MogMotionDetection $PLUGINS_DIR/MogMotionDetection

Expand Down
2 changes: 1 addition & 1 deletion cpp/motion/STRUCK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
project(STRUCK)

if(NOT TARGET STRUCK)
find_package(OpenCV 4.9.0 EXACT REQUIRED PATHS /opt/opencv-4.9.0 COMPONENTS opencv_core opencv_imgproc)
find_package(OpenCV 4.13.0 EXACT REQUIRED PATHS /opt/opencv-4.13.0 COMPONENTS opencv_core opencv_imgproc)

# Need to use absolute paths so that both Mog and Subsense can build STRUCK
set(STRUCK_SRC
Expand Down
2 changes: 1 addition & 1 deletion cpp/motion/SubsenseMotionDetection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(CMAKE_CXX_STANDARD 17)

include(../../ComponentSetup.cmake)

find_package(OpenCV 4.9.0 EXACT REQUIRED PATHS /opt/opencv-4.9.0
find_package(OpenCV 4.13.0 EXACT REQUIRED PATHS /opt/opencv-4.13.0
COMPONENTS opencv_objdetect opencv_video opencv_features2d opencv_flann opencv_ml opencv_highgui)

find_package(mpfComponentInterface REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions cpp/motion/SubsenseMotionDetection/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -28,7 +28,7 @@

ARG BUILD_REGISTRY
ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_cpp_component_build:${BUILD_TAG} as build_component
FROM ${BUILD_REGISTRY}openmpf_cpp_component_build:${BUILD_TAG} AS build_component


RUN --mount=source=SubsenseMotionDetection,target=SubsenseMotionDetection \
Expand All @@ -39,9 +39,9 @@ ARG RUN_TESTS=false
RUN if [ "${RUN_TESTS,,}" == true ]; then cd $BUILD_DIR/test && ./SubsenseMotionDetectionTest; fi


FROM ${BUILD_REGISTRY}openmpf_cpp_executor:${BUILD_TAG} as install_component
FROM ${BUILD_REGISTRY}openmpf_cpp_executor:${BUILD_TAG} AS install_component

ENV LD_LIBRARY_PATH $PLUGINS_DIR/SubsenseMotionDetection/lib
ENV LD_LIBRARY_PATH=$PLUGINS_DIR/SubsenseMotionDetection/lib

COPY --from=build_component $BUILD_DIR/plugin/SubsenseMotionDetection $PLUGINS_DIR/SubsenseMotionDetection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ void BackgroundSubtractorSuBSENSE::apply(cv::InputArray _image, cv::OutputArray
}
}

void BackgroundSubtractorSuBSENSE::apply(
cv::InputArray image, cv::InputArray knownForegroundMask, cv::OutputArray fgmask,
double learningRate) {
throw std::runtime_error("knownForegroundMask is not supported.");
}

void BackgroundSubtractorSuBSENSE::getBackgroundImage(cv::OutputArray backgroundImage) const {
CV_Assert(m_bInitialized);
cv::Mat oAvgBGImg = cv::Mat::zeros(m_oImgSize,CV_32FC((int)m_nImgChannels));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class BackgroundSubtractorSuBSENSE : public BackgroundSubtractorLBSP {
//! primary model update function; the learning param is used to override the internal learning thresholds (ignored when <= 0)
// virtual void operator()(cv::InputArray image, cv::OutputArray fgmask, double learningRateOverride=0);
virtual void apply(cv::InputArray image, cv::OutputArray fgmask, double learningRateOverride=0);

virtual void apply(cv::InputArray image, cv::InputArray knownForegroundMask,
cv::OutputArray fgmask, double learningRate=-1);
//! returns a copy of the latest reconstructed background image
void getBackgroundImage(cv::OutputArray backgroundImage) const;
//! returns a copy of the latest reconstructed background descriptors image
Expand Down Expand Up @@ -111,4 +114,3 @@ class BackgroundSubtractorSuBSENSE : public BackgroundSubtractorLBSP {
cv::Mat m_oCurrRawFGBlinkMask;
cv::Mat m_oLastRawFGBlinkMask;
};

2 changes: 1 addition & 1 deletion cpp/motion/SubsenseMotionDetection/SubSense/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(SubSense)

find_package(OpenCV 4.9.0 EXACT REQUIRED PATHS /opt/opencv-4.9.0
find_package(OpenCV 4.13.0 EXACT REQUIRED PATHS /opt/opencv-4.13.0
COMPONENTS opencv_features2d)

aux_source_directory(. SRC)
Expand Down