Skip to content

Commit 0cabece

Browse files
Sylvain Maziereservantftransperfect
authored andcommitted
imageProcessing: guard OpenCV-dependent filters behind ALICEVISION_HAVE_OPENCV
1 parent 20b6f52 commit 0cabece

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/software/utils/main_imageProcessing.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ void setupSteps(std::list<std::unique_ptr<ImageProcess>> & steps, const Processi
522522
{
523523
steps.push_back(std::make_unique<SharpenProcess>(pParams.sharpen.width, pParams.sharpen.contrast, pParams.sharpen.threshold));
524524
}
525+
#if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_OPENCV)
525526
if (pParams.bilateralFilter.enabled)
526527
{
527528
steps.push_back(std::make_unique<BilateralFilterProcess>(pParams.bilateralFilter.distance, pParams.bilateralFilter.sigmaColor, pParams.bilateralFilter.sigmaSpace));
@@ -530,6 +531,7 @@ void setupSteps(std::list<std::unique_ptr<ImageProcess>> & steps, const Processi
530531
{
531532
steps.push_back(std::make_unique<ClaheFilterProcess>(pParams.claheFilter.tileGridSize, pParams.claheFilter.clipLimit));
532533
}
534+
#endif
533535
if (pParams.fillHoles)
534536
{
535537
steps.push_back(std::make_unique<FillHolesProcess>());
@@ -538,10 +540,12 @@ void setupSteps(std::list<std::unique_ptr<ImageProcess>> & steps, const Processi
538540
{
539541
steps.push_back(std::make_unique<NoiseProcess>(ENoiseMethod_enumToString(pParams.noise.method), pParams.noise.A, pParams.noise.B, pParams.noise.mono));
540542
}
543+
#if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_OPENCV)
541544
if (pParams.nlmFilter.enabled)
542545
{
543546
steps.push_back(std::make_unique<NlmFilterProcess>(pParams.nlmFilter.filterStrength, pParams.nlmFilter.filterStrengthColor, pParams.nlmFilter.templateWindowSize, pParams.nlmFilter.searchWindowSize));
544547
}
548+
#endif
545549
if (pParams.applyDcpMetadata || pParams.enableColorTempProcessing)
546550
{
547551
steps.push_back(std::make_unique<ColorTemperatureProcess>(pParams.applyDcpMetadata, pParams.useDCPColorMatrixOnly, pParams.enableColorTempProcessing, pParams.correlatedColorTemperature));

0 commit comments

Comments
 (0)