diff --git a/src/EffectBase.cpp b/src/EffectBase.cpp index 2fb9b10b5..ee918e54d 100644 --- a/src/EffectBase.cpp +++ b/src/EffectBase.cpp @@ -548,6 +548,12 @@ std::shared_ptr EffectBase::GetMaskImage(std::shared_ptr target_ } std::shared_ptr EffectBase::TrackedObjectMask(std::shared_ptr target_image, int64_t frame_number) const { +#ifndef USE_OPENCV + // Tracked-object bounding boxes are only produced by OpenCV-based + // trackers; without OpenCV there is nothing to draw a mask for. + (void)frame_number; + return {}; +#else if (!target_image || target_image->isNull() || trackedObjects.empty()) return {}; @@ -595,6 +601,7 @@ std::shared_ptr EffectBase::TrackedObjectMask(std::shared_ptr ta if (!drew_any_box) return {}; return mask_image; +#endif } void EffectBase::BlendWithMask(std::shared_ptr original_image, std::shared_ptr effected_image, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6815c9246..6a866ac94 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -69,7 +69,6 @@ set(OPENSHOT_TESTS LensFlare AnalogTape BenchmarkArgs - EffectMask Mask Pixelate Saturation @@ -96,6 +95,7 @@ if($CACHE{HAVE_OPENCV}) CVStabilizer CVOutline ObjectMask + EffectMask # CVObjectDetection ) endif()