From 845da4dff601b2f7adb3e2ae35ef0a715cdddd16 Mon Sep 17 00:00:00 2001 From: HaiVQ Date: Tue, 10 Dec 2024 23:28:15 +0700 Subject: [PATCH] Disable alpha channel thresholding in Outline effect to prevent removal of aliased edges --- src/effects/Outline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/effects/Outline.cpp b/src/effects/Outline.cpp index 01f7fc4e..e570c90e 100644 --- a/src/effects/Outline.cpp +++ b/src/effects/Outline.cpp @@ -63,7 +63,9 @@ std::shared_ptr Outline::GetFrame(std::shared_ptr channels(4); cv::split(cv_image, channels); cv::Mat alpha_mask = channels[3].clone(); - cv::threshold(alpha_mask, alpha_mask, 254, 255, cv::ThresholdTypes::THRESH_BINARY); // threshold the alpha channel to remove aliased edges + + // Disable de-antialiased + // cv::threshold(alpha_mask, alpha_mask, 254, 255, cv::ThresholdTypes::THRESH_BINARY); // threshold the alpha channel to remove aliased edges // Create the outline mask