Commit 551b6cd
imageProcessing: check opencv availability
* imageProcessing: guard OpenCV-dependent filters behind ALICEVISION_HAVE_OPENCV
* Apply suggestion from @fabiencastan
Co-authored-by: Fabien Castan <fabcastan@gmail.com>
* fix(imageProcessing): fix guard placement for bilateralFilter and nlmFilter OpenCV checks
The `#if ALICEVISION_HAVE_OPENCV` guards were incorrectly placed
*before* the
`if (pParams.*.enabled)` runtime checks, causing the entire block
(including
the enabled-check) to be silently skipped at compile time when OpenCV is
absent.
- Move the preprocessor guard *inside* the runtime `if` block for
bilateralFilter
and nlmFilter, so the enabled-check is always compiled and evaluated
- Add an `#else` branch for nlmFilter that logs an explicit error when
OpenCV
is unavailable and the filter is requested, instead of silently bypassing it
---------
Co-authored-by: Sylvain Maziere <sylvain.maziere@technicolor.com>
Co-authored-by: Fabien Castan <fabcastan@gmail.com>1 parent 20b6f52 commit 551b6cd
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
527 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
| 535 | + | |
531 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
| |||
539 | 547 | | |
540 | 548 | | |
541 | 549 | | |
| 550 | + | |
542 | 551 | | |
543 | 552 | | |
544 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
545 | 557 | | |
546 | 558 | | |
547 | 559 | | |
| |||
0 commit comments